分享优化
parent
f378c82dd4
commit
587a6b2db6
|
@ -175,14 +175,31 @@
|
|||
} else this.$toolAll.tools.showToast(res.msg);
|
||||
},error=>{})
|
||||
this.timer = setInterval(()=>{
|
||||
this.$requst.post('staff/coupon/write-off-experience-couponQuery',{coupon_id:this.dataList[index].id,secret:this.secret}).then(res=>{
|
||||
if(res.code==0){
|
||||
// if(res.data.result==0){
|
||||
this.$toolAll.tools.showToast('使用成功');
|
||||
this.isTY = false;
|
||||
clearInterval(this.timer);
|
||||
this.checkAllList(0);
|
||||
// }
|
||||
var params = {coupon_id:this.dataList[index].id,secret:this.secret}
|
||||
uni.request({
|
||||
url: `${uni.getStorageSync('hostapi')}staff/coupon/write-off-experience-couponQuery`,
|
||||
method: 'POST',
|
||||
data: params,
|
||||
header:{
|
||||
'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)
|
||||
|
|
|
@ -61,7 +61,9 @@
|
|||
title:'优惠券组',
|
||||
richText:'',
|
||||
groupId:'',
|
||||
ifLing:false
|
||||
ifLing:false,
|
||||
share_img:'', //分享图片
|
||||
share_title:'', //分享标签
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
|
@ -74,11 +76,14 @@
|
|||
}
|
||||
},
|
||||
onShareAppMessage() {
|
||||
// 调用tools.js中的种植埋点事件
|
||||
console.log(`${this.$http}${this.share_img}`,`${this.share_title}`,212121212)
|
||||
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')}`, // 默认是当前页面,必须是以‘/’开头的完整路径
|
||||
imageUrl: `` //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||
imageUrl: `${this.$http}${this.share_img}` //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
|
||||
};
|
||||
return shareObj;
|
||||
},
|
||||
onLoad(op) {
|
||||
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.dataList = [];
|
||||
this.zcList = [];
|
||||
this.share_img = res.data.share_img;
|
||||
this.share_title = res.data.title;
|
||||
if(res.data.coupon.length!=0){
|
||||
res.data.coupon.forEach(item=>{
|
||||
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
Loading…
Reference in New Issue