Commit 80cbf17b510ecd8f073220fed3ccb47e9d048e39

Authored by pengye
1 parent db54ec94

买券或者充值,跳转到confirmPayment付款页面需要获取邀请函模板

... ... @@ -14,13 +14,13 @@ Page({
sid:'',
types:'1',//1是邀请函过来的(邀请函的券或者点击意见反馈买券) 2是商家APP分享的
rid:'',
StyleType:'',//邀请函模板
},
use:{},
detail:{},
exp_date:{},
num: 1,
totalize: '',
StyleType:'',//邀请函模板
explain: "关于代金券不得不说的那些事,关于代金券不得不说的那些事,关于代金券不得不说的那些事,关于代金券不得不说的那些事",
},
... ... @@ -34,7 +34,7 @@ Page({
name:options.name,
sid:options.sid,
oid:options.oid,
types:options.types,
types:options.types,//1是邀请函过来的(邀请函的券或者点击意见反馈买券) 2是邀请函 3是商家APP分享的或者短信的链接
rid:options.rid?options.rid:'',
StyleType:options.StyleType|| '1',
}
... ... @@ -180,8 +180,9 @@ Page({
})
return
}
// 跳转到支付页,types传参 1邀请函 2提前点餐 3商家端app分享
wx.navigateTo({
url: `./confirmPayment?sid=${this.data.opt.sid}&sellerName=${this.data.opt.name}&oid=${this.data.opt.oid}&rid=${this.data.opt.rid?this.data.opt.rid:''}&type=1&detail=${JSON.stringify(detail)}&combine_out_trade_no=${res.data.combine_out_trade_no}&totalize=${this.data.totalize}&types=${this.data.opt.types}&StyleType=${this.data.opt.StyleType}`,
url: `./confirmPayment?sid=${this.data.opt.sid}&sellerName=${this.data.opt.name}&oid=${this.data.opt.oid}&rid=${this.data.opt.rid?this.data.opt.rid:''}&type=1&detail=${JSON.stringify(detail)}&combine_out_trade_no=${res.data.combine_out_trade_no}&totalize=${this.data.totalize}&types=1&StyleType=${this.data.opt.StyleType}`,
})
}else{
wx.showToast({
... ...
... ... @@ -56,10 +56,8 @@ Page({
sellerName: options.sellerName ? options.sellerName : '',
},
type: options.type,
StyleType: options.StyleType,
})
console.log('onLoad',{...this.data.opt});
console.log('StyleType',options.StyleType);
let obj = wx.getStorageSync('info')
console.log('objobjobjobj',{...obj})
if (obj) {
... ... @@ -73,6 +71,19 @@ Page({
}
this.countdown()
this.modal = this.selectComponent("#payModal"); //通过给组件所起的id调用组件
this.getSellerTemplateConfFun(options.sid)
},
// 获取商家设置营销信息---获取模板
getSellerTemplateConfFun(sid){
App.Seller.GetSellerTemplateConf({
sid
}).then(res => {
let StyleType = res.data.type;
this.setData({
StyleType
})
console.log('StyleType',options.StyleType);
})
},
// 购买完成券之后关注公众号
wananchi() {
... ...
... ... @@ -98,7 +98,7 @@ Page({
if(res.ret=='200'){
let url = util.http_build_query({
type:'2',
types: this.data.opt.types,
types: '1',// 1邀请函 2提前点餐 3商家端app分享
detail: JSON.stringify(detail),
sid: this.data.opt.sid,
combine_out_trade_no:res.data.combine_out_trade_no,
... ...