Commit 2c31a41c8b44ce2dd2eb57a7e0a10b23c506eff3
1 parent
c9972cc9
赤峰静态码测试完成
Showing
4 changed files
with
268 additions
and
96 deletions
src/components/dynCodePay.vue
| @@ -25,9 +25,12 @@ | @@ -25,9 +25,12 @@ | ||
| 25 | <span>停车时长</span> | 25 | <span>停车时长</span> |
| 26 | <span>{{ $utils.dateFormat(staytime) }}</span> | 26 | <span>{{ $utils.dateFormat(staytime) }}</span> |
| 27 | </li> | 27 | </li> |
| 28 | + | ||
| 29 | + | ||
| 30 | + | ||
| 28 | <li> | 31 | <li> |
| 29 | <span>待缴金额</span> | 32 | <span>待缴金额</span> |
| 30 | - <span>{{(orderFee/100).toFixed(2)}}</span> | 33 | + <span>{{(orderFee/100).toFixed(2)}} 元</span> |
| 31 | </li> | 34 | </li> |
| 32 | 35 | ||
| 33 | </ul> | 36 | </ul> |
| @@ -66,6 +69,7 @@ export default { | @@ -66,6 +69,7 @@ export default { | ||
| 66 | outtime: '', // 出场时间 | 69 | outtime: '', // 出场时间 |
| 67 | staytime: '', // 停车时长 | 70 | staytime: '', // 停车时长 |
| 68 | orderFee: '', // 需要支付的费用 | 71 | orderFee: '', // 需要支付的费用 |
| 72 | + | ||
| 69 | arrearageActFee: 0, | 73 | arrearageActFee: 0, |
| 70 | arrearageDiscFee: 0, | 74 | arrearageDiscFee: 0, |
| 71 | arrearageActFee: 0, | 75 | arrearageActFee: 0, |
src/components/plateNumber.vue
| 1 | <template> | 1 | <template> |
| 2 | <div id="page"> | 2 | <div id="page"> |
| 3 | <div class="wrap"> | 3 | <div class="wrap"> |
| 4 | - <p style="margin-bottom: 18px;margin-top: 18px;">请选择车牌颜色</p> | 4 | + <!--<p style="margin-bottom: 18px;margin-top: 18px;">请选择车牌颜色</p>--> |
| 5 | 5 | ||
| 6 | - <ul class="color-choose"> | ||
| 7 | - <li v-for="(i,index) in colorList" :key="i.name" @click="chooseColor(index)" | ||
| 8 | - :style="{color:currentColor==index?'#FFF':'',background: currentColor==index?activeBG:'' }" | ||
| 9 | - > | ||
| 10 | - {{i.name}} | ||
| 11 | - </li> | 6 | + <!--<ul class="color-choose">--> |
| 7 | + <!--<li v-for="(i,index) in colorList" :key="i.name" @click="chooseColor(index)"--> | ||
| 8 | + <!--:style="{color:currentColor==index?'#FFF':'',background: currentColor==index?activeBG:'' }"--> | ||
| 9 | + <!-->--> | ||
| 10 | + <!--{{i.name}}--> | ||
| 11 | + <!--</li>--> | ||
| 12 | 12 | ||
| 13 | - </ul> | 13 | + <!--</ul>--> |
| 14 | 14 | ||
| 15 | - <p style="margin-bottom: 18px;margin-top: 18px;">请输入车牌号码</p> | ||
| 16 | - <div class="num-box"> | 15 | + <p style="margin-bottom: 18px;margin-top: 18px;"> |
| 16 | + {{formData.commonCard == '3'?'请输入手机号码':'请输入车牌号码'}} | ||
| 17 | + </p> | ||
| 18 | + | ||
| 19 | + | ||
| 20 | + <div v-if="formData.commonCard == '3'"> | ||
| 21 | + <input type="text" class="iphone-box" v-model="carNum" maxlength="11" oninput="value=value.replace(/[^\d]/g,'')"> | ||
| 22 | + </div> | ||
| 23 | + | ||
| 24 | + <div class="num-box" v-else> | ||
| 17 | <div class="num0" @click="clickFirstWrap()"> | 25 | <div class="num0" @click="clickFirstWrap()"> |
| 18 | <span>{{formData.num0}}</span> | 26 | <span>{{formData.num0}}</span> |
| 19 | </div> | 27 | </div> |
| @@ -24,12 +32,15 @@ | @@ -24,12 +32,15 @@ | ||
| 24 | <div class="num1" @click="clickKeyWordWrap(4)"><span>{{formData.num4}}</span></div> | 32 | <div class="num1" @click="clickKeyWordWrap(4)"><span>{{formData.num4}}</span></div> |
| 25 | <div class="num1" @click="clickKeyWordWrap(5)"><span>{{formData.num5}}</span></div> | 33 | <div class="num1" @click="clickKeyWordWrap(5)"><span>{{formData.num5}}</span></div> |
| 26 | <div class="num1" @click="clickKeyWordWrap(6)"><span>{{formData.num6}}</span></div> | 34 | <div class="num1" @click="clickKeyWordWrap(6)"><span>{{formData.num6}}</span></div> |
| 27 | - <div v-if="formData.commonCard == '2'" class="num1" @click="clickKeyWordWrap(7)"><span>{{formData.num7}}</span></div> | 35 | + <div v-if="formData.commonCard == '2'" class="num1" @click="clickKeyWordWrap(7)"><span>{{formData.num7}}</span> |
| 36 | + </div> | ||
| 28 | </div> | 37 | </div> |
| 29 | 38 | ||
| 30 | 39 | ||
| 40 | + | ||
| 41 | + | ||
| 31 | <div class="radio-box"> | 42 | <div class="radio-box"> |
| 32 | - <label class="flex-items-center"> | 43 | + <label class="flex-items-center" @click="keyBoardStatus = true"> |
| 33 | <img v-if="formData.commonCard == 1" | 44 | <img v-if="formData.commonCard == 1" |
| 34 | src="../assets/images/icon_chose_s@2x.png" | 45 | src="../assets/images/icon_chose_s@2x.png" |
| 35 | alt=""> | 46 | alt=""> |
| @@ -38,9 +49,9 @@ | @@ -38,9 +49,9 @@ | ||
| 38 | alt=""> | 49 | alt=""> |
| 39 | <input type="radio" | 50 | <input type="radio" |
| 40 | v-model="formData.commonCard" | 51 | v-model="formData.commonCard" |
| 41 | - value="1" />普通车牌 | 52 | + value="1"/>普通车牌 |
| 42 | </label> | 53 | </label> |
| 43 | - <label class="flex-items-center"> | 54 | + <label class="flex-items-center" @click="keyBoardStatus = true"> |
| 44 | <img v-if="formData.commonCard == 2" | 55 | <img v-if="formData.commonCard == 2" |
| 45 | src="../assets/images/icon_chose_s@2x.png" | 56 | src="../assets/images/icon_chose_s@2x.png" |
| 46 | alt=""> | 57 | alt=""> |
| @@ -49,7 +60,18 @@ | @@ -49,7 +60,18 @@ | ||
| 49 | alt=""> | 60 | alt=""> |
| 50 | <input type="radio" | 61 | <input type="radio" |
| 51 | v-model="formData.commonCard" | 62 | v-model="formData.commonCard" |
| 52 | - value="2" />新能源车牌 | 63 | + value="2"/>新能源车牌 |
| 64 | + </label> | ||
| 65 | + <label class="flex-items-center" @click.self="changeTab"> | ||
| 66 | + <img v-if="formData.commonCard == 3" | ||
| 67 | + src="../assets/images/icon_chose_s@2x.png" | ||
| 68 | + alt=""> | ||
| 69 | + <img v-else | ||
| 70 | + src="../assets/images/icon_chose_n@2x.png" | ||
| 71 | + alt=""> | ||
| 72 | + <input type="radio" | ||
| 73 | + v-model="formData.commonCard" | ||
| 74 | + value="3"/>无牌车 | ||
| 53 | </label> | 75 | </label> |
| 54 | </div> | 76 | </div> |
| 55 | 77 | ||
| @@ -169,7 +191,7 @@ | @@ -169,7 +191,7 @@ | ||
| 169 | </div> | 191 | </div> |
| 170 | </div> | 192 | </div> |
| 171 | </div> | 193 | </div> |
| 172 | - <div class="keyboard-wrap" v-if="keyBoardStatus === true"> | 194 | + <div class="keyboard-wrap" v-show="keyBoardStatus == true"> |
| 173 | <!-- <div class="number-wrap"></div> | 195 | <!-- <div class="number-wrap"></div> |
| 174 | <div class="letter-wrap"></div> | 196 | <div class="letter-wrap"></div> |
| 175 | <div class="cn-wrap"></div> --> | 197 | <div class="cn-wrap"></div> --> |
| @@ -229,7 +251,7 @@ | @@ -229,7 +251,7 @@ | ||
| 229 | <modal-alert ref="alert"> | 251 | <modal-alert ref="alert"> |
| 230 | <div class="trave-tip-content txt-l" slot="content"> | 252 | <div class="trave-tip-content txt-l" slot="content"> |
| 231 | <div class="confirm-text"> | 253 | <div class="confirm-text"> |
| 232 | - <p>请输入正确的车牌号</p> | 254 | + <p>请输入正确的{{tip}}</p> |
| 233 | </div> | 255 | </div> |
| 234 | </div> | 256 | </div> |
| 235 | <span slot="button">知道了</span> | 257 | <span slot="button">知道了</span> |
| @@ -237,33 +259,35 @@ | @@ -237,33 +259,35 @@ | ||
| 237 | </div> | 259 | </div> |
| 238 | </template> | 260 | </template> |
| 239 | <script> | 261 | <script> |
| 262 | +import {noCarQRcodeInOutPark} from '@/api/plateNumber/plateNumber' | ||
| 263 | + | ||
| 240 | export default { | 264 | export default { |
| 241 | - data () { | 265 | + data() { |
| 242 | return { | 266 | return { |
| 243 | - colorList:[ | 267 | + colorList: [ |
| 244 | { | 268 | { |
| 245 | - name:'蓝牌', | ||
| 246 | - id:'1' | 269 | + name: '蓝牌', |
| 270 | + id: '1' | ||
| 247 | }, | 271 | }, |
| 248 | { | 272 | { |
| 249 | - name:'黄牌', | ||
| 250 | - id:'2' | 273 | + name: '黄牌', |
| 274 | + id: '2' | ||
| 251 | }, | 275 | }, |
| 252 | { | 276 | { |
| 253 | - name:'白牌', | ||
| 254 | - id:'3' | 277 | + name: '绿牌', |
| 278 | + id: '3' | ||
| 255 | }, | 279 | }, |
| 256 | { | 280 | { |
| 257 | - name:'黑牌', | ||
| 258 | - id:'4' | 281 | + name: '白牌', |
| 282 | + id: '4' | ||
| 259 | }, | 283 | }, |
| 260 | { | 284 | { |
| 261 | - name:'绿牌', | ||
| 262 | - id:'5' | 285 | + name: '黑牌', |
| 286 | + id: '5' | ||
| 263 | }, | 287 | }, |
| 264 | ], | 288 | ], |
| 265 | - currentColor:0, | ||
| 266 | - activeBG:'#0054C0', | 289 | + currentColor: 0, |
| 290 | + activeBG: '#0054C0', | ||
| 267 | formData: { | 291 | formData: { |
| 268 | commonCard: '1', | 292 | commonCard: '1', |
| 269 | num0: '', | 293 | num0: '', |
| @@ -290,40 +314,107 @@ export default { | @@ -290,40 +314,107 @@ export default { | ||
| 290 | confirmTitle: '', | 314 | confirmTitle: '', |
| 291 | submitConfirm: false, | 315 | submitConfirm: false, |
| 292 | submitConfirmFalse: false, | 316 | submitConfirmFalse: false, |
| 293 | - submitConfirmText: '' | 317 | + submitConfirmText: '', |
| 318 | + carNum:'', | ||
| 319 | + tip:'车牌号', | ||
| 294 | } | 320 | } |
| 295 | }, | 321 | }, |
| 296 | - mounted () { | 322 | + mounted() { |
| 323 | + console.log(window.location) | ||
| 324 | + console.log(this.$route.query) | ||
| 325 | + let params = this.$route.query | ||
| 326 | + if (Object.keys(params).length == 0) { | ||
| 327 | + alert('1') | ||
| 328 | + } else { | ||
| 329 | + this.noCarQRcodeInOutPark() | ||
| 330 | + } | ||
| 297 | }, | 331 | }, |
| 298 | methods: { | 332 | methods: { |
| 299 | - chooseColor (index){ // 颜色选择 | ||
| 300 | - this.currentColor = index | ||
| 301 | - switch (this.currentColor) { | ||
| 302 | - case 0 : | ||
| 303 | - return this.activeBG = '#0054C0' | ||
| 304 | - break; | ||
| 305 | - case 1 : | ||
| 306 | - return this.activeBG = '#FEBE00' | ||
| 307 | - break; | ||
| 308 | - case 2 : | ||
| 309 | - return this.activeBG = '#E4E5E7' | ||
| 310 | - break; | ||
| 311 | - case 3 : | ||
| 312 | - return this.activeBG = '#333333' | ||
| 313 | - break; | ||
| 314 | - case 4 : | ||
| 315 | - return this.activeBG = '#97DEA1' | ||
| 316 | - break; | ||
| 317 | - } | 333 | + // chooseColor (index){ // 颜色选择 |
| 334 | + // this.currentColor = index | ||
| 335 | + // switch (this.currentColor) { | ||
| 336 | + // case 0 : | ||
| 337 | + // return this.activeBG = '#0054C0' | ||
| 338 | + // break; | ||
| 339 | + // case 1 : | ||
| 340 | + // return this.activeBG = '#FEBE00' | ||
| 341 | + // break; | ||
| 342 | + // case 2 : | ||
| 343 | + // return this.activeBG = '#97DEA1' | ||
| 344 | + // break; | ||
| 345 | + // case 3 : | ||
| 346 | + // return this.activeBG = '#E4E5E7' | ||
| 347 | + // break; | ||
| 348 | + // case 4 : | ||
| 349 | + // return this.activeBG = '#333333' | ||
| 350 | + // break; | ||
| 351 | + // } | ||
| 352 | + // }, | ||
| 353 | + noCarQRcodeInOutPark() { | ||
| 354 | + let params = this.$route.query | ||
| 355 | + params.payType = this.$utils.IsWeixinOrAlipay()//4:微信 1:支付宝 | ||
| 356 | + params.terminalSource = "7";//1:任你听 3:微信公共号 4:云平台 7:H5 | ||
| 357 | + params.app_id = 1, | ||
| 358 | + params.salt = 2, | ||
| 359 | + params.deviceInfo = 3, | ||
| 360 | + params.sign_type = 'md5', | ||
| 361 | + params.sign = 4, | ||
| 362 | + params.token = '666' | ||
| 363 | + params.carNumber = this.carNum | ||
| 364 | + noCarQRcodeInOutPark(params).then(res => { | ||
| 365 | + console.log(res) | ||
| 366 | + if (res.code == 0) {//进场 | ||
| 367 | + //alertMsg("出场成功"); | ||
| 368 | + if (res.data) { | ||
| 369 | + var tmpObj = res.data; | ||
| 370 | + //判断是否需要支付 | ||
| 371 | + if (tmpObj.needPay) { | ||
| 372 | + | ||
| 373 | + var queryParams = this.$utils.parseParams(tmpObj); | ||
| 374 | + console.log(queryParams) | ||
| 375 | + console.log(tmpObj) | ||
| 376 | + // | ||
| 377 | + this.$router.push({ | ||
| 378 | + path: 'pay', | ||
| 379 | + query: tmpObj | ||
| 380 | + }) | ||
| 381 | + | ||
| 382 | + // window.location.href = "../pay.html?" + queryParams; | ||
| 383 | + } else { | ||
| 384 | + alert('无需缴费,欢迎下次光临') | ||
| 385 | + | ||
| 386 | + } | ||
| 387 | + //var tel = document.getElementById("inputPhoneNum").value.replace(/\s/g, "");//去除空格 | ||
| 388 | + //var orderFee = keepTwoDecimalFull((tmpObj.orderFee / 100));//本次出场实际应付金额(减去折扣,优惠券等之后的应付金额) | ||
| 389 | + //var tmpUrl = "orderId=" + tmpObj.orderId + "&outtime=" + tmpObj.outtime + "&tel=" + tel + "&orderFee=" + orderFee; | ||
| 390 | + | ||
| 391 | + } else { | ||
| 392 | + alert("没有找到订单"); | ||
| 393 | + } | ||
| 394 | + } else {//其他情况如【该卡号场内已存在】 | ||
| 395 | + console.log(res.message); | ||
| 396 | + alert(res.message); | ||
| 397 | + | ||
| 398 | + } | ||
| 399 | + | ||
| 400 | + }) | ||
| 318 | }, | 401 | }, |
| 319 | - clickFirstWrap () { | 402 | + changeTab() { |
| 403 | + // this.firstSelectStatus = false | ||
| 404 | + // this.firstWrapStatus = false | ||
| 405 | + this.keyBoardStatus = false | ||
| 406 | + this.firstClickStatus = false | ||
| 407 | + this.firstWrapStatus = false | ||
| 408 | + | ||
| 409 | + }, | ||
| 410 | + clickFirstWrap() { | ||
| 320 | // 点击第一个输入框 | 411 | // 点击第一个输入框 |
| 321 | this.firstClickStatus = true | 412 | this.firstClickStatus = true |
| 322 | this.firstWrapStatus = true | 413 | this.firstWrapStatus = true |
| 323 | this.keyBoardStatus = false | 414 | this.keyBoardStatus = false |
| 324 | this.formData.num0 = '' | 415 | this.formData.num0 = '' |
| 325 | }, | 416 | }, |
| 326 | - selectFirstWord (event) { | 417 | + selectFirstWord(event) { |
| 327 | // 选择省份 | 418 | // 选择省份 |
| 328 | if (event.target.localName !== 'span') { | 419 | if (event.target.localName !== 'span') { |
| 329 | return | 420 | return |
| @@ -337,7 +428,7 @@ export default { | @@ -337,7 +428,7 @@ export default { | ||
| 337 | // this.$refs.num1.focus() | 428 | // this.$refs.num1.focus() |
| 338 | // document.getElementById('num1').focus() | 429 | // document.getElementById('num1').focus() |
| 339 | }, | 430 | }, |
| 340 | - clickKeyBoard (item) { // 点击自定义键盘 | 431 | + clickKeyBoard(item) { // 点击自定义键盘 |
| 341 | console.log(item) | 432 | console.log(item) |
| 342 | this.formData['num' + this.activeKeyWordIndex] = item | 433 | this.formData['num' + this.activeKeyWordIndex] = item |
| 343 | 434 | ||
| @@ -353,7 +444,7 @@ export default { | @@ -353,7 +444,7 @@ export default { | ||
| 353 | } | 444 | } |
| 354 | } | 445 | } |
| 355 | }, | 446 | }, |
| 356 | - deleteWord () { // 退格 | 447 | + deleteWord() { // 退格 |
| 357 | // console.log(this.activeKeyWordIndex) | 448 | // console.log(this.activeKeyWordIndex) |
| 358 | // console.log(this.formData['num' + (this.activeKeyWordIndex - 1)]) | 449 | // console.log(this.formData['num' + (this.activeKeyWordIndex - 1)]) |
| 359 | if (this.activeKeyWordIndex > 1) { | 450 | if (this.activeKeyWordIndex > 1) { |
| @@ -361,17 +452,18 @@ export default { | @@ -361,17 +452,18 @@ export default { | ||
| 361 | this.activeKeyWordIndex-- | 452 | this.activeKeyWordIndex-- |
| 362 | } | 453 | } |
| 363 | }, | 454 | }, |
| 364 | - clickKeyWordWrap (activeKeyWordIndex) { | 455 | + clickKeyWordWrap(activeKeyWordIndex) { |
| 365 | this.keyBoardStatus = true | 456 | this.keyBoardStatus = true |
| 366 | this.activeKeyWordIndex = activeKeyWordIndex | 457 | this.activeKeyWordIndex = activeKeyWordIndex |
| 367 | this.formData['num' + this.activeKeyWordIndex] = '' | 458 | this.formData['num' + this.activeKeyWordIndex] = '' |
| 368 | }, | 459 | }, |
| 369 | - submitFn () { | 460 | + submitFn() { |
| 370 | let plateLicense | 461 | let plateLicense |
| 371 | if (this.formData.commonCard === '1') { | 462 | if (this.formData.commonCard === '1') { |
| 372 | plateLicense = this.plate_license_1 | 463 | plateLicense = this.plate_license_1 |
| 373 | plateLicense = this.palindrome(plateLicense) | 464 | plateLicense = this.palindrome(plateLicense) |
| 374 | if (plateLicense.length < 7) { | 465 | if (plateLicense.length < 7) { |
| 466 | + this.tip = '车牌号' | ||
| 375 | this.$refs.alert.open() | 467 | this.$refs.alert.open() |
| 376 | return | 468 | return |
| 377 | } | 469 | } |
| @@ -380,21 +472,35 @@ export default { | @@ -380,21 +472,35 @@ export default { | ||
| 380 | plateLicense = this.plate_license_2 | 472 | plateLicense = this.plate_license_2 |
| 381 | plateLicense = this.palindrome(plateLicense) | 473 | plateLicense = this.palindrome(plateLicense) |
| 382 | if (plateLicense.length < 8) { | 474 | if (plateLicense.length < 8) { |
| 475 | + this.tip = '车牌号' | ||
| 383 | this.$refs.alert.open() | 476 | this.$refs.alert.open() |
| 384 | return | 477 | return |
| 385 | } | 478 | } |
| 386 | } | 479 | } |
| 387 | - this.$emit('getPlateLicense',plateLicense) | ||
| 388 | - console.log(plateLicense); | ||
| 389 | - this.$router.push({ | ||
| 390 | - path:'parkRecord', | ||
| 391 | - query:{ | ||
| 392 | - carNumber:plateLicense, | ||
| 393 | - carNumberColor: this.currentColor | 480 | + |
| 481 | + if (this.formData.commonCard === '3') { | ||
| 482 | + plateLicense = this.plate_license_2 | ||
| 483 | + plateLicense = this.palindrome(plateLicense) | ||
| 484 | + if (plateLicense.length < 11) { | ||
| 485 | + this.tip = '手机号' | ||
| 486 | + this.$refs.alert.open() | ||
| 487 | + return | ||
| 394 | } | 488 | } |
| 395 | - }) | 489 | + } |
| 490 | + // | ||
| 491 | + // this.$emit('getPlateLicense', plateLicense) | ||
| 492 | + console.log(plateLicense); | ||
| 493 | + this.carNum = plateLicense | ||
| 494 | + // this.$router.push({ | ||
| 495 | + // path: 'pay', | ||
| 496 | + // query: { | ||
| 497 | + // carNumber: plateLicense | ||
| 498 | + // } | ||
| 499 | + // }) | ||
| 500 | + | ||
| 501 | + this.noCarQRcodeInOutPark() | ||
| 396 | }, | 502 | }, |
| 397 | - palindrome (str) { | 503 | + palindrome(str) { |
| 398 | var arr = str.split('') | 504 | var arr = str.split('') |
| 399 | arr = arr.filter(function (val) { | 505 | arr = arr.filter(function (val) { |
| 400 | return ( | 506 | return ( |
| @@ -417,7 +523,7 @@ export default { | @@ -417,7 +523,7 @@ export default { | ||
| 417 | }) | 523 | }) |
| 418 | return arr.join('') | 524 | return arr.join('') |
| 419 | }, | 525 | }, |
| 420 | - checkIsHasSpecialStr (str) { | 526 | + checkIsHasSpecialStr(str) { |
| 421 | var flag = false | 527 | var flag = false |
| 422 | var arr = str.split('') | 528 | var arr = str.split('') |
| 423 | arr.forEach(val => { | 529 | arr.forEach(val => { |
| @@ -451,7 +557,7 @@ export default { | @@ -451,7 +557,7 @@ export default { | ||
| 451 | }) | 557 | }) |
| 452 | return flag | 558 | return flag |
| 453 | }, | 559 | }, |
| 454 | - checkIsHasChineseStr (str) { | 560 | + checkIsHasChineseStr(str) { |
| 455 | var Reg = /.*[\u4e00-\u9fa5]+.*/ | 561 | var Reg = /.*[\u4e00-\u9fa5]+.*/ |
| 456 | if (Reg.test(str)) { | 562 | if (Reg.test(str)) { |
| 457 | return true | 563 | return true |
| @@ -460,7 +566,7 @@ export default { | @@ -460,7 +566,7 @@ export default { | ||
| 460 | } | 566 | } |
| 461 | }, | 567 | }, |
| 462 | computed: { | 568 | computed: { |
| 463 | - plate_license_1 () { | 569 | + plate_license_1() { |
| 464 | return ( | 570 | return ( |
| 465 | this.formData.num0 + | 571 | this.formData.num0 + |
| 466 | this.formData.num1 + | 572 | this.formData.num1 + |
| @@ -471,7 +577,7 @@ export default { | @@ -471,7 +577,7 @@ export default { | ||
| 471 | this.formData.num6 | 577 | this.formData.num6 |
| 472 | ) | 578 | ) |
| 473 | }, | 579 | }, |
| 474 | - plate_license_2 () { | 580 | + plate_license_2() { |
| 475 | return ( | 581 | return ( |
| 476 | this.formData.num0 + | 582 | this.formData.num0 + |
| 477 | this.formData.num1 + | 583 | this.formData.num1 + |
| @@ -491,8 +597,9 @@ export default { | @@ -491,8 +597,9 @@ export default { | ||
| 491 | display: flex; | 597 | display: flex; |
| 492 | align-items: center; | 598 | align-items: center; |
| 493 | } | 599 | } |
| 600 | + | ||
| 494 | .wrap { | 601 | .wrap { |
| 495 | - padding:0 18px; | 602 | + padding: 0 18px; |
| 496 | .radio-box { | 603 | .radio-box { |
| 497 | display: flex; | 604 | display: flex; |
| 498 | align-items: center; | 605 | align-items: center; |
| @@ -512,14 +619,14 @@ export default { | @@ -512,14 +619,14 @@ export default { | ||
| 512 | } | 619 | } |
| 513 | } | 620 | } |
| 514 | 621 | ||
| 515 | - .color-choose{ | 622 | + .color-choose { |
| 516 | width: 265px; | 623 | width: 265px; |
| 517 | height: 34px; | 624 | height: 34px; |
| 518 | margin: 0 auto; | 625 | margin: 0 auto; |
| 519 | background: #F3F3F3; | 626 | background: #F3F3F3; |
| 520 | border-radius: 6px; | 627 | border-radius: 6px; |
| 521 | display: flex; | 628 | display: flex; |
| 522 | - li{ | 629 | + li { |
| 523 | flex: 1; | 630 | flex: 1; |
| 524 | text-align: center; | 631 | text-align: center; |
| 525 | line-height: 34px; | 632 | line-height: 34px; |
| @@ -620,6 +727,7 @@ export default { | @@ -620,6 +727,7 @@ export default { | ||
| 620 | } | 727 | } |
| 621 | } | 728 | } |
| 622 | } | 729 | } |
| 730 | + | ||
| 623 | .first-word-wrap { | 731 | .first-word-wrap { |
| 624 | // height: 9.4rem; | 732 | // height: 9.4rem; |
| 625 | background-color: #D2D5DB; | 733 | background-color: #D2D5DB; |
| @@ -637,12 +745,12 @@ export default { | @@ -637,12 +745,12 @@ export default { | ||
| 637 | width: 1.8rem; | 745 | width: 1.8rem; |
| 638 | height: 1.8rem; | 746 | height: 1.8rem; |
| 639 | // border: 1px solid #9cbce2; | 747 | // border: 1px solid #9cbce2; |
| 640 | - box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.35); | 748 | + box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.35); |
| 641 | border-radius: 0.16rem; | 749 | border-radius: 0.16rem; |
| 642 | text-align: center; | 750 | text-align: center; |
| 643 | &.bordernone { | 751 | &.bordernone { |
| 644 | border: none; | 752 | border: none; |
| 645 | - box-shadow:none | 753 | + box-shadow: none |
| 646 | } | 754 | } |
| 647 | span { | 755 | span { |
| 648 | box-sizing: border-box; | 756 | box-sizing: border-box; |
| @@ -661,11 +769,12 @@ export default { | @@ -661,11 +769,12 @@ export default { | ||
| 661 | width: 1.6rem; | 769 | width: 1.6rem; |
| 662 | } | 770 | } |
| 663 | } | 771 | } |
| 664 | - &:nth-last-of-type(1){ | 772 | + &:nth-last-of-type(1) { |
| 665 | margin-bottom: 0rem; | 773 | margin-bottom: 0rem; |
| 666 | } | 774 | } |
| 667 | } | 775 | } |
| 668 | } | 776 | } |
| 777 | + | ||
| 669 | .keyboard-wrap { | 778 | .keyboard-wrap { |
| 670 | background-color: #D2D5DB; | 779 | background-color: #D2D5DB; |
| 671 | position: fixed; | 780 | position: fixed; |
| @@ -687,33 +796,33 @@ export default { | @@ -687,33 +796,33 @@ export default { | ||
| 687 | justify-content: center; | 796 | justify-content: center; |
| 688 | height: 1.8rem; | 797 | height: 1.8rem; |
| 689 | margin: 0 0.3rem; | 798 | margin: 0 0.3rem; |
| 690 | - box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.35); | 799 | + box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.35); |
| 691 | background-color: #fff; | 800 | background-color: #fff; |
| 692 | border-radius: 0.125rem; | 801 | border-radius: 0.125rem; |
| 693 | &:active { | 802 | &:active { |
| 694 | background-color: #e4e4e4; | 803 | background-color: #e4e4e4; |
| 695 | } | 804 | } |
| 696 | - &.bordernone{ | 805 | + &.bordernone { |
| 697 | border: none; | 806 | border: none; |
| 698 | box-shadow: none; | 807 | box-shadow: none; |
| 699 | background-color: #D2D5DB; | 808 | background-color: #D2D5DB; |
| 700 | - &:active{ | ||
| 701 | - background-color:#D2D5DB; | 809 | + &:active { |
| 810 | + background-color: #D2D5DB; | ||
| 702 | } | 811 | } |
| 703 | } | 812 | } |
| 704 | - &.delete{ | 813 | + &.delete { |
| 705 | background-color: #465266; | 814 | background-color: #465266; |
| 706 | - img{ | 815 | + img { |
| 707 | width: 1.15rem; | 816 | width: 1.15rem; |
| 708 | } | 817 | } |
| 709 | } | 818 | } |
| 710 | } | 819 | } |
| 711 | } | 820 | } |
| 712 | - .cancel{ | 821 | + .cancel { |
| 713 | display: flex; | 822 | display: flex; |
| 714 | justify-content: flex-end; | 823 | justify-content: flex-end; |
| 715 | align-items: center; | 824 | align-items: center; |
| 716 | - span{ | 825 | + span { |
| 717 | display: flex; | 826 | display: flex; |
| 718 | align-items: center; | 827 | align-items: center; |
| 719 | justify-content: center; | 828 | justify-content: center; |
| @@ -725,4 +834,20 @@ export default { | @@ -725,4 +834,20 @@ export default { | ||
| 725 | } | 834 | } |
| 726 | } | 835 | } |
| 727 | } | 836 | } |
| 837 | + | ||
| 838 | + input[type="text"]:focus { | ||
| 839 | + border: 0; | ||
| 840 | + border: 1px solid #e4e4e4 !important; | ||
| 841 | + } | ||
| 842 | + | ||
| 843 | + .iphone-box { | ||
| 844 | + border: 0; | ||
| 845 | + width: 100%; | ||
| 846 | + height: 1.8rem; | ||
| 847 | + line-height: 1.8rem; | ||
| 848 | + padding-left: 20px; | ||
| 849 | + border: 1px solid #e4e4e4; | ||
| 850 | + font-size: 14px; | ||
| 851 | + } | ||
| 852 | + | ||
| 728 | </style> | 853 | </style> |
src/router/index.js
| @@ -24,16 +24,16 @@ export default new Router({ | @@ -24,16 +24,16 @@ export default new Router({ | ||
| 24 | name: 'plateNumber', | 24 | name: 'plateNumber', |
| 25 | component: plateNumber | 25 | component: plateNumber |
| 26 | }, | 26 | }, |
| 27 | - { | ||
| 28 | - path: '/parkRecord', | ||
| 29 | - name: 'parkRecord', | ||
| 30 | - component: parkRecord | ||
| 31 | - }, | ||
| 32 | - { | ||
| 33 | - path: '/orderPay', | ||
| 34 | - name: 'orderPay', | ||
| 35 | - component: () => import("@/components/orderPay.vue") | ||
| 36 | - }, | 27 | + // { |
| 28 | + // path: '/parkRecord', | ||
| 29 | + // name: 'parkRecord', | ||
| 30 | + // component: parkRecord | ||
| 31 | + // }, | ||
| 32 | + // { | ||
| 33 | + // path: '/orderPay', | ||
| 34 | + // name: 'orderPay', | ||
| 35 | + // component: () => import("@/components/orderPay.vue") | ||
| 36 | + // }, | ||
| 37 | 37 | ||
| 38 | { | 38 | { |
| 39 | path: '/payResult', | 39 | path: '/payResult', |
| @@ -48,6 +48,12 @@ export default new Router({ | @@ -48,6 +48,12 @@ export default new Router({ | ||
| 48 | component: () => import("@/components/dynCodePay.vue") | 48 | component: () => import("@/components/dynCodePay.vue") |
| 49 | }, | 49 | }, |
| 50 | 50 | ||
| 51 | + { | ||
| 52 | + path: '/pay', | ||
| 53 | + name: 'pay', | ||
| 54 | + component: () => import("@/components/pay.vue") | ||
| 55 | + }, | ||
| 56 | + | ||
| 51 | 57 | ||
| 52 | 58 | ||
| 53 | 59 |
src/utils/utils.js
| @@ -12,6 +12,43 @@ export default { | @@ -12,6 +12,43 @@ export default { | ||
| 12 | return pwd; | 12 | return pwd; |
| 13 | }, | 13 | }, |
| 14 | 14 | ||
| 15 | + parseParams: function (data) { | ||
| 16 | + try { | ||
| 17 | + var tempArr = []; | ||
| 18 | + for (var i in data) { | ||
| 19 | + var key = (i); | ||
| 20 | + var value = encodeURIComponent(data[i]);//decodeURIComponent | ||
| 21 | + tempArr.push(key + '=' + value); | ||
| 22 | + } | ||
| 23 | + var urlParamsStr = tempArr.join('&'); | ||
| 24 | + return urlParamsStr; | ||
| 25 | + } catch (err) { | ||
| 26 | + return ''; | ||
| 27 | + } | ||
| 28 | + }, | ||
| 29 | + | ||
| 30 | + | ||
| 31 | + IsWeixinOrAlipay: function () { | ||
| 32 | + if (/MicroMessenger/.test(window.navigator.userAgent)) { | ||
| 33 | + console.log("微信客户端"); | ||
| 34 | + //this.switchShow("wxPay"); | ||
| 35 | + return 4 | ||
| 36 | + } else if (/AlipayClient/.test(window.navigator.userAgent)) { | ||
| 37 | + console.log("支付宝客户端"); | ||
| 38 | + //this.switchShow("aliPay"); | ||
| 39 | + return 1 | ||
| 40 | + } else if (/BankabciPhone/.test(window.navigator.userAgent)) { | ||
| 41 | + console.log("农行客户端"); | ||
| 42 | + return 1 | ||
| 43 | + } else if (/BankabcAndroid/.test(window.navigator.userAgent)) { | ||
| 44 | + console.log("农行客户端"); | ||
| 45 | + return 1 | ||
| 46 | + } else { | ||
| 47 | + console.log("其他浏览器"); | ||
| 48 | + return 1 | ||
| 49 | + } | ||
| 50 | + }, | ||
| 51 | + | ||
| 15 | 52 | ||
| 16 | 53 | ||
| 17 | dateFormat: function (msd) { // 时间转换 | 54 | dateFormat: function (msd) { // 时间转换 |