| @@ -1,12 +1,14 @@ | |||
| const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | |||
| let app = getApp(); | |||
| let config = require("../../config/config.js"); | |||
| let Http = require("../../utils/HttpBasics"); | |||
| let Util = require("../../utils/util"); | |||
| let app = getApp(); | |||
| const imgurl = require("../../utils/imgurl"); | |||
| Page({ | |||
| data: { | |||
| parkUrl: imgurl.park.url, | |||
| jianUrl: imgurl.jian.url, | |||
| qidaiUrl: imgurl.qidai.url, | |||
| addUrl: imgurl.add.url, | |||
| quanUrl: imgurl.quan.url, | |||
| cheUrl: imgurl.che.url, | |||
| @@ -58,9 +60,9 @@ Page({ | |||
| console.log(res) | |||
| }, | |||
| gotoetcp:function(){ | |||
| console.log(this.data.extraData) | |||
| console.log(this.data.passCarAppId) | |||
| wx.navigateToMiniProgram({ | |||
| appId:'wx192b7d2e8dcbefd0', | |||
| appId: that.data.passCarAppId, | |||
| extraData: this.data.extraData, | |||
| envVersion:'release', | |||
| path:"pages/main/main", | |||
| @@ -80,6 +82,14 @@ 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("停车"); | |||
| if (app.globalData.token) { | |||
| that.getList(); | |||
| that.init(); | |||
| @@ -539,7 +549,8 @@ Page({ | |||
| carNumber: carNumber, | |||
| outCarId: outCarId | |||
| }; | |||
| console.log(postData) | |||
| console.log(that.data.passCarreturnUrl) | |||
| console.log("获得停车费用") | |||
| Http.post({ | |||
| url: config.api.getCarStopFee, | |||
| data: postData | |||
| @@ -551,7 +562,7 @@ Page({ | |||
| syncId: res.data.orderId, | |||
| payType: 6, // 小程序支付 | |||
| CarNumber: carNumber, | |||
| returnUrl: "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback", | |||
| returnUrl: passCarreturnUrl, | |||
| source: "FUMAO-001", | |||
| actionId: "1" //操作ID,1:小程序支付 | |||
| } | |||
| @@ -567,11 +578,6 @@ Page({ | |||
| }) | |||
| .catch(error => { | |||
| console.log(error) | |||
| wx.showModal({ | |||
| title: '提示', | |||
| content: error.message, | |||
| showCancel: false | |||
| }) | |||
| that.setData({ | |||
| stopFees: {}, | |||
| scroll: true | |||
| @@ -1,4 +1,4 @@ | |||
| <view class='container'> | |||
| <view class='container' wx:if="{{ifHaveCarModular == 1}}"> | |||
| <view class='top'> | |||
| <view class='header'> | |||
| <image src='{{parkUrl}}' mode="widthFix"></image>{{park.addr}} | |||
| @@ -23,11 +23,6 @@ | |||
| </swiper-item> | |||
| </block> | |||
| </swiper> | |||
| <!-- <view class="dots"> | |||
| <block wx:for="{{carList}}" wx:key="unique"> | |||
| <view class="dot{{index == current ? ' active' : ''}}"></view> | |||
| </block> | |||
| </view> --> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| @@ -50,8 +45,6 @@ | |||
| <text wx:else>{{couponList.length}}张可用</text> | |||
| <image class='jiant' src='{{jianUrl}}' mode='widthFix'></image> | |||
| </view> | |||
| </view> | |||
| <view class="clearfix"> | |||
| @@ -61,12 +54,9 @@ | |||
| <view class="buy-view" wx:if="{{stopFees.orderId}}"> | |||
| <navigator bindfail="bindfail" path="pages/main/main" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="wx192b7d2e8dcbefd0" extra-data='{{extraData}}' version="release"> | |||
| <navigator bindfail="bindfail" path="pages/main/main" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="{{passCarAppId}}" extra-data='{{extraData}}' version="{{etcpversion}}"> | |||
| 立即支付 | |||
| </navigator> | |||
| <!-- <navigator wx:if="{{canIUse}}" class='buy' path="pages/main/main" target="miniProgram" open-type="navigate" app-id="wxc07f9d67923d676d" extra-data='{{extraData}}' version="release"> | |||
| 立即支付 | |||
| </navigator> --> | |||
| <view wx:if="{{!canIUse}}" class='buy' bindtap='gotoetcp'>立即支付</view> | |||
| </view> | |||
| </view> | |||
| @@ -112,4 +102,9 @@ | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <view class="con" wx:if="{{ifHaveCarModular == 0}}"> | |||
| <image class="img" src="{{qidaiUrl}}" mode="widthFix"></image> | |||
| <text class="txt1">智慧停车即将上线</text> | |||
| <text class="txt2">敬请期待</text> | |||
| </view> | |||
| @@ -375,19 +375,6 @@ page { | |||
| .textV3 { | |||
| width: 225rpx; | |||
| } | |||
| /* .textV1{ | |||
| position: absolute; | |||
| left: 10rpx; | |||
| top: 22rpx; | |||
| } */ | |||
| /* .textV2{ | |||
| position: absolute; | |||
| top: 22rpx; | |||
| right: 80rpx; | |||
| } */ | |||
| .choice { | |||
| width: 80rpx; | |||
| height: 80rpx; | |||
| @@ -636,4 +623,28 @@ button::after { | |||
| vertical-align: middle; | |||
| margin-top: -6rpx; | |||
| margin-right: -10rpx; | |||
| } | |||
| } | |||
| .img { | |||
| display: block; | |||
| width: 211rpx; | |||
| margin: 168rpx auto 40rpx; | |||
| } | |||
| .txt1 { | |||
| display: block; | |||
| font-size: 34rpx; | |||
| color: #333; | |||
| letter-spacing: 0; | |||
| text-align: center; | |||
| } | |||
| .txt2 { | |||
| display: block; | |||
| font-size: 28rpx; | |||
| color: #999; | |||
| letter-spacing: 0; | |||
| text-align: center; | |||
| line-height: 40rpx; | |||
| margin-top: 10rpx; | |||
| } | |||