@@ -1,10 +1,8 @@ | |||||
const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | ||||
console.log(extConfig.weappId) | |||||
let weappId = extConfig.weappId; | let weappId = extConfig.weappId; | ||||
console.log(extConfig) | |||||
var config = { | var config = { | ||||
url: "https://ciformall.youlane.cn/C/api", | |||||
// url:"https://c.malls.iformall.com/C/api", | |||||
// url:'https://ctest.malls.iformall.com/C/api', | |||||
url: extConfig.attr.configUrl, | |||||
api: { | api: { | ||||
/** | /** | ||||
* 接口用途:login | * 接口用途:login | ||||
@@ -6,6 +6,7 @@ | |||||
"name": "富茂客官开发", | "name": "富茂客官开发", | ||||
"attr": { | "attr": { | ||||
"ifHaveCarModular":"1", | "ifHaveCarModular":"1", | ||||
"etcppversion":"release", | |||||
"configUrl":"https://ciformall.youlane.cn/C/api", | "configUrl":"https://ciformall.youlane.cn/C/api", | ||||
"passCarAppId":"wx192b7d2e8dcbefd0", | "passCarAppId":"wx192b7d2e8dcbefd0", | ||||
"passCarPath":"pages/passCar/passCar", | "passCarPath":"pages/passCar/passCar", | ||||
@@ -1,4 +1,5 @@ | |||||
{ | { | ||||
"usingComponents": {}, | "usingComponents": {}, | ||||
"navigationBarTitleText": "首页", | |||||
"navigationBarBackgroundColor": "#fff" | "navigationBarBackgroundColor": "#fff" | ||||
} | } |
@@ -1,12 +1,14 @@ | |||||
const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | |||||
let app = getApp(); | |||||
let config = require("../../config/config.js"); | let config = require("../../config/config.js"); | ||||
let Http = require("../../utils/HttpBasics"); | let Http = require("../../utils/HttpBasics"); | ||||
let Util = require("../../utils/util"); | let Util = require("../../utils/util"); | ||||
let app = getApp(); | |||||
const imgurl = require("../../utils/imgurl"); | const imgurl = require("../../utils/imgurl"); | ||||
Page({ | Page({ | ||||
data: { | data: { | ||||
parkUrl: imgurl.park.url, | parkUrl: imgurl.park.url, | ||||
jianUrl: imgurl.jian.url, | jianUrl: imgurl.jian.url, | ||||
qidaiUrl: imgurl.qidai.url, | |||||
addUrl: imgurl.add.url, | addUrl: imgurl.add.url, | ||||
quanUrl: imgurl.quan.url, | quanUrl: imgurl.quan.url, | ||||
cheUrl: imgurl.che.url, | cheUrl: imgurl.che.url, | ||||
@@ -58,19 +60,13 @@ Page({ | |||||
console.log(res) | console.log(res) | ||||
}, | }, | ||||
gotoetcp:function(){ | gotoetcp:function(){ | ||||
console.log(this.data.extraData) | |||||
console.log(this.data.passCarAppId) | |||||
wx.navigateToMiniProgram({ | wx.navigateToMiniProgram({ | ||||
appId:'wx192b7d2e8dcbefd0', | |||||
appId: that.data.passCarAppId, | |||||
extraData: this.data.extraData, | extraData: this.data.extraData, | ||||
envVersion:'release', | envVersion:'release', | ||||
path:"pages/main/main", | path:"pages/main/main", | ||||
}) | }) | ||||
// wx.navigateToMiniProgram({ | |||||
// appId:'wxc07f9d67923d676d', | |||||
// extraData: this.data.extraData, | |||||
// envVersion:'release', | |||||
// path: "pages/main/main", | |||||
// }) | |||||
}, | }, | ||||
showquan: function() { | showquan: function() { | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
@@ -86,6 +82,15 @@ Page({ | |||||
}, | }, | ||||
onShow: function(options) { | onShow: function(options) { | ||||
var that = this; | var that = this; | ||||
console.log(extConfig); | |||||
that.setData({ | |||||
passCarPath:extConfig.attr.passCarPath, | |||||
passCarAppId: extConfig.attr.passCarAppId, | |||||
etcppversion: extConfig.attr.etcppversion, | |||||
passCarreturnUrl: extConfig.attr.passCarreturnUrl, | |||||
ifHaveCarModular: extConfig.attr.ifHaveCarModular | |||||
}) | |||||
console.log("停车"); | |||||
if (app.globalData.token) { | if (app.globalData.token) { | ||||
that.getList(); | that.getList(); | ||||
that.init(); | that.init(); | ||||
@@ -545,7 +550,8 @@ Page({ | |||||
carNumber: carNumber, | carNumber: carNumber, | ||||
outCarId: outCarId | outCarId: outCarId | ||||
}; | }; | ||||
console.log(postData) | |||||
console.log(that.data.passCarreturnUrl) | |||||
console.log("获得停车费用") | |||||
Http.post({ | Http.post({ | ||||
url: config.api.getCarStopFee, | url: config.api.getCarStopFee, | ||||
data: postData | data: postData | ||||
@@ -556,8 +562,7 @@ Page({ | |||||
token: app.globalData.etcpToken, | token: app.globalData.etcpToken, | ||||
syncId: res.data.orderId, | syncId: res.data.orderId, | ||||
payType: 6, // 小程序支付 | payType: 6, // 小程序支付 | ||||
CarNumber: carNumber, | |||||
returnUrl: "https://ciformall.youlane.cn/api/carCallback/etcpPaidCallback", | |||||
CarNumber: that.data.passCarreturnUrl, | |||||
source: "FUMAO-001", | source: "FUMAO-001", | ||||
actionId: "1" //操作ID,1:小程序支付 | actionId: "1" //操作ID,1:小程序支付 | ||||
} | } | ||||
@@ -572,10 +577,7 @@ Page({ | |||||
}) | }) | ||||
}) | }) | ||||
.catch(error => { | .catch(error => { | ||||
wx.showToast({ | |||||
title: error.message, | |||||
icon:"none" | |||||
}) | |||||
console.log(error) | |||||
that.setData({ | that.setData({ | ||||
stopFees: {}, | stopFees: {}, | ||||
scroll: true | scroll: true | ||||
@@ -1,4 +1,4 @@ | |||||
<view class='container'> | |||||
<view class='container' wx:if="{{ifHaveCarModular == 1}}"> | |||||
<view class='top'> | <view class='top'> | ||||
<view class='header'> | <view class='header'> | ||||
<image src='{{parkUrl}}' mode="widthFix"></image>{{park.addr}} | <image src='{{parkUrl}}' mode="widthFix"></image>{{park.addr}} | ||||
@@ -23,11 +23,6 @@ | |||||
</swiper-item> | </swiper-item> | ||||
</block> | </block> | ||||
</swiper> | </swiper> | ||||
<!-- <view class="dots"> | |||||
<block wx:for="{{carList}}" wx:key="unique"> | |||||
<view class="dot{{index == current ? ' active' : ''}}"></view> | |||||
</block> | |||||
</view> --> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -59,12 +54,9 @@ | |||||
<view class="buy-view" wx:if="{{stopFees.orderId}}"> | <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="{{etcppversion}}"> | |||||
立即支付 | 立即支付 | ||||
</navigator> | </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 wx:if="{{!canIUse}}" class='buy' bindtap='gotoetcp'>立即支付</view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -110,4 +102,9 @@ | |||||
</view> | </view> | ||||
</view> | </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> | </view> |
@@ -375,19 +375,6 @@ page { | |||||
.textV3 { | .textV3 { | ||||
width: 225rpx; | width: 225rpx; | ||||
} | } | ||||
/* .textV1{ | |||||
position: absolute; | |||||
left: 10rpx; | |||||
top: 22rpx; | |||||
} */ | |||||
/* .textV2{ | |||||
position: absolute; | |||||
top: 22rpx; | |||||
right: 80rpx; | |||||
} */ | |||||
.choice { | .choice { | ||||
width: 80rpx; | width: 80rpx; | ||||
height: 80rpx; | height: 80rpx; | ||||
@@ -636,4 +623,28 @@ button::after { | |||||
vertical-align: middle; | vertical-align: middle; | ||||
margin-top: -6rpx; | margin-top: -6rpx; | ||||
margin-right: -10rpx; | 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; | |||||
} |