添加:文创豆商城添加分享任务,分享内容支持后台设置

This commit is contained in:
wuhui_zzw 2023-12-11 17:29:09 +08:00
parent d21895c86a
commit 4aec585007
2 changed files with 27 additions and 20 deletions

View File

@ -960,7 +960,8 @@ var fun = {
"/member/courseindex", "/member/courseindex",
"/member/payanother/", "/member/payanother/",
"/enrollEnter/", "/enrollEnter/",
'/activityHome' '/activityHome',
'/member/legumes/shopping'
]; ];
for (let i = 0; i < list.length; i++) { for (let i = 0; i < list.length; i++) {
@ -995,6 +996,7 @@ var fun = {
$http.post("member.member.wxJsSdkConfig", requestData).then( $http.post("member.member.wxJsSdkConfig", requestData).then(
response => { response => {
if (response.result === 1) { if (response.result === 1) {
console.log('配置信息',response.data);
if (response.data.config && response.data.config.appId) { if (response.data.config && response.data.config.appId) {
if (shareFun) { if (shareFun) {
shareFun(response.data); shareFun(response.data);

View File

@ -229,6 +229,7 @@ export default {
videoTime: '', videoTime: '',
task_status: false,// task_status: false,//
is_show: false, is_show: false,
share_config: {},
withdrawal_num: '',// withdrawal_num: '',//
is_video_show: false,// is_video_show: false,//
account_info: {},// account_info: {},//
@ -266,7 +267,8 @@ export default {
_this.getAccountInfo(); _this.getAccountInfo();
// //
_this.$nextTick(() => { _this.$nextTick(() => {
//_this.is_show_share = _this.fun.getTyep() == 1; _this.getShareSet();
_this.is_show_share = _this.fun.getTyep() == 1;
}); });
}, },
methods: { methods: {
@ -326,6 +328,19 @@ export default {
_this.getGoodsList(); _this.getGoodsList();
} }
}, },
//
getShareSet() {
let _this = this;
$http.get("plugin.cultural-space.api.index.getShopShareInfo", {}, "加载中...")
.then(response => {
if (response.result === 1) {
_this.share_config = response.data;
}
})
.catch(error => {
console.log(error);
});
},
// //
getAccountInfo(){ getAccountInfo(){
let _this = this; let _this = this;
@ -395,25 +410,15 @@ export default {
} else { } else {
// //
_this.$dialog.alert({message: "请点击右上角微信分享"}); _this.$dialog.alert({message: "请点击右上角微信分享"});
let shareConfig = { //
title: '这里是分享标题', _this.fun.wxShare("", {mid: _this.fun.getKeyByMid()}, _this.share_config , data => {
imgUrl: '', console.log('配置信息',data);
description: '这里是描述信息', }, success => {
// link: '' _this.task_status = true;
}; _this.$dialog.alert({message: "分享成功"}).then(() => {
_this.fun.wxShare("", {mid: _this.fun.getKeyByMid()}, shareConfig, _this.submitWithdrawal();//
data => {},
success => {
_this.task_status = true;
_this.$dialog.alert({message: "分享成功"}).then(()=>{
_this.$dialog.alert({message: "分享成功,触发自动提交!"});
// _this.submitWithdrawal();//
});
}); });
});
} }
}, },
// - // -