Commit b6bde29129cb22aa2cb3eac8adb86dbd05f78e4e
Merge remote-tracking branch 'origin/branch' into branch
# Conflicts: # common/common.js
Showing
3 changed files
with
103 additions
and
358 deletions
common/common.js
1 | 1 | import md5 from './md5.min.js'; |
2 | - | |
3 | 2 | // 江阴正式环境 |
4 | 3 | var serverUrl = "https://bus.jycrtc.com"; |
5 | - | |
6 | 4 | //江阴微信小程序appid |
7 | 5 | const hs_wxPay_appId = 'wxfdc1af620d3ab750'; |
8 | - | |
9 | 6 | // 江阴慧停车orgId |
10 | 7 | const public_orgId = '10107'; |
11 | 8 | const appName = '江阴慧停车'; |
12 | 9 | const ACompany = '©江阴慧停车管理有限公司'; |
13 | 10 | const BCompany = '由中兴智能交通股份有限公司提供技术支持'; |
14 | 11 | const appVerson = '1.0.0'; |
15 | - | |
16 | 12 | const SetToken = uni.getStorageSync("globalUser").token; |
17 | - | |
18 | 13 | // ----江阴项目 接口---- |
19 | 14 | // 商户登录 |
20 | 15 | const userLogin = serverUrl + "/business/h5/index/login"; |
21 | - | |
22 | 16 | // 获取已登录商户用户信息 |
23 | 17 | const indexInfo = serverUrl + "/business/h5/index/info"; |
24 | - | |
25 | 18 | // 商户退出登录 |
26 | 19 | const userLoginout = serverUrl + "/business/h5/index/logout"; |
27 | - | |
28 | 20 | // 商户关于我们 |
29 | 21 | const useraboutUs = serverUrl + "/business/h5/index/aboutUs"; |
30 | - | |
31 | 22 | // 商户账户余额信息 |
32 | 23 | const walletAccount = serverUrl + "/business/h5/wallet/account"; |
33 | - | |
34 | 24 | // 商户充值金额列表 |
35 | 25 | const rechargeList = serverUrl + "/business/h5/wallet/rechargeList"; |
26 | +// 通过商户ID查询停车记录信息 | |
27 | +const getBusinessParkOrderByBusIdForPage = serverUrl + "/business/h5/order/getBusinessParkOrderByBusIdForPage"; | |
28 | +// 通过商户ID查询停车记录信息 | |
29 | +const getPayOrderByOrderId = serverUrl + "/business/h5/order/getPayOrderByOrderId"; | |
30 | +//刘淇接口 | |
31 | + | |
32 | + | |
33 | +// 商户卡券-可以购买卡券列表-分页 | |
34 | +const couponRuleParkPage = serverUrl + "business/h5/coupon/couponRuleParkPage"; | |
35 | + | |
36 | + | |
37 | +//陈彪接口 | |
36 | 38 | |
37 | 39 | // 余额明细下拉框选择列表 |
38 | 40 | const walletKindType = serverUrl + "/business/h5/wallet/kindType"; |
... | ... | @@ -46,19 +48,11 @@ const walletDetailsPage = serverUrl + "/business/h5/wallet/detailsPage"; |
46 | 48 | // 钱包充值-微信 |
47 | 49 | const publicUnifiedOrder = serverUrl + "/business/h5/pay/weixinpay/publicUnifiedOrder"; |
48 | 50 | |
49 | -// 通过商户ID查询停车记录信息 | |
50 | -const getBusinessParkOrderByBusIdForPage = serverUrl + "/business/h5/order/getBusinessParkOrderByBusIdForPage"; | |
51 | - | |
52 | -// 通过商户ID查询停车记录信息 | |
53 | -const getPayOrderByOrderId = serverUrl + "/business/h5/order/getPayOrderByOrderId"; | |
54 | - | |
55 | 51 | |
56 | 52 | |
57 | -// | |
58 | -const requestSign = function(inputData) { | |
59 | 53 | |
54 | +const requestSign = function (inputData) { | |
60 | 55 | var jsonList = inputData || {}; |
61 | - | |
62 | 56 | jsonList.orgId = public_orgId; |
63 | 57 | jsonList.sign_type = "md5"; |
64 | 58 | jsonList.app_id = "0eca8f5373ca4866aec2f8e9d9367104"; |
... | ... | @@ -68,7 +62,6 @@ const requestSign = function(inputData) { |
68 | 62 | // jsonList.token = getGlobalUser("globalUser").token; |
69 | 63 | jsonList.token = getGlobalUser("globalUser").token; |
70 | 64 | // jsonList.token = 'af7ed65335f842ee8f754e841ff940ea'; |
71 | - | |
72 | 65 | var arrData = []; |
73 | 66 | for (var key in jsonList) { |
74 | 67 | var obj = {}; |
... | ... | @@ -83,11 +76,9 @@ const requestSign = function(inputData) { |
83 | 76 | jsonList.sign = sign; |
84 | 77 | return jsonList; |
85 | 78 | } |
86 | - | |
87 | - | |
88 | 79 | //获取sign |
89 | -var getSign = function(objb) { | |
90 | - var compare = function(obj1, obj2) { | |
80 | +var getSign = function (objb) { | |
81 | + var compare = function (obj1, obj2) { | |
91 | 82 | var val1 = obj1.keyname; |
92 | 83 | var val2 = obj2.keyname; |
93 | 84 | if (val1 < val2) { |
... | ... | @@ -111,9 +102,8 @@ var getSign = function(objb) { |
111 | 102 | strmd5 = strmd5.toUpperCase(); |
112 | 103 | return strmd5; |
113 | 104 | } |
114 | - | |
115 | 105 | //获取盐值 |
116 | -var getSalt = function() { | |
106 | +var getSalt = function () { | |
117 | 107 | var len = parseInt(32); |
118 | 108 | var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; |
119 | 109 | var maxPos = $chars.length; |
... | ... | @@ -124,8 +114,7 @@ var getSalt = function() { |
124 | 114 | // console.log(pwd); |
125 | 115 | return pwd; |
126 | 116 | } |
127 | - | |
128 | -var getGlobalUser = function(key) { | |
117 | +var getGlobalUser = function (key) { | |
129 | 118 | var userInfo = uni.getStorageSync("globalUser"); |
130 | 119 | if (userInfo != null && userInfo != "" && userInfo != undefined) { |
131 | 120 | return userInfo; |
... | ... | @@ -133,58 +122,52 @@ var getGlobalUser = function(key) { |
133 | 122 | return ''; |
134 | 123 | } |
135 | 124 | } |
136 | - | |
137 | 125 | // 除了金额 |
138 | -var moneyFormat = function(val) { | |
126 | +var moneyFormat = function (val) { | |
139 | 127 | return (val / 100).toFixed(2) |
140 | 128 | } |
141 | - | |
142 | -var dateFormat = function(msd) { // 时间转换 | |
143 | - var time = msd | |
129 | +var dateFormat = function (msd) { // 时间转换 | |
130 | + var time =msd | |
144 | 131 | |
145 | 132 | if (null != time && "" != time) { |
146 | - | |
147 | 133 | if (time > 60 && time < 60 * 60) { |
148 | - | |
149 | 134 | time = parseInt(time / 60.0) + "分钟" + parseInt((parseFloat(time / 60.0) - |
150 | 135 | |
151 | 136 | parseInt(time / 60.0)) * 60) + "秒"; |
152 | 137 | |
153 | - } else if (time >= 60 * 60 && time < 60 * 60 * 24) { | |
138 | + } | |
154 | 139 | |
140 | + else if (time >= 60 * 60 && time < 60 * 60 * 24) { | |
155 | 141 | time = parseInt(time / 3600.0) + "小时" + parseInt((parseFloat(time / 3600.0) - |
156 | 142 | |
157 | - parseInt(time / 3600.0)) * 60) + "分钟" + | |
143 | + parseInt(time / 3600.0)) * 60) + "分钟" + | |
158 | 144 | |
159 | 145 | parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) - |
160 | 146 | |
161 | 147 | parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "秒"; |
162 | 148 | |
163 | 149 | } else if (time >= 60 * 60 * 24) { |
150 | + time = parseInt(time / 3600.0/24) + "天" +parseInt((parseFloat(time / 3600.0/24)- | |
164 | 151 | |
165 | - time = parseInt(time / 3600.0 / 24) + "天" + parseInt((parseFloat(time / 3600.0 / 24) - | |
166 | - | |
167 | - parseInt(time / 3600.0 / 24)) * 24) + "小时" + parseInt((parseFloat(time / 3600.0) - | |
152 | + parseInt(time / 3600.0/24))*24) + "小时" + parseInt((parseFloat(time / 3600.0) - | |
168 | 153 | |
169 | - parseInt(time / 3600.0)) * 60) + "分钟" + | |
154 | + parseInt(time / 3600.0)) * 60) + "分钟" + | |
170 | 155 | |
171 | 156 | parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) - |
172 | 157 | |
173 | 158 | parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "秒"; |
174 | 159 | |
175 | - } else { | |
160 | + } | |
176 | 161 | |
162 | + else { | |
177 | 163 | time = parseInt(time) + "秒"; |
178 | 164 | |
179 | 165 | } |
180 | 166 | |
181 | 167 | } |
182 | - | |
183 | 168 | return time; |
184 | 169 | } |
185 | - | |
186 | 170 | export default { |
187 | - | |
188 | 171 | // deviceInfo, |
189 | 172 | hs_wxPay_appId, |
190 | 173 | public_orgId, |
... | ... | @@ -195,7 +178,7 @@ export default { |
195 | 178 | SetToken, |
196 | 179 | requestSign, |
197 | 180 | moneyFormat, |
198 | - | |
181 | + dateFormat, | |
199 | 182 | // 接口 |
200 | 183 | userLogin, |
201 | 184 | indexInfo, |
... | ... | @@ -208,17 +191,11 @@ export default { |
208 | 191 | |
209 | 192 | |
210 | 193 | |
211 | - | |
212 | - | |
213 | - | |
214 | - | |
215 | - | |
216 | - | |
217 | 194 | //陈彪接口 |
218 | 195 | rechargeList, |
219 | 196 | walletKindType, |
220 | 197 | detailSummary, |
221 | 198 | walletDetailsPage, |
222 | 199 | publicUnifiedOrder, |
223 | - | |
200 | + | |
224 | 201 | } | ... | ... |
pages/businessCard/businessCard.vue
... | ... | @@ -2,17 +2,9 @@ |
2 | 2 | <view> |
3 | 3 | <uni-section title="50%(折扣券)" type="line"> |
4 | 4 | <uni-card padding="0" spacing="0"> |
5 | - <!--<template v-slot:cover>--> | |
6 | - <!--<view class="custom-cover">--> | |
7 | - <!--<image class="cover-image" mode="aspectFill" :src="cover">--> | |
8 | - <!--</image>--> | |
9 | - <!--<view class="cover-content">--> | |
10 | - <!--<text class="uni-subtitle uni-white">今日新闻热点</text>--> | |
11 | - <!--</view>--> | |
12 | - <!--</view>--> | |
13 | - <!--</template>--> | |
5 | + | |
14 | 6 | <uni-list> |
15 | - <uni-list-item title="适应车场" rightText="万达商业广场" > | |
7 | + <uni-list-item title="适应车场" rightText="万达商业广场"> | |
16 | 8 | <text></text> |
17 | 9 | </uni-list-item> |
18 | 10 | <uni-list-item title="价格:¥5/张" rightText="商户库存:0张"></uni-list-item> |
... | ... | @@ -49,7 +41,7 @@ |
49 | 41 | <!--</view>--> |
50 | 42 | <!--</template>--> |
51 | 43 | <uni-list> |
52 | - <uni-list-item title="适应车场" rightText="万达商业广场" > | |
44 | + <uni-list-item title="适应车场" rightText="万达商业广场"> | |
53 | 45 | <text></text> |
54 | 46 | </uni-list-item> |
55 | 47 | <uni-list-item title="价格:¥5/张" rightText="商户库存:0张"></uni-list-item> |
... | ... | @@ -77,7 +69,7 @@ |
77 | 69 | <!--</view>--> |
78 | 70 | <!--</template>--> |
79 | 71 | <uni-list> |
80 | - <uni-list-item title="适应车场" rightText="万达商业广场" > | |
72 | + <uni-list-item title="适应车场" rightText="万达商业广场"> | |
81 | 73 | <text></text> |
82 | 74 | </uni-list-item> |
83 | 75 | <uni-list-item title="价格:¥5/张" rightText="商户库存:0张"></uni-list-item> |
... | ... | @@ -106,7 +98,7 @@ |
106 | 98 | <!--</view>--> |
107 | 99 | <!--</template>--> |
108 | 100 | <uni-list> |
109 | - <uni-list-item title="适应车场" rightText="万达商业广场" > | |
101 | + <uni-list-item title="适应车场" rightText="万达商业广场"> | |
110 | 102 | <text></text> |
111 | 103 | </uni-list-item> |
112 | 104 | <uni-list-item title="价格:¥5/张" rightText="商户库存:0张"></uni-list-item> |
... | ... | @@ -135,7 +127,7 @@ |
135 | 127 | <!--</view>--> |
136 | 128 | <!--</template>--> |
137 | 129 | <uni-list> |
138 | - <uni-list-item title="适应车场" rightText="万达商业广场" > | |
130 | + <uni-list-item title="适应车场" rightText="万达商业广场"> | |
139 | 131 | <text></text> |
140 | 132 | </uni-list-item> |
141 | 133 | <uni-list-item title="价格:¥5/张" rightText="商户库存:0张"></uni-list-item> |
... | ... | @@ -163,7 +155,7 @@ |
163 | 155 | <!--</view>--> |
164 | 156 | <!--</template>--> |
165 | 157 | <uni-list> |
166 | - <uni-list-item title="适应车场" rightText="万达商业广场" > | |
158 | + <uni-list-item title="适应车场" rightText="万达商业广场"> | |
167 | 159 | <text></text> |
168 | 160 | </uni-list-item> |
169 | 161 | <uni-list-item title="价格:¥5/张" rightText="商户库存:0张"></uni-list-item> |
... | ... | @@ -179,138 +171,6 @@ |
179 | 171 | </uni-card> |
180 | 172 | </uni-section> |
181 | 173 | |
182 | - | |
183 | - | |
184 | - <!--<view class="statistics yellow-bg uni-list-cell-pd" style="color: #fff">共18笔充值,充值总金额100.00元</view>--> | |
185 | - <!--<view class="uni-list">--> | |
186 | - <!--<view class="uni-list-cell">--> | |
187 | - <!--<view class="uni-list-cell-left">--> | |
188 | - <!--消费类型--> | |
189 | - <!--</view>--> | |
190 | - <!--<view class="uni-list-cell-db">--> | |
191 | - <!--<picker @change="bindPickerChange" :value="index" :range="array">--> | |
192 | - <!--<view class="uni-input">{{array[index]}}</view>--> | |
193 | - <!--</picker>--> | |
194 | - <!--</view>--> | |
195 | - <!--</view>--> | |
196 | - <!--</view>--> | |
197 | - | |
198 | - <!--<view class="uni-list">--> | |
199 | - <!--<view class="uni-list-cell">--> | |
200 | - <!--<view class="uni-list-cell-left">--> | |
201 | - <!--充值方式--> | |
202 | - <!--</view>--> | |
203 | - <!--<view class="uni-list-cell-db">--> | |
204 | - <!--<picker @change="bindPickerChangeWay" :value="indexWay" :range="arrayWay">--> | |
205 | - <!--<view class="uni-input">{{arrayWay[indexWay]}}</view>--> | |
206 | - <!--</picker>--> | |
207 | - <!--</view>--> | |
208 | - <!--</view>--> | |
209 | - <!--</view>--> | |
210 | - | |
211 | - | |
212 | - <!--<view class="uni-list">--> | |
213 | - <!--<view class="uni-list-cell">--> | |
214 | - <!--<view class="uni-list-cell-left">--> | |
215 | - <!--开始时间--> | |
216 | - <!--</view>--> | |
217 | - <!--<view class="uni-list-cell-db">--> | |
218 | - <!--<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindStartDateChange">--> | |
219 | - <!--<view class="uni-input">{{benginDate}}</view>--> | |
220 | - <!--</picker>--> | |
221 | - <!--</view>--> | |
222 | - <!--</view>--> | |
223 | - <!--</view>--> | |
224 | - | |
225 | - <!--<view class="uni-list">--> | |
226 | - <!--<view class="uni-list-cell">--> | |
227 | - <!--<view class="uni-list-cell-left">--> | |
228 | - <!--结束时间--> | |
229 | - <!--</view>--> | |
230 | - <!--<view class="uni-list-cell-db">--> | |
231 | - <!--<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindEndDateChange">--> | |
232 | - <!--<view class="uni-input">{{overDate}}</view>--> | |
233 | - <!--</picker>--> | |
234 | - <!--</view>--> | |
235 | - <!--</view>--> | |
236 | - <!--</view>--> | |
237 | - | |
238 | - <!--<!– <view class="border-bg"></view> –>--> | |
239 | - | |
240 | - | |
241 | - <!--<uni-load-more class="load"--> | |
242 | - <!--:content-text="contentText"--> | |
243 | - <!--:status="status"--> | |
244 | - <!--:icon-size="24"--> | |
245 | - <!--:iconType="iconType"--> | |
246 | - <!--v-if="rows.length == 0">--> | |
247 | - | |
248 | - <!--<uni-list class="rechargeWrap">--> | |
249 | - <!--<view class="recordCon uni-list-cell-pd">--> | |
250 | - <!--<text>+66</text>--> | |
251 | - <!--<text>充值成功</text>--> | |
252 | - <!--</view>--> | |
253 | - <!--<view class="recordCon uni-list-cell-pd">--> | |
254 | - <!--<text class="color-green">微信充值</text>--> | |
255 | - <!--<text>2020-10-01 01:01:01</text>--> | |
256 | - <!--</view>--> | |
257 | - <!--</uni-list>--> | |
258 | - | |
259 | - <!--<uni-list class="rechargeWrap">--> | |
260 | - <!--<view class="recordCon uni-list-cell-pd">--> | |
261 | - <!--<text>+66</text>--> | |
262 | - <!--<text>充值成功</text>--> | |
263 | - <!--</view>--> | |
264 | - <!--<view class="recordCon uni-list-cell-pd">--> | |
265 | - <!--<text class="color-blue">支付宝充值</text>--> | |
266 | - <!--<text>2020-10-01 01:01:01</text>--> | |
267 | - <!--</view>--> | |
268 | - <!--</uni-list>--> | |
269 | - | |
270 | - <!--<uni-list class="rechargeWrap">--> | |
271 | - <!--<view class="recordCon uni-list-cell-pd">--> | |
272 | - <!--<text>+66</text>--> | |
273 | - <!--<text>充值成功</text>--> | |
274 | - <!--</view>--> | |
275 | - <!--<view class="recordCon uni-list-cell-pd">--> | |
276 | - <!--<text class="color-red">线下公对公充值</text>--> | |
277 | - <!--<text>2020-10-01 01:01:01</text>--> | |
278 | - <!--</view>--> | |
279 | - <!--</uni-list>--> | |
280 | - | |
281 | - <!--<uni-list class="rechargeWrap">--> | |
282 | - <!--<view class="recordCon uni-list-cell-pd">--> | |
283 | - <!--<text>-66</text>--> | |
284 | - <!--<text>支付成功</text>--> | |
285 | - <!--</view>--> | |
286 | - <!--<view class="recordCon uni-list-cell-pd">--> | |
287 | - <!--<text class="color-green">购买卡券</text>--> | |
288 | - <!--<text>2020-10-01 01:01:01</text>--> | |
289 | - <!--</view>--> | |
290 | - <!--<view class="rechargeArrow">--> | |
291 | - <!-->--> | |
292 | - <!--</view>--> | |
293 | - <!--</uni-list>--> | |
294 | - | |
295 | - | |
296 | - | |
297 | - <!--<uni-list class="rechargeWrap">--> | |
298 | - <!--<view class="recordCon uni-list-cell-pd">--> | |
299 | - <!--<text>-66</text>--> | |
300 | - <!--<text>支付成功</text>--> | |
301 | - <!--</view>--> | |
302 | - <!--<view class="recordCon uni-list-cell-pd">--> | |
303 | - <!--<text class="">停车支付</text>--> | |
304 | - <!--<text>2020-10-01 01:01:01</text>--> | |
305 | - <!--</view>--> | |
306 | - <!--<view class="rechargeArrow">--> | |
307 | - <!-->--> | |
308 | - <!--</view>--> | |
309 | - <!--</uni-list>--> | |
310 | - | |
311 | - <!--</uni-load-more>--> | |
312 | - | |
313 | - | |
314 | 174 | </view> |
315 | 175 | </template> |
316 | 176 | |
... | ... | @@ -329,109 +189,62 @@ export default { |
329 | 189 | indexWay: 0, |
330 | 190 | benginDate: currentDate, |
331 | 191 | overDate: currentDate, |
332 | - rows:[], | |
333 | - pageNum:1,//当前页 | |
334 | - pageSize:1,//每页条数 | |
335 | - reload:false, | |
336 | - status:'more', | |
337 | - contentText:{ | |
338 | - contentdown:'上拉加载更多~', | |
339 | - contentrefresh:'正在加载更多~', | |
340 | - contentmore:'我是有底线的~' | |
192 | + rows: [], | |
193 | + pageNum: 1,//当前页 | |
194 | + pageSize: 1,//每页条数 | |
195 | + reload: false, | |
196 | + status: 'more', | |
197 | + contentText: { | |
198 | + contentdown: '上拉加载更多~', | |
199 | + contentrefresh: '正在加载更多~', | |
200 | + contentmore: '我是有底线的~' | |
341 | 201 | }, |
342 | - iconType:'auto', // 图标样式 | |
202 | + iconType: 'auto', // 图标样式 | |
343 | 203 | } |
344 | 204 | }, |
345 | 205 | onLoad(params) { |
346 | 206 | wx.showShareMenu({ |
347 | 207 | withShareTicket: true |
348 | 208 | }) |
349 | - // this.mycarNumber = params.carNumber; | |
350 | - // this.myorderId = params.orderId; | |
351 | - // this.myparkCode = params.parkCode; | |
352 | - // this.myorderState = params.orderState; | |
353 | - // this.totalFee = params.totalFee | |
354 | - // this.unPayFee = params.unPayFee | |
355 | - // if (params.orderState == 5) { | |
356 | - // //停车补缴单 103 | |
357 | - // this.mypaySrcType = '103' | |
358 | - // } else { | |
359 | - // this.mypaySrcType = '101' | |
360 | - // } | |
361 | - // // this.GetbillQueryInfo(this.mycarNumber, this.myorderId, this.myparkCode); | |
362 | - // this.getWxCode(); | |
363 | - // this.PDlogin(); | |
364 | - //console.log("xxxmake = "+this.makedateFormat()); | |
209 | + this.couponRuleParkPage() | |
365 | 210 | }, |
366 | 211 | onShow() { |
367 | 212 | var me = this; |
368 | - var userInfo = me.getGlobalUser("globalUser"); | |
369 | - if (userInfo != null) { | |
370 | - me.phoneNumb = userInfo.userPhone; | |
371 | - } | |
372 | - var pages = getCurrentPages(); | |
373 | - var currPage = pages[pages.length - 1]; //当前页面 | |
374 | - console.log('currPage.data.selCoupon = ' + currPage.data.selCoupon); | |
375 | - me.selCoupon = currPage.data.selCoupon; | |
376 | - console.log(JSON.stringify(me.selCoupon)); | |
377 | - // me.GetbillQueryInfo(me.mycarNumber, me.myorderId, me.myparkCode, me.selCoupon.cardNo, me.selCoupon.couponType, me.selCoupon | |
378 | - // .discValue); | |
379 | - // GetbillQueryInfo(carnum, orderId, parkCode, cardNo, couponType, disValue) { | |
213 | + | |
380 | 214 | }, |
381 | 215 | computed: { |
382 | - startDate() { | |
383 | - return this.getDate('start'); | |
384 | - }, | |
385 | - endDate() { | |
386 | - return this.getDate('end'); | |
387 | - } | |
216 | + | |
388 | 217 | }, |
389 | 218 | methods: { |
390 | - actionsClick(text){ | |
391 | - uni.showToast({ | |
392 | - title:text, | |
393 | - icon:'none' | |
394 | - }) | |
395 | - }, | |
396 | - bindPickerChange: function (e) { | |
397 | - console.log('picker发送选择改变,携带值为', e.detail.value) | |
398 | - this.index = e.detail.value | |
399 | - }, | |
400 | - bindPickerChangeWay: function (e) { | |
401 | - console.log('picker发送选择改变,携带值为', e.detail.value) | |
402 | - this.indexWay = e.detail.value | |
403 | - }, | |
404 | - bindStartDateChange: function (e) { | |
405 | - this.benginDate = e.detail.value | |
406 | - }, | |
407 | - bindEndDateChange: function (e) { | |
408 | - this.overDate = e.detail.value | |
409 | - }, | |
410 | - getDate(type) { | |
411 | - const date = new Date(); | |
412 | - let year = date.getFullYear(); | |
413 | - let month = date.getMonth() + 1; | |
414 | - let day = date.getDate(); | |
415 | - if (type === 'start') { | |
416 | - year = year - 60; | |
417 | - } else if (type === 'end') { | |
418 | - year = year + 2; | |
219 | + // 通过商户ID查询停车记录信息 | |
220 | + couponRuleParkPage() { | |
221 | + let that = this | |
222 | + let paramsData = { | |
223 | + pageNum: '1', | |
224 | + pageSize: '10' | |
419 | 225 | } |
420 | - month = month > 9 ? month : '0' + month; | |
421 | - day = day > 9 ? day : '0' + day; | |
422 | - return `${year}-${month}-${day}`; | |
226 | + // 首页信息获取 接口 | |
227 | + that.$myRequest({ | |
228 | + url: that.$common.getBusinessParkOrderByBusIdForPage, | |
229 | + method: 'POST', | |
230 | + data: that.$common.requestSign(paramsData) | |
231 | + }).then(res => { | |
232 | + this.recordList = res.data.dataList | |
233 | + }) | |
423 | 234 | }, |
235 | + | |
424 | 236 | } |
425 | 237 | } |
426 | 238 | </script> |
427 | 239 | |
428 | 240 | <style lang="scss" scoped> |
429 | - /deep/ .uni-section{ | |
241 | + /deep/ .uni-section { | |
430 | 242 | padding-bottom: 10px; |
431 | 243 | } |
432 | - .rechargeWrap{ | |
244 | + | |
245 | + .rechargeWrap { | |
433 | 246 | position: relative; |
434 | - .rechargeArrow{ | |
247 | + .rechargeArrow { | |
435 | 248 | position: absolute; |
436 | 249 | right: 10px; |
437 | 250 | top: 30px; |
... | ... | @@ -439,6 +252,7 @@ export default { |
439 | 252 | color: #999; |
440 | 253 | } |
441 | 254 | } |
255 | + | |
442 | 256 | .recordCon { |
443 | 257 | padding-right: 35px; |
444 | 258 | color: #999; |
... | ... | @@ -479,20 +293,24 @@ export default { |
479 | 293 | height: 45px; |
480 | 294 | border-top: 1px #eee solid; |
481 | 295 | } |
296 | + | |
482 | 297 | .card-actions-item { |
483 | 298 | display: flex; |
484 | 299 | flex-direction: row; |
485 | 300 | align-items: center; |
486 | 301 | } |
302 | + | |
487 | 303 | .card-actions-item-text { |
488 | 304 | font-size: 12px; |
489 | 305 | color: #666; |
490 | 306 | margin-left: 5px; |
491 | 307 | } |
308 | + | |
492 | 309 | .cover-image { |
493 | 310 | flex: 1; |
494 | 311 | height: 150px; |
495 | 312 | } |
313 | + | |
496 | 314 | .no-border { |
497 | 315 | border-width: 0; |
498 | 316 | } | ... | ... |
pages/parkRecordList/recordDetail.vue
1 | 1 | <template> |
2 | 2 | <view class="container"> |
3 | - | |
3 | + | |
4 | 4 | <view class="uni-title uni-common-pl recordCarNum">车牌号码:{{carNumber}}</view> |
5 | 5 | <view class="uni-list" style="margin-bottom: 4px"> |
6 | 6 | <view class="uni-list-cell recordPadding"> |
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | 入场时间 |
18 | 18 | </view> |
19 | 19 | <view class="uni-list-cell-db"> |
20 | - <uni-dateformat :date="parkInTime" format="yyyy-MM-dd hh:mm:ss"></uni-dateformat> | |
20 | + <uni-dateformat :date="parkInTime" format="yyyy-MM-dd hh:mm:ss"></uni-dateformat> | |
21 | 21 | </view> |
22 | 22 | </view> |
23 | 23 | |
... | ... | @@ -41,90 +41,40 @@ |
41 | 41 | </view> |
42 | 42 | |
43 | 43 | |
44 | - <uni-list class=""> | |
45 | - <view class="uni-title uni-common-pl recordCarNum">一次支付订单</view> | |
46 | - <view class="recordCon listPadding"> | |
47 | - <text>实收:</text> | |
48 | - <text>¥10.00</text> | |
49 | - </view> | |
50 | - <view class="recordCon listPadding"> | |
51 | - <text>应收:</text> | |
52 | - <text>¥10.00</text> | |
53 | - </view> | |
54 | - <view class="recordCon listPadding"> | |
55 | - <text>支付金额:</text> | |
56 | - <text>¥10.00</text> | |
57 | - </view> | |
58 | - <view class="recordCon listPadding"> | |
59 | - <text>支付方式:</text> | |
60 | - <text class="colorBlue">商户余额</text> | |
61 | - </view> | |
62 | - <view class="recordCon listPadding"> | |
63 | - <text>支付时间:</text> | |
64 | - <text>2022-04-05 20:20:20</text> | |
65 | - </view> | |
66 | - <view class="recordCon listPadding"> | |
67 | - <text>订单编号:</text> | |
68 | - <text>1012321839678731</text> | |
69 | - </view> | |
70 | - </uni-list> | |
71 | - <uni-list class=""> | |
72 | - <view class="uni-title uni-common-pl recordCarNum">二次支付订单</view> | |
73 | - <view class="recordCon listPadding"> | |
74 | - <text>实收:</text> | |
75 | - <text>¥10.00</text> | |
76 | - </view> | |
77 | - <view class="recordCon listPadding"> | |
78 | - <text>应收:</text> | |
79 | - <text>¥10.00</text> | |
80 | - </view> | |
81 | - <view class="recordCon listPadding"> | |
82 | - <text>支付金额:</text> | |
83 | - <text>¥10.00</text> | |
84 | - </view> | |
85 | - <view class="recordCon listPadding"> | |
86 | - <text>支付方式:</text> | |
87 | - <text class="colorBlue">商户余额</text> | |
88 | - </view> | |
89 | - <view class="recordCon listPadding"> | |
90 | - <text>支付时间:</text> | |
91 | - <text>2022-04-05 20:20:20</text> | |
92 | - </view> | |
93 | - <view class="recordCon listPadding"> | |
94 | - <text>订单编号:</text> | |
95 | - <text>1012321839678731</text> | |
96 | - </view> | |
97 | - </uni-list> | |
98 | - | |
44 | + <uni-list class="" v-for="(i, index) in listData" :key="i.id"> | |
45 | + <view class="uni-title uni-common-pl recordCarNum" v-if="listData.length>1">{{index+1}}次支付订单</view> | |
99 | 46 | |
100 | - <uni-list class=""> | |
101 | 47 | <view class="recordCon listPadding"> |
102 | 48 | <text>优惠券:</text> |
103 | - <text>5元金额券</text> | |
49 | + <text>{{$common.moneyFormat(i.orderDicountFee)}}元金额券</text> | |
104 | 50 | </view> |
105 | 51 | <view class="recordCon listPadding"> |
106 | 52 | <text>优惠:</text> |
107 | - <text class="colorGreen">¥5.00</text> | |
53 | + <text class="colorGreen">¥{{$common.moneyFormat(i.orderDicountFee)}}</text> | |
108 | 54 | </view> |
109 | 55 | <view class="recordCon listPadding"> |
110 | 56 | <text>应收:</text> |
111 | - <text>¥10.00</text> | |
57 | + <text>¥{{$common.moneyFormat(i.orderTotalFee)}}</text> | |
112 | 58 | </view> |
113 | 59 | <view class="recordCon listPadding"> |
114 | 60 | <text>实收:</text> |
115 | - <text class="colorBlue">¥10.00</text> | |
61 | + <text class="colorBlue">¥{{$common.moneyFormat(i.orderActFee)}}</text> | |
116 | 62 | </view> |
117 | 63 | <view class="recordCon listPadding"> |
118 | 64 | <text>支付金额:</text> |
119 | - <text>¥10.00</text> | |
65 | + <text>¥{{$common.moneyFormat(i.orderActFee)}}</text> | |
120 | 66 | </view> |
121 | 67 | <view class="recordCon listPadding"> |
122 | 68 | <text>支付方式:</text> |
123 | 69 | <text class="colorBlue">商户余额</text> |
124 | 70 | </view> |
125 | 71 | <view class="recordCon listPadding"> |
72 | + <text>支付时间:</text> | |
73 | + <text class="colorBlue">{{i.payFinishTime}}</text> | |
74 | + </view> | |
75 | + <view class="recordCon listPadding"> | |
126 | 76 | <text>订单编号:</text> |
127 | - <text>1012321839678731</text> | |
77 | + <text>{{i.rltOrderId}}</text> | |
128 | 78 | </view> |
129 | 79 | </uni-list> |
130 | 80 | |
... | ... | @@ -134,7 +84,6 @@ |
134 | 84 | |
135 | 85 | <script> |
136 | 86 | export default { |
137 | - | |
138 | 87 | data() { |
139 | 88 | const currentDate = this.getDate({ |
140 | 89 | format: true |
... | ... | @@ -144,12 +93,13 @@ export default { |
144 | 93 | mycarNumber: '', |
145 | 94 | userIsLogin: false, |
146 | 95 | shownoFlag: 0, |
147 | - orderId:'',// 订单号 | |
148 | - plName:'',// 停车场名称 | |
149 | - parkOutTime:'',// 出场时间 | |
150 | - parkInTime:'',// 入场时间 | |
151 | - parkingDuration:'',// 停车时长 | |
152 | - carNumber:'',// 车牌号 | |
96 | + orderId: '',// 订单号 | |
97 | + plName: '',// 停车场名称 | |
98 | + parkOutTime: '',// 出场时间 | |
99 | + parkInTime: '',// 入场时间 | |
100 | + parkingDuration: 3600,// 停车时长 | |
101 | + carNumber: '',// 车牌号 | |
102 | + listData:[], | |
153 | 103 | } |
154 | 104 | }, |
155 | 105 | onLoad(params) { |
... | ... | @@ -162,11 +112,8 @@ export default { |
162 | 112 | this.plName = option.plName |
163 | 113 | this.parkOutTime = option.parkOutTime |
164 | 114 | this.parkInTime = option.parkInTime |
165 | - this.parkingDuration = option.parkingDuration | |
115 | + this.parkingDuration = 3600 | |
166 | 116 | this.carNumber = option.carNumber |
167 | - | |
168 | - | |
169 | - | |
170 | 117 | console.log(this.orderId) |
171 | 118 | this.getPayOrderByOrderId(); |
172 | 119 | }, |
... | ... | @@ -195,7 +142,7 @@ export default { |
195 | 142 | getPayOrderByOrderId() { |
196 | 143 | let that = this |
197 | 144 | let paramsData = { |
198 | - orderId: '101962015377023516672' | |
145 | + orderId: this.orderId | |
199 | 146 | } |
200 | 147 | // 首页信息获取 接口 |
201 | 148 | that.$myRequest({ |
... | ... | @@ -203,7 +150,8 @@ export default { |
203 | 150 | method: 'POST', |
204 | 151 | data: that.$common.requestSign(paramsData) |
205 | 152 | }).then(res => { |
206 | - console.log(res) | |
153 | + console.log(res) | |
154 | + that.listData = res.data | |
207 | 155 | }) |
208 | 156 | }, |
209 | 157 | bindDateChange: function (e) { |
... | ... | @@ -251,10 +199,12 @@ export default { |
251 | 199 | display: flex; |
252 | 200 | justify-content: space-between; |
253 | 201 | } |
254 | - .colorBlue{ | |
202 | + | |
203 | + .colorBlue { | |
255 | 204 | color: #0A98D5; |
256 | 205 | } |
257 | - .colorGreen{ | |
206 | + | |
207 | + .colorGreen { | |
258 | 208 | color: #1AAD19; |
259 | 209 | } |
260 | 210 | </style> | ... | ... |