添加分享页面分享按钮
parent
eba57daf4b
commit
710aabb57f
|
@ -78,7 +78,7 @@
|
||||||
});
|
});
|
||||||
this.$requst.upload('/api/file/upload/image',{path:url}).then(res=>{
|
this.$requst.upload('/api/file/upload/image',{path:url}).then(res=>{
|
||||||
if(res.code==0) {
|
if(res.code==0) {
|
||||||
this.userInfo.avatarUrl = `${getApp().globalData.hostapi}`+res.data.src;
|
this.userInfo.avatarUrl = res.data.src;
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
})
|
})
|
||||||
|
|
|
@ -66,8 +66,8 @@
|
||||||
{src:'/static/tabbar/icon-score.png',title:'我的积分'},
|
{src:'/static/tabbar/icon-score.png',title:'我的积分'},
|
||||||
{src:'/static/tabbar/icon-address.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-znz.png',title:'我的分享'},
|
{src:'/static/tabbar/icon-panh.png',title:'我的分享'},
|
||||||
], // 导航列表
|
], // 导航列表
|
||||||
userInfo:{}, //用户信息
|
userInfo:{}, //用户信息
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,16 +19,16 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="mar-s30 pad-zy20 bacf boxshow2">
|
<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">
|
<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="width100">
|
||||||
<view class="disjbac">
|
<view class="disjbac">
|
||||||
<view class="fon24 colb">{{item.account.nickname}}</view>
|
<view class="fon24 colb">{{item.nickname}}</view>
|
||||||
<view class="col-e42417 fon24">+{{item.num}}</view>
|
<view class="col-e42417 fon24">+{{item.total_score ? item.total_score : 0}}</view>
|
||||||
</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="fon20" style="color: #747474;" v-if="item.created_at">{{item.created_at.split('-').join('.')}}</view>
|
||||||
<view class="fon24">{{item.name}}</view>
|
<view class="fon24">{{item.name}}</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -59,11 +59,13 @@
|
||||||
loading:false,
|
loading:false,
|
||||||
//二维码相关参数
|
//二维码相关参数
|
||||||
textstr:`https://chuanwujia.com/share?invite_code=${uni.getStorageSync('invite_code')}`,
|
textstr:`https://chuanwujia.com/share?invite_code=${uni.getStorageSync('invite_code')}`,
|
||||||
scoreInfo:''
|
scoreInfo:'',
|
||||||
|
hostapi:'',// 域名
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
this.hostapi = getApp().globalData.hostapi;
|
||||||
// this.getCode();
|
// this.getCode();
|
||||||
this.getExtend();
|
this.getExtend();
|
||||||
},
|
},
|
||||||
|
@ -92,10 +94,10 @@
|
||||||
page:this.page,
|
page:this.page,
|
||||||
size:this.size
|
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){
|
if(res.code==0){
|
||||||
console.log(res,'推广人信息')
|
console.log(res,'推广人信息')
|
||||||
this.scoreInfo = res.data.promotion_score;
|
this.scoreInfo = res.data.total_share_score;
|
||||||
this.total = res.data.list.total;
|
this.total = res.data.list.total;
|
||||||
if(this.page==1){this.dataList=[];}
|
if(this.page==1){this.dataList=[];}
|
||||||
this.dataList = [...this.dataList,...res.data.list.list];
|
this.dataList = [...this.dataList,...res.data.list.list];
|
||||||
|
|
|
@ -29,21 +29,28 @@
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.qrCode();
|
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: {
|
methods: {
|
||||||
// 生成二维码
|
// 生成二维码
|
||||||
qrCode() {
|
qrCode() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title:'正在生成推广码',
|
title:'正在生成推广码',
|
||||||
icon:'loading',
|
icon:'loading',
|
||||||
duration:5000
|
duration:4000
|
||||||
})
|
})
|
||||||
|
|
||||||
// 生成推广码
|
// 生成推广码
|
||||||
this.$requst.get('/api/user/personal-poster').then(res=>{
|
this.$requst.get('/api/user/personal-poster').then(res=>{
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
this.shareImg = res.data.poster;
|
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
this.shareImg = res.data.poster;
|
||||||
}
|
}
|
||||||
}).catch(err=>{
|
}).catch(err=>{
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|
Loading…
Reference in New Issue