Commit 3b560931aa961d4d34b118f0cab986dda70b18ea

Authored by pengye
1 parent 354ecc93

支付定金成功或失败提示、进入邀请函通过预订ID查收定金详情

... ... @@ -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%)'
... ...
... ... @@ -213,11 +213,12 @@
<view class="moreText">滑动查看更多</view>
<image src="https://qn.colorcun.com/jt1.png" mode="" />
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (options.paymentId && paymentStatus == '0')}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}">
<view wx:if="{{marketing.is_online_book=='1'}}" class="book-item-font second-book-button flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订
<view class="toastBox" wx:if="{{toastBool}}">
{{toastText}}
</view>
<view wx:if="{{options.paymentId && paymentStatus == '0'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="paymentFun">支付定金</view>
<button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人
</button>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="all-button flex-lr sharewidth">
<view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view>
<view wx:if="{{marketing.is_transpond=='1'}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</view>
</view>
\ No newline at end of file
... ...
... ... @@ -416,54 +416,30 @@
justify-content: flex-end;
}
.between {
justify-content: space-between;
}
.centerBtn {
margin: 0 20rpx;
}
.second-book-button {
margin-right: 20rpx;
}
.book-item-font {
width: 25%;
border: 2rpx solid #0143A3;
.shareItem,
.moreBtn,
.paymenBtn {
width: inherit;
margin: 0;
background: #fafafa;
color: #0143A3;
border: 2rpx solid #0143A3;
height: 46%;
border-radius: 42rpx;
font-weight: 600;
margin-right: 20rpx;
}
.shareItem {
width: 100%;
margin: 0;
margin-right: 0;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
color: #fff;
}
.moreBtn{
width: 100%;
}
.sharewidth .moreBtn {
width: 100% !important;
}
.sharewidth .shareItem {
width: 100% !important;
}
.between .shareItem {
width: 65% !important;
}
.book-item-font {
width: 40% !important;
}
.menu-item {
width: 100%;
height: 100%;
... ...
... ... @@ -16,7 +16,6 @@ Page({
tableNum: 0,
detail: {},
staffinfo: {},
between: false,
chef: {},
marketing: {},
home: {},
... ... @@ -54,6 +53,9 @@ Page({
isPlay: '1',
paymentStatus:'',//定金支付状态 1支付 0未支付
reserveData:{},//自定义图文数据
toastBool: false, //支付定金提示框
toastText: '', //支付定金提示文字
paymentId: '', //定金id
},
tablestr: '',
urlsValue: [],
... ... @@ -75,9 +77,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",
... ... @@ -145,6 +144,7 @@ Page({
onShow: function () {
this.getDetail()
this.getText()
this.getPaymentStatus()
},
// 复制微信号
copyWeChat() {
... ... @@ -316,14 +316,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'
})
}
})
... ... @@ -348,8 +350,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) {
... ... @@ -360,28 +363,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{
... ... @@ -392,6 +398,14 @@ Page({
}
})
},
// 关闭支付失败或者成功弹框
hideToast() {
setTimeout(()=> {
this.setData({
toastBool:false
})
}, 1500)
},
// 客户经理获取基本信息
getstaffinfo(uid, sid) {
console.log('sellerid', this.data.detail.seller.id);
... ... @@ -546,11 +560,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
})
}
if (themeColor == 'turmeric' || themeColor == 'golden') {
whiteBj = true
} else {
... ...
... ... @@ -221,11 +221,12 @@
<view class="moreText">滑动查看更多</view>
<image src="https://qn.colorcun.com/jt1.png" mode="" />
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (options.paymentId && paymentStatus == '0')}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}">
<view wx:if="{{marketing.is_online_book=='1'}}" class="book-item-font second-book-button flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订
<view class="toastBox" wx:if="{{toastBool}}">
{{toastText}}
</view>
<view wx:if="{{options.paymentId && paymentStatus == '0'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="paymentFun">支付定金</view>
<button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人
</button>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="all-button flex-lr sharewidth">
<view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view>
<view wx:if="{{marketing.is_transpond=='1'}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</view>
</view>
\ No newline at end of file
... ...
... ... @@ -454,62 +454,30 @@
justify-content: flex-end;
}
.between {
justify-content: space-between;
}
.centerBtn {
margin: 0 20rpx;
}
.second-book-button {
margin-right: 20rpx;
}
.book-item-font {
width: 25%;
border: 2rpx solid #0143A3;
.shareItem,
.moreBtn,
.paymenBtn {
width: inherit;
margin: 0;
background: #fafafa;
color: #0143A3;
border: 2rpx solid #0143A3;
height: 46%;
border-radius: 42rpx;
font-weight: 600;
margin-right: 20rpx;
}
.shareItem {
width: 100%;
margin: 0;
background: #fafafa;
color: #0143A3;
border: 2rpx solid #0143A3;
}
.moreBtn{
width: 100%;
}
.sharewidth .moreBtn {
width: 100% !important;
}
.between .shareItem {
width: 100%;
margin: 0;
margin-right: 0;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
color: #fff;
}
.sharewidth .shareItem {
width: 100% !important;
}
.between .shareItem {
width: 65% !important;
}
.book-item-font {
width: 40% !important;
}
.menu-item {
width: 100%;
height: 100%;
... ...
... ... @@ -16,7 +16,6 @@ Page({
tableNum: 0,
detail: {},
staffinfo: {},
between: false,
chef: {},
marketing: {},
home: {},
... ... @@ -54,6 +53,9 @@ Page({
isPlay: '1',
paymentStatus:'',//定金支付状态 1支付 0未支付
reserveData:{},//自定义图文数据
toastBool: false, //支付定金提示框
toastText: '', //支付定金提示文字
paymentId: '', //定金id
},
tablestr: '',
urlsValue: [],
... ... @@ -75,9 +77,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",
... ... @@ -145,6 +144,7 @@ Page({
onShow: function () {
this.getDetail()
this.getText()
this.getPaymentStatus()
},
// 复制微信号
copyWeChat() {
... ... @@ -316,14 +316,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'
})
}
})
... ... @@ -348,8 +350,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) {
... ... @@ -360,28 +363,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{
... ... @@ -392,6 +398,14 @@ Page({
}
})
},
// 关闭支付失败或者成功弹框
hideToast() {
setTimeout(()=> {
this.setData({
toastBool:false
})
}, 1500)
},
// 客户经理获取基本信息
getstaffinfo(uid, sid) {
console.log('sellerid', this.data.detail.seller.id);
... ... @@ -546,11 +560,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
})
}
if (themeColor == 'turmeric' || themeColor == 'golden') {
whiteBj = true
} else {
... ...
... ... @@ -197,11 +197,12 @@
<view class="moreText">滑动查看更多</view>
<image src="https://qn.colorcun.com/jt1.png" mode="" />
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (options.paymentId && paymentStatus == '0')}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}">
<view wx:if="{{marketing.is_online_book=='1'}}" class="book-item-font second-book-button flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订
<view class="toastBox" wx:if="{{toastBool}}">
{{toastText}}
</view>
<view wx:if="{{options.paymentId && paymentStatus == '0'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="paymentFun">支付定金</view>
<button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人
</button>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="all-button flex-lr sharewidth">
<view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view>
<view wx:if="{{marketing.is_transpond=='1'}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</view>
</view>
\ No newline at end of file
... ...
... ... @@ -430,50 +430,26 @@
justify-content: flex-end;
}
.between {
justify-content: space-between;
}
.second-book-button {
margin-right: 20rpx;
}
.book-item-font {
width: 25%;
border: 2rpx solid #0143A3;
.shareItem,
.moreBtn,
.paymenBtn {
width: inherit;
margin: 0;
background: #fafafa;
color: #0143A3;
border: 2rpx solid #0143A3;
height: 46%;
border-radius: 42rpx;
font-weight: 600;
margin-right: 20rpx;
}
.shareItem {
width: 100%;
margin: 0;
margin-right: 0;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
color: #fff;
}
.moreBtn{
width: 100%;
}
.sharewidth .moreBtn {
width: 100% !important;
}
.sharewidth .shareItem {
width: 100% !important;
}
.between .shareItem {
width: 65% !important;
}
.book-item-font {
width: 40% !important;
}
.menu-item {
width: 100%;
height: 100%;
... ...
... ... @@ -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
})
}
if (themeColor == 'turmeric' || themeColor == 'golden') {
whiteBj = true
} else {
... ...
... ... @@ -194,11 +194,12 @@
<view class="moreText">滑动查看更多</view>
<image src="https://qn.colorcun.com/jt1.png" mode="" />
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (options.paymentId && paymentStatus == '0')}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}">
<view wx:if="{{marketing.is_online_book=='1'}}" class="book-item-font second-book-button flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订
<view class="toastBox" wx:if="{{toastBool}}">
{{toastText}}
</view>
<view wx:if="{{options.paymentId && paymentStatus == '0'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="paymentFun">支付定金</view>
<button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人
</button>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="all-button flex-lr sharewidth">
<view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view>
<view wx:if="{{marketing.is_transpond=='1'}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</view>
</view>
\ No newline at end of file
... ...
... ... @@ -421,54 +421,30 @@
justify-content: flex-end;
}
.between {
justify-content: space-between;
}
.second-book-button {
margin-right: 20rpx;
}
.book-item-font {
width: 25%;
border: 2rpx solid #0143A3;
.shareItem,
.moreBtn,
.paymenBtn {
width: inherit;
margin: 0;
background: #fafafa;
color: #0143A3;
border: 2rpx solid #0143A3;
height: 46%;
border-radius: 42rpx;
font-weight: 600;
margin-right: 20rpx;
}
.shareItem {
width: 100%;
margin: 0;
background: #fafafa;
color: #0143A3;
border: 2rpx solid #0143A3;
}
.moreBtn{
width: 100%;
}
.sharewidth .moreBtn {
width: 100% !important;
}
.between .shareItem {
width: 65% !important;
margin: 0;
margin-right: 0;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
color: #fff;
}
.sharewidth .shareItem {
width: 100% !important;
}
.book-item-font {
width: 40% !important;
}
.menu-item {
width: 100%;
height: 100%;
... ...
... ... @@ -16,7 +16,6 @@ Page({
tableNum: 0,
detail: {},
staffinfo: {},
between: false,
id: null,
msgTpl: '',
chef: {},
... ... @@ -54,6 +53,9 @@ Page({
isPlay: '1',
paymentStatus:'',//定金支付状态 1支付 0未支付
reserveData:{},//自定义图文数据
toastBool: false, //支付定金提示框
toastText: '', //支付定金提示文字
paymentId: '', //定金id
},
screenHeight: '',
attentionAnim: {},
... ... @@ -73,9 +75,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",
... ... @@ -139,6 +138,7 @@ Page({
onShow: function () {
this.getDetail()
this.getText()
this.getPaymentStatus()
},
cli() {
if (this.data.staffinfo.wechat) {
... ... @@ -268,14 +268,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'
})
}
})
... ... @@ -300,8 +302,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) {
... ... @@ -312,28 +315,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{
... ... @@ -344,6 +350,14 @@ Page({
}
})
},
// 关闭支付失败或者成功弹框
hideToast() {
setTimeout(()=> {
this.setData({
toastBool:false
})
}, 1500)
},
// 客户经理获取基本信息
getstaffinfo(uid, sid) {
console.log('sellerid', this.data.detail.seller.id);
... ... @@ -494,11 +508,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
})
}
if (themeColor == 'turmeric' || themeColor == 'golden') {
whiteBj = true
} else {
... ...
... ... @@ -272,11 +272,12 @@
<view class="moreText">滑动查看更多</view>
<image src="https://qn.colorcun.com/jt1.png" mode="" />
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (options.paymentId && paymentStatus == '0')}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}">
<view wx:if="{{marketing.is_online_book=='1'}}" class="book-item-font second-book-button flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订
<view class="toastBox" wx:if="{{toastBool}}">
{{toastText}}
</view>
<view wx:if="{{options.paymentId && paymentStatus == '0'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="paymentFun">支付定金</view>
<button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人
</button>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="all-button flex-lr sharewidth">
<view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view>
<view wx:if="{{marketing.is_transpond=='1'}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</view>
</view>
\ No newline at end of file
... ...
... ... @@ -587,59 +587,30 @@
justify-content: flex-end;
}
.between {
justify-content: space-between;
}
.centerBtn {
margin: 0 20rpx;
}
.second-book-button {
margin-right: 20rpx;
}
.book-item-font {
width: 25%;
border: 2rpx solid #0143A3;
.shareItem,
.moreBtn,
.paymenBtn {
width: inherit;
margin: 0;
background: #fafafa;
color: #0143A3;
border: 2rpx solid #0143A3;
height: 46%;
border-radius: 42rpx;
font-weight: 600;
margin-right: 20rpx;
}
.shareItem {
width: 100%;
margin: 0;
background: #fafafa;
color: #0143A3;
border: 2rpx solid #0143A3;
}
.moreBtn{
width: 100%;
}
.sharewidth .moreBtn {
width: 100% !important;
}
.between .shareItem {
width: 65% !important;
margin: 0;
margin-right: 0;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
color: #fff;
}
.sharewidth .shareItem {
width: 100% !important;
}
.book-item-font {
width: 40% !important;
}
.menu-item {
width: 100%;
height: 100%;
... ...
... ... @@ -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
})
}
this.setData({
chef,
marketing,
... ...
... ... @@ -215,11 +215,12 @@
<view class="moreText">滑动查看更多</view>
<image src="https://qn.colorcun.com/jt1.png" mode="" />
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (options.paymentId && paymentStatus == '0')}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}">
<view wx:if="{{marketing.is_online_book=='1'}}" class="book-item-font second-book-button flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订
<view class="toastBox" wx:if="{{toastBool}}">
{{toastText}}
</view>
<view wx:if="{{options.paymentId && paymentStatus == '0'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="paymentFun">支付定金</view>
<button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人
</button>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="all-button flex-lr sharewidth">
<view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view>
<view wx:if="{{marketing.is_transpond=='1'}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</view>
</view>
\ No newline at end of file
... ...
... ... @@ -418,62 +418,30 @@
justify-content: flex-end;
}
.between {
justify-content: space-between;
}
.centerBtn {
margin: 0 20rpx;
}
.second-book-button {
margin-right: 20rpx;
}
.book-item-font {
width: 25%;
border: 2rpx solid #0143A3;
.shareItem,
.moreBtn,
.paymenBtn {
width: inherit;
margin: 0;
background: #fafafa;
color: #0143A3;
border: 2rpx solid #0143A3;
height: 46%;
border-radius: 42rpx;
font-weight: 600;
margin-right: 20rpx;
}
.shareItem {
width: 100%;
margin: 0;
background: #fafafa;
color: #0143A3;
border: 2rpx solid #0143A3;
}
.moreBtn{
width: 100%;
}
.sharewidth .moreBtn {
width: 100% !important;
}
.between .shareItem {
width: 100%;
margin: 0;
margin-right: 0;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
color: #fff;
}
.sharewidth .shareItem {
width: 100% !important;
}
.between .shareItem {
width: 65% !important;
}
.book-item-font {
width: 40% !important;
}
.menu-item {
width: 100%;
height: 100%;
... ...
... ... @@ -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() {
... ... @@ -314,14 +314,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'
})
}
})
... ... @@ -346,8 +348,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) {
... ... @@ -358,28 +361,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{
... ... @@ -390,6 +396,14 @@ Page({
}
})
},
// 关闭支付失败或者成功弹框
hideToast() {
setTimeout(()=> {
this.setData({
toastBool:false
})
}, 1500)
},
// 客户经理获取基本信息
getstaffinfo(uid, sid) {
console.log('sellerid', this.data.detail.seller.id);
... ... @@ -544,11 +558,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
})
}
this.setData({
chef,
marketing,
... ...
... ... @@ -202,11 +202,12 @@
<view class="moreText">滑动查看更多</view>
<image src="https://qn.colorcun.com/jt1.png" mode="" />
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (options.paymentId && paymentStatus == '0')}}" class="{{between?'all-button flex-lr between':'all-button flex-lr sharewidth'}}">
<view wx:if="{{marketing.is_online_book=='1'}}" class="book-item-font second-book-button flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订
<view class="toastBox" wx:if="{{toastBool}}">
{{toastText}}
</view>
<view wx:if="{{options.paymentId && paymentStatus == '0'}}" class="book-item-font second-book-button flex-cc font30r" bindtap="paymentFun">支付定金</view>
<button wx:if="{{marketing.is_transpond=='1'}}" class="book-item-font flex-cc font30r shareItem" open-type="share">转发给客人
</button>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1' || (paymentId && paymentStatus == '0')}}" class="all-button flex-lr sharewidth">
<view wx:if="{{marketing.is_online_book=='1'}}" class="flex-cc font30r moreBtn" bindtap="secondbook" style="position: relative;">再次预订</view>
<view wx:if="{{paymentId && paymentStatus == '0'}}" class="flex-cc font30r paymenBtn" bindtap="paymentFun">支付定金</view>
<view wx:if="{{marketing.is_transpond=='1'}}" class="flex-cc font30r shareItem" open-type="share">转发给客人</view>
</view>
\ No newline at end of file
... ...
... ... @@ -187,10 +187,10 @@
margin-left: 10rpx;
height: 54rpx !important;
border: 2rpx solid #0143A3;
color: #0143A3;
height: 54rpx !important;
border-radius: 42rpx;
font-weight: 600;
color: #0143A3;
height: 54rpx !important;
border-radius: 42rpx;
font-weight: 600;
}
.positioning .name text {
... ... @@ -263,7 +263,7 @@
width: 100%;
margin-bottom: 20rpx;
display: block !important;
vertical-align: top;
vertical-align: top;
}
.famousChefBox {
... ... @@ -436,62 +436,30 @@
justify-content: flex-end;
}
.between {
justify-content: space-between;
}
.centerBtn {
margin: 0 20rpx;
}
.second-book-button {
margin-right: 20rpx;
}
.book-item-font {
width: 25%;
border: 2rpx solid #0143A3;
.shareItem,
.moreBtn,
.paymenBtn {
width: inherit;
margin: 0;
background: #fafafa;
color: #0143A3;
border: 2rpx solid #0143A3;
height: 46%;
border-radius: 42rpx;
font-weight: 600;
margin-right: 20rpx;
}
.shareItem {
width: 100%;
margin: 0;
background: #fafafa;
color: #0143A3;
border: 2rpx solid #0143A3;
}
.moreBtn{
width: 100%;
}
.sharewidth .moreBtn {
width: 100% !important;
}
.between .shareItem {
width: 100%;
margin: 0;
margin-right: 0;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
color: #fff;
}
.sharewidth .shareItem {
width: 100% !important;
}
.between .shareItem {
width: 65% !important;
}
.book-item-font {
width: 40% !important;
}
.menu-item {
width: 100%;
height: 100%;
... ... @@ -531,16 +499,17 @@
font-size: 28rpx;
}
.reserveBox{
.reserveBox {
margin: 20rpx 40rpx 0 40rpx;
}
.reserveBox .title{
.reserveBox .title {
margin-bottom: 20rpx;
color: #000;
font-family: PingFang SC;
}
.reserveBox .items{
.reserveBox .items {
margin-bottom: 20rpx;
color: #000;
font-family: PingFang SC;
... ... @@ -656,7 +625,7 @@
margin-top: 20rpx;
}
.musicImg{
.musicImg {
width: 62rpx;
height: 62rpx;
position: fixed !important;
... ... @@ -665,7 +634,7 @@
z-index: 200;
}
.bookData{
.bookData {
margin-left: 0;
}
... ... @@ -833,4 +802,18 @@
.businessBox text {
color: #0143A3;
}
.toastBox {
width: fit-content;
position: fixed;
padding: 30rpx;
color: #fff;
background: rgba(0, 0, 0, .7);
font-size: 28rpx;
border-radius: 10rpx;
left: 50%;
z-index: 999;
top: 50%;
transform: translate(-50%, -50%);
}
\ No newline at end of file
... ...
... ... @@ -741,8 +741,8 @@ export default {
openid:'openid'
},
// 通过定金ID查收定金详情
'App.Reserve.GetReserveDepositByid':{
// 通过预订ID查收定金详情
'App.Reserve.GetReserveDepositByRid':{
openid:'openid'
},
... ...