From 710aabb57f82dc820722304bb996a04e69af7578 Mon Sep 17 00:00:00 2001 From: xcw Date: Thu, 23 Feb 2023 10:22:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E4=BA=AB=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=88=86=E4=BA=AB=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/login/login.vue | 2 +- pages/tabbar/my/my.vue | 4 ++-- pagesA/my-extend/my-extend.vue | 18 ++++++++++-------- pagesA/my-share/my-share.vue | 13 ++++++++++--- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/pages/login/login.vue b/pages/login/login.vue index b7db3b5..66ad4e9 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -78,7 +78,7 @@ }); this.$requst.upload('/api/file/upload/image',{path:url}).then(res=>{ if(res.code==0) { - this.userInfo.avatarUrl = `${getApp().globalData.hostapi}`+res.data.src; + this.userInfo.avatarUrl = res.data.src; } uni.hideLoading(); }) diff --git a/pages/tabbar/my/my.vue b/pages/tabbar/my/my.vue index 1742cc7..444909c 100644 --- a/pages/tabbar/my/my.vue +++ b/pages/tabbar/my/my.vue @@ -66,8 +66,8 @@ {src:'/static/tabbar/icon-score.png',title:'我的积分'}, {src:'/static/tabbar/icon-address.png',title:'我的地址'}, {src:'/static/tabbar/icon-znz.png',title:'观看记录'}, - {src:'/static/tabbar/icon-znz.png',title:'我的推广'}, - {src:'/static/tabbar/icon-znz.png',title:'我的分享'}, + {src:'/static/tabbar/icon-set.png',title:'我的推广'}, + {src:'/static/tabbar/icon-panh.png',title:'我的分享'}, ], // 导航列表 userInfo:{}, //用户信息 } diff --git a/pagesA/my-extend/my-extend.vue b/pagesA/my-extend/my-extend.vue index 724ea01..cb5a9f9 100644 --- a/pagesA/my-extend/my-extend.vue +++ b/pagesA/my-extend/my-extend.vue @@ -19,16 +19,16 @@ - + - {{item.account.nickname}} - +{{item.num}} + {{item.nickname}} + +{{item.total_score ? item.total_score : 0}} - + @@ -59,11 +59,13 @@ loading:false, //二维码相关参数 textstr:`https://chuanwujia.com/share?invite_code=${uni.getStorageSync('invite_code')}`, - scoreInfo:'' + scoreInfo:'', + hostapi:'',// 域名 } }, onLoad() { this.loading = true; + this.hostapi = getApp().globalData.hostapi; // this.getCode(); this.getExtend(); }, @@ -92,10 +94,10 @@ page:this.page, size:this.size } - this.$requst.get('/api/user/sales',params).then(res=>{ + this.$requst.get('/api/user/my-share-account',params).then(res=>{ if(res.code==0){ console.log(res,'推广人信息') - this.scoreInfo = res.data.promotion_score; + this.scoreInfo = res.data.total_share_score; this.total = res.data.list.total; if(this.page==1){this.dataList=[];} this.dataList = [...this.dataList,...res.data.list.list]; diff --git a/pagesA/my-share/my-share.vue b/pagesA/my-share/my-share.vue index f5b4590..a58773d 100644 --- a/pagesA/my-share/my-share.vue +++ b/pagesA/my-share/my-share.vue @@ -29,21 +29,28 @@ onLoad() { this.qrCode(); }, - + onShareAppMessage(res) { + var shareObj = { +      title: ``, // 默认是小程序的名称(可以写slogan等) +      path: `/pages/tabbar/pagehome/pagehome?invite_code=${uni.getStorageSync('invite_code')}`, // 默认是当前页面,必须是以‘/’开头的完整路径 +      imageUrl: ``//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4 +   }; +   return shareObj; + }, methods: { // 生成二维码 qrCode() { uni.showLoading({ title:'正在生成推广码', icon:'loading', - duration:5000 + duration:4000 }) // 生成推广码 this.$requst.get('/api/user/personal-poster').then(res=>{ if(res.code==0){ - this.shareImg = res.data.poster; uni.hideLoading(); + this.shareImg = res.data.poster; } }).catch(err=>{ uni.hideLoading();