123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>个人资料-创业帮</title>
- <meta name="keywords" content="个人资料-创业帮">
- <meta name="description" content="个人资料-创业帮">
- <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <meta content="telephone=no" name="format-detection">
- <meta content="email=no" name="format-detection">
- <meta name="apple-mobile-web-app-title" content="个人资料-创业帮">
- <meta http-equiv="Cache-Control" content="no-siteapp">
- <link rel="stylesheet" href="./static/css/crop.css">
- <link rel="stylesheet" href="./static/css/main.css">
- </head>
- <body class="bgc-back pt0 ovh" style="padding-top:0;">
- <div id="app">
- <van-nav-bar class="user_rank_explan_title user_title_normal" left-arrow title="个人资料" v-if="toptitleisshow" @click-left="goback">
- <template #left>
- <van-icon name="arrow-left"></van-icon>
- </template>
- </van-nav-bar>
- <van-cell-group class="top_line user_info_userphoto" :border="false" v-cloak>
- <van-cell is-link center @click="uploadphoto">
- <template #title><span>头像</span></template>
- <template #default><img class="user-info-header" :src="PublicLib.CachePicture({picUrl:userinfo.HeadPhoto,domid:'usercenterimg'})" id="usercenterimg" style="border-radius:50%;" v-cloak></template>
- </van-cell>
- <van-cell title="姓名" value="创业帮001"></van-cell>
- </van-cell-group>
- <van-cell-group class="bt8f7f7f7" :border="false" v-cloak>
- <van-cell title="手机" :value="userinfo.Mobile"></van-cell>
- <van-cell title="我的推荐码">
- <template #right-icon>
- <div class="f12 dib c999 pr16" id="inviteCode">{{userinfo.MakerCode}}</div>
- <van-button plain size="mini" :data-clipboard-text="userinfo.MakerCode" data-clipboard-action="copy" data-clipboard-target="#inviteCode" ref="copy" @click="copyCode">复制</van-button>
- </template>
- </van-cell>
- <van-cell title="我的名片" is-link @click="mycard">
- <template #default>
- <van-icon name="qr"></van-icon>
- </template>
- </van-cell>
- </van-cell-group>
- <van-cell-group class="bt8f7f7f7" :border="false" v-cloak>
- <van-cell title="我的推荐人" :value="userinfo.InviteName"></van-cell>
- <van-cell title="推荐人联系电话" :value="userinfo.InviteMobile">
- <template #right-icon>
- <div class="f12 dib c999 pr16"></div>
- <van-button plain size="mini" @click="takephone(userinfo.InviteMobile)">拨号</van-button>
- </template>
- </van-cell>
- </van-cell-group>
- <input type="file" accept="image/*" id="upload" style="display:none;">
- </div>
- <script src="./static/js/clipboard.min.js"></script>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/appfunc.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script src="./static/js/publicfn.js"></script>
- <script src="./static/js/exif.js"></script>
- <script src="./static/js/transformation-matrix.js"></script>
- <script src="./static/js/prefix-umd.js"></script>
- <script src="./static/js/index.js"></script>
- <script>
- //上回后回调方法,用于调用缩放、裁切、旋转功能
- function AppUpload(imgpath) {
- setTimeout(function () {
- PublicLib.WapCropForApp(300, 300, 'upload', imgpath, 1);
- }, 300);
- };
- //裁切结束后回调方法
- function ShowPhoto(url) {
- //获取最终的图片地址
- app.uploadheadhpotofn(url);
- };
- //初始化crop
- if (isWeb) {
- PublicLib.WapCrop(1000, 1000, 'upload', 1);
- };
-
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
-
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- toptitleisshow:false,
- active: 0,
- realauth:false,
- checked: false,
- copyBtn: {},
- userinfo:{
- HeadPhoto:"./static/images/user-img@3x.png",
- },
- flag:0,
- };
- },
- created() {
- this.toptitleisshow = toptitleisshow;
- this.getuserinfo();
- const that = this;
- this.$nextTick(()=>{
- that.copyBtn = new ClipboardJS(this.$refs.copy);
- });
- this.verificationrealauth();
- },
- methods: {
- async getuserinfo(){
- PublicLib.ShowLoading({Message:''});
- const Id = PublicLib.getCookieInfo('userId');
- const res = await getRequest('api/v1/users/personalinfo',JSON.stringify({Id}));
- if(res.status !== '1') return tips('获取创客信息失败!')
- PublicLib.HideLoading();
- this.userinfo = res.data;
- //- this.userinfo.InviteMobile = '111111';
- },
- giveToast(str){
- vant.Toast(str);
- },
- copyCode(){
- const that = this;
- const clipboard = that.copyBtn;
- clipboard.on('success', function(e) {
- that.giveToast('复制成功');
- });
- clipboard.on('error', function(e) {
- that.giveToast('复制失败,请手动选择复制!');
- });
- },
- async verificationrealauth(){
- const Id = PublicLib.getCookieInfo('userId');
- const userinfo = await getRequest('api/v1/users/personalinfo',JSON.stringify({Id}));
- //- 是否实名认证完毕
- if(userinfo.data.AuthFlag !== 1) {
- this.realauth = true;
- }else{
- this.realauth = false;
- };
- },
- //- 点击了我的名片
- mycard(){
- if(this.realauth){
- PublicLib.ShowDialog({
- Title:'暂未实名认证',
- Message:'是否去实名认证?',
- ConfirmText:'去实名',
- CancelText:'暂不实名',
- ConfirmAction:'app.goAuth()',
- CanelAction:''
- });
- return;
- }
- PublicLib.Goto({Url:'user-myqrcode'});
- },
- goAuth(){
- PublicLib.Goto({Url:'user-realauth'});
- },
- //- 拨打电话
- takephone(phonenum){
- PublicLib.PhoneCall(phonenum);
- },
- goback(){
- PublicLib.GoBack({Level:1});
- },
- //- 上传头像
- uploadphoto(){
- PublicLib.UploadPhoto({
- Quality:1,
- PhotoCount:1,
- Width:300,
- Height:300,
- });
- },
- //- 上传头像到个人资料
- async uploadheadhpotofn(HeadPhoto){
- const Id = PublicLib.getCookieInfo('userId');
- const res = await postRequest('api/v1/users/uploadheadphoto',JSON.stringify({Id,HeadPhoto}));
- if(res.status !== '1') return tips('上传头像失败,请重试!');
- tips('上传头像成功!');
- this.userinfo.HeadPhoto = showHost + HeadPhoto;
- }
- }
- });
- </script>
- </body>
- </html>
|