@@ -46,6 +46,8 @@ | |||||
"pages/orderquanma/index", | "pages/orderquanma/index", | ||||
"pages/passCar/couponList/couponList", | "pages/passCar/couponList/couponList", | ||||
"pages/passCar/couponDetail/couponDetail", | "pages/passCar/couponDetail/couponDetail", | ||||
"pages/passCar/showList/showList", | |||||
"pages/passCar/showDetail/showDetail", | |||||
"pages/managelicenseplate/managelicenseplate", | "pages/managelicenseplate/managelicenseplate", | ||||
"pages/payrule/payrule", | "pages/payrule/payrule", | ||||
"pages/grade/grade", | "pages/grade/grade", | ||||
@@ -180,6 +180,10 @@ var config = { | |||||
* 联合登录 | * 联合登录 | ||||
*/ | */ | ||||
carInit: "/car/init", | carInit: "/car/init", | ||||
/** | |||||
* 停车支付订单列表 | |||||
*/ | |||||
carPayOrderList: "/car/payOrderList", | |||||
/** | /** | ||||
* 绑车牌 | * 绑车牌 | ||||
*/ | */ | ||||
@@ -2,44 +2,35 @@ | |||||
"ext": { | "ext": { | ||||
"attr": { | "attr": { | ||||
"car": { | "car": { | ||||
"tjd": { | |||||
"payPath": "", | |||||
"tjdAppId": "wx6945d1bda68d7993" | |||||
}, | |||||
"etcp": { | "etcp": { | ||||
"payPath": "pages/pay/order-pay-open/main", | |||||
"etcpAppId": "wxc07f9d67923d676d", | |||||
"etcpCallbackUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback" | |||||
}, | |||||
"bolink": { | |||||
"payPath": "pages/park/park", | |||||
"bolinkAppId": "wxbd08b4baa10fcc1d" | |||||
}, | |||||
"version": "release" | |||||
"etcpAppId": "wx192b7d2e8dcbefd0", | |||||
"etcpVersion": "release", | |||||
"etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback" | |||||
} | |||||
}, | }, | ||||
"mchId": "1604439800", | "mchId": "1604439800", | ||||
"imgProxy": [ | "imgProxy": [ | ||||
{ | { | ||||
"newUrl": "https://c.malls.iformall.com/img", | |||||
"newUrl": "https://ctest.malls.iformall.com/img", | |||||
"orgUrl": "https://iformall-net.formall.oss-accelerate.aliyuncs.com" | "orgUrl": "https://iformall-net.formall.oss-accelerate.aliyuncs.com" | ||||
}, | }, | ||||
{ | { | ||||
"newUrl": "https://c.malls.iformall.com/img1", | |||||
"newUrl": "https://ctest.malls.iformall.com/img1", | |||||
"orgUrl": "https://formall.oss-accelerate.aliyuncs.com" | "orgUrl": "https://formall.oss-accelerate.aliyuncs.com" | ||||
}, | }, | ||||
{ | { | ||||
"newUrl": "https://c.malls.iformall.com/img2", | |||||
"newUrl": "https://ctest.malls.iformall.com/img2", | |||||
"orgUrl": "https://wx.qlogo.cn" | "orgUrl": "https://wx.qlogo.cn" | ||||
} | } | ||||
], | ], | ||||
"configUrl": "https://c.malls.iformall.com/C/api", | |||||
"ifStoreApp": "0", | |||||
"configUrl": "https://ctest.malls.iformall.com/C/api", | |||||
"businessSwitch": "1", | |||||
"ifHaveWebSocket": "0", | "ifHaveWebSocket": "0", | ||||
"ifHaveCarModular": "0" | |||||
"ifHaveCarModular": "1" | |||||
}, | }, | ||||
"name": "金茂悦茂邻荟", | |||||
"weappId": "wx7c9c7122a91946a7", | |||||
"appVersion": "C.5.1.1" | |||||
"name": "金泸商务", | |||||
"weappId": "wx649b3be73c1afe47", | |||||
"appVersion": "C.test.5.2.0" | |||||
}, | }, | ||||
"debug": false, | "debug": false, | ||||
"tabBar": { | "tabBar": { | ||||
@@ -75,7 +66,8 @@ | |||||
"selectedIconPath": "assets/images/user-a.png" | "selectedIconPath": "assets/images/user-a.png" | ||||
} | } | ||||
], | ], | ||||
"custom": true | |||||
"color": "#abb1be", | |||||
"selectedColor": "#b2743d" | |||||
}, | }, | ||||
"window": { | "window": { | ||||
"backgroundTextStyle": "dark", | "backgroundTextStyle": "dark", | ||||
@@ -83,7 +75,17 @@ | |||||
"navigationBarTitleText": "", | "navigationBarTitleText": "", | ||||
"navigationBarBackgroundColor": "#FFFFFF" | "navigationBarBackgroundColor": "#FFFFFF" | ||||
}, | }, | ||||
"extAppid": "wx7c9c7122a91946a7", | |||||
"plugins": { | |||||
"auto-points-plugin": { | |||||
"version": "1.3.0", | |||||
"provider": "wxfab2bf944bfc4da6" | |||||
}, | |||||
"live-player-plugin": { | |||||
"version": "1.3.4", | |||||
"provider": "wx2b03c6e691cd7370" | |||||
} | |||||
}, | |||||
"extAppid": "wx649b3be73c1afe47", | |||||
"extEnable": true, | "extEnable": true, | ||||
"permission": { | "permission": { | ||||
"scope.userLocation": { | "scope.userLocation": { | ||||
@@ -54,6 +54,7 @@ Page({ | |||||
generalPayPath: '', | generalPayPath: '', | ||||
generalExtraData: {}, | generalExtraData: {}, | ||||
goHomeUrl: "", | goHomeUrl: "", | ||||
supportPay: "" | |||||
}, | }, | ||||
getMoreList(e) { | getMoreList(e) { | ||||
let totalNum = this.data.ticketList.length; | let totalNum = this.data.ticketList.length; | ||||
@@ -192,6 +193,33 @@ Page({ | |||||
} | } | ||||
}, | }, | ||||
callPay(data) { | |||||
wx.requestPayment({ | |||||
timeStamp: data.timeStamp, | |||||
nonceStr: data.nonceStr, | |||||
package: data.package, | |||||
signType: data.signType ? data.signType : "MD5", | |||||
paySign: res.data.paySign, | |||||
success: res => { | |||||
wx.showLoading({ | |||||
title: '订单正在处理中...', | |||||
}) | |||||
this.showList() | |||||
}, | |||||
fail: res => { | |||||
wx.hideLoading(); | |||||
wx.showToast({ | |||||
title: '支付失败', | |||||
icon: 'error' | |||||
}) | |||||
/** | |||||
* 支付失败,需要更新订单的状态 | |||||
*/ | |||||
}, | |||||
complete: res => { } | |||||
}); | |||||
}, | |||||
//停车费用为0 | //停车费用为0 | ||||
paySuccess: function () { | paySuccess: function () { | ||||
wx.showModal({ | wx.showModal({ | ||||
@@ -201,6 +229,22 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
// supportPay等于1时 | |||||
goToPay() { | |||||
Http.post({ | |||||
url: '/car/createPayOrder', | |||||
data: { | |||||
carNumber: this.data.listCardNum, | |||||
carFee: String(this.data.stopFees.remainingFee * 100) | |||||
} | |||||
}).then(res => { | |||||
const data = res.data | |||||
this.callPay(data) | |||||
}).catch(err => { | |||||
}) | |||||
}, | |||||
gotomange: function () { | gotomange: function () { | ||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: '/pages/managelicenseplate/managelicenseplate', | url: '/pages/managelicenseplate/managelicenseplate', | ||||
@@ -236,6 +280,13 @@ Page({ | |||||
url: '/pages/passCar/couponList/couponList', | url: '/pages/passCar/couponList/couponList', | ||||
}) | }) | ||||
}, | }, | ||||
showList: function () { | |||||
wx.navigateTo({ | |||||
url: '/pages/passCar/showList/showList', | |||||
}) | |||||
}, | |||||
gotodetail: function (e) { | gotodetail: function (e) { | ||||
wx.showModal({ | wx.showModal({ | ||||
title: '缴费规则', | title: '缴费规则', | ||||
@@ -631,6 +682,15 @@ Page({ | |||||
if (res.data.token) { | if (res.data.token) { | ||||
app.globalData.etcpToken = res.data.token; | app.globalData.etcpToken = res.data.token; | ||||
} | } | ||||
if (res.data.supportPay && res.data.supportPay == 1) { | |||||
that.setData({ | |||||
supportPay: 1 | |||||
}) | |||||
} else { | |||||
that.setData({ | |||||
supportPay: 0 | |||||
}) | |||||
} | |||||
/** | /** | ||||
* 获得停车费用 | * 获得停车费用 | ||||
*/ | */ | ||||
@@ -912,7 +972,8 @@ Page({ | |||||
}, | }, | ||||
timecha: res.data.duration | timecha: res.data.duration | ||||
}); | }); | ||||
} else { | |||||
} else { // *#06# | |||||
// var extraDataStr = { | // var extraDataStr = { | ||||
// params: { | // params: { | ||||
// token: app.globalData.etcpToken, | // token: app.globalData.etcpToken, | ||||
@@ -934,8 +995,7 @@ Page({ | |||||
generalAppId: res.data.appId, | generalAppId: res.data.appId, | ||||
generalPayPath: res.data.payPath, | generalPayPath: res.data.payPath, | ||||
generalExtraData: res.data.extraData, | generalExtraData: res.data.extraData, | ||||
extraDataFlag: JSON.stringify(res.data.extraData), | |||||
extraDataFlag: JSON.stringify(res.data.extraData) | |||||
}); | }); | ||||
console.log(that.data.extraDataFlag, "123456789") | console.log(that.data.extraDataFlag, "123456789") | ||||
} | } | ||||
@@ -60,28 +60,28 @@ | |||||
系统提示: | 系统提示: | ||||
</view> --> | </view> --> | ||||
<!-- 停车费用大于0 etcp --> | <!-- 停车费用大于0 etcp --> | ||||
<view class="buy-view" wx:if="{{stopFees.orderId&&stopFees.remainingFee>0&&parkVendor==1}}"> | |||||
<view class="buy-view" wx:if="{{stopFees.orderId&&stopFees.remainingFee>0&&parkVendor==1&&supportPay!=1}}"> | |||||
<navigator bindfail="bindfail" path="{{payPath}}" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="{{etcpAppId}}" extra-data='{{extraData}}' version="{{carMiniVersion}}"> | <navigator bindfail="bindfail" path="{{payPath}}" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="{{etcpAppId}}" extra-data='{{extraData}}' version="{{carMiniVersion}}"> | ||||
立即支付 | 立即支付 | ||||
</navigator> | </navigator> | ||||
<view wx:if="{{!canIUse}}" class='buy' data-flag="parkVendor1" bindtap='gotoCarMini'>立即支付</view> | <view wx:if="{{!canIUse}}" class='buy' data-flag="parkVendor1" bindtap='gotoCarMini'>立即支付</view> | ||||
</view> | </view> | ||||
<!-- 停车费用大于0 tjd --> | <!-- 停车费用大于0 tjd --> | ||||
<view class="buy-view" wx:if="{{stopFees.orderId&&stopFees.remainingFee>0&&parkVendor==2}}"> | |||||
<view class="buy-view" wx:if="{{stopFees.orderId&&stopFees.remainingFee>0&&parkVendor==2&&supportPay!=1}}"> | |||||
<navigator bindfail="bindfail" path="{{payPath}}" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="{{tjdAppId}}" extra-data='{{extraData}}' version="{{carMiniVersion}}"> | <navigator bindfail="bindfail" path="{{payPath}}" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="{{tjdAppId}}" extra-data='{{extraData}}' version="{{carMiniVersion}}"> | ||||
立即支付 | 立即支付 | ||||
</navigator> | </navigator> | ||||
<view wx:if="{{!canIUse}}" class='buy' data-flag="parkVendor1" bindtap='gotoCarMini'>立即支付</view> | <view wx:if="{{!canIUse}}" class='buy' data-flag="parkVendor1" bindtap='gotoCarMini'>立即支付</view> | ||||
</view> | </view> | ||||
<!-- 停车费用大于0 bolink --> | <!-- 停车费用大于0 bolink --> | ||||
<view class="buy-view" wx:if="{{stopFees.orderId&&stopFees.remainingFee>0&&parkVendor==5}}"> | |||||
<view class="buy-view" wx:if="{{stopFees.orderId&&stopFees.remainingFee>0&&parkVendor==5&&supportPay!=1}}"> | |||||
<navigator bindfail="bindfail" path="{{payPath}}" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="{{bolinkAppId}}" extra-data='{{extraData}}' version="{{carMiniVersion}}"> | <navigator bindfail="bindfail" path="{{payPath}}" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="{{bolinkAppId}}" extra-data='{{extraData}}' version="{{carMiniVersion}}"> | ||||
立即支付 | 立即支付 | ||||
</navigator> | </navigator> | ||||
<view wx:if="{{!canIUse}}" class='buy' data-flag="parkVendor5" bindtap='gotoCarMini'>立即支付</view> | <view wx:if="{{!canIUse}}" class='buy' data-flag="parkVendor5" bindtap='gotoCarMini'>立即支付</view> | ||||
</view> | </view> | ||||
<!-- 通用停车 --> | <!-- 通用停车 --> | ||||
<view class="buy-view" wx:if="{{stopFees.orderId&&stopFees.remainingFee>0&&parkVendor!=1&&parkVendor!=2&&parkVendor!=3&&parkVendor!=4&&parkVendor!=5&&extraDataFlag!='{}'}}"> | |||||
<view class="buy-view" wx:if="{{stopFees.orderId&&stopFees.remainingFee>0&&parkVendor!=1&&parkVendor!=2&&parkVendor!=3&&parkVendor!=4&&parkVendor!=5&&extraDataFlag!='{}'&&supportPay!=1}}"> | |||||
<navigator bindfail="bindfail" path="{{generalPayPath}}" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="{{generalAppId}}" extra-data='{{generalExtraData}}' version="{{carMiniVersion}}"> | <navigator bindfail="bindfail" path="{{generalPayPath}}" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="{{generalAppId}}" extra-data='{{generalExtraData}}' version="{{carMiniVersion}}"> | ||||
立即支付 | 立即支付 | ||||
</navigator> | </navigator> | ||||
@@ -89,7 +89,7 @@ | |||||
</view> | </view> | ||||
<view class="buy-view" wx:if="{{stopFees.orderId&&stopFees.remainingFee>0&&parkVendor!=1&&parkVendor!=2&&parkVendor!=3&&parkVendor!=4&&parkVendor!=5&&extraDataFlag=='{}'}}"> | |||||
<view class="buy-view" wx:if="{{stopFees.orderId && stopFees.remainingFee>0 && parkVendor!=1 && parkVendor!=2 && parkVendor!=3 && parkVendor!=4 && parkVendor!=5 && extraDataFlag=='{}' && supportPay!=1}}"> | |||||
<navigator bindfail="bindfail" path="{{generalPayPath}}" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="{{generalAppId}}" version="{{carMiniVersion}}"> | <navigator bindfail="bindfail" path="{{generalPayPath}}" wx:if="{{canIUse}}" class='buy' target="miniProgram" open-type="navigate" app-id="{{generalAppId}}" version="{{carMiniVersion}}"> | ||||
立即支付 | 立即支付 | ||||
</navigator> | </navigator> | ||||
@@ -97,7 +97,10 @@ | |||||
</view> | </view> | ||||
<!-- 停车费用为0 --> | <!-- 停车费用为0 --> | ||||
<view wx:if="{{stopFees.remainingFee==0}}" class='buy' bindtap='paySuccess'>立即支付</view> | |||||
<!-- // && stopFees.remainingFee>0 --> | |||||
<view wx:if="{{supportPay && supportPay==1}}" class='buy' bindtap='goToPay'>立即支付</view> | |||||
<!-- <view wx:if="{{stopFees.remainingFee==0}}" class='buy' bindtap='paySuccess'>立即支付</view> --> | |||||
</view> | </view> | ||||
<!-- 没有车牌的时候显示 --> | <!-- 没有车牌的时候显示 --> | ||||
@@ -109,6 +112,14 @@ | |||||
<text class='carNumber'>车辆入场后,才能绑车牌</text> | <text class='carNumber'>车辆入场后,才能绑车牌</text> | ||||
</view> | </view> | ||||
<view class='bottonBox'> | <view class='bottonBox'> | ||||
<view class='textStyle' bindtap='showList'> | |||||
<image src='{{tingcheHr}}'></image> | |||||
我的支付订单 | |||||
<view class='detail'> | |||||
<image src='{{jianUrl}}'></image> | |||||
</view> | |||||
</view> | |||||
<view class='textStyle' bindtap='showquan'> | <view class='textStyle' bindtap='showquan'> | ||||
<image src='{{tingcheHr}}'></image> | <image src='{{tingcheHr}}'></image> | ||||
我的停车券 | 我的停车券 | ||||
@@ -164,7 +164,8 @@ | |||||
<text class='btnTxt'>首页</text> | <text class='btnTxt'>首页</text> | ||||
</button> | </button> | ||||
<button form-type="submit" disabled='{{showbutton}}' hover-class='active' class='buy' wx:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100!=0&&priceAndStockObj.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}"> | <button form-type="submit" disabled='{{showbutton}}' hover-class='active' class='buy' wx:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&priceAndStockObj.salePrice/100!=0&&priceAndStockObj.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}"> | ||||
<text class='txt'>{{priceAndStockObj.salePrice/100}}元</text>马上购买</button> | |||||
<text class='txt'>{{priceAndStockObj.salePrice/100}}元</text>马上购买 | |||||
</button> | |||||
<button wx:if="{{data.type==11&&priceAndStockObj.remainInventory!=0}}" bindtap="gohome" data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="2" class="home">配送到家 | <button wx:if="{{data.type==11&&priceAndStockObj.remainInventory!=0}}" bindtap="gohome" data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="2" class="home">配送到家 | ||||
</button> | </button> | ||||
<button wx:if="{{data.type==11&&priceAndStockObj.remainInventory!=0}}" bindtap="gohome" data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="1" class="arrive">到店自提 | <button wx:if="{{data.type==11&&priceAndStockObj.remainInventory!=0}}" bindtap="gohome" data-couponchannelid="{{couponChannelId}}" data-couponid="{{couponId}}" data-shippingtype="1" class="arrive">到店自提 | ||||
@@ -0,0 +1,125 @@ | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | |||||
let config = require("../../../config/config.js"); | |||||
let Http = require("../../../utils/HttpBasics"); | |||||
const util = require("../../../utils/util"); | |||||
let app = getApp(); | |||||
const imgurl = require("../../../utils/imgurl"); | |||||
Page({ | |||||
/** | |||||
* 页面的初始数据 | |||||
*/ | |||||
data: { | |||||
navigationBarHeight, | |||||
detail: {} | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面加载 | |||||
*/ | |||||
onLoad(options) { | |||||
const detail = JSON.parse(options.item) | |||||
detail.payTime = this.timestampToTime(detail.payTime) | |||||
detail.createTime = this.timestampToTime(detail.createTime) | |||||
detail.updateTime = this.timestampToTime(detail.updateTime) | |||||
this.setData({ | |||||
detail: detail | |||||
}) | |||||
}, | |||||
/** | |||||
* @description 根据时间戳获取时间 | |||||
* @param {*} timestamp 必传,number类型,时间戳数据(10位及以下,10位至13位) | |||||
* @param {*} format 选传,string类型,提供以下时间格式:YYYY-MM-DD hh:mm:ss、YYYY/MM/DD hh:mm:ss、YYYY.MM.DD hh:mm:ss、YYYY MM DD hh:mm:ss、YYYY年MM月DD日 hh:mm:ss、YYYY-MM-DD、YYYY/MM/DD、YYYY.MM.DD、YYYY MM DD、YYYY年MM月DD日;若不传,则默认为:YYYY-MM-DD | |||||
* @returns 根据要求的时间格式 | |||||
* @version V 1.0, Created by YWQ, 2022.10.20 | |||||
*/ | |||||
timestampToTime(timestamp, format) { | |||||
//时间戳为10位需*1000,时间戳为13位不需乘1000 | |||||
const length = timestamp.length | |||||
if (length <= 10) { | |||||
var date = new Date(timestamp * 1000) | |||||
} else { | |||||
var date = new Date(timestamp) | |||||
} | |||||
let Y = String(date.getFullYear()) | |||||
let M = String(date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) | |||||
let D = String(date.getDate() + 1 < 10 ? '0' + (date.getDate()) : date.getDate()) | |||||
let h = String(date.getHours() + 1 < 10 ? '0' + (date.getHours()) : date.getHours()) | |||||
let m = String(date.getMinutes() + 1 < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) | |||||
let s = String(date.getSeconds() + 1 < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) | |||||
// return Y + M + D + h + m + s | |||||
if (format == "YYYY-MM-DD hh:mm:ss") { | |||||
return Y + "-" + M + "-" + D + " " + h + ":" + m + ":" + s | |||||
} else if (format == "YYYY/MM/DD hh:mm:ss") { | |||||
return Y + "/" + M + "/" + D + " " + h + ":" + m + ":" + s | |||||
} else if (format == "YYYY.MM.DD hh:mm:ss") { | |||||
return Y + "." + M + "." + D + " " + h + ":" + m + ":" + s | |||||
} else if (format == "YYYY MM DD hh:mm:ss") { | |||||
return Y + " " + M + " " + D + " " + h + ":" + m + ":" + s | |||||
} else if (format == "YYYY年MM月DD日 hh:mm:ss") { | |||||
return Y + "年" + M + "月" + D + "日" + " " + h + ":" + m + ":" + s | |||||
} else if (format == "YYYY-MM-DD") { | |||||
return Y + "-" + M + "-" + D | |||||
} else if (format == "YYYY/MM/DD") { | |||||
return Y + "/" + M + "/" + D | |||||
} else if (format == "YYYY.MM.DD") { | |||||
return Y + "." + M + "." + D | |||||
} else if (format == "YYYY MM DD") { | |||||
return Y + " " + M + " " + D | |||||
} else if (format == "YYYY年MM月DD日") { | |||||
return Y + "年" + M + "月" + D + "日" | |||||
} else { | |||||
return Y + "-" + M + "-" + D | |||||
} | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面初次渲染完成 | |||||
*/ | |||||
onReady() { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面显示 | |||||
*/ | |||||
onShow() { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面隐藏 | |||||
*/ | |||||
onHide() { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面卸载 | |||||
*/ | |||||
onUnload() { | |||||
}, | |||||
/** | |||||
* 页面相关事件处理函数--监听用户下拉动作 | |||||
*/ | |||||
onPullDownRefresh() { | |||||
}, | |||||
/** | |||||
* 页面上拉触底事件的处理函数 | |||||
*/ | |||||
onReachBottom() { | |||||
}, | |||||
/** | |||||
* 用户点击右上角分享 | |||||
*/ | |||||
onShareAppMessage() { | |||||
} | |||||
}) |
@@ -0,0 +1,9 @@ | |||||
{ | |||||
"usingComponents": { | |||||
"i-tab": "../../../dist/tab/index", | |||||
"i-tabs": "../../../dist/tabs/index", | |||||
"navbar": "../../../components/navbar/navbar" | |||||
}, | |||||
"navigationBarTitleText": "支付订单详情", | |||||
"navigationBarBackgroundColor": "#F4F5F9" | |||||
} |
@@ -0,0 +1,43 @@ | |||||
<navbar back home text="支付订单详情"></navbar> | |||||
<view style="height:{{navigationBarHeight}} "></view> | |||||
<view class="detail"> | |||||
<view> | |||||
车牌号:{{detail.carNumber}} | |||||
</view> | |||||
<view> | |||||
支付金额:{{detail.payAmount}} | |||||
</view> | |||||
<view> | |||||
支付时间:{{detail.payTime}} | |||||
</view> | |||||
<view> | |||||
创建时间:{{detail.createTime}} | |||||
</view> | |||||
<view> | |||||
更新时间:{{detail.updateTime}} | |||||
</view> | |||||
<view> | |||||
微信生成的订单号:{{detail.transactionId}} | |||||
</view> | |||||
<view> | |||||
车场订单号:{{detail.parkOrderNo}} | |||||
</view> | |||||
<view> | |||||
商户收款账户:{{detail.merchantAccount}} | |||||
</view> | |||||
<view> | |||||
商户编号:{{detail.merchantId}} | |||||
</view> | |||||
<view> | |||||
商户名称:{{detail.merchantName}} | |||||
</view> | |||||
<view> | |||||
是否已通知车场:{{detail.parkNotify == 1 ? '是' : '否'}} | |||||
</view> | |||||
<view> | |||||
通知失败原因:{{detail.notifyFailReason}} | |||||
</view> | |||||
<view> | |||||
通知重试次数:{{detail.notifyCount}} | |||||
</view> | |||||
</view> |
@@ -0,0 +1,8 @@ | |||||
/* pages/passCar/showDetail/showDetail.wxss */ | |||||
.detail { | |||||
padding: 40rpx; | |||||
} | |||||
.detail view { | |||||
margin-bottom: 50rpx; | |||||
} |
@@ -0,0 +1,119 @@ | |||||
const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' | |||||
let config = require("../../../config/config.js"); | |||||
let Http = require("../../../utils/HttpBasics"); | |||||
const util = require("../../../utils/util"); | |||||
let app = getApp(); | |||||
const imgurl = require("../../../utils/imgurl"); | |||||
Page({ | |||||
/** | |||||
* 页面的初始数据 | |||||
*/ | |||||
data: { | |||||
navigationBarHeight, | |||||
carPayOrderList: [], | |||||
pageNum: '1' | |||||
}, | |||||
getList(pageNum) { | |||||
const that = this | |||||
Http.get({ | |||||
url: config.api.carPayOrderList + `?pageNum=${pageNum}&pageSize=10`, | |||||
}).then(res => { | |||||
console.log(res, 'res'); | |||||
if (pageNum == 1) { | |||||
const tempArr = res.data.list | |||||
tempArr.forEach(item => { | |||||
item.payAmount = this.getPayNumber(item.payAmount) | |||||
}) | |||||
that.setData({ | |||||
carPayOrderList: res.data.list | |||||
}) | |||||
} else { | |||||
const tempArr = that.data.carPayOrderList | |||||
res.data.list.forEach(item => { | |||||
item.payAmount = this.getPayNumber(item.payAmount) | |||||
tempArr.push(item) | |||||
}) | |||||
that.setData({ | |||||
carPayOrderList: tempArr | |||||
}) | |||||
} | |||||
}).catch(err => { | |||||
}) | |||||
}, | |||||
getPayNumber(num) { | |||||
return (num / 100).toFixed(2) + "元" | |||||
}, | |||||
goDetial(e) { | |||||
const item = JSON.stringify(e.currentTarget.dataset.item) | |||||
wx.navigateTo({ | |||||
url: `/pages/passCar/showDetail/showDetail?item=${item}`, | |||||
}) | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面加载 | |||||
*/ | |||||
onLoad(options) { | |||||
this.getList(this.data.pageNum) | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面初次渲染完成 | |||||
*/ | |||||
onReady() { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面显示 | |||||
*/ | |||||
onShow() { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面隐藏 | |||||
*/ | |||||
onHide() { | |||||
}, | |||||
/** | |||||
* 生命周期函数--监听页面卸载 | |||||
*/ | |||||
onUnload() { | |||||
}, | |||||
/** | |||||
* 页面相关事件处理函数--监听用户下拉动作 | |||||
*/ | |||||
onPullDownRefresh() { | |||||
}, | |||||
/** | |||||
* 页面上拉触底事件的处理函数 | |||||
*/ | |||||
onReachBottom() { | |||||
const that = this; | |||||
that.data.pageNum++; | |||||
that.setData({ | |||||
pageNum: that.data.pageNum | |||||
}); | |||||
that.getList(that.data.pageNum); | |||||
}, | |||||
/** | |||||
* 用户点击右上角分享 | |||||
*/ | |||||
onShareAppMessage() { | |||||
} | |||||
}) |
@@ -0,0 +1,9 @@ | |||||
{ | |||||
"usingComponents": { | |||||
"i-tab": "../../../dist/tab/index", | |||||
"i-tabs": "../../../dist/tabs/index", | |||||
"navbar": "../../../components/navbar/navbar" | |||||
}, | |||||
"navigationBarTitleText": "支付订单", | |||||
"navigationBarBackgroundColor": "#F4F5F9" | |||||
} |
@@ -0,0 +1,14 @@ | |||||
<navbar back home text="支付订单"></navbar> | |||||
<view style="height:{{navigationBarHeight}} "></view> | |||||
<view class="list"> | |||||
<view class="item" wx:for="{{carPayOrderList}}" wx:key="index"> | |||||
<view data-item="{{item}}" bindtap="goDetial"> | |||||
<view class="child">车牌号:{{item.carNumber}}</view> | |||||
<view class="child">支付金额:{{item.payAmount}}</view> | |||||
<view>支付时间:{{item.payTime}}</view> | |||||
<view class="detail"> | |||||
查看详情 | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</view> |
@@ -0,0 +1,28 @@ | |||||
/* pages/passCar/showList.wxss */ | |||||
page { | |||||
background-color: #dfdfdf; | |||||
} | |||||
.list { | |||||
padding: 40rpx; | |||||
} | |||||
.list .item { | |||||
position: relative; | |||||
background-color: #fff; | |||||
margin-bottom: 40rpx; | |||||
border-radius: 20rpx; | |||||
padding: 20rpx; | |||||
} | |||||
.list .item .child { | |||||
margin-bottom: 20rpx; | |||||
} | |||||
.list .item .detail { | |||||
position: absolute; | |||||
right: 40rpx; | |||||
top: 50%; | |||||
transform: translateY(-50%); | |||||
} |
@@ -34,7 +34,7 @@ | |||||
}, | }, | ||||
"compileType": "miniprogram", | "compileType": "miniprogram", | ||||
"libVersion": "2.11.2", | "libVersion": "2.11.2", | ||||
"appid": "wx453ae0d37f3550d0", | |||||
"appid": "wxfa336cad86ed598d", | |||||
"projectname": "C", | "projectname": "C", | ||||
"simulatorType": "wechat", | "simulatorType": "wechat", | ||||
"simulatorPluginLibVersion": {}, | "simulatorPluginLibVersion": {}, | ||||