@@ -1,10 +1,8 @@ | |||
const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | |||
console.log(extConfig.weappId) | |||
let weappId = extConfig.weappId; | |||
console.log(extConfig) | |||
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: { | |||
/** | |||
* 接口用途:login | |||
@@ -6,6 +6,7 @@ | |||
"name": "富茂客官开发", | |||
"attr": { | |||
"ifHaveCarModular":"1", | |||
"etcppversion":"release", | |||
"configUrl":"https://ciformall.youlane.cn/C/api", | |||
"passCarAppId":"wx192b7d2e8dcbefd0", | |||
"passCarPath":"pages/passCar/passCar", | |||
@@ -1,4 +1,5 @@ | |||
{ | |||
"usingComponents": {}, | |||
"navigationBarTitleText": "首页", | |||
"navigationBarBackgroundColor": "#fff" | |||
} |
@@ -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,19 +60,13 @@ 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", | |||
}) | |||
// wx.navigateToMiniProgram({ | |||
// appId:'wxc07f9d67923d676d', | |||
// extraData: this.data.extraData, | |||
// envVersion:'release', | |||
// path: "pages/main/main", | |||
// }) | |||
}, | |||
showquan: function() { | |||
wx.navigateTo({ | |||
@@ -86,6 +82,15 @@ Page({ | |||
}, | |||
onShow: function(options) { | |||
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) { | |||
that.getList(); | |||
that.init(); | |||
@@ -545,7 +550,8 @@ Page({ | |||
carNumber: carNumber, | |||
outCarId: outCarId | |||
}; | |||
console.log(postData) | |||
console.log(that.data.passCarreturnUrl) | |||
console.log("获得停车费用") | |||
Http.post({ | |||
url: config.api.getCarStopFee, | |||
data: postData | |||
@@ -556,8 +562,7 @@ Page({ | |||
token: app.globalData.etcpToken, | |||
syncId: res.data.orderId, | |||
payType: 6, // 小程序支付 | |||
CarNumber: carNumber, | |||
returnUrl: "https://ciformall.youlane.cn/api/carCallback/etcpPaidCallback", | |||
CarNumber: that.data.passCarreturnUrl, | |||
source: "FUMAO-001", | |||
actionId: "1" //操作ID,1:小程序支付 | |||
} | |||
@@ -572,10 +577,7 @@ Page({ | |||
}) | |||
}) | |||
.catch(error => { | |||
wx.showToast({ | |||
title: error.message, | |||
icon:"none" | |||
}) | |||
console.log(error) | |||
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> | |||
@@ -59,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="{{etcppversion}}"> | |||
立即支付 | |||
</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> | |||
@@ -110,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; | |||
} |