Commit cd2e737e7c2b8c79054acbd60d4cc851d83dd25d

Authored by pengye
1 parent c4a73c5a

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

... ... @@ -20,6 +20,7 @@ Page({
exp_date:{},
num: 1,
totalize: '',
StyleType:'',//邀请函模板
explain: "关于代金券不得不说的那些事,关于代金券不得不说的那些事,关于代金券不得不说的那些事,关于代金券不得不说的那些事",
},
... ... @@ -35,6 +36,7 @@ Page({
oid:options.oid,
types:options.types,
rid:options.rid?options.rid:'',
StyleType:options.StyleType|| '1',
}
})
console.log('onLoad',{...this.data.opt});
... ... @@ -179,7 +181,7 @@ Page({
return
}
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}`,
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}`,
})
}else{
wx.showToast({
... ...
... ... @@ -24,6 +24,7 @@ Page({
calendarData: '',
sex: "先生",
indexs: 0,
StyleType:'',//邀请函模板
sexList: [{
sex: '先生',
value: '1',
... ... @@ -55,6 +56,7 @@ Page({
sellerName: options.sellerName ? options.sellerName : '',
},
type: options.type,
StyleType: options.StyleType,
})
console.log('onLoad',{...this.data.opt});
let obj = wx.getStorageSync('info')
... ... @@ -75,7 +77,7 @@ Page({
wananchi() {
this.closeModal()
wx.navigateTo({
url: `/pages/me/wananchi?type=1&oid=${this.data.opt.detail.oid}`
url: `/pages/me/wananchi?type=1&oid=${this.data.opt.detail.oid}&sid=${this.data.opt.sid}`
})
},
showModal() {
... ... @@ -138,10 +140,17 @@ Page({
},
// 支付失败回调 types 1邀请函 2提前点餐 3商家端app分享
callbackFun() {
let url = '';
let url = '/pages/customer/detail_owner_invitation_new1?id=' + that.data.opt.detail.oid;
let that = this;
if (that.data.opt.types == '1') {
url = '/pages/customer/detail_owner_invitation_new?id=' + that.data.opt.detail.oid;
if(that.data.opt.types == '1'){
switch (this.data.StyleType) {
case '1':
url = '/pages/customer/detail_owner_invitation_new1?id=' + that.data.opt.detail.oid;
break;
case '2':
url = '/pages/customer/detail_owner_invitation_new2?id=' + that.data.opt.detail.oid;
break;
}
}
if (that.data.opt.types == '2') {
let data={}
... ... @@ -166,8 +175,17 @@ Page({
recharge() {
console.log('充值完成跳转', this.data.opt.detail.oid);
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) {
case '1':
url = `/pages/customer/detail_owner_invitation_new1?id=${this.data.opt.detail.oid}&hasInvitation=1&hasSellerShare=1&tplid=1`
break;
case '2':
url = `/pages/customer/detail_owner_invitation_new2?id=${this.data.opt.detail.oid}&hasInvitation=1&hasSellerShare=1&tplid=1`
break;
}
wx.reLaunch({
url: `/pages/customer/detail_owner_invitation_new?id=${this.data.opt.detail.oid}&hasInvitation=1&hasSellerShare=1&tplid=1`
url
})
},
// 绑定名称
... ... @@ -334,8 +352,17 @@ Page({
navEvent() {
// 1 邀请函 2 提前点餐 3商家端分享
if (this.data.opt.types == '1') {
let url='/pages/customer/detail_owner_invitation_new1?id=' + this.data.opt.detail.oid;
switch (this.data.StyleType) {
case '1':
url = '/pages/customer/detail_owner_invitation_new1?id=' + this.data.opt.detail.oid;
break;
case '2':
url = '/pages/customer/detail_owner_invitation_new1?id=' + this.data.opt.detail.oid;
break;
}
return wx.reLaunch({
url: '/pages/customer/detail_owner_invitation_new?id=' + this.data.opt.detail.oid,
url,
})
}
if (this.data.opt.types == '2') {
... ...
... ... @@ -62,6 +62,25 @@ Page({
}
})
},
// 跳转到邀请函页面,获取商家使用模板
gotoInvitation(){
App.Seller.GetSellerTemplateConf({
sid:this.detail.seller.id
}).then(res => {
let url=`/pages/customer/detail_owner_invitation_new1?id=${detail.id}}&hasInvitation=1&hasSellerShare=1&tplid=1`
switch (res.data.type) {
case '1':
url = `/pages/customer/detail_owner_invitation_new1?id=${detail.id}}&hasInvitation=1&hasSellerShare=1&tplid=1`
break;
case '2':
url = `/pages/customer/detail_owner_invitation_new2?id=${detail.id}}&hasInvitation=1&hasSellerShare=1&tplid=1`
break;
}
wx.navigateTo({
url,
})
})
},
//返回我的订单页面
navEvent(){
wx.redirectTo({
... ...
... ... @@ -39,11 +39,11 @@
<view class="min-but flex align-center justify-center txt-30-h solid">取消预订</view>
</navigator>
<block>
<navigator url="/pages/customer/detail_owner_invitation_new?id={{detail.id}}&hasInvitation=1&hasSellerShare=1&tplid=1"
<view bindtap="gotoInvitation"
wx:if="{{detail.hasRunning}}"
class="split">
<view class="min-but flex align-center justify-center txt-30-h solid line-blue">通知好友</view>
</navigator>
</view>
</block>
<navigator url="/pages/pinglun/create?sid={{detail.seller.id}}&oid={{detail.id}}&sellername={{detail.seller.sellername}}"
... ...
... ... @@ -44,6 +44,7 @@ Page({
swich_phone:'0',
is_comments:'0',
is_user_comments:false,
StyleType:'',
},
/**
* 生命周期函数--监听页面加载
... ... @@ -338,6 +339,7 @@ Page({
coupon_dataList,
swich_phone,
is_comments,
StyleType:res.data.type,
}
console.log('获取数据', {...obj});
if(marketing && marketing.is_recharge=='1' && marketing.recharge_data){
... ... @@ -383,6 +385,7 @@ Page({
scoreInfo,
swich_phone,
is_comments,
StyleType:res.data.type,
})
if (home && home.red == '1' && home.green == '67' && home.blue == '163') {
this.setData({
... ...
... ... @@ -88,7 +88,7 @@
会员生日当天可用{{item.desc?','+item.desc+'。':'。'}}
</view>
</view>
<navigator url="/pack-activity/pack/buyCoupon?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1" hover-class="navigator-hover">
<navigator url="/pack-activity/pack/buyCoupon?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="font24r orderingFood">
去抢购
</view>
... ...
... ... @@ -45,6 +45,7 @@ Page({
is_comments: '0',
is_user_comments: false,
tableinfo: [],
StyleType:'',
},
tablestr: '',
urlsValue: [],
... ... @@ -379,6 +380,7 @@ Page({
coupon_dataList,
swich_phone,
is_comments,
StyleType:res.data.type,
}
console.log('获取数据', {
...obj
... ... @@ -426,6 +428,7 @@ Page({
scoreInfo,
swich_phone,
is_comments,
StyleType:res.data.type,
})
if (home && home.red == '1' && home.green == '67' && home.blue == '163') {
this.setData({
... ...
... ... @@ -68,7 +68,7 @@
会员生日当天可用{{item.desc?','+item.desc+'。':'。'}}
</view>
</view>
<navigator url="/pack-activity/pack/buyCoupon?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1" hover-class="navigator-hover">
<navigator url="/pack-activity/pack/buyCoupon?id={{item.id}}&name={{seller.name}}&use={{item.stringifyUse}}&sid={{seller.sid}}&oid={{detail.id}}&types=1&StyleType={{StyleType}}" hover-class="navigator-hover">
<view class="font24r orderingFood">
去抢购
</view>
... ...
... ... @@ -168,7 +168,7 @@ Page({
},
gotoDetailHan(e){
console.log(util.attr(e,'id'))
let url='/pages/customer/detail_owner_invitation_new?id='+util.attr(e,'id')+'&hasInvitation=1&hasSellerShare=1&tplid=1'
let url='/pages/customer/detail_owner_invitation_new1?id='+util.attr(e,'id')+'&hasInvitation=1&hasSellerShare=1&tplid=1'
wx.navigateTo({
url:url,
})
... ...
... ... @@ -7,6 +7,7 @@ Page({
data: {
isShow:'show',
oid:'',
sid:'',
},
/**
* 生命周期函数--监听页面加载
... ... @@ -16,14 +17,28 @@ Page({
if(options && options.type=='1'){
this.setData({
isShow:'none',
oid:options.oid
oid:options.oid,
sid:options.sid,
})
}
console.log('options',options);
},
navEvent(){
return wx.reLaunch({
url: '/pages/customer/detail_owner_invitation_new?id='+this.data.oid,
App.Seller.GetSellerTemplateConf({
sid:this.data.sid
}).then(res => {
let url='/pages/customer/detail_owner_invitation_new1?id='+this.data.oid
switch (res.data.type) {
case '1':
url = '/pages/customer/detail_owner_invitation_new1?id='+this.data.oid
break;
case '2':
url = '/pages/customer/detail_owner_invitation_new2??id='+this.data.oid
break;
}
return wx.reLaunch({
url,
})
})
},
/**
... ...