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 | 31 | // 商户账户余额信息 |
32 | 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 | 43 | const requestSign = function(inputData) { |
36 | 44 | |
... | ... | @@ -43,8 +51,8 @@ const requestSign = function(inputData) { |
43 | 51 | jsonList.salt = getSalt(); |
44 | 52 | jsonList.terminalSource = "11"; |
45 | 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 | 57 | var arrData = []; |
50 | 58 | for (var key in jsonList) { |
... | ... | @@ -135,6 +143,7 @@ export default { |
135 | 143 | userLoginout, |
136 | 144 | useraboutUs, |
137 | 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 | 9 | 开始时间 |
10 | 10 | </view> |
11 | 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 | 14 | </picker> |
15 | 15 | </view> |
16 | 16 | </view> |
... | ... | @@ -20,15 +20,15 @@ |
20 | 20 | 结束时间 |
21 | 21 | </view> |
22 | 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 | 25 | </picker> |
26 | 26 | </view> |
27 | 27 | </view> |
28 | 28 | </view> |
29 | 29 | |
30 | 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 | 32 | <view> |
33 | 33 | {{i.plName}} |
34 | 34 | </view> |
... | ... | @@ -60,13 +60,15 @@ |
60 | 60 | |
61 | 61 | <script> |
62 | 62 | |
63 | +import common from "../../common/common"; | |
63 | 64 | export default { |
64 | 65 | data() { |
65 | 66 | const currentDate = this.getDate({ |
66 | 67 | format: true |
67 | 68 | }) |
68 | 69 | return { |
69 | - date: currentDate, | |
70 | + startTime:currentDate, | |
71 | + endTime: currentDate, | |
70 | 72 | mycarNumber: '', |
71 | 73 | userIsLogin: false, |
72 | 74 | // shownoFlag: 0, |
... | ... | @@ -106,8 +108,8 @@ export default { |
106 | 108 | let that = this |
107 | 109 | let paramsData = { |
108 | 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 | 115 | that.$myRequest({ |
... | ... | @@ -118,8 +120,20 @@ export default { |
118 | 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 | 134 | bindDateChange: function (e) { |
122 | - this.date = e.detail.value | |
135 | + this.endTime = e.detail.value | |
136 | + this.getBusinessParkOrderByBusIdForPage() | |
123 | 137 | }, |
124 | 138 | getDate(type) { |
125 | 139 | const date = new Date(); | ... | ... |
pages/parkRecordList/recordDetail.vue
... | ... | @@ -173,23 +173,17 @@ export default { |
173 | 173 | date: currentDate, |
174 | 174 | mycarNumber: '', |
175 | 175 | userIsLogin: false, |
176 | - shownoFlag: 0 | |
176 | + shownoFlag: 0, | |
177 | + orderId:'',// 订单号 | |
177 | 178 | } |
178 | 179 | }, |
179 | 180 | onLoad(params) { |
180 | 181 | wx.showShareMenu({ |
181 | 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 | 188 | onShow() { |
195 | 189 | var me = this; |
... | ... | @@ -212,6 +206,21 @@ export default { |
212 | 206 | } |
213 | 207 | }, |
214 | 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 | 224 | bindDateChange: function (e) { |
216 | 225 | this.date = e.detail.value |
217 | 226 | }, | ... | ... |