Commit 4087b794084f707aa3d163f5758de0501f243897
1 parent
7850cc26
黄石微信公众号 -- 临停支付
Showing
4 changed files
with
45 additions
and
87 deletions
src/utils/request.js
... | ... | @@ -7,7 +7,7 @@ const service = axios.create({ |
7 | 7 | // http://pay.service.renniting.cn/ 赤峰 |
8 | 8 | // http://pay.service.huangshiparking.com/ 黄石正式环境 |
9 | 9 | // http://39.98.54.240:8090/ 黄石测试环境 |
10 | - baseURL: 'http://pay.service.renniting.cn/v1', // url = base url + request url | |
10 | + baseURL: 'http://pay.service.huangshiparking.com/', // url = base url + request url | |
11 | 11 | // withCredentials: true, // send cookies when cross-domain requests |
12 | 12 | timeout: 6000 // request timeout |
13 | 13 | }) | ... | ... |
src/utils/utils.js
... | ... | @@ -145,16 +145,16 @@ export default { |
145 | 145 | // ud8yq5tv0inxupc05xfeau39jywlqoj2 新的id |
146 | 146 | // ny1u72b6k374sg379z0kqjgfxe2ycnpw 新的签名 |
147 | 147 | |
148 | - myVarAppid:'ud8yq5tv0inxupc05xfeau39jywlqoj2',// 公共请求Appid | |
148 | + myVarAppid:'0eca8f5373ca4866aec2f8e9d9367104',// 公共请求Appid | |
149 | 149 | |
150 | 150 | myDeviceInfo: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E', // 公共请求设备信息 |
151 | 151 | |
152 | - myVxAppId: 'wx2af2bab90d433c86', | |
152 | + myVxAppId: 'wxa1a66cc7d263afe6', | |
153 | 153 | // 测试环境 微信赤峰 appid wxff4cebaedbf4f886 |
154 | 154 | // 微信赤峰 appid wx2af2bab90d433c86 |
155 | 155 | // 黄石 appid wxa1a66cc7d263afe6 |
156 | 156 | |
157 | - myOrgId: '10003', // 归属地 赤峰id 10003 黄石 10079 | |
157 | + myOrgId: '10079', // 归属地 赤峰id 10003 黄石 10079 | |
158 | 158 | |
159 | 159 | myGetSign: function (objb) { // 获取签名 |
160 | 160 | var compare = function (obj1, obj2) { |
... | ... | @@ -169,13 +169,13 @@ export default { |
169 | 169 | } |
170 | 170 | } |
171 | 171 | objb.sort(compare); |
172 | - var strmd5 = 'ny1u72b6k374sg379z0kqjgfxe2ycnpw'; | |
172 | + var strmd5 = '14318527b13840c2a4af63fef52c2d6e'; | |
173 | 173 | for(var i=0;i<objb.length;i++){ |
174 | 174 | if(objb[i].value != null&&objb[i].value != ''){ |
175 | 175 | strmd5 += objb[i].keyname+objb[i].value; |
176 | 176 | } |
177 | 177 | } |
178 | - strmd5 += 'ny1u72b6k374sg379z0kqjgfxe2ycnpw'; | |
178 | + strmd5 += '14318527b13840c2a4af63fef52c2d6e'; | |
179 | 179 | // console.log('strmd5-------->'+strmd5); |
180 | 180 | strmd5 = md5(strmd5); |
181 | 181 | strmd5=strmd5.toUpperCase(); | ... | ... |
src/views/parkPay/orderPay.vue
... | ... | @@ -42,8 +42,8 @@ |
42 | 42 | <script> |
43 | 43 | // import CryptoJS from '../utils/AES.js' |
44 | 44 | // let Base64 = require('js-base64').Base64 |
45 | -import { MessageBox } from 'mint-ui'; | |
46 | -import { aliPay, getOpenId, vxPayQuery, bankH5Pay, queryParkingRecordPageByCarNumbers } from '@/api/orderPay/orderPay' | |
45 | + | |
46 | +import {aliPay, getOpenId, vxPayQuery, bankH5Pay, queryParkingRecordPageByCarNumbers} from '@/api/orderPay/orderPay' | |
47 | 47 | |
48 | 48 | export default { |
49 | 49 | name: 'orderPay', |
... | ... | @@ -64,6 +64,7 @@ export default { |
64 | 64 | } |
65 | 65 | }, |
66 | 66 | created() { |
67 | + | |
67 | 68 | this.carWrapBG = this.$route.query.carColor //车牌颜色 |
68 | 69 | this.carNumber = this.$route.query.carNumber |
69 | 70 | this.arrearageTotalFee = this.$route.query.arrearageTotalFee // 应收 |
... | ... | @@ -78,10 +79,8 @@ export default { |
78 | 79 | this.webAppCode = this.getCode(); |
79 | 80 | } |
80 | 81 | |
81 | - | |
82 | - | |
83 | 82 | }, |
84 | - mounted(){ | |
83 | + mounted() { | |
85 | 84 | |
86 | 85 | }, |
87 | 86 | methods: { |
... | ... | @@ -117,12 +116,11 @@ export default { |
117 | 116 | this.orderId = _order |
118 | 117 | } |
119 | 118 | |
120 | - | |
121 | 119 | if (this.clientBrowser == '微信') { // 微信支付 |
122 | 120 | let _openId = sessionStorage.getItem('openIdData') |
123 | - if(_openId){ | |
121 | + if (_openId) { | |
124 | 122 | me.vxPay(_openId, this.orderId) |
125 | - }else{ | |
123 | + } else { | |
126 | 124 | //第一步获取openid |
127 | 125 | var codeParams = { |
128 | 126 | code: this.webAppCode, |
... | ... | @@ -131,12 +129,12 @@ export default { |
131 | 129 | getOpenId(codeParams).then(res => { |
132 | 130 | if (res.code == 0) { |
133 | 131 | me.vxPay(res.data, this.orderId) |
134 | - sessionStorage.setItem('openIdData',res.data) | |
132 | + sessionStorage.setItem('openIdData', res.data) | |
135 | 133 | } else if (res.code == 40163) { //code been used, hints[重复code问题] |
136 | - alert('请重新扫码重复code问题') | |
134 | + this.$msgbox('提示', '请重新扫码重复code问题') | |
137 | 135 | console.log(res.message); |
138 | 136 | } else { |
139 | - alert('请重新扫码') | |
137 | + this.$msgbox('提示', '请重新扫码') | |
140 | 138 | } |
141 | 139 | }) |
142 | 140 | } |
... | ... | @@ -172,11 +170,11 @@ export default { |
172 | 170 | vm.onBridgeReady(data) |
173 | 171 | } |
174 | 172 | } else { |
175 | - alert("没有找到返回值"); | |
173 | + this.$msgbox('提示', '没有找到返回值') | |
176 | 174 | } |
177 | 175 | } else { |
178 | 176 | console.log(res.message); |
179 | - alert(res.message); | |
177 | + this.$msgbox('提示', res.message) | |
180 | 178 | } |
181 | 179 | }) |
182 | 180 | }, |
... | ... | @@ -209,7 +207,7 @@ export default { |
209 | 207 | deviceInfo: me.$utils.myDeviceInfo, |
210 | 208 | salt: salt, |
211 | 209 | sign_type: "md5", |
212 | - token:'', | |
210 | + token: '', | |
213 | 211 | } |
214 | 212 | wxparams.sign = me.$utils.signObject(wxparams) |
215 | 213 | queryParkingRecordPageByCarNumbers(wxparams).then(response => { |
... | ... | @@ -218,17 +216,17 @@ export default { |
218 | 216 | |
219 | 217 | // alert(JSON.stringify(me.parkList)) |
220 | 218 | // alert(me.parkList.length) |
221 | - if(me.parkList.length == 0){ | |
219 | + if (me.parkList.length == 0) { | |
222 | 220 | me.$router.push({ |
223 | - path:'parkRecord', | |
224 | - query:{ | |
221 | + path: 'parkRecord', | |
222 | + query: { | |
225 | 223 | carNumber: me.carNumber, |
226 | 224 | carNumberColor: me.carWrapBG, |
227 | 225 | parkFlag: 0 // 0表示在停 1表示历史 |
228 | 226 | } |
229 | 227 | }) |
230 | 228 | |
231 | - }else{ | |
229 | + } else { | |
232 | 230 | me.parkingData = me.parkList.filter(item => { |
233 | 231 | return item.parkState == '10' |
234 | 232 | }) |
... | ... | @@ -238,7 +236,7 @@ export default { |
238 | 236 | }) |
239 | 237 | console.log(me.historyList) |
240 | 238 | |
241 | - if(me.historyList.length>0){ | |
239 | + if (me.historyList.length > 0) { | |
242 | 240 | MessageBox.confirm('', { |
243 | 241 | message: '您当前有历史欠费 是否立即补缴?', |
244 | 242 | title: '温馨提示', |
... | ... | @@ -248,8 +246,8 @@ export default { |
248 | 246 | if (action == 'confirm') { //确认的回调 |
249 | 247 | console.log('确定'); |
250 | 248 | me.$router.push({ |
251 | - path:'parkRecord', | |
252 | - query:{ | |
249 | + path: 'parkRecord', | |
250 | + query: { | |
253 | 251 | carNumber: me.carNumber, |
254 | 252 | carNumberColor: me.carWrapBG, |
255 | 253 | parkFlag: 1 // 0表示在停 1表示历史 |
... | ... | @@ -261,18 +259,18 @@ export default { |
261 | 259 | console.log('取消'); |
262 | 260 | } |
263 | 261 | }); |
264 | - }else{ | |
262 | + } else { | |
265 | 263 | |
266 | - if(me.paySrcType==101){ //缴费了本次 | |
264 | + if (me.paySrcType == 101) { //缴费了本次 | |
267 | 265 | me.$router.push({ |
268 | - path:'parkRecord', | |
269 | - query:{ | |
266 | + path: 'parkRecord', | |
267 | + query: { | |
270 | 268 | carNumber: me.carNumber, |
271 | 269 | carNumberColor: me.carWrapBG, |
272 | 270 | parkFlag: 0 // 0表示在停 1表示历史 |
273 | 271 | } |
274 | 272 | }) |
275 | - }else{ | |
273 | + } else { | |
276 | 274 | MessageBox.confirm('', { |
277 | 275 | message: '您当前有在停订单 是否立即支付?', |
278 | 276 | title: '温馨提示', |
... | ... | @@ -282,8 +280,8 @@ export default { |
282 | 280 | if (action == 'confirm') { //确认的回调 |
283 | 281 | console.log('确定'); |
284 | 282 | me.$router.push({ |
285 | - path:'parkRecord', | |
286 | - query:{ | |
283 | + path: 'parkRecord', | |
284 | + query: { | |
287 | 285 | carNumber: me.carNumber, |
288 | 286 | carNumberColor: me.carWrapBG, |
289 | 287 | parkFlag: 0 // 0表示在停 1表示历史 |
... | ... | @@ -300,23 +298,18 @@ export default { |
300 | 298 | } |
301 | 299 | } |
302 | 300 | |
303 | - | |
304 | - | |
305 | 301 | }) |
306 | 302 | |
307 | - | |
308 | - | |
309 | 303 | } else { |
310 | 304 | console.log('失败') |
311 | - alert('支付失败') | |
305 | + this.$msgbox('提示', '支付失败') | |
312 | 306 | me.$router.go(-2); |
313 | 307 | } |
314 | 308 | } |
315 | 309 | ) |
316 | 310 | }, |
317 | 311 | }, |
318 | - filters: { | |
319 | - } | |
312 | + filters: {} | |
320 | 313 | } |
321 | 314 | </script> |
322 | 315 | ... | ... |
src/views/parkPay/plateNumber.vue
1 | 1 | <template> |
2 | 2 | <div id="page"> |
3 | 3 | |
4 | - <div class="swiper-container" style="height: 260px"> | |
5 | - <div class="swiper-wrapper"> | |
6 | - <div class="swiper-slide" v-for="item in swiperData" :key="item.id" | |
7 | - :style="{backgroundImage:'url(' + item.url + ')'}" | |
8 | - @click="openImgUrl(item)" | |
9 | - ></div> | |
10 | - </div> | |
11 | - <!-- 如果需要分页器 --> | |
12 | - <div class="swiper-pagination"></div> | |
13 | - | |
14 | - <!-- 如果需要滚动条 --> | |
15 | - <!-- <div class="swiper-scrollbar"></div>--> | |
16 | - </div> | |
17 | - | |
18 | 4 | <div class="wrap"> |
19 | - <!--<p style="margin-bottom: 18px;margin-top: 18px;">请选择车牌颜色</p>--> | |
20 | - | |
21 | - <!--<ul class="color-choose">--> | |
22 | - <!--<li v-for="(i,index) in colorList" :key="i.name" @click="chooseColor(index)"--> | |
23 | - <!--:style="{color:currentColor==index?'#FFF':'',background: currentColor==index?activeBG:'' }"--> | |
24 | - <!-->--> | |
25 | - <!--{{i.name}}--> | |
26 | - <!--</li>--> | |
27 | - | |
28 | - <!--</ul>--> | |
29 | - | |
5 | + <p style="margin-bottom: 18px;margin-top: 18px;">请选择车牌颜色</p> | |
30 | 6 | |
7 | + <ul class="color-choose"> | |
8 | + <li v-for="(i,index) in colorList" :key="i.name" @click="chooseColor(index)" | |
9 | + :style="{color:currentColor==index?'#FFF':'',background: currentColor==index?activeBG:'' }" | |
10 | + > | |
11 | + {{i.name}} | |
12 | + </li> | |
31 | 13 | |
14 | + </ul> | |
32 | 15 | |
33 | 16 | |
34 | 17 | <p style="margin-bottom: 18px;margin-top: 18px;">请输入车牌号码</p> |
... | ... | @@ -97,7 +80,7 @@ |
97 | 80 | <div class="first-word" |
98 | 81 | @click="selectFirstWord($event)"> |
99 | 82 | <div class="word"> |
100 | - <span>蒙</span> | |
83 | + <span>鄂</span> | |
101 | 84 | </div> |
102 | 85 | <div class="word"> |
103 | 86 | <span>湘</span> |
... | ... | @@ -106,7 +89,7 @@ |
106 | 89 | <span>津</span> |
107 | 90 | </div> |
108 | 91 | <div class="word"> |
109 | - <span>鄂</span> | |
92 | + <span>蒙</span> | |
110 | 93 | </div> |
111 | 94 | <div class="word"> |
112 | 95 | <span>沪</span> |
... | ... | @@ -290,14 +273,7 @@ |
290 | 273 | </div> |
291 | 274 | |
292 | 275 | |
293 | - <modal-alert ref="alert"> | |
294 | - <div class="trave-tip-content txt-l" slot="content"> | |
295 | - <div class="confirm-text"> | |
296 | - <p>请输入正确的车牌号</p> | |
297 | - </div> | |
298 | - </div> | |
299 | - <span slot="button">知道了</span> | |
300 | - </modal-alert> | |
276 | + | |
301 | 277 | </div> |
302 | 278 | </template> |
303 | 279 | <script> |
... | ... | @@ -618,17 +594,6 @@ export default { |
618 | 594 | </script> |
619 | 595 | <style lang="scss" scoped> |
620 | 596 | |
621 | - .swiper-container { | |
622 | - height: 206px; | |
623 | - } | |
624 | - | |
625 | - .swiper-slide { | |
626 | - /*width: 100%;*/ | |
627 | - height: 206px; | |
628 | - background-repeat: no-repeat; | |
629 | - background-size: 100% 100%; | |
630 | - } | |
631 | - | |
632 | 597 | .flex-items-center { |
633 | 598 | display: flex; |
634 | 599 | align-items: center; | ... | ... |