分享优化

master
Lee 2022-10-29 10:13:05 +08:00
parent f378c82dd4
commit 587a6b2db6
22 changed files with 55 additions and 31 deletions

View File

@ -175,14 +175,31 @@
} else this.$toolAll.tools.showToast(res.msg); } else this.$toolAll.tools.showToast(res.msg);
},error=>{}) },error=>{})
this.timer = setInterval(()=>{ this.timer = setInterval(()=>{
this.$requst.post('staff/coupon/write-off-experience-couponQuery',{coupon_id:this.dataList[index].id,secret:this.secret}).then(res=>{ var params = {coupon_id:this.dataList[index].id,secret:this.secret}
if(res.code==0){ uni.request({
// if(res.data.result==0){ url: `${uni.getStorageSync('hostapi')}staff/coupon/write-off-experience-couponQuery`,
this.$toolAll.tools.showToast('使用成功'); method: 'POST',
this.isTY = false; data: params,
clearInterval(this.timer); header:{
this.checkAllList(0); 'Content-Type': 'application/json; charset=UTF-8',
// } 'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
},
success: res => {
if(res.data.code==0){
// if(res.data.result==0){
this.$toolAll.tools.showToast('使用成功');
this.isTY = false;
clearInterval(this.timer);
this.checkAllList(0);
// }
}else if(res.data.code==200){
return false;
}else{
uni.showToast({
title:res.data.msg,
icon:'none'
})
}
} }
}) })
},3000) },3000)

View File

@ -61,7 +61,9 @@
title:'优惠券组', title:'优惠券组',
richText:'', richText:'',
groupId:'', groupId:'',
ifLing:false ifLing:false,
share_img:'', //
share_title:'', //
} }
}, },
computed:{ computed:{
@ -74,11 +76,14 @@
} }
}, },
onShareAppMessage() { onShareAppMessage() {
// tools.js
console.log(`${this.$http}${this.share_img}`,`${this.share_title}`,212121212)
var shareObj = { var shareObj = {
title: `${ya.detailObj.title}`, // (slogan) title: `${this.share_title}`, // (slogan)
path: `/pagesB/couponGroup/couponGroup?group_id=${this.groupId}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // / path: `/pagesB/couponGroup/couponGroup?group_id=${this.groupId}&share_id=${uni.getStorageSync('userId')}&invite_code=${uni.getStorageSync('invite_code')}`, // /
imageUrl: `` //PNGJPG imageUrl 使 5:4 imageUrl: `${this.$http}${this.share_img}` //PNGJPG imageUrl 使 5:4
}; };
return shareObj;
}, },
onLoad(op) { onLoad(op) {
if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){ if(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){
@ -115,6 +120,8 @@
this.richText = this.$toolAll.tools.escape2Html(res.data.content); this.richText = this.$toolAll.tools.escape2Html(res.data.content);
this.dataList = []; this.dataList = [];
this.zcList = []; this.zcList = [];
this.share_img = res.data.share_img;
this.share_title = res.data.title;
if(res.data.coupon.length!=0){ if(res.data.coupon.length!=0){
res.data.coupon.forEach(item=>{ res.data.coupon.forEach(item=>{
let obj = { let obj = {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long