Commit b6d85d2d0480d60155e8ae2fcc80ad08d5e52add
Merge remote-tracking branch 'origin/branch' into branch
# Conflicts: # common/common.js
Showing
3 changed files
with
73 additions
and
28 deletions
common/common.js
@@ -4,7 +4,7 @@ import md5 from './md5.min.js'; | @@ -4,7 +4,7 @@ import md5 from './md5.min.js'; | ||
4 | var serverUrl = "https://bus.jycrtc.com"; | 4 | var serverUrl = "https://bus.jycrtc.com"; |
5 | 5 | ||
6 | //江阴微信小程序appid | 6 | //江阴微信小程序appid |
7 | -const hs_wxPay_appId = 'wxfdc1af620d3ab750'; | 7 | +const hs_wxPay_appId = 'wxfdc1af620d3ab750'; |
8 | 8 | ||
9 | // 江阴慧停车orgId | 9 | // 江阴慧停车orgId |
10 | const public_orgId = '10107'; | 10 | const public_orgId = '10107'; |
@@ -29,25 +29,33 @@ const userLoginout = serverUrl + "/business/h5/index/logout"; | @@ -29,25 +29,33 @@ const userLoginout = serverUrl + "/business/h5/index/logout"; | ||
29 | const useraboutUs = serverUrl + "/business/h5/index/aboutUs"; | 29 | const useraboutUs = serverUrl + "/business/h5/index/aboutUs"; |
30 | 30 | ||
31 | // 商户账户余额信息 | 31 | // 商户账户余额信息 |
32 | -const walletAccount = serverUrl + "/business/h5/wallet/account"; | 32 | +const walletAccount = serverUrl + "/business/h5/wallet/account"; |
33 | 33 | ||
34 | // 商户充值金额列表 | 34 | // 商户充值金额列表 |
35 | const rechargeList = serverUrl + "/business/h5/wallet/rechargeList"; | 35 | const rechargeList = serverUrl + "/business/h5/wallet/rechargeList"; |
36 | 36 | ||
37 | +// 通过商户ID查询停车记录信息 | ||
38 | +const getBusinessParkOrderByBusIdForPage = serverUrl + "/business/h5/order/getBusinessParkOrderByBusIdForPage"; | ||
39 | + | ||
40 | +// 通过商户ID查询停车记录信息 | ||
41 | +const getPayOrderByOrderId = serverUrl + "/business/h5/order/getPayOrderByOrderId"; | ||
42 | + | ||
43 | + | ||
44 | + | ||
37 | // | 45 | // |
38 | const requestSign = function(inputData) { | 46 | const requestSign = function(inputData) { |
39 | 47 | ||
40 | var jsonList = inputData || {}; | 48 | var jsonList = inputData || {}; |
41 | 49 | ||
42 | - jsonList.orgId = public_orgId; | 50 | + jsonList.orgId = public_orgId; |
43 | jsonList.sign_type = "md5"; | 51 | jsonList.sign_type = "md5"; |
44 | jsonList.app_id = "0eca8f5373ca4866aec2f8e9d9367104"; | 52 | jsonList.app_id = "0eca8f5373ca4866aec2f8e9d9367104"; |
45 | jsonList.deviceInfo = "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E"; | 53 | jsonList.deviceInfo = "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E"; |
46 | jsonList.salt = getSalt(); | 54 | jsonList.salt = getSalt(); |
47 | jsonList.terminalSource = "11"; | 55 | jsonList.terminalSource = "11"; |
56 | + // jsonList.token = getGlobalUser("globalUser").token; | ||
48 | jsonList.token = getGlobalUser("globalUser").token; | 57 | jsonList.token = getGlobalUser("globalUser").token; |
49 | - // jsonList.token = getGlobalUser("globalUser").token; | ||
50 | - // jsonList.token = 'af7ed65335f842ee8f754e841ff940ea'; | 58 | + // jsonList.token = 'af7ed65335f842ee8f754e841ff940ea'; |
51 | 59 | ||
52 | var arrData = []; | 60 | var arrData = []; |
53 | for (var key in jsonList) { | 61 | for (var key in jsonList) { |
@@ -130,7 +138,7 @@ export default { | @@ -130,7 +138,7 @@ export default { | ||
130 | appVerson, | 138 | appVerson, |
131 | SetToken, | 139 | SetToken, |
132 | requestSign, | 140 | requestSign, |
133 | - moneyFormat, | 141 | + moneyFormat, |
134 | 142 | ||
135 | // 接口 | 143 | // 接口 |
136 | userLogin, | 144 | userLogin, |
@@ -138,7 +146,21 @@ export default { | @@ -138,7 +146,21 @@ export default { | ||
138 | userLoginout, | 146 | userLoginout, |
139 | useraboutUs, | 147 | useraboutUs, |
140 | walletAccount, | 148 | walletAccount, |
149 | + //刘淇接口 | ||
150 | + getBusinessParkOrderByBusIdForPage, | ||
151 | + getPayOrderByOrderId, | ||
152 | + | ||
153 | + | ||
154 | + | ||
155 | + | ||
156 | + | ||
157 | + | ||
158 | + | ||
159 | + | ||
160 | + | ||
161 | + //陈彪接口 | ||
141 | rechargeList, | 162 | rechargeList, |
142 | - // 通过商户ID查询停车记录信息 | ||
143 | - getBusinessParkOrderByBusIdForPage:serverUrl + "/business/h5/order/getBusinessParkOrderByBusIdForPage", | 163 | + |
164 | + | ||
165 | + | ||
144 | } | 166 | } |
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 | }, |