|
|
@@ -30,6 +30,7 @@ Page({ |
|
|
|
current: 0,
|
|
|
|
stopFees: {},
|
|
|
|
scroll: true,
|
|
|
|
ifHaveCarModular:"",
|
|
|
|
canIUse: wx.canIUse("navigator")
|
|
|
|
},
|
|
|
|
/**
|
|
|
@@ -60,7 +61,6 @@ Page({ |
|
|
|
console.log(res)
|
|
|
|
},
|
|
|
|
gotoetcp: function () {
|
|
|
|
console.log(this.data.passCarAppId)
|
|
|
|
wx.navigateToMiniProgram({
|
|
|
|
appId: that.data.passCarAppId,
|
|
|
|
extraData: this.data.extraData,
|
|
|
@@ -82,14 +82,23 @@ Page({ |
|
|
|
},
|
|
|
|
onShow: function (options) {
|
|
|
|
var that = this;
|
|
|
|
console.log(extConfig);
|
|
|
|
that.setData({
|
|
|
|
passCarAppId: extConfig.attr.passCarAppId,
|
|
|
|
etcpversion: extConfig.attr.etcpversion,
|
|
|
|
passCarreturnUrl: extConfig.attr.passCarreturnUrl,
|
|
|
|
ifHaveCarModular: extConfig.attr.ifHaveCarModular
|
|
|
|
})
|
|
|
|
console.log("停车");
|
|
|
|
console.log(that.data.ifHaveCarModular)
|
|
|
|
if (Object.keys(extConfig).length != 0) {
|
|
|
|
that.setData({
|
|
|
|
passCarAppId: extConfig.attr.passCarAppId,
|
|
|
|
etcpversion: extConfig.attr.etcpversion,
|
|
|
|
passCarreturnUrl: extConfig.attr.passCarreturnUrl,
|
|
|
|
ifHaveCarModular: extConfig.attr.ifHaveCarModular
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
that.setData({
|
|
|
|
passCarAppId:'wx192b7d2e8dcbefd0',
|
|
|
|
etcpversion:'release',
|
|
|
|
passCarreturnUrl:'https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback',
|
|
|
|
ifHaveCarModular:1
|
|
|
|
})
|
|
|
|
}
|
|
|
|
console.log(that.data.ifHaveCarModular)
|
|
|
|
if (app.globalData.token) {
|
|
|
|
that.getList();
|
|
|
|
that.init();
|
|
|
@@ -549,20 +558,19 @@ Page({ |
|
|
|
carNumber: carNumber,
|
|
|
|
outCarId: outCarId
|
|
|
|
};
|
|
|
|
console.log(that.data.passCarreturnUrl)
|
|
|
|
console.log("获得停车费用")
|
|
|
|
Http.post({
|
|
|
|
url: config.api.getCarStopFee,
|
|
|
|
data: postData
|
|
|
|
})
|
|
|
|
.then(res => {
|
|
|
|
console.log(res)
|
|
|
|
var extraDataStr = {
|
|
|
|
params: {
|
|
|
|
token: app.globalData.etcpToken,
|
|
|
|
syncId: res.data.orderId,
|
|
|
|
payType: 6, // 小程序支付
|
|
|
|
CarNumber: carNumber,
|
|
|
|
returnUrl: passCarreturnUrl,
|
|
|
|
returnUrl: that.data.passCarreturnUrl,
|
|
|
|
source: "FUMAO-001",
|
|
|
|
actionId: "1" //操作ID,1:小程序支付
|
|
|
|
}
|
|
|
@@ -572,12 +580,12 @@ Page({ |
|
|
|
stopFees: res.data,
|
|
|
|
timecha: Util.timecha(res.data.exitTime, res.data.entranceTime)
|
|
|
|
});
|
|
|
|
console.log(that.data.stopFees)
|
|
|
|
that.setData({
|
|
|
|
scroll: true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(error => {
|
|
|
|
console.log(error)
|
|
|
|
that.setData({
|
|
|
|
stopFees: {},
|
|
|
|
scroll: true
|
|
|
|