【调整】移除分销商及代理商分享记录,重写分销商海报及代理商海报,修复分销商店铺分享url传值错误的问题。

This commit is contained in:
大灰灰
2022-11-15 00:23:06 +08:00
parent e171a77976
commit 11859d3dcf
6 changed files with 97 additions and 26 deletions

View File

@@ -258,7 +258,9 @@
}
this.$u.api.share(data).then(res => {
if (res.status) {
this.$u.route('/pages/share/sharePoster/sharePoster?poster=' + encodeURIComponent(res.data))
data.params.posterUrl = res.data;
data.params.shareType = this.$globalConstVars.shareType.agent;
this.$u.route('/pages/share/shareNewPoster/shareNewPoster' + uni.$u.queryParams(data.params))
} else {
this.$u.toast(res.msg)
}

View File

@@ -109,11 +109,11 @@
icon: '/static/images/distribution/distribution_icon6.png',
router: '/pages/member/agent/rankings/rankings'
},
shareLog: {
name: '分享记录',
icon: '/static/images/distribution/distribution_icon8.png',
router: '/pages/member/agent/shareLog/shareLog'
},
//shareLog: {
// name: '分享记录',
// icon: '/static/images/distribution/distribution_icon8.png',
// router: '/pages/member/agent/shareLog/shareLog'
//},
},
info: {}, //分销商信息
userInfo: {}, // 用户信息
@@ -199,7 +199,9 @@
}
this.$u.api.share(data).then(res => {
if (res.status) {
this.$u.route('/pages/share/sharePoster/sharePoster?poster=' + encodeURIComponent(res.data))
data.params.posterUrl = res.data;
data.params.shareType = this.$globalConstVars.shareType.agent;
this.$u.route('/pages/share/shareNewPoster/shareNewPoster' + uni.$u.queryParams(data.params))
} else {
this.$u.toast(res.msg)
}

View File

@@ -255,7 +255,9 @@
}
this.$u.api.share(data).then(res => {
if (res.status) {
this.$u.route('/pages/share/sharePoster/sharePoster?poster=' + encodeURIComponent(res.data))
data.params.posterUrl = res.data;
data.params.shareType = this.$globalConstVars.shareType.inv;
this.$u.route('/pages/share/shareNewPoster/shareNewPoster' + uni.$u.queryParams(data.params))
} else {
this.$u.toast(res.msg)
}
@@ -274,7 +276,7 @@
};
let userToken = this.$db.get('userToken');
if (userToken && userToken != '') {
data['token'] = userToken;
data.token = userToken
}
this.$u.api.share(data).then(res => {
this.shareUrl = res.data

View File

@@ -108,11 +108,11 @@
icon: '/static/images/distribution/distribution_icon6.png',
router: '/pages/member/distribution/rankings/rankings'
},
shareLog: {
name: '分享记录',
icon: '/static/images/distribution/distribution_icon8.png',
router: '/pages/member/distribution/shareLog/shareLog'
},
//shareLog: {
// name: '分享记录',
// icon: '/static/images/distribution/distribution_icon8.png',
// router: '/pages/member/distribution/shareLog/shareLog'
//},
},
info: {}, //分销商信息
userInfo: {}, // 用户信息
@@ -133,6 +133,7 @@
if (_this.$store.state.config.distributionStore == '1') {
_this.utilityMenus.myStore.router = '/pages/member/distribution/myStore/myStore?store=' + _this.info.store;
}
this.getShareUrl();
} else {
//报错了
_this.$u.toast(res.msg);
@@ -157,7 +158,6 @@
if (res.status) {
_this.userInfo = res.data
}
this.getShareUrl();
})
},
//去提现
@@ -171,10 +171,13 @@
url: this.$globalConstVars.shareUrl,
type: this.$globalConstVars.shareModel.url,
page: this.$globalConstVars.shareType.inv,
params: {
store: this.info.store
},
};
let userToken = this.$db.get('userToken');
if (userToken && userToken != '') {
data['token'] = userToken;
data.token = userToken
}
this.$u.api.share(data).then(res => {
this.shareUrl = res.data
@@ -197,7 +200,9 @@
}
this.$u.api.share(data).then(res => {
if (res.status) {
this.$u.route('/pages/share/sharePoster/sharePoster?poster=' + encodeURIComponent(res.data))
data.params.posterUrl = res.data;
data.params.shareType = this.$globalConstVars.shareType.inv;
this.$u.route('/pages/share/shareNewPoster/shareNewPoster' + uni.$u.queryParams(data.params))
} else {
this.$u.toast(res.msg)
}

View File

@@ -74,7 +74,7 @@
case _this.$globalConstVars.shareType.solitaire:
_this.gotoSolitaire(res.data.params.id);
break;
//接龙
//服务商品
case _this.$globalConstVars.shareType.serviceGoods:
_this.gotoServiceGoods(res.data.params.serviceGoodsId);
break;
@@ -212,7 +212,7 @@
url: '/pages/member/distribution/myStore/myStore',
type: 'redirectTo',
params: {
id: id
store: id
}
})
} else {

View File

@@ -22,12 +22,15 @@
</l-painter-view>
<l-painter-view css="margin-left: 40rpx; margin-top: 30rpx; padding: 32rpx; box-sizing: border-box; background: #fff; border-radius: 16rpx; width: 670rpx; box-shadow: 0 20rpx 58rpx rgba(0,0,0,.15)">
<l-painter-image :src="showModel.image" css="object-fit: cover; object-position: 50% 50%; width: 606rpx; height: 606rpx; border-radius: 12rpx;" />
<l-painter-view css="margin-top: 32rpx; color: #FF0000; font-weight: bold; font-size: 28rpx; line-height: 1em;">
<l-painter-view css="margin-top: 32rpx; color: #FF0000; font-weight: bold; font-size: 28rpx; line-height: 1em;" v-if="showPrice">
<l-painter-text text="¥" css="vertical-align: bottom" />
<l-painter-text :text="showModel.price" css="vertical-align: bottom; font-size: 58rpx" />
<l-painter-text text="元" css="vertical-align: bottom" />
<l-painter-text v-if="showModel.mktprice>0" :text="'¥'+ showModel.mktprice" css="vertical-align: bottom; padding-left: 10rpx; font-weight: normal; text-decoration: line-through; color: #999999" />
</l-painter-view>
<l-painter-view css="margin-top: 32rpx; color: #FF0000; font-weight: bold; font-size: 28rpx; line-height: 1em;" v-if="showStore">
<l-painter-text :text="showModel.storeDesc" css="vertical-align: bottom; font-size: 48rpx" />
</l-painter-view>
<l-painter-view css="margin-top: 32rpx; font-size: 26rpx; color: #8c5400" v-if="showPinTuanArguments">
<l-painter-text :text="'截止:'+showModel.pinTuan.endTime" css="color: #212121; background: #ffb400;" />
<l-painter-text :text="showModel.pinTuan.peopleNumber+'人团'" css="margin-left: 16rpx; background: #fff4d9; text-decoration: line-through;" />
@@ -90,10 +93,12 @@
groupPurchaseSeckill: {
endTime: '',
},
storeDesc: ''
},
showPinTuanArguments: false,
showGroupPurchaseSeckillArguments: false
showGroupPurchaseSeckillArguments: false,
showPrice: true,
showStore: true
};
},
onLoad(options) {
@@ -133,7 +138,8 @@
})
}
})
} else if (options.shareType == _this.$globalConstVars.shareType.pinTuan) {
}
else if (options.shareType == _this.$globalConstVars.shareType.pinTuan) {
let data = {
id: parseInt(options.groupId),
data: false,
@@ -167,7 +173,8 @@
})
}
})
} else if (options.shareType == _this.$globalConstVars.shareType.serviceGoods) {
}
else if (options.shareType == _this.$globalConstVars.shareType.serviceGoods) {
let data = {
id: parseInt(options.serviceGoodsId),
data: false,
@@ -198,7 +205,8 @@
}
})
} else if (options.shareType == _this.$globalConstVars.shareType.seckill) {
}
else if (options.shareType == _this.$globalConstVars.shareType.seckill) {
let data = {
id: parseInt(options.groupId),
type: _this.$globalConstVars.shareType.seckill,
@@ -236,7 +244,8 @@
})
}
})
} else if (options.shareType == _this.$globalConstVars.shareType.group) {
}
else if (options.shareType == _this.$globalConstVars.shareType.group) {
let data = {
id: parseInt(options.groupId),
type: _this.$globalConstVars.shareType.seckill,
@@ -274,7 +283,58 @@
})
}
})
}
else if (options.shareType == _this.$globalConstVars.shareType.inv) {
_this.$u.api.getDistributionStoreInfo({
id: options.store
}).then(res => {
if (res.status) {
_this.showModel.describe = '共有' + res.data.totalGoods + '件商品供您选择';
_this.showModel.name = res.data.storeDesc ? res.data.storeDesc : "欢迎您访问我的店铺";
_this.showModel.storeDesc = res.data.storeName ? res.data.storeName : "我的店铺";
_this.showModel.image = res.data.storeLogo ? res.data.storeLogo : '/static/images/common/empty.png';
_this.showPrice = false;
setTimeout(function () {
_this.canvasToTempFilePath();
uni.hideLoading();
}, 1000);
} else {
_this.$refs.uToast.show({
message: res.msg, type: 'error', complete: function () {
uni.navigateBack({
delta: 1
});
}
})
}
});
}
else if (options.shareType == _this.$globalConstVars.shareType.agent) {
_this.$u.api.getAgentInfo({
id: options.store
}).then(res => {
if (res.status) {
_this.showModel.describe = '共有' + res.data.totalGoods + '件商品供您选择';
_this.showModel.name = res.data.storeDesc ? res.data.storeDesc : "欢迎您访问我的店铺";
_this.showModel.storeDesc = res.data.storeName ? res.data.storeName : "我的店铺";
_this.showModel.image = res.data.storeLogo ? res.data.storeLogo : '/static/images/common/empty.png';
_this.showPrice = false;
setTimeout(function () {
_this.canvasToTempFilePath();
uni.hideLoading();
}, 1000);
} else {
_this.$refs.uToast.show({
message: res.msg, type: 'error', complete: function () {
uni.navigateBack({
delta: 1
});
}
})
}
});
}
},
computed: {