Commit ec445cc98ede41ad63a34ab1074e7978c56f3d63

Authored by pengye
1 parent 976fc551

邀请函自定义图文数据、支付定金

... ... @@ -51,6 +51,8 @@ Page({
hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报
_attentionAnim: {},
isPlay: '1',
paymentStatus:'',//定金支付状态 1支付 0未支付
reserveData:{},//自定义图文数据
},
tablestr: '',
urlsValue: [],
... ... @@ -72,6 +74,9 @@ Page({
console.log(param);
console.log(options);
this.setData(param)
if(options.paymentId){
this.getPaymentStatus(options.paymentId)
}
mta.Page.init({
"appID": "500667280",
"eventID": "500667287",
... ... @@ -138,6 +143,7 @@ Page({
*/
onShow: function () {
this.getDetail()
this.getText()
},
// 复制微信号
copyWeChat() {
... ... @@ -309,6 +315,77 @@ Page({
}
})
},
// 通过定金ID查收定金详情
getPaymentStatus(id){
App.Reserve.GetReserveDepositByid({
id
}).then(res=>{
if(res.ret == 200){
this.setData({
paymentStatus:res.data.trade_state=='SUCCESS'?'1':'0'
})
}
})
},
// 获取自定义图文内容
getText() {
App.Reserve.GetReserveImgText({
rid: this.data.options.id
}).then(res => {
if (res.ret == 200 && res.data) {
let data = res.data;
let content = util.determine(data.content)
console.log('contentcontentcontent', content);
this.setData({
reserveData: {
title: data.title || '',
content,
}
})
}
})
},
// 点击支付定金
paymentFun() {
App.PayOnline.CombineTransactionsByDeposit({
id: this.options.paymentId,
openid: getApp().openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
timeStamp: res.data.timeStamp + '',
nonceStr: res.data.nonceStr,
package: res.data.package,
signType: res.data.signType,
paySign: res.data.paySign,
success(ress) {
if (ress.errMsg == 'requestPayment:ok') {
console.log('支付成功', ress);
this.setData({
paymentStatus:'1'
})
return wx.showToast({
title: '支付成功',
icon: 'success'
})
}
console.log('支付失败', ress);
wx.showToast({
title: '支付失败,请重新支付',
icon: 'none',
})
},
fail(ress) {
console.log('支付失败', ress);
wx.showToast({
title: '支付失败,请重新支付',
icon: 'none',
})
},
})
}
})
},
// 客户经理获取基本信息
getstaffinfo(uid, sid) {
console.log('sellerid', this.data.detail.seller.id);
... ...
... ... @@ -105,6 +105,13 @@
<text wx:if="{{marketing.is_comments_coupon=='1'}}">想吐槽?戳这里填写意见反馈赢好礼!</text>
<image src="https://qn.colorcun.com/evaluate.png" mode="" />
</view>
<view class="reserveBox" wx:if="{{reserveData && (reserveData.title || reserveData.content)}}">
<view class="title font36r" wx:if="{{reserveData.title}}">{{reserveData.title}}</view>
<block wx:for="{{reserveData.content}}" wx:key="index">
<image class="items" wx:if="{{item.type =='1'}}" src="{{item.content}}" mode="widthFix"/>
<view class="items font24r" wx:if="{{item.type == '2'}}">{{item.content}}</view>
</block>
</view>
<!-- 餐厅介绍图文分开 -->
<view class="introduce" wx:if="{{store}}">
<view class="imgMask">
... ... @@ -207,9 +214,10 @@
<image src="https://qn.colorcun.com/jt1.png" mode="" />
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1'}}" 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" bindtap="secondbook" style="position: relative;">再次预订
<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>
<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>
</view>
\ No newline at end of file
... ...
... ... @@ -217,7 +217,7 @@
margin-left: 20rpx;
color: #515151;
font-family: PingFang SC;
font-size: 20rpx;
font-size: 24rpx;
max-height: 400rpx;
overflow: hidden;
white-space: pre-line;
... ... @@ -444,6 +444,14 @@
color: #fff;
}
.moreBtn{
width: 100%;
}
.sharewidth .moreBtn {
width: 100% !important;
}
.sharewidth .shareItem {
width: 100% !important;
}
... ... @@ -495,6 +503,21 @@
font-size: 28rpx;
}
.reserveBox{
margin: 20rpx 40rpx 0 40rpx;
}
.reserveBox .title{
margin-bottom: 20rpx;
color: #000;
font-family: PingFang SC;
}
.reserveBox .items{
margin-bottom: 20rpx;
color: #000;
font-family: PingFang SC;
}
.more {
height: 80rpx;
width: 100%;
... ...
... ... @@ -52,6 +52,8 @@ Page({
hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报
_attentionAnim: {},
isPlay: '1',
paymentStatus:'',//定金支付状态 1支付 0未支付
reserveData:{},//自定义图文数据
},
tablestr: '',
urlsValue: [],
... ... @@ -73,6 +75,9 @@ 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 +144,7 @@ Page({
*/
onShow: function () {
this.getDetail()
this.getText()
},
// 复制微信号
copyWeChat() {
... ... @@ -310,6 +316,77 @@ Page({
}
})
},
// 通过定金ID查收定金详情
getPaymentStatus(id){
App.Reserve.GetReserveDepositByid({
id
}).then(res=>{
if(res.ret == 200){
this.setData({
paymentStatus:res.data.trade_state=='SUCCESS'?'1':'0'
})
}
})
},
// 获取自定义图文内容
getText() {
App.Reserve.GetReserveImgText({
rid: this.data.options.id
}).then(res => {
if (res.ret == 200 && res.data) {
let data = res.data;
let content = util.determine(data.content)
console.log('contentcontentcontent', content);
this.setData({
reserveData: {
title: data.title || '',
content,
}
})
}
})
},
// 点击支付定金
paymentFun() {
App.PayOnline.CombineTransactionsByDeposit({
id: this.options.paymentId,
openid: getApp().openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
timeStamp: res.data.timeStamp + '',
nonceStr: res.data.nonceStr,
package: res.data.package,
signType: res.data.signType,
paySign: res.data.paySign,
success(ress) {
if (ress.errMsg == 'requestPayment:ok') {
console.log('支付成功', ress);
this.setData({
paymentStatus:'1'
})
return wx.showToast({
title: '支付成功',
icon: 'success'
})
}
console.log('支付失败', ress);
wx.showToast({
title: '支付失败,请重新支付',
icon: 'none',
})
},
fail(ress) {
console.log('支付失败', ress);
wx.showToast({
title: '支付失败,请重新支付',
icon: 'none',
})
},
})
}
})
},
// 客户经理获取基本信息
getstaffinfo(uid, sid) {
console.log('sellerid', this.data.detail.seller.id);
... ...
... ... @@ -113,6 +113,13 @@
<text wx:if="{{marketing.is_comments_coupon=='1'}}">想吐槽?戳这里填写意见反馈赢好礼!</text>
<image src="https://qn.colorcun.com/evaluate.png" mode="" />
</view>
<view class="reserveBox" wx:if="{{reserveData && (reserveData.title || reserveData.content)}}">
<view class="title font36r" wx:if="{{reserveData.title}}">{{reserveData.title}}</view>
<block wx:for="{{reserveData.content}}" wx:key="index">
<image class="items" wx:if="{{item.type =='1'}}" src="{{item.content}}" mode="widthFix"/>
<view class="items font24r" wx:if="{{item.type == '2'}}">{{item.content}}</view>
</block>
</view>
<!-- 餐厅介绍图文分开 -->
<view class="introduce" wx:if="{{store}}">
<view class="imgMask">
... ... @@ -215,9 +222,10 @@
<image src="https://qn.colorcun.com/jt1.png" mode="" />
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1'}}" 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" bindtap="secondbook" style="position: relative;">再次预订
<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>
<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>
</view>
\ No newline at end of file
... ...
... ... @@ -256,7 +256,7 @@
margin-left: 20rpx;
color: #515151;
font-family: PingFang SC;
font-size: 20rpx;
font-size: 24rpx;
max-height: 400rpx;
overflow: hidden;
white-space: pre-line;
... ... @@ -483,6 +483,14 @@
border: 2rpx solid #0143A3;
}
.moreBtn{
width: 100%;
}
.sharewidth .moreBtn {
width: 100% !important;
}
.between .shareItem {
width: 100%;
margin: 0;
... ... @@ -541,6 +549,23 @@
font-size: 28rpx;
}
.reserveBox{
margin: 20rpx 40rpx 0 40rpx;
}
.reserveBox .title{
color: #000;
font-family: PingFang SC;
font-size: 36rpx !important;
top: 0 !important;
text-align: left !important;
margin: 0 0 20rpx 0 !important;
}
.reserveBox .items{
margin-bottom: 20rpx;
color: #000;
font-family: PingFang SC;
}
.more {
height: 80rpx;
width: 100%;
... ...
... ... @@ -52,6 +52,8 @@ Page({
hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报
_attentionAnim: {},
isPlay: '1',
paymentStatus:'',//定金支付状态 1支付 0未支付
reserveData:{},//自定义图文数据
},
tablestr: '',
urlsValue: [],
... ... @@ -73,6 +75,9 @@ 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 +144,7 @@ Page({
*/
onShow: function () {
this.getDetail()
this.getText()
},
// 复制微信号
copyWeChat() {
... ... @@ -310,6 +316,77 @@ Page({
}
})
},
// 通过定金ID查收定金详情
getPaymentStatus(id){
App.Reserve.GetReserveDepositByid({
id
}).then(res=>{
if(res.ret == 200){
this.setData({
paymentStatus:res.data.trade_state=='SUCCESS'?'1':'0'
})
}
})
},
// 获取自定义图文内容
getText() {
App.Reserve.GetReserveImgText({
rid: this.data.options.id
}).then(res => {
if (res.ret == 200 && res.data) {
let data = res.data;
let content = util.determine(data.content)
console.log('contentcontentcontent', content);
this.setData({
reserveData: {
title: data.title || '',
content,
}
})
}
})
},
// 点击支付定金
paymentFun() {
App.PayOnline.CombineTransactionsByDeposit({
id: this.options.paymentId,
openid: getApp().openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
timeStamp: res.data.timeStamp + '',
nonceStr: res.data.nonceStr,
package: res.data.package,
signType: res.data.signType,
paySign: res.data.paySign,
success(ress) {
if (ress.errMsg == 'requestPayment:ok') {
console.log('支付成功', ress);
this.setData({
paymentStatus:'1'
})
return wx.showToast({
title: '支付成功',
icon: 'success'
})
}
console.log('支付失败', ress);
wx.showToast({
title: '支付失败,请重新支付',
icon: 'none',
})
},
fail(ress) {
console.log('支付失败', ress);
wx.showToast({
title: '支付失败,请重新支付',
icon: 'none',
})
},
})
}
})
},
// 客户经理获取基本信息
getstaffinfo(uid, sid) {
console.log('sellerid', this.data.detail.seller.id);
... ...
... ... @@ -92,6 +92,13 @@
<text wx:if="{{marketing.is_comments_coupon=='1'}}">想吐槽?戳这里填写意见反馈赢好礼!</text>
<image src="https://qn.colorcun.com/evaluate.png" mode="" />
</view>
<view class="reserveBox" wx:if="{{reserveData && (reserveData.title || reserveData.content)}}">
<view class="title font36r" wx:if="{{reserveData.title}}">{{reserveData.title}}</view>
<block wx:for="{{reserveData.content}}" wx:key="index">
<image class="items" wx:if="{{item.type =='1'}}" src="{{item.content}}" mode="widthFix"/>
<view class="items font24r" wx:if="{{item.type == '2'}}">{{item.content}}</view>
</block>
</view>
<!-- 餐厅介绍图文分开 -->
<block wx:if="{{store}}">
<view class="imgMask">
... ... @@ -191,9 +198,10 @@
<image src="https://qn.colorcun.com/jt1.png" mode="" />
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1'}}" 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" bindtap="secondbook" style="position: relative;">再次预订
<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>
<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>
</view>
\ No newline at end of file
... ...
... ... @@ -454,6 +454,14 @@
color: #fff;
}
.moreBtn{
width: 100%;
}
.sharewidth .moreBtn {
width: 100% !important;
}
.sharewidth .shareItem {
width: 100% !important;
}
... ... @@ -504,6 +512,24 @@
font-size: 28rpx;
}
.reserveBox{
margin: 20rpx 40rpx 0 40rpx;
}
.reserveBox .title{
color: #000;
font-family: PingFang SC;
font-size: 36rpx !important;
top: 0 !important;
text-align: left !important;
margin: 0 0 20rpx 0 !important;
}
.reserveBox .items{
margin-bottom: 20rpx;
color: #000;
font-family: PingFang SC;
}
.scroll-view {
white-space: nowrap;
}
... ...
... ... @@ -51,6 +51,8 @@ Page({
hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报
_attentionAnim: {},
isPlay: '1',
paymentStatus:'',//定金支付状态 1支付 0未支付
reserveData:{},//自定义图文数据
},
tablestr: '',
urlsValue: [],
... ... @@ -72,6 +74,9 @@ Page({
console.log(param);
console.log(options);
this.setData(param)
if(options.paymentId){
this.getPaymentStatus(options.paymentId)
}
mta.Page.init({
"appID": "500667280",
"eventID": "500667287",
... ... @@ -138,6 +143,7 @@ Page({
*/
onShow: function () {
this.getDetail()
this.getText()
},
// 复制微信号
copyWeChat() {
... ... @@ -309,6 +315,77 @@ Page({
}
})
},
// 通过定金ID查收定金详情
getPaymentStatus(id){
App.Reserve.GetReserveDepositByid({
id
}).then(res=>{
if(res.ret == 200){
this.setData({
paymentStatus:res.data.trade_state=='SUCCESS'?'1':'0'
})
}
})
},
// 获取自定义图文内容
getText() {
App.Reserve.GetReserveImgText({
rid: this.data.options.id
}).then(res => {
if (res.ret == 200 && res.data) {
let data = res.data;
let content = util.determine(data.content)
console.log('contentcontentcontent', content);
this.setData({
reserveData: {
title: data.title || '',
content,
}
})
}
})
},
// 点击支付定金
paymentFun() {
App.PayOnline.CombineTransactionsByDeposit({
id: this.options.paymentId,
openid: getApp().openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
timeStamp: res.data.timeStamp + '',
nonceStr: res.data.nonceStr,
package: res.data.package,
signType: res.data.signType,
paySign: res.data.paySign,
success(ress) {
if (ress.errMsg == 'requestPayment:ok') {
console.log('支付成功', ress);
this.setData({
paymentStatus:'1'
})
return wx.showToast({
title: '支付成功',
icon: 'success'
})
}
console.log('支付失败', ress);
wx.showToast({
title: '支付失败,请重新支付',
icon: 'none',
})
},
fail(ress) {
console.log('支付失败', ress);
wx.showToast({
title: '支付失败,请重新支付',
icon: 'none',
})
},
})
}
})
},
// 客户经理获取基本信息
getstaffinfo(uid, sid) {
console.log('sellerid', this.data.detail.seller.id);
... ...
... ... @@ -89,6 +89,13 @@
<text wx:if="{{marketing.is_comments_coupon=='1'}}">想吐槽?戳这里填写意见反馈赢好礼!</text>
<image src="https://qn.colorcun.com/evaluate.png" mode="" />
</view>
<view class="reserveBox" wx:if="{{reserveData && (reserveData.title || reserveData.content)}}">
<view class="title font36r" wx:if="{{reserveData.title}}">{{reserveData.title}}</view>
<block wx:for="{{reserveData.content}}" wx:key="index">
<image class="items" wx:if="{{item.type =='1'}}" src="{{item.content}}" mode="widthFix"/>
<view class="items font24r" wx:if="{{item.type == '2'}}">{{item.content}}</view>
</block>
</view>
<!-- 餐厅介绍图文分开 -->
<block wx:if="{{store}}">
<view class="imgMask">
... ... @@ -188,9 +195,10 @@
<image src="https://qn.colorcun.com/jt1.png" mode="" />
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1'}}" 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" bindtap="secondbook" style="position: relative;">再次预订
<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>
<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>
</view>
\ No newline at end of file
... ...
... ... @@ -446,6 +446,14 @@
border: 2rpx solid #0143A3;
}
.moreBtn{
width: 100%;
}
.sharewidth .moreBtn {
width: 100% !important;
}
.between .shareItem {
width: 65% !important;
margin: 0;
... ... @@ -499,6 +507,21 @@
font-size: 28rpx;
}
.reserveBox{
margin: 20rpx 40rpx 0 40rpx;
}
.reserveBox .title{
margin-bottom: 20rpx;
color: #000;
font-family: PingFang SC;
}
.reserveBox .items{
margin-bottom: 20rpx;
color: #000;
font-family: PingFang SC;
}
.scroll-view {
white-space: nowrap;
}
... ...
... ... @@ -52,6 +52,8 @@ Page({
hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报
_attentionAnim: {},
isPlay: '1',
paymentStatus:'',//定金支付状态 1支付 0未支付
reserveData:{},//自定义图文数据
},
screenHeight: '',
attentionAnim: {},
... ... @@ -71,6 +73,9 @@ Page({
console.log(param);
console.log(options);
this.setData(param)
if(options.paymentId){
this.getPaymentStatus(options.paymentId)
}
mta.Page.init({
"appID": "500667280",
"eventID": "500667287",
... ... @@ -133,6 +138,7 @@ Page({
*/
onShow: function () {
this.getDetail()
this.getText()
},
cli() {
if (this.data.staffinfo.wechat) {
... ... @@ -262,6 +268,77 @@ Page({
}
})
},
// 通过定金ID查收定金详情
getPaymentStatus(id){
App.Reserve.GetReserveDepositByid({
id
}).then(res=>{
if(res.ret == 200){
this.setData({
paymentStatus:res.data.trade_state=='SUCCESS'?'1':'0'
})
}
})
},
// 获取自定义图文内容
getText() {
App.Reserve.GetReserveImgText({
rid: this.data.options.id
}).then(res => {
if (res.ret == 200 && res.data) {
let data = res.data;
let content = util.determine(data.content)
console.log('contentcontentcontent', content);
this.setData({
reserveData: {
title: data.title || '',
content,
}
})
}
})
},
// 点击支付定金
paymentFun() {
App.PayOnline.CombineTransactionsByDeposit({
id: this.options.paymentId,
openid: getApp().openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
timeStamp: res.data.timeStamp + '',
nonceStr: res.data.nonceStr,
package: res.data.package,
signType: res.data.signType,
paySign: res.data.paySign,
success(ress) {
if (ress.errMsg == 'requestPayment:ok') {
console.log('支付成功', ress);
this.setData({
paymentStatus:'1'
})
return wx.showToast({
title: '支付成功',
icon: 'success'
})
}
console.log('支付失败', ress);
wx.showToast({
title: '支付失败,请重新支付',
icon: 'none',
})
},
fail(ress) {
console.log('支付失败', ress);
wx.showToast({
title: '支付失败,请重新支付',
icon: 'none',
})
},
})
}
})
},
// 客户经理获取基本信息
getstaffinfo(uid, sid) {
console.log('sellerid', this.data.detail.seller.id);
... ...
... ... @@ -112,6 +112,13 @@
<text wx:if="{{marketing.is_comments_coupon=='1'}}">想吐槽?戳这里填写意见反馈赢好礼!</text>
<image src="https://qn.colorcun.com/evaluate.png" mode="" />
</view>
<view class="reserveBox" wx:if="{{reserveData && (reserveData.title || reserveData.content)}}">
<view class="title font36r" wx:if="{{reserveData.title}}">{{reserveData.title}}</view>
<block wx:for="{{reserveData.content}}" wx:key="index">
<image class="items" wx:if="{{item.type =='1'}}" src="{{item.content}}" mode="widthFix"/>
<view class="items font24r" wx:if="{{item.type == '2'}}">{{item.content}}</view>
</block>
</view>
<!-- 品牌介绍类型 图文合并 -->
<!-- (必须有图 && 新模板的图文合并开启 && 图片展示开启 && 文字展示开启) || (新模板的图文合并字段不存在代表老数据 && store.style 1图文合并)-->
<view class="introduce" wx:if="{{(store && store.images.length && store.is_above && store.is_above=='1' && store.is_images=='1' && store.is_introduce=='1') || (store && !store.is_above && store.style=='1')}}">
... ... @@ -266,9 +273,10 @@
<image src="https://qn.colorcun.com/jt1.png" mode="" />
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1'}}" 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" bindtap="secondbook" style="position: relative;">再次预订
<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>
<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>
</view>
\ No newline at end of file
... ...
... ... @@ -616,6 +616,14 @@
border: 2rpx solid #0143A3;
}
.moreBtn{
width: 100%;
}
.sharewidth .moreBtn {
width: 100% !important;
}
.between .shareItem {
width: 65% !important;
margin: 0;
... ... @@ -670,6 +678,24 @@
font-size: 28rpx;
}
.reserveBox{
margin: 20rpx 40rpx 0 40rpx;
}
.reserveBox .title{
color: #000;
font-family: PingFang SC;
font-size: 36rpx !important;
top: 0 !important;
text-align: left !important;
margin: 0 0 20rpx 0 !important;
}
.reserveBox .items{
margin-bottom: 20rpx;
color: #000;
font-family: PingFang SC;
}
.more {
height: 80rpx;
width: 100%;
... ...
... ... @@ -51,6 +51,8 @@ Page({
hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报
_attentionAnim: {},
isPlay: '1',
paymentStatus:'',//定金支付状态 1支付 0未支付
reserveData:{},//自定义图文数据
},
tablestr: '',
urlsValue: [],
... ... @@ -72,6 +74,9 @@ Page({
console.log(param);
console.log(options);
this.setData(param)
if(options.paymentId){
this.getPaymentStatus(options.paymentId)
}
mta.Page.init({
"appID": "500667280",
"eventID": "500667287",
... ... @@ -138,6 +143,7 @@ Page({
*/
onShow: function () {
this.getDetail()
this.getText()
},
// 复制微信号
copyWeChat() {
... ... @@ -309,6 +315,77 @@ Page({
}
})
},
// 通过定金ID查收定金详情
getPaymentStatus(id){
App.Reserve.GetReserveDepositByid({
id
}).then(res=>{
if(res.ret == 200){
this.setData({
paymentStatus:res.data.trade_state=='SUCCESS'?'1':'0'
})
}
})
},
// 获取自定义图文内容
getText() {
App.Reserve.GetReserveImgText({
rid: this.data.options.id
}).then(res => {
if (res.ret == 200 && res.data) {
let data = res.data;
let content = util.determine(data.content)
console.log('contentcontentcontent', content);
this.setData({
reserveData: {
title: data.title || '',
content,
}
})
}
})
},
// 点击支付定金
paymentFun() {
App.PayOnline.CombineTransactionsByDeposit({
id: this.options.paymentId,
openid: getApp().openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
timeStamp: res.data.timeStamp + '',
nonceStr: res.data.nonceStr,
package: res.data.package,
signType: res.data.signType,
paySign: res.data.paySign,
success(ress) {
if (ress.errMsg == 'requestPayment:ok') {
console.log('支付成功', ress);
this.setData({
paymentStatus:'1'
})
return wx.showToast({
title: '支付成功',
icon: 'success'
})
}
console.log('支付失败', ress);
wx.showToast({
title: '支付失败,请重新支付',
icon: 'none',
})
},
fail(ress) {
console.log('支付失败', ress);
wx.showToast({
title: '支付失败,请重新支付',
icon: 'none',
})
},
})
}
})
},
// 客户经理获取基本信息
getstaffinfo(uid, sid) {
console.log('sellerid', this.data.detail.seller.id);
... ...
... ... @@ -107,6 +107,13 @@
<text wx:if="{{marketing.is_comments_coupon=='1'}}">想吐槽?戳这里填写意见反馈赢好礼!</text>
<image src="https://qn.colorcun.com/evaluate.png" mode="" />
</view>
<view class="reserveBox" wx:if="{{reserveData && (reserveData.title || reserveData.content)}}">
<view class="title font36r" wx:if="{{reserveData.title}}">{{reserveData.title}}</view>
<block wx:for="{{reserveData.content}}" wx:key="index">
<image class="items" wx:if="{{item.type =='1'}}" src="{{item.content}}" mode="widthFix"/>
<view class="items font24r" wx:if="{{item.type == '2'}}">{{item.content}}</view>
</block>
</view>
<!-- 餐厅介绍图文分开 -->
<view class="introduce" wx:if="{{store}}">
<view class="imgMask">
... ... @@ -209,9 +216,10 @@
<image src="https://qn.colorcun.com/jt1.png" mode="" />
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1'}}" 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" bindtap="secondbook" style="position: relative;">再次预订
<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>
<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>
</view>
\ No newline at end of file
... ...
... ... @@ -222,7 +222,7 @@
margin: 0 0 20rpx 20rpx;
color: #515151;
font-family: PingFang SC;
font-size: 20rpx;
font-size: 24rpx;
max-height: 400rpx;
overflow: hidden;
white-space: pre-line;
... ... @@ -447,6 +447,14 @@
border: 2rpx solid #0143A3;
}
.moreBtn{
width: 100%;
}
.sharewidth .moreBtn {
width: 100% !important;
}
.between .shareItem {
width: 100%;
margin: 0;
... ... @@ -505,6 +513,21 @@
font-size: 28rpx;
}
.reserveBox{
margin: 20rpx 40rpx 0 40rpx;
}
.reserveBox .title{
margin-bottom: 20rpx;
color: #000;
font-family: PingFang SC;
}
.reserveBox .items{
margin-bottom: 20rpx;
color: #000;
font-family: PingFang SC;
}
.more {
height: 80rpx;
width: 100%;
... ...
... ... @@ -51,6 +51,8 @@ Page({
hasValueBroadcast:false,//商家是否能播报,只有极速版不能播报
_attentionAnim: {},
isPlay: '1',
paymentStatus:'',//定金支付状态 1支付 0未支付
reserveData:{},//自定义图文数据
},
tablestr: '',
urlsValue: [],
... ... @@ -72,6 +74,9 @@ Page({
console.log(param);
console.log(options);
this.setData(param)
if(options.paymentId){
this.getPaymentStatus(options.paymentId)
}
mta.Page.init({
"appID": "500667280",
"eventID": "500667287",
... ... @@ -138,6 +143,7 @@ Page({
*/
onShow: function () {
this.getDetail()
this.getText()
},
// 复制微信号
copyWeChat() {
... ... @@ -308,6 +314,77 @@ Page({
}
})
},
// 通过定金ID查收定金详情
getPaymentStatus(id){
App.Reserve.GetReserveDepositByid({
id
}).then(res=>{
if(res.ret == 200){
this.setData({
paymentStatus:res.data.trade_state=='SUCCESS'?'1':'0'
})
}
})
},
// 获取自定义图文内容
getText() {
App.Reserve.GetReserveImgText({
rid: this.data.options.id
}).then(res => {
if (res.ret == 200 && res.data) {
let data = res.data;
let content = util.determine(data.content)
console.log('contentcontentcontent', content);
this.setData({
reserveData: {
title: data.title || '',
content,
}
})
}
})
},
// 点击支付定金
paymentFun() {
App.PayOnline.CombineTransactionsByDeposit({
id: this.options.paymentId,
openid: getApp().openid,
}).then(res => {
if (res.ret == 200) {
wx.requestPayment({
timeStamp: res.data.timeStamp + '',
nonceStr: res.data.nonceStr,
package: res.data.package,
signType: res.data.signType,
paySign: res.data.paySign,
success(ress) {
if (ress.errMsg == 'requestPayment:ok') {
console.log('支付成功', ress);
this.setData({
paymentStatus:'1'
})
return wx.showToast({
title: '支付成功',
icon: 'success'
})
}
console.log('支付失败', ress);
wx.showToast({
title: '支付失败,请重新支付',
icon: 'none',
})
},
fail(ress) {
console.log('支付失败', ress);
wx.showToast({
title: '支付失败,请重新支付',
icon: 'none',
})
},
})
}
})
},
// 客户经理获取基本信息
getstaffinfo(uid, sid) {
console.log('sellerid', this.data.detail.seller.id);
... ...
... ... @@ -94,6 +94,13 @@
<text wx:if="{{marketing.is_comments_coupon=='1'}}">想吐槽?戳这里填写意见反馈赢好礼!</text>
<image src="https://qn.colorcun.com/evaluate.png" mode="" />
</view>
<view class="reserveBox" wx:if="{{reserveData && (reserveData.title || reserveData.content)}}">
<view class="title font36r" wx:if="{{reserveData.title}}">{{reserveData.title}}</view>
<block wx:for="{{reserveData.content}}" wx:key="index">
<image class="items" wx:if="{{item.type =='1'}}" src="{{item.content}}" mode="widthFix"/>
<view class="items font24r" wx:if="{{item.type == '2'}}">{{item.content}}</view>
</block>
</view>
<!-- 餐厅介绍图文分开 -->
<view class="introduce" wx:if="{{store}}">
<view class="imgMask">
... ... @@ -196,9 +203,10 @@
<image src="https://qn.colorcun.com/jt1.png" mode="" />
</view>
</scroll-view>
<view wx:if="{{marketing.is_transpond=='1' || marketing.is_online_book=='1'}}" 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" bindtap="secondbook" style="position: relative;">再次预订
<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>
<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>
</view>
\ No newline at end of file
... ...
... ... @@ -241,7 +241,7 @@
margin: 0 0 20rpx 20rpx;
color: #515151;
font-family: PingFang SC;
font-size: 20rpx;
font-size: 24rpx;
max-height: 400rpx;
overflow: hidden;
white-space: pre-line;
... ... @@ -465,6 +465,14 @@
border: 2rpx solid #0143A3;
}
.moreBtn{
width: 100%;
}
.sharewidth .moreBtn {
width: 100% !important;
}
.between .shareItem {
width: 100%;
margin: 0;
... ... @@ -523,6 +531,21 @@
font-size: 28rpx;
}
.reserveBox{
margin: 20rpx 40rpx 0 40rpx;
}
.reserveBox .title{
margin-bottom: 20rpx;
color: #000;
font-family: PingFang SC;
}
.reserveBox .items{
margin-bottom: 20rpx;
color: #000;
font-family: PingFang SC;
}
.more {
height: 80rpx;
width: 100%;
... ...
... ... @@ -73,7 +73,8 @@ Page({
url = '/pages/customer/detail_owner_invitation6';
}
url += '?id=' + this.data.options.id + '&tplid=' + this.data.options.tplid;
console.log('url', url);
url+= this.data.options.paymentId?'&paymentId='+this.data.options.paymentId:'&paymentId=' ;
console.log('跳转路径url', url);
wx.redirectTo({
url
})
... ...
... ... @@ -736,4 +736,19 @@ export default {
openid:'openid'
},
// 用户从邀请函支付定金
'App.PayOnline.CombineTransactionsByDeposit':{
openid:'openid'
},
// 通过定金ID查收定金详情
'App.Reserve.GetReserveDepositByid':{
openid:'openid'
},
// 获取预订详情自定义图文
'App.Reserve.GetReserveImgText':{
openid:'openid'
},
}
\ No newline at end of file
... ...