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

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

View File

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