|
...
|
...
|
@@ -16,7 +16,6 @@ Page({ |
|
|
|
tableNum: 0,
|
|
|
|
detail: {},
|
|
|
|
staffinfo: {},
|
|
|
|
between: false,
|
|
|
|
chef: {},
|
|
|
|
marketing: {},
|
|
|
|
home: {},
|
|
...
|
...
|
@@ -53,6 +52,9 @@ Page({ |
|
|
|
isPlay: '1',
|
|
|
|
paymentStatus:'',//定金支付状态 1支付 0未支付
|
|
|
|
reserveData:{},//自定义图文数据
|
|
|
|
toastBool: false, //支付定金提示框
|
|
|
|
toastText: '', //支付定金提示文字
|
|
|
|
paymentId: '', //定金id
|
|
|
|
},
|
|
|
|
tablestr: '',
|
|
|
|
urlsValue: [],
|
|
...
|
...
|
@@ -74,9 +76,6 @@ Page({ |
|
|
|
console.log(param);
|
|
|
|
console.log(options);
|
|
|
|
this.setData(param)
|
|
|
|
if(options.paymentId){
|
|
|
|
this.getPaymentStatus(options.paymentId)
|
|
|
|
}
|
|
|
|
mta.Page.init({
|
|
|
|
"appID": "500667280",
|
|
|
|
"eventID": "500667287",
|
|
...
|
...
|
@@ -144,6 +143,7 @@ Page({ |
|
|
|
onShow: function () {
|
|
|
|
this.getDetail()
|
|
|
|
this.getText()
|
|
|
|
this.getPaymentStatus()
|
|
|
|
},
|
|
|
|
// 复制微信号
|
|
|
|
copyWeChat() {
|
|
...
|
...
|
@@ -315,14 +315,16 @@ Page({ |
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
// 通过定金ID查收定金详情
|
|
|
|
getPaymentStatus(id){
|
|
|
|
App.Reserve.GetReserveDepositByid({
|
|
|
|
id
|
|
|
|
}).then(res=>{
|
|
|
|
if(res.ret == 200){
|
|
|
|
// 通过预订ID查收定金详情
|
|
|
|
getPaymentStatus() {
|
|
|
|
App.Reserve.GetReserveDepositByRid({
|
|
|
|
rid: this.data.options.id
|
|
|
|
}).then(res => {
|
|
|
|
if (res.ret == 200 && res.data && res.data.length > 0) {
|
|
|
|
let data = res.data[0];
|
|
|
|
this.setData({
|
|
|
|
paymentStatus:res.data.trade_state=='SUCCESS'?'1':'0'
|
|
|
|
paymentId: data.id,
|
|
|
|
paymentStatus: data.trade_state == 'SUCCESS' ? '1' : '0'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
...
|
...
|
@@ -347,8 +349,9 @@ Page({ |
|
|
|
},
|
|
|
|
// 点击支付定金
|
|
|
|
paymentFun() {
|
|
|
|
let that = this;
|
|
|
|
App.PayOnline.CombineTransactionsByDeposit({
|
|
|
|
id: this.options.paymentId,
|
|
|
|
id: this.data.paymentId,
|
|
|
|
openid: getApp().openid,
|
|
|
|
}).then(res => {
|
|
|
|
if (res.ret == 200) {
|
|
...
|
...
|
@@ -359,28 +362,31 @@ Page({ |
|
|
|
signType: res.data.signType,
|
|
|
|
paySign: res.data.paySign,
|
|
|
|
success(ress) {
|
|
|
|
console.log('微信支付结果',ress);
|
|
|
|
if (ress.errMsg == 'requestPayment:ok') {
|
|
|
|
console.log('支付成功', ress);
|
|
|
|
this.setData({
|
|
|
|
paymentStatus:'1'
|
|
|
|
})
|
|
|
|
return wx.showToast({
|
|
|
|
title: '支付成功',
|
|
|
|
icon: 'success'
|
|
|
|
that.setData({
|
|
|
|
paymentStatus:'1',
|
|
|
|
toastBool:true,
|
|
|
|
toastText:'支付成功'
|
|
|
|
})
|
|
|
|
that.hideToast();
|
|
|
|
return
|
|
|
|
}
|
|
|
|
console.log('支付失败', ress);
|
|
|
|
wx.showToast({
|
|
|
|
title: '支付失败,请重新支付',
|
|
|
|
icon: 'none',
|
|
|
|
console.log('支付失败1', ress);
|
|
|
|
that.setData({
|
|
|
|
toastBool:true,
|
|
|
|
toastText:'支付失败,请重新支付'
|
|
|
|
})
|
|
|
|
that.hideToast();
|
|
|
|
},
|
|
|
|
fail(ress) {
|
|
|
|
console.log('支付失败', ress);
|
|
|
|
wx.showToast({
|
|
|
|
title: '支付失败,请重新支付',
|
|
|
|
icon: 'none',
|
|
|
|
console.log('支付失败2', ress);
|
|
|
|
that.setData({
|
|
|
|
toastBool:true,
|
|
|
|
toastText:'支付失败,请重新支付'
|
|
|
|
})
|
|
|
|
that.hideToast();
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}else{
|
|
...
|
...
|
@@ -391,6 +397,14 @@ Page({ |
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
// 关闭支付失败或者成功弹框
|
|
|
|
hideToast() {
|
|
|
|
setTimeout(()=> {
|
|
|
|
this.setData({
|
|
|
|
toastBool:false
|
|
|
|
})
|
|
|
|
}, 1500)
|
|
|
|
},
|
|
|
|
// 客户经理获取基本信息
|
|
|
|
getstaffinfo(uid, sid) {
|
|
|
|
console.log('sellerid', this.data.detail.seller.id);
|
|
...
|
...
|
@@ -545,11 +559,6 @@ Page({ |
|
|
|
}
|
|
|
|
if (store && store.images && store.images.length > 0) store.images = util.determine(store.images);
|
|
|
|
if (signboard && signboard.images && signboard.images.length > 0) signboard.images = util.determine(signboard.images);
|
|
|
|
if (marketing && marketing.is_online_book && marketing.is_online_book == '1' && marketing.is_transpond == '1') {
|
|
|
|
this.setData({
|
|
|
|
between: true
|
|
|
|
})
|
|
|
|
}
|
|
|
|
switch (themeColor) {
|
|
|
|
case 'blackBlueGradient':
|
|
|
|
themeSixteen = 'linear-gradient(104.24deg, #42a5ff -57.47%, #000000 55.72%, #42a5ff 182.69%)'
|
...
|
...
|
|