Commit 84f4c1cc66f0a1b0fe8dc72b5692c2da100e699f

Authored by pengye
1 parent cfe542ee

跳转到邀请函页面判断商家是哪种模板

... ... @@ -59,6 +59,7 @@ Page({
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) {
... ... @@ -84,12 +85,12 @@ Page({
this.modal.showModal() //调用组件中打开模态框方法
},
confirmPayment(gid) {
let that = this;
App.PayOnline.CombineTransactionsByNewRecharge({
combine_out_trade_no: this.data.opt.combine_out_trade_no,
gid:gid?gid:'',
}).then(res => {
console.log(res.data);
let that = this;
if (res.ret != '200') {
wx.showToast({
title: res.msg,
... ... @@ -140,9 +141,10 @@ Page({
},
// 支付失败回调 types 1邀请函 2提前点餐 3商家端app分享
callbackFun() {
let url = '/pages/customer/detail_owner_invitation_new1?id=' + that.data.opt.detail.oid;
let that = this;
let url = '/pages/customer/detail_owner_invitation_new1?id=' + that.data.opt.detail.oid;
if(that.data.opt.types == '1'){
console.log('StyleType',this.data.StyleType);
switch (this.data.StyleType) {
case '1':
url = '/pages/customer/detail_owner_invitation_new1?id=' + that.data.opt.detail.oid;
... ... @@ -174,6 +176,7 @@ Page({
// 充值后跳转
recharge() {
console.log('充值完成跳转', this.data.opt.detail.oid);
console.log('StyleType',this.data.StyleType);
this.closeModal()
let url=`/pages/customer/detail_owner_invitation_new1?id=${this.data.opt.detail.oid}&hasInvitation=1&hasSellerShare=1&tplid=1`
switch (this.data.StyleType) {
... ...
... ... @@ -18,6 +18,7 @@ Page({
exp_date:{},
detail:{},
recharge_list:{},
StyleType:'',//邀请函模板
},
/**
... ... @@ -32,7 +33,8 @@ Page({
sid:options.sid,
oid:options.oid,
types:options.types,
rid:options.rid?options.rid:''
rid:options.rid?options.rid:'',
StyleType:options.StyleType|| '1',
}
})
console.log('onLoad',{...this.data.opt});
... ... @@ -103,7 +105,8 @@ Page({
totalize:this.data.detail.recharge_money,
sellerName: this.data.opt.name,
oid: this.data.opt.oid,
rid:this.data.opt.rid?this.data.opt.rid:''
rid:this.data.opt.rid?this.data.opt.rid:'',
StyleType:this.data.opt.StyleType,
}, './confirmPayment')
wx.navigateTo({
url
... ...
... ... @@ -248,7 +248,7 @@
{{recharge_data.recharge_list.is_coupons=='1'?'会员充值满'+marketing.recharge_data.recharge_money+'元赠送'+certificate:''}}。
</view>
</view>
<navigator url="/pack-activity/pack/vipRecharge?id={{recharge_data.id}}&name={{seller.name}}&sid={{seller.sid}}&oid={{detail.id}}&types=1" hover-class="navigator-hover">
<navigator url="/pack-activity/pack/vipRecharge?id={{recharge_data.id}}&name={{seller.name}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="font24r orderingFood">
去充值
</view>
... ...
... ... @@ -151,7 +151,7 @@
{{recharge_data.recharge_list.is_coupons=='1'?'会员充值满'+marketing.recharge_data.recharge_money+'元赠送'+certificate:''}}。
</view>
</view>
<navigator url="/pack-activity/pack/vipRecharge?id={{recharge_data.id}}&name={{seller.name}}&sid={{seller.sid}}&oid={{detail.id}}&types=1" hover-class="navigator-hover">
<navigator url="/pack-activity/pack/vipRecharge?id={{recharge_data.id}}&name={{seller.name}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="font24r orderingFood">
去充值
</view>
... ...
... ... @@ -141,30 +141,31 @@ Page({
console.log(res.data.openid,'resdataopenidopenidopenidopenid');
console.log(opt.hasInvitation,'hasInvitation');
console.log(opt.openid,'optopenidoptopenidopt.openid');
console.log('type',res.data.temp_config_type);
console.log('type',res.data.seller.temp_config_type);
let configType=res.data.seller.temp_config_type
if (!res.data.openid) {//无预订人
url = '/pages/customer/detail_owner';
if (opt.hasInvitation == 1 && is_new=='1' && res.data.temp_config_type=='1') {
if (opt.hasInvitation == 1 && is_new=='1' && configType=='1') {
url = '/pages/customer/detail_owner_invitation_new1';
}else if(opt.hasInvitation == 1 && is_new=='1' && res.data.temp_config_type=='2') {
}else if(opt.hasInvitation == 1 && is_new=='1' && configType=='2') {
url = '/pages/customer/detail_owner_invitation_new2';
}else{
url = '/pages/customer/detail_owner_invitation';
}
} else {
url = '/pages/customer/detail_customer';
if (opt.hasInvitation == 1 && is_new=='1' && res.data.temp_config_type=='1') {
if (opt.hasInvitation == 1 && is_new=='1' && configType=='1') {
url = '/pages/customer/detail_owner_invitation_new1';
}else if(opt.hasInvitation == 1 && is_new=='1' && res.data.temp_config_type=='2') {
}else if(opt.hasInvitation == 1 && is_new=='1' && configType=='2') {
url = '/pages/customer/detail_owner_invitation_new2';
}else{
url = '/pages/customer/detail_invitation';
}
if (res.data.openid == opt.openid) {
url = '/pages/customer/detail_owner';
if (opt.hasInvitation == 1 && is_new=='1' && res.data.temp_config_type=='1') {
if (opt.hasInvitation == 1 && is_new=='1' && configType=='1') {
url = '/pages/customer/detail_owner_invitation_new1';
}else if(opt.hasInvitation == 1 && is_new=='1' && res.data.temp_config_type=='2') {
}else if(opt.hasInvitation == 1 && is_new=='1' && configType=='2') {
url = '/pages/customer/detail_owner_invitation_new2';
}else{
url = '/pages/customer/detail_owner_invitation';
... ...
// pages/me/wananchi.js
import App from '../../utils/api';
Page({
/**
... ... @@ -24,16 +25,17 @@ Page({
console.log('options',options);
},
navEvent(){
let that=this;
App.Seller.GetSellerTemplateConf({
sid:this.data.sid
}).then(res => {
let url='/pages/customer/detail_owner_invitation_new1?id='+this.data.oid
let url='/pages/customer/detail_owner_invitation_new1?id='+that.data.oid
switch (res.data.type) {
case '1':
url = '/pages/customer/detail_owner_invitation_new1?id='+this.data.oid
url = '/pages/customer/detail_owner_invitation_new1?id='+that.data.oid
break;
case '2':
url = '/pages/customer/detail_owner_invitation_new2??id='+this.data.oid
url = '/pages/customer/detail_owner_invitation_new2?id='+that.data.oid
break;
}
return wx.reLaunch({
... ...