Commit d9f79954b88e1f7d27bb9e96d8388519298e91eb
1 parent
15d5c692
停车记录
Showing
3 changed files
with
56 additions
and
24 deletions
common/common.js
| @@ -31,6 +31,14 @@ const useraboutUs = serverUrl + "/business/h5/index/aboutUs"; | @@ -31,6 +31,14 @@ const useraboutUs = serverUrl + "/business/h5/index/aboutUs"; | ||
| 31 | // 商户账户余额信息 | 31 | // 商户账户余额信息 |
| 32 | const walletAccount = serverUrl + "/business/h5/wallet/account"; | 32 | const walletAccount = serverUrl + "/business/h5/wallet/account"; |
| 33 | 33 | ||
| 34 | +// 通过商户ID查询停车记录信息 | ||
| 35 | +const getBusinessParkOrderByBusIdForPage = serverUrl + "/business/h5/order/getBusinessParkOrderByBusIdForPage"; | ||
| 36 | + | ||
| 37 | +// 通过商户ID查询停车记录信息 | ||
| 38 | +const getPayOrderByOrderId = serverUrl + "/business/h5/order/getPayOrderByOrderId"; | ||
| 39 | + | ||
| 40 | + | ||
| 41 | + | ||
| 34 | // | 42 | // |
| 35 | const requestSign = function(inputData) { | 43 | const requestSign = function(inputData) { |
| 36 | 44 | ||
| @@ -43,8 +51,8 @@ const requestSign = function(inputData) { | @@ -43,8 +51,8 @@ const requestSign = function(inputData) { | ||
| 43 | jsonList.salt = getSalt(); | 51 | jsonList.salt = getSalt(); |
| 44 | jsonList.terminalSource = "11"; | 52 | jsonList.terminalSource = "11"; |
| 45 | // jsonList.token = getGlobalUser("globalUser").token; | 53 | // jsonList.token = getGlobalUser("globalUser").token; |
| 46 | - // jsonList.token = getGlobalUser("globalUser").token; | ||
| 47 | - jsonList.token = 'eb1538c4c2ee45d7b2610cf071c4a27f'; | 54 | + jsonList.token = getGlobalUser("globalUser").token; |
| 55 | + // jsonList.token = 'af7ed65335f842ee8f754e841ff940ea'; | ||
| 48 | 56 | ||
| 49 | var arrData = []; | 57 | var arrData = []; |
| 50 | for (var key in jsonList) { | 58 | for (var key in jsonList) { |
| @@ -135,6 +143,7 @@ export default { | @@ -135,6 +143,7 @@ export default { | ||
| 135 | userLoginout, | 143 | userLoginout, |
| 136 | useraboutUs, | 144 | useraboutUs, |
| 137 | walletAccount, | 145 | walletAccount, |
| 138 | - // 通过商户ID查询停车记录信息 | ||
| 139 | - getBusinessParkOrderByBusIdForPage:serverUrl + "/business/h5/order/getBusinessParkOrderByBusIdForPage", | 146 | + // |
| 147 | + getBusinessParkOrderByBusIdForPage, | ||
| 148 | + getPayOrderByOrderId | ||
| 140 | } | 149 | } |
pages/parkRecordList/parkRecordList.vue
| @@ -9,8 +9,8 @@ | @@ -9,8 +9,8 @@ | ||
| 9 | 开始时间 | 9 | 开始时间 |
| 10 | </view> | 10 | </view> |
| 11 | <view class="uni-list-cell-db"> | 11 | <view class="uni-list-cell-db"> |
| 12 | - <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange"> | ||
| 13 | - <view class="uni-input">{{date}}</view> | 12 | + <picker mode="date" :value="startTime" :start="startDate" :end="endDate" @change="bindStartDateChange"> |
| 13 | + <view class="uni-input">{{startTime}}</view> | ||
| 14 | </picker> | 14 | </picker> |
| 15 | </view> | 15 | </view> |
| 16 | </view> | 16 | </view> |
| @@ -20,15 +20,15 @@ | @@ -20,15 +20,15 @@ | ||
| 20 | 结束时间 | 20 | 结束时间 |
| 21 | </view> | 21 | </view> |
| 22 | <view class="uni-list-cell-db"> | 22 | <view class="uni-list-cell-db"> |
| 23 | - <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange"> | ||
| 24 | - <view class="uni-input">{{date}}</view> | 23 | + <picker mode="date" :value="endTime" :start="startDate" :end="endDate" @change="bindDateChange"> |
| 24 | + <view class="uni-input">{{endTime}}</view> | ||
| 25 | </picker> | 25 | </picker> |
| 26 | </view> | 26 | </view> |
| 27 | </view> | 27 | </view> |
| 28 | </view> | 28 | </view> |
| 29 | 29 | ||
| 30 | <view v-if="recordList.length>0"> | 30 | <view v-if="recordList.length>0"> |
| 31 | - <view class="parkRecordWrap" v-for="(i, index) in recordList"> | 31 | + <view class="parkRecordWrap" v-for="(i, index) in recordList" @click="toRecordDetail(i.orderId)"> |
| 32 | <view> | 32 | <view> |
| 33 | {{i.plName}} | 33 | {{i.plName}} |
| 34 | </view> | 34 | </view> |
| @@ -60,13 +60,15 @@ | @@ -60,13 +60,15 @@ | ||
| 60 | 60 | ||
| 61 | <script> | 61 | <script> |
| 62 | 62 | ||
| 63 | +import common from "../../common/common"; | ||
| 63 | export default { | 64 | export default { |
| 64 | data() { | 65 | data() { |
| 65 | const currentDate = this.getDate({ | 66 | const currentDate = this.getDate({ |
| 66 | format: true | 67 | format: true |
| 67 | }) | 68 | }) |
| 68 | return { | 69 | return { |
| 69 | - date: currentDate, | 70 | + startTime:currentDate, |
| 71 | + endTime: currentDate, | ||
| 70 | mycarNumber: '', | 72 | mycarNumber: '', |
| 71 | userIsLogin: false, | 73 | userIsLogin: false, |
| 72 | // shownoFlag: 0, | 74 | // shownoFlag: 0, |
| @@ -106,8 +108,8 @@ export default { | @@ -106,8 +108,8 @@ export default { | ||
| 106 | let that = this | 108 | let that = this |
| 107 | let paramsData = { | 109 | let paramsData = { |
| 108 | businessId: uni.getStorageSync("indexInfo").businessId, | 110 | businessId: uni.getStorageSync("indexInfo").businessId, |
| 109 | - startTime: that.date, | ||
| 110 | - endTime: that.date | 111 | + startTime: that.startTime, |
| 112 | + endTime: that.endTime | ||
| 111 | } | 113 | } |
| 112 | // 首页信息获取 接口 | 114 | // 首页信息获取 接口 |
| 113 | that.$myRequest({ | 115 | that.$myRequest({ |
| @@ -118,8 +120,20 @@ export default { | @@ -118,8 +120,20 @@ export default { | ||
| 118 | this.recordList = res.data.dataList | 120 | this.recordList = res.data.dataList |
| 119 | }) | 121 | }) |
| 120 | }, | 122 | }, |
| 123 | + toRecordDetail: function(orderId){ | ||
| 124 | + console.log(orderId) | ||
| 125 | + uni.navigateTo({ | ||
| 126 | + url: '../parkRecordList/recordDetail?orderId='+orderId | ||
| 127 | + }); | ||
| 128 | + | ||
| 129 | + }, | ||
| 130 | + bindStartDateChange: function (e) { | ||
| 131 | + this.startTime = e.detail.value | ||
| 132 | + this.getBusinessParkOrderByBusIdForPage() | ||
| 133 | + }, | ||
| 121 | bindDateChange: function (e) { | 134 | bindDateChange: function (e) { |
| 122 | - this.date = e.detail.value | 135 | + this.endTime = e.detail.value |
| 136 | + this.getBusinessParkOrderByBusIdForPage() | ||
| 123 | }, | 137 | }, |
| 124 | getDate(type) { | 138 | getDate(type) { |
| 125 | const date = new Date(); | 139 | const date = new Date(); |
pages/parkRecordList/recordDetail.vue
| @@ -173,23 +173,17 @@ export default { | @@ -173,23 +173,17 @@ export default { | ||
| 173 | date: currentDate, | 173 | date: currentDate, |
| 174 | mycarNumber: '', | 174 | mycarNumber: '', |
| 175 | userIsLogin: false, | 175 | userIsLogin: false, |
| 176 | - shownoFlag: 0 | 176 | + shownoFlag: 0, |
| 177 | + orderId:'',// 订单号 | ||
| 177 | } | 178 | } |
| 178 | }, | 179 | }, |
| 179 | onLoad(params) { | 180 | onLoad(params) { |
| 180 | wx.showShareMenu({ | 181 | wx.showShareMenu({ |
| 181 | withShareTicket: true | 182 | withShareTicket: true |
| 182 | }) | 183 | }) |
| 183 | - console.log("params.record : " + params.record); | ||
| 184 | - if (params.record == 1) { | ||
| 185 | - this.mycarNumber = ''; | ||
| 186 | - } | ||
| 187 | - else { | ||
| 188 | - this.mycarNumber = params.carNumber; | ||
| 189 | - // this.mycarNumber = '苏B3M913'; | ||
| 190 | - } | ||
| 191 | - // this.getRecordOrder(this.mycarNumber, 10); | ||
| 192 | - //console.log("xxxmake = "+this.makedateFormat()); | 184 | + this.orderId = params.orderId |
| 185 | + console.log(this.orderId) | ||
| 186 | + this.getPayOrderByOrderId(); | ||
| 193 | }, | 187 | }, |
| 194 | onShow() { | 188 | onShow() { |
| 195 | var me = this; | 189 | var me = this; |
| @@ -212,6 +206,21 @@ export default { | @@ -212,6 +206,21 @@ export default { | ||
| 212 | } | 206 | } |
| 213 | }, | 207 | }, |
| 214 | methods: { | 208 | methods: { |
| 209 | + // 通过商户ID查询停车记录信息 | ||
| 210 | + getPayOrderByOrderId() { | ||
| 211 | + let that = this | ||
| 212 | + let paramsData = { | ||
| 213 | + orderId: '101962015377023516672' | ||
| 214 | + } | ||
| 215 | + // 首页信息获取 接口 | ||
| 216 | + that.$myRequest({ | ||
| 217 | + url: that.$common.getPayOrderByOrderId, | ||
| 218 | + method: 'POST', | ||
| 219 | + data: that.$common.requestSign(paramsData) | ||
| 220 | + }).then(res => { | ||
| 221 | + console.log(res) | ||
| 222 | + }) | ||
| 223 | + }, | ||
| 215 | bindDateChange: function (e) { | 224 | bindDateChange: function (e) { |
| 216 | this.date = e.detail.value | 225 | this.date = e.detail.value |
| 217 | }, | 226 | }, |