Commit 4087b794084f707aa3d163f5758de0501f243897

Authored by liuqimichale
1 parent 7850cc26

黄石微信公众号 -- 临停支付

src/utils/request.js
@@ -7,7 +7,7 @@ const service = axios.create({ @@ -7,7 +7,7 @@ const service = axios.create({
7 // http://pay.service.renniting.cn/ 赤峰 7 // http://pay.service.renniting.cn/ 赤峰
8 // http://pay.service.huangshiparking.com/ 黄石正式环境 8 // http://pay.service.huangshiparking.com/ 黄石正式环境
9 // http://39.98.54.240:8090/ 黄石测试环境 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 // withCredentials: true, // send cookies when cross-domain requests 11 // withCredentials: true, // send cookies when cross-domain requests
12 timeout: 6000 // request timeout 12 timeout: 6000 // request timeout
13 }) 13 })
src/utils/utils.js
@@ -145,16 +145,16 @@ export default { @@ -145,16 +145,16 @@ export default {
145 // ud8yq5tv0inxupc05xfeau39jywlqoj2 新的id 145 // ud8yq5tv0inxupc05xfeau39jywlqoj2 新的id
146 // ny1u72b6k374sg379z0kqjgfxe2ycnpw 新的签名 146 // ny1u72b6k374sg379z0kqjgfxe2ycnpw 新的签名
147 147
148 - myVarAppid:'ud8yq5tv0inxupc05xfeau39jywlqoj2',// 公共请求Appid 148 + myVarAppid:'0eca8f5373ca4866aec2f8e9d9367104',// 公共请求Appid
149 149
150 myDeviceInfo: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E', // 公共请求设备信息 150 myDeviceInfo: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E', // 公共请求设备信息
151 151
152 - myVxAppId: 'wx2af2bab90d433c86', 152 + myVxAppId: 'wxa1a66cc7d263afe6',
153 // 测试环境 微信赤峰 appid wxff4cebaedbf4f886 153 // 测试环境 微信赤峰 appid wxff4cebaedbf4f886
154 // 微信赤峰 appid wx2af2bab90d433c86 154 // 微信赤峰 appid wx2af2bab90d433c86
155 // 黄石 appid wxa1a66cc7d263afe6 155 // 黄石 appid wxa1a66cc7d263afe6
156 156
157 - myOrgId: '10003', // 归属地 赤峰id 10003 黄石 10079 157 + myOrgId: '10079', // 归属地 赤峰id 10003 黄石 10079
158 158
159 myGetSign: function (objb) { // 获取签名 159 myGetSign: function (objb) { // 获取签名
160 var compare = function (obj1, obj2) { 160 var compare = function (obj1, obj2) {
@@ -169,13 +169,13 @@ export default { @@ -169,13 +169,13 @@ export default {
169 } 169 }
170 } 170 }
171 objb.sort(compare); 171 objb.sort(compare);
172 - var strmd5 = 'ny1u72b6k374sg379z0kqjgfxe2ycnpw'; 172 + var strmd5 = '14318527b13840c2a4af63fef52c2d6e';
173 for(var i=0;i<objb.length;i++){ 173 for(var i=0;i<objb.length;i++){
174 if(objb[i].value != null&&objb[i].value != ''){ 174 if(objb[i].value != null&&objb[i].value != ''){
175 strmd5 += objb[i].keyname+objb[i].value; 175 strmd5 += objb[i].keyname+objb[i].value;
176 } 176 }
177 } 177 }
178 - strmd5 += 'ny1u72b6k374sg379z0kqjgfxe2ycnpw'; 178 + strmd5 += '14318527b13840c2a4af63fef52c2d6e';
179 // console.log('strmd5-------->'+strmd5); 179 // console.log('strmd5-------->'+strmd5);
180 strmd5 = md5(strmd5); 180 strmd5 = md5(strmd5);
181 strmd5=strmd5.toUpperCase(); 181 strmd5=strmd5.toUpperCase();
src/views/parkPay/orderPay.vue
@@ -42,8 +42,8 @@ @@ -42,8 +42,8 @@
42 <script> 42 <script>
43 // import CryptoJS from '../utils/AES.js' 43 // import CryptoJS from '../utils/AES.js'
44 // let Base64 = require('js-base64').Base64 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 export default { 48 export default {
49 name: 'orderPay', 49 name: 'orderPay',
@@ -64,6 +64,7 @@ export default { @@ -64,6 +64,7 @@ export default {
64 } 64 }
65 }, 65 },
66 created() { 66 created() {
  67 +
67 this.carWrapBG = this.$route.query.carColor //车牌颜色 68 this.carWrapBG = this.$route.query.carColor //车牌颜色
68 this.carNumber = this.$route.query.carNumber 69 this.carNumber = this.$route.query.carNumber
69 this.arrearageTotalFee = this.$route.query.arrearageTotalFee // 应收 70 this.arrearageTotalFee = this.$route.query.arrearageTotalFee // 应收
@@ -78,10 +79,8 @@ export default { @@ -78,10 +79,8 @@ export default {
78 this.webAppCode = this.getCode(); 79 this.webAppCode = this.getCode();
79 } 80 }
80 81
81 -  
82 -  
83 }, 82 },
84 - mounted(){ 83 + mounted() {
85 84
86 }, 85 },
87 methods: { 86 methods: {
@@ -117,12 +116,11 @@ export default { @@ -117,12 +116,11 @@ export default {
117 this.orderId = _order 116 this.orderId = _order
118 } 117 }
119 118
120 -  
121 if (this.clientBrowser == '微信') { // 微信支付 119 if (this.clientBrowser == '微信') { // 微信支付
122 let _openId = sessionStorage.getItem('openIdData') 120 let _openId = sessionStorage.getItem('openIdData')
123 - if(_openId){ 121 + if (_openId) {
124 me.vxPay(_openId, this.orderId) 122 me.vxPay(_openId, this.orderId)
125 - }else{ 123 + } else {
126 //第一步获取openid 124 //第一步获取openid
127 var codeParams = { 125 var codeParams = {
128 code: this.webAppCode, 126 code: this.webAppCode,
@@ -131,12 +129,12 @@ export default { @@ -131,12 +129,12 @@ export default {
131 getOpenId(codeParams).then(res => { 129 getOpenId(codeParams).then(res => {
132 if (res.code == 0) { 130 if (res.code == 0) {
133 me.vxPay(res.data, this.orderId) 131 me.vxPay(res.data, this.orderId)
134 - sessionStorage.setItem('openIdData',res.data) 132 + sessionStorage.setItem('openIdData', res.data)
135 } else if (res.code == 40163) { //code been used, hints[重复code问题] 133 } else if (res.code == 40163) { //code been used, hints[重复code问题]
136 - alert('请重新扫码重复code问题') 134 + this.$msgbox('提示', '请重新扫码重复code问题')
137 console.log(res.message); 135 console.log(res.message);
138 } else { 136 } else {
139 - alert('请重新扫码') 137 + this.$msgbox('提示', '请重新扫码')
140 } 138 }
141 }) 139 })
142 } 140 }
@@ -172,11 +170,11 @@ export default { @@ -172,11 +170,11 @@ export default {
172 vm.onBridgeReady(data) 170 vm.onBridgeReady(data)
173 } 171 }
174 } else { 172 } else {
175 - alert("没有找到返回值"); 173 + this.$msgbox('提示', '没有找到返回值')
176 } 174 }
177 } else { 175 } else {
178 console.log(res.message); 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,7 +207,7 @@ export default {
209 deviceInfo: me.$utils.myDeviceInfo, 207 deviceInfo: me.$utils.myDeviceInfo,
210 salt: salt, 208 salt: salt,
211 sign_type: "md5", 209 sign_type: "md5",
212 - token:'', 210 + token: '',
213 } 211 }
214 wxparams.sign = me.$utils.signObject(wxparams) 212 wxparams.sign = me.$utils.signObject(wxparams)
215 queryParkingRecordPageByCarNumbers(wxparams).then(response => { 213 queryParkingRecordPageByCarNumbers(wxparams).then(response => {
@@ -218,17 +216,17 @@ export default { @@ -218,17 +216,17 @@ export default {
218 216
219 // alert(JSON.stringify(me.parkList)) 217 // alert(JSON.stringify(me.parkList))
220 // alert(me.parkList.length) 218 // alert(me.parkList.length)
221 - if(me.parkList.length == 0){ 219 + if (me.parkList.length == 0) {
222 me.$router.push({ 220 me.$router.push({
223 - path:'parkRecord',  
224 - query:{ 221 + path: 'parkRecord',
  222 + query: {
225 carNumber: me.carNumber, 223 carNumber: me.carNumber,
226 carNumberColor: me.carWrapBG, 224 carNumberColor: me.carWrapBG,
227 parkFlag: 0 // 0表示在停 1表示历史 225 parkFlag: 0 // 0表示在停 1表示历史
228 } 226 }
229 }) 227 })
230 228
231 - }else{ 229 + } else {
232 me.parkingData = me.parkList.filter(item => { 230 me.parkingData = me.parkList.filter(item => {
233 return item.parkState == '10' 231 return item.parkState == '10'
234 }) 232 })
@@ -238,7 +236,7 @@ export default { @@ -238,7 +236,7 @@ export default {
238 }) 236 })
239 console.log(me.historyList) 237 console.log(me.historyList)
240 238
241 - if(me.historyList.length>0){ 239 + if (me.historyList.length > 0) {
242 MessageBox.confirm('', { 240 MessageBox.confirm('', {
243 message: '您当前有历史欠费 是否立即补缴?', 241 message: '您当前有历史欠费 是否立即补缴?',
244 title: '温馨提示', 242 title: '温馨提示',
@@ -248,8 +246,8 @@ export default { @@ -248,8 +246,8 @@ export default {
248 if (action == 'confirm') { //确认的回调 246 if (action == 'confirm') { //确认的回调
249 console.log('确定'); 247 console.log('确定');
250 me.$router.push({ 248 me.$router.push({
251 - path:'parkRecord',  
252 - query:{ 249 + path: 'parkRecord',
  250 + query: {
253 carNumber: me.carNumber, 251 carNumber: me.carNumber,
254 carNumberColor: me.carWrapBG, 252 carNumberColor: me.carWrapBG,
255 parkFlag: 1 // 0表示在停 1表示历史 253 parkFlag: 1 // 0表示在停 1表示历史
@@ -261,18 +259,18 @@ export default { @@ -261,18 +259,18 @@ export default {
261 console.log('取消'); 259 console.log('取消');
262 } 260 }
263 }); 261 });
264 - }else{ 262 + } else {
265 263
266 - if(me.paySrcType==101){ //缴费了本次 264 + if (me.paySrcType == 101) { //缴费了本次
267 me.$router.push({ 265 me.$router.push({
268 - path:'parkRecord',  
269 - query:{ 266 + path: 'parkRecord',
  267 + query: {
270 carNumber: me.carNumber, 268 carNumber: me.carNumber,
271 carNumberColor: me.carWrapBG, 269 carNumberColor: me.carWrapBG,
272 parkFlag: 0 // 0表示在停 1表示历史 270 parkFlag: 0 // 0表示在停 1表示历史
273 } 271 }
274 }) 272 })
275 - }else{ 273 + } else {
276 MessageBox.confirm('', { 274 MessageBox.confirm('', {
277 message: '您当前有在停订单 是否立即支付?', 275 message: '您当前有在停订单 是否立即支付?',
278 title: '温馨提示', 276 title: '温馨提示',
@@ -282,8 +280,8 @@ export default { @@ -282,8 +280,8 @@ export default {
282 if (action == 'confirm') { //确认的回调 280 if (action == 'confirm') { //确认的回调
283 console.log('确定'); 281 console.log('确定');
284 me.$router.push({ 282 me.$router.push({
285 - path:'parkRecord',  
286 - query:{ 283 + path: 'parkRecord',
  284 + query: {
287 carNumber: me.carNumber, 285 carNumber: me.carNumber,
288 carNumberColor: me.carWrapBG, 286 carNumberColor: me.carWrapBG,
289 parkFlag: 0 // 0表示在停 1表示历史 287 parkFlag: 0 // 0表示在停 1表示历史
@@ -300,23 +298,18 @@ export default { @@ -300,23 +298,18 @@ export default {
300 } 298 }
301 } 299 }
302 300
303 -  
304 -  
305 }) 301 })
306 302
307 -  
308 -  
309 } else { 303 } else {
310 console.log('失败') 304 console.log('失败')
311 - alert('支付失败') 305 + this.$msgbox('提示', '支付失败')
312 me.$router.go(-2); 306 me.$router.go(-2);
313 } 307 }
314 } 308 }
315 ) 309 )
316 }, 310 },
317 }, 311 },
318 - filters: {  
319 - } 312 + filters: {}
320 } 313 }
321 </script> 314 </script>
322 315
src/views/parkPay/plateNumber.vue
1 <template> 1 <template>
2 <div id="page"> 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 <div class="wrap"> 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 - <!--&gt;-->  
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 <p style="margin-bottom: 18px;margin-top: 18px;">请输入车牌号码</p> 17 <p style="margin-bottom: 18px;margin-top: 18px;">请输入车牌号码</p>
@@ -97,7 +80,7 @@ @@ -97,7 +80,7 @@
97 <div class="first-word" 80 <div class="first-word"
98 @click="selectFirstWord($event)"> 81 @click="selectFirstWord($event)">
99 <div class="word"> 82 <div class="word">
100 - <span></span> 83 + <span></span>
101 </div> 84 </div>
102 <div class="word"> 85 <div class="word">
103 <span>湘</span> 86 <span>湘</span>
@@ -106,7 +89,7 @@ @@ -106,7 +89,7 @@
106 <span>津</span> 89 <span>津</span>
107 </div> 90 </div>
108 <div class="word"> 91 <div class="word">
109 - <span></span> 92 + <span></span>
110 </div> 93 </div>
111 <div class="word"> 94 <div class="word">
112 <span>沪</span> 95 <span>沪</span>
@@ -290,14 +273,7 @@ @@ -290,14 +273,7 @@
290 </div> 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 </div> 277 </div>
302 </template> 278 </template>
303 <script> 279 <script>
@@ -618,17 +594,6 @@ export default { @@ -618,17 +594,6 @@ export default {
618 </script> 594 </script>
619 <style lang="scss" scoped> 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 .flex-items-center { 597 .flex-items-center {
633 display: flex; 598 display: flex;
634 align-items: center; 599 align-items: center;