Commit 7e2b9e16 by 高淑倩

详情页支付url

parent 5bbb8e87
...@@ -17,6 +17,7 @@ wxService.page({ ...@@ -17,6 +17,7 @@ wxService.page({
min: '00', min: '00',
sec: '00', sec: '00',
ms: '0', ms: '0',
mergedAmount: 0
}, },
/** /**
...@@ -62,7 +63,8 @@ wxService.page({ ...@@ -62,7 +63,8 @@ wxService.page({
// 订单倒计时 超多两小时 刷新当前页 // 订单倒计时 超多两小时 刷新当前页
// 本地时间 - 创建时间 > 2小时 刷新当前页 // 本地时间 - 创建时间 > 2小时 刷新当前页
this.setData({ this.setData({
detail: data detail: data,
mergedAmount: data.mergedAmount || 0
}, ()=>{ }, ()=>{
this.initCountDown(data.countDownOrderTime, data.createOrderTime, data.localNowTime) this.initCountDown(data.countDownOrderTime, data.createOrderTime, data.localNowTime)
}) })
...@@ -169,11 +171,13 @@ wxService.page({ ...@@ -169,11 +171,13 @@ wxService.page({
title: '加载中', title: '加载中',
mask: true mask: true
}) })
wxService.post(`/sale/trade/buyer/wxprepay/${id}`).then(res => {
const { mergedAmount } = this.data
let url = mergedAmount ? `/sale/payment/merged/buyer/wxprepay/${id}` : `/sale/trade/buyer/wxprepay/${id}`
wxService.post(`${url}`).then(res => {
if (res) { if (res) {
const { result, data } = res.data const { result, data } = res.data
if (result == 0) { if (result == 0) {
console.log('dddd', data.amount)
let amount = data.amount || 0 let amount = data.amount || 0
wx.hideLoading() wx.hideLoading()
wx.requestPayment(Object.assign({ wx.requestPayment(Object.assign({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment