|
...
|
...
|
@@ -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);
|
...
|
...
|
|