@@ -206,13 +206,24 @@ Page({ | |||||
bindfail: function (res) { | bindfail: function (res) { | ||||
console.log(res) | console.log(res) | ||||
}, | }, | ||||
gotoetcp: function () { | |||||
wx.navigateToMiniProgram({ | |||||
appId: that.data.etcpAppId, | |||||
extraData: this.data.extraData, | |||||
envVersion: 'release', | |||||
path: "pages/pay/order-pay-open/main", | |||||
}) | |||||
gotoetcp: function (e) { | |||||
// etcp parkVendor1 | |||||
// 新加 parkVendor5 | |||||
if (e.target.dataset.flag == 'parkVendor1'){ | |||||
wx.navigateToMiniProgram({ | |||||
appId: this.data.etcpAppId, | |||||
extraData: this.data.extraData, | |||||
envVersion: 'release', | |||||
path: "pages/pay/order-pay-open/main", | |||||
}) | |||||
} else if (e.target.dataset.flag == 'parkVendor5'){ | |||||
wx.navigateToMiniProgram({ | |||||
appId: 'wxbd08b4baa10fcc1d', | |||||
extraData: this.data.extraData, | |||||
envVersion: 'release', | |||||
path: "pages/park/park", | |||||
}) | |||||
} | |||||
}, | }, | ||||
showquan: function () { | showquan: function () { | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
@@ -740,22 +751,37 @@ Page({ | |||||
}) | }) | ||||
.then(res => { | .then(res => { | ||||
console.log(res) | console.log(res) | ||||
var extraDataStr = { | |||||
params: { | |||||
token: app.globalData.etcpToken, | |||||
syncId: res.data.orderId, | |||||
payType: 6, // 小程序支付 | |||||
CarNumber: carNumber, | |||||
returnUrl: that.data.etcpCallbackUrl, | |||||
source: "FUMAO-001", | |||||
actionId: "1" //操作ID,1:小程序支付 | |||||
if(app.globalData.parkVendor != 5){ | |||||
var extraDataStr = { | |||||
params: { | |||||
token: app.globalData.etcpToken, | |||||
syncId: res.data.orderId, | |||||
payType: 6, // 小程序支付 | |||||
CarNumber: carNumber, | |||||
returnUrl: that.data.etcpCallbackUrl, | |||||
source: "FUMAO-001", | |||||
actionId: "1" //操作ID,1:小程序支付 | |||||
} | |||||
} | } | ||||
}; | |||||
} else if (app.globalData.parkVendor == 5) { | |||||
var extraDataStr = { | |||||
params: { | |||||
union_id: '200389', | |||||
order_id: res.data.orderId, | |||||
park_id: "30536", | |||||
plate_number: carNumber, | |||||
money: res.data.remainingFee, | |||||
park_name: "", | |||||
} | |||||
} | |||||
} | |||||
that.setData({ | that.setData({ | ||||
extraData: extraDataStr, | extraData: extraDataStr, | ||||
stopFees: res.data, | stopFees: res.data, | ||||
timecha: Util.timecha(res.data.exitTime, res.data.entranceTime) | timecha: Util.timecha(res.data.exitTime, res.data.entranceTime) | ||||
}); | }); | ||||
that.setData({ | that.setData({ | ||||
scroll: true | scroll: true | ||||
}) | }) | ||||
@@ -46,18 +46,22 @@ | |||||
<text class='fr' style='color:#ff4949;'>{{stopFees.remainingFee}}元</text> | <text class='fr' style='color:#ff4949;'>{{stopFees.remainingFee}}元</text> | ||||
</view> | </view> | ||||
<!-- 停车费用大于0 --> | <!-- 停车费用大于0 --> | ||||
<view class="buy-view" wx:if="{{stopFees.orderId&&stopFees.remainingFee>0}}"> | |||||
<view class="buy-view" wx:if="{{stopFees.orderId&&stopFees.remainingFee>0&&app.globalData.parkVendor!=1}}"> | |||||
<navigator bindfail="bindfail" path="pages/pay/order-pay-open/main" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="{{etcpAppId}}" extra-data='{{extraData}}' version="{{etcpVersion}}"> | <navigator bindfail="bindfail" path="pages/pay/order-pay-open/main" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="{{etcpAppId}}" extra-data='{{extraData}}' version="{{etcpVersion}}"> | ||||
立即支付 | 立即支付 | ||||
</navigator> | </navigator> | ||||
<view wx:if="{{!canIUse}}" class='buy' bindtap='gotoetcp'>立即支付</view> | |||||
<view wx:if="{{!canIUse}}" class='buy' data-flag="parkVendor1" bindtap='gotoetcp'>立即支付</view> | |||||
</view> | |||||
<view class="buy-view" wx:if="{{stopFees.orderId&&stopFees.remainingFee>0&&app.globalData.parkVendor==5}}"> | |||||
<navigator bindfail="bindfail" path="pages/park/park" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="wxbd08b4baa10fcc1d" extra-data='{{extraData}}' version="{{etcpVersion}}"> | |||||
立即支付 | |||||
</navigator> | |||||
<view wx:if="{{!canIUse}}" class='buy' data-flag="parkVendor5" bindtap='gotoetcp'>立即支付</view> | |||||
</view> | </view> | ||||
<!-- 停车费用为0 --> | <!-- 停车费用为0 --> | ||||
<view wx:if="{{stopFees.remainingFee==0}}" class='buy' bindtap='paySuccess'>立即支付</view> | <view wx:if="{{stopFees.remainingFee==0}}" class='buy' bindtap='paySuccess'>立即支付</view> | ||||
</view> | </view> | ||||
<!-- 没有车牌的时候显示 --> | <!-- 没有车牌的时候显示 --> | ||||
<view class='borderUp' bindtap='jumpToAdd' wx:if="{{carList.length==0}}"> | <view class='borderUp' bindtap='jumpToAdd' wx:if="{{carList.length==0}}"> | ||||
<view class="myCars"> | <view class="myCars"> | ||||