添加分享页面分享按钮

master
xcw 2023-02-23 10:22:52 +08:00
parent eba57daf4b
commit 710aabb57f
4 changed files with 23 additions and 14 deletions

View File

@ -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();
})

View File

@ -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:{}, //
}

View File

@ -19,16 +19,16 @@
</view>
<view class="mar-s30 pad-zy20 bacf boxshow2">
<view class=" col26 pad-sx20 pad-zy10 disac borbot" v-for="(item,index) in dataList" :key="index">
<image :src="item.account.headimgurl" class="flexs radius_100 mar-y20" style="width: 78rpx;height: 78rpx;" mode="aspectFill" lazy-load></image>
<image :src="item.headimgurl" class="flexs radius_100 mar-y20" style="width: 78rpx;height: 78rpx;" mode="aspectFill" lazy-load></image>
<view class="width100">
<view class="disjbac">
<view class="fon24 colb">{{item.account.nickname}}</view>
<view class="col-e42417 fon24">+{{item.num}}</view>
<view class="fon24 colb">{{item.nickname}}</view>
<view class="col-e42417 fon24">+{{item.total_score ? item.total_score : 0}}</view>
</view>
<view class="disjbac" style="margin-top: 6rpx;">
<!-- <view class="disjbac" style="margin-top: 6rpx;">
<view class="fon20" style="color: #747474;" v-if="item.created_at">{{item.created_at.split('-').join('.')}}</view>
<view class="fon24">{{item.name}}</view>
</view>
</view> -->
</view>
</view>
</view>
@ -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];

View File

@ -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: ``//PNGJPG 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();