Commit d4ef0bced1c8cd10bba74d253b4c85569b1e7e9d
1 parent
92544c76
西城绿牌支付
Showing
6 changed files
with
97 additions
and
69 deletions
config/index.js
| @@ -8,7 +8,7 @@ module.exports = { | @@ -8,7 +8,7 @@ module.exports = { | ||
| 8 | dev: { | 8 | dev: { |
| 9 | 9 | ||
| 10 | // Paths | 10 | // Paths |
| 11 | - assetsSubDirectory: 'static', | 11 | + assetsSubDirectory: 'select', |
| 12 | assetsPublicPath: '/', | 12 | assetsPublicPath: '/', |
| 13 | proxyTable: {}, | 13 | proxyTable: {}, |
| 14 | // proxyTable: { | 14 | // proxyTable: { |
| @@ -48,11 +48,11 @@ module.exports = { | @@ -48,11 +48,11 @@ module.exports = { | ||
| 48 | 48 | ||
| 49 | build: { | 49 | build: { |
| 50 | // Template for index.html | 50 | // Template for index.html |
| 51 | - index: path.resolve(__dirname, '../dist/index.html'), | 51 | + index: path.resolve(__dirname, '../select/select.html'), |
| 52 | 52 | ||
| 53 | // Paths | 53 | // Paths |
| 54 | - assetsRoot: path.resolve(__dirname, '../dist'), | ||
| 55 | - assetsSubDirectory: 'static', | 54 | + assetsRoot: path.resolve(__dirname, '../select'), |
| 55 | + assetsSubDirectory: 'select', | ||
| 56 | assetsPublicPath: './', | 56 | assetsPublicPath: './', |
| 57 | 57 | ||
| 58 | /** | 58 | /** |
index.html
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | <meta charset="utf-8"> | 4 | <meta charset="utf-8"> |
| 5 | <meta name="google" content="notranslate"> | 5 | <meta name="google" content="notranslate"> |
| 6 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> | 6 | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
| 7 | - <title>小票码扫码支付</title> | 7 | + <title>扫码支付</title> |
| 8 | </head> | 8 | </head> |
| 9 | <body> | 9 | <body> |
| 10 | <div id="app"></div> | 10 | <div id="app"></div> |
src/components/parkRecord.vue
| @@ -422,26 +422,26 @@ export default { | @@ -422,26 +422,26 @@ export default { | ||
| 422 | font-weight: bold; | 422 | font-weight: bold; |
| 423 | li:first-child { | 423 | li:first-child { |
| 424 | width: 150px; | 424 | width: 150px; |
| 425 | - &.carBlue { | ||
| 426 | - background: url("../assets/images/carBlue.png") no-repeat 90px center; | ||
| 427 | - background-size: 28px 17px; | ||
| 428 | - } | ||
| 429 | - &.carYellow { | ||
| 430 | - background: url("../assets/images/carYellow.png") no-repeat 90px center; | ||
| 431 | - background-size: 28px 17px; | ||
| 432 | - } | ||
| 433 | - &.carGreen { | ||
| 434 | - background: url("../assets/images/carGreen.png") no-repeat 90px center; | ||
| 435 | - background-size: 28px 17px; | ||
| 436 | - } | ||
| 437 | - &.carWhite { | ||
| 438 | - background: url("../assets/images/carWhite.png") no-repeat 90px center; | ||
| 439 | - background-size: 28px 17px; | ||
| 440 | - } | ||
| 441 | - &.carBlack { | ||
| 442 | - background: url("../assets/images/carBlack.png") no-repeat 90px center; | ||
| 443 | - background-size: 28px 17px; | ||
| 444 | - } | 425 | + /*&.carBlue {*/ |
| 426 | + /*background: url("../assets/images/carBlue.png") no-repeat 90px center;*/ | ||
| 427 | + /*background-size: 28px 17px;*/ | ||
| 428 | + /*}*/ | ||
| 429 | + /*&.carYellow {*/ | ||
| 430 | + /*background: url("../assets/images/carYellow.png") no-repeat 90px center;*/ | ||
| 431 | + /*background-size: 28px 17px;*/ | ||
| 432 | + /*}*/ | ||
| 433 | + /*&.carGreen {*/ | ||
| 434 | + /*background: url("../assets/images/carGreen.png") no-repeat 90px center;*/ | ||
| 435 | + /*background-size: 28px 17px;*/ | ||
| 436 | + /*}*/ | ||
| 437 | + /*&.carWhite {*/ | ||
| 438 | + /*background: url("../assets/images/carWhite.png") no-repeat 90px center;*/ | ||
| 439 | + /*background-size: 28px 17px;*/ | ||
| 440 | + /*}*/ | ||
| 441 | + /*&.carBlack {*/ | ||
| 442 | + /*background: url("../assets/images/carBlack.png") no-repeat 90px center;*/ | ||
| 443 | + /*background-size: 28px 17px;*/ | ||
| 444 | + /*}*/ | ||
| 445 | } | 445 | } |
| 446 | li:last-child { | 446 | li:last-child { |
| 447 | margin-right: 18px; | 447 | margin-right: 18px; |
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> | ||
| 5 | 4 | ||
| 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> | 5 | + <div v-if="formData.sgFlage==1"> |
| 6 | + <p style="margin-bottom: 18px;margin-top: 18px;">请选择车牌颜色</p> | ||
| 12 | 7 | ||
| 13 | - </ul> | 8 | + <ul class="color-choose"> |
| 9 | + <li v-for="(i,index) in colorList" :key="i.name" @click="chooseColor(index)" | ||
| 10 | + :style="{color:currentColor==index?'#FFF':'',background: currentColor==index?activeBG:'' }" | ||
| 11 | + > | ||
| 12 | + {{i.name}} | ||
| 13 | + </li> | ||
| 14 | 14 | ||
| 15 | - <p style="margin-bottom: 18px;margin-top: 18px;">请输入车牌号码</p> | ||
| 16 | - <div class="num-box"> | ||
| 17 | - <div class="num0" @click="clickFirstWrap()"> | ||
| 18 | - <span>{{formData.num0}}</span> | ||
| 19 | - </div> | ||
| 20 | - <div class="num1" @click="clickKeyWordWrap(1)"><span>{{formData.num1}}</span></div> | ||
| 21 | - <!--<em class="spot"></em>--> | ||
| 22 | - <div class="num1" @click="clickKeyWordWrap(2)"><span>{{formData.num2}}</span></div> | ||
| 23 | - <div class="num1" @click="clickKeyWordWrap(3)"><span>{{formData.num3}}</span></div> | ||
| 24 | - <div class="num1" @click="clickKeyWordWrap(4)"><span>{{formData.num4}}</span></div> | ||
| 25 | - <div class="num1" @click="clickKeyWordWrap(5)"><span>{{formData.num5}}</span></div> | ||
| 26 | - <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> | 15 | + </ul> |
| 16 | + | ||
| 17 | + <p style="margin-bottom: 18px;margin-top: 18px;">请输入车牌号码</p> | ||
| 18 | + <div class="num-box"> | ||
| 19 | + <div class="num0" @click="clickFirstWrap()"> | ||
| 20 | + <span>{{formData.num0}}</span> | ||
| 21 | + </div> | ||
| 22 | + <div class="num1" @click="clickKeyWordWrap(1)"><span>{{formData.num1}}</span></div> | ||
| 23 | + <!--<em class="spot"></em>--> | ||
| 24 | + <div class="num1" @click="clickKeyWordWrap(2)"><span>{{formData.num2}}</span></div> | ||
| 25 | + <div class="num1" @click="clickKeyWordWrap(3)"><span>{{formData.num3}}</span></div> | ||
| 26 | + <div class="num1" @click="clickKeyWordWrap(4)"><span>{{formData.num4}}</span></div> | ||
| 27 | + <div class="num1" @click="clickKeyWordWrap(5)"><span>{{formData.num5}}</span></div> | ||
| 28 | + <div class="num1" @click="clickKeyWordWrap(6)"><span>{{formData.num6}}</span></div> | ||
| 29 | + <div v-if="formData.commonCard == '2'" class="num1" @click="clickKeyWordWrap(7)"><span>{{formData.num7}}</span></div> | ||
| 30 | + </div> | ||
| 31 | + </div> | ||
| 32 | + | ||
| 33 | + <div v-else style="padding-top: 20px;"> | ||
| 34 | + <mt-field label="车牌" placeholder="请输入使馆车牌" v-model="username"></mt-field> | ||
| 28 | </div> | 35 | </div> |
| 29 | 36 | ||
| 30 | 37 | ||
| 38 | + | ||
| 31 | <div class="radio-box"> | 39 | <div class="radio-box"> |
| 32 | <label class="flex-items-center"> | 40 | <label class="flex-items-center"> |
| 33 | - <img v-if="formData.commonCard == 1" | 41 | + <img v-if="formData.sgFlage == 1" |
| 34 | src="../assets/images/icon_chose_s@2x.png" | 42 | src="../assets/images/icon_chose_s@2x.png" |
| 35 | alt=""> | 43 | alt=""> |
| 36 | <img v-else | 44 | <img v-else |
| 37 | src="../assets/images/icon_chose_n@2x.png" | 45 | src="../assets/images/icon_chose_n@2x.png" |
| 38 | alt=""> | 46 | alt=""> |
| 39 | <input type="radio" | 47 | <input type="radio" |
| 40 | - v-model="formData.commonCard" | 48 | + v-model="formData.sgFlage" |
| 41 | value="1" />普通车牌 | 49 | value="1" />普通车牌 |
| 42 | </label> | 50 | </label> |
| 43 | <label class="flex-items-center"> | 51 | <label class="flex-items-center"> |
| 44 | - <img v-if="formData.commonCard == 2" | 52 | + <img v-if="formData.sgFlage == 2" |
| 45 | src="../assets/images/icon_chose_s@2x.png" | 53 | src="../assets/images/icon_chose_s@2x.png" |
| 46 | alt=""> | 54 | alt=""> |
| 47 | <img v-else | 55 | <img v-else |
| 48 | src="../assets/images/icon_chose_n@2x.png" | 56 | src="../assets/images/icon_chose_n@2x.png" |
| 49 | alt=""> | 57 | alt=""> |
| 50 | <input type="radio" | 58 | <input type="radio" |
| 51 | - v-model="formData.commonCard" | ||
| 52 | - value="2" />新能源车牌 | 59 | + v-model="formData.sgFlage" |
| 60 | + value="2" />使馆车牌 | ||
| 53 | </label> | 61 | </label> |
| 54 | </div> | 62 | </div> |
| 55 | 63 | ||
| @@ -295,10 +303,12 @@ export default { | @@ -295,10 +303,12 @@ export default { | ||
| 295 | id:'5' | 303 | id:'5' |
| 296 | }, | 304 | }, |
| 297 | ], | 305 | ], |
| 306 | + username:'', | ||
| 298 | currentColor:0, | 307 | currentColor:0, |
| 299 | activeBG:'#0054C0', | 308 | activeBG:'#0054C0', |
| 300 | formData: { | 309 | formData: { |
| 301 | commonCard: '1', | 310 | commonCard: '1', |
| 311 | + sgFlage:1, | ||
| 302 | num0: '', | 312 | num0: '', |
| 303 | num1: '', | 313 | num1: '', |
| 304 | num2: '', | 314 | num2: '', |
| @@ -349,6 +359,11 @@ export default { | @@ -349,6 +359,11 @@ export default { | ||
| 349 | }, | 359 | }, |
| 350 | chooseColor (index){ // 颜色选择 | 360 | chooseColor (index){ // 颜色选择 |
| 351 | this.currentColor = index | 361 | this.currentColor = index |
| 362 | + if(index == 4){ | ||
| 363 | + this.formData.commonCard = 2 | ||
| 364 | + }else{ | ||
| 365 | + this.formData.commonCard = 1 | ||
| 366 | + } | ||
| 352 | switch (this.currentColor) { | 367 | switch (this.currentColor) { |
| 353 | case 0 : | 368 | case 0 : |
| 354 | return this.activeBG = '#0054C0' | 369 | return this.activeBG = '#0054C0' |
| @@ -363,6 +378,7 @@ export default { | @@ -363,6 +378,7 @@ export default { | ||
| 363 | return this.activeBG = '#333333' | 378 | return this.activeBG = '#333333' |
| 364 | break; | 379 | break; |
| 365 | case 4 : | 380 | case 4 : |
| 381 | + | ||
| 366 | return this.activeBG = '#97DEA1' | 382 | return this.activeBG = '#97DEA1' |
| 367 | break; | 383 | break; |
| 368 | } | 384 | } |
| @@ -418,30 +434,38 @@ export default { | @@ -418,30 +434,38 @@ export default { | ||
| 418 | this.formData['num' + this.activeKeyWordIndex] = '' | 434 | this.formData['num' + this.activeKeyWordIndex] = '' |
| 419 | }, | 435 | }, |
| 420 | submitFn () { | 436 | submitFn () { |
| 421 | - let plateLicense | ||
| 422 | - if (this.formData.commonCard === '1') { | ||
| 423 | - plateLicense = this.plate_license_1 | ||
| 424 | - plateLicense = this.palindrome(plateLicense) | ||
| 425 | - if (plateLicense.length < 7) { | ||
| 426 | - this.$refs.alert.open() | ||
| 427 | - return | 437 | + var plateLicense |
| 438 | + if(this.formData.sgFlage==1){ | ||
| 439 | + // alert(this.formData.commonCard) | ||
| 440 | + if (this.formData.commonCard == '1') { | ||
| 441 | + plateLicense = this.plate_license_1 | ||
| 442 | + plateLicense = this.palindrome(plateLicense) | ||
| 443 | + if (plateLicense.length < 7) { | ||
| 444 | + this.$refs.alert.open() | ||
| 445 | + return | ||
| 446 | + } | ||
| 428 | } | 447 | } |
| 429 | - } | ||
| 430 | - if (this.formData.commonCard === '2') { | ||
| 431 | - plateLicense = this.plate_license_2 | ||
| 432 | - plateLicense = this.palindrome(plateLicense) | ||
| 433 | - if (plateLicense.length < 8) { | ||
| 434 | - this.$refs.alert.open() | ||
| 435 | - return | 448 | + if (this.formData.commonCard == '2') { |
| 449 | + // alert('2') | ||
| 450 | + plateLicense = this.plate_license_2 | ||
| 451 | + plateLicense = this.palindrome(plateLicense) | ||
| 452 | + console.log(plateLicense) | ||
| 453 | + if (plateLicense.length < 8) { | ||
| 454 | + this.$refs.alert.open() | ||
| 455 | + return | ||
| 456 | + } | ||
| 436 | } | 457 | } |
| 458 | + this.$emit('getPlateLicense',plateLicense) | ||
| 459 | + console.log(plateLicense); | ||
| 460 | + }else{ | ||
| 461 | + plateLicense = this.username | ||
| 437 | } | 462 | } |
| 438 | - this.$emit('getPlateLicense',plateLicense) | ||
| 439 | - console.log(plateLicense); | 463 | + console.log(plateLicense) |
| 440 | this.$router.push({ | 464 | this.$router.push({ |
| 441 | path:'parkRecord', | 465 | path:'parkRecord', |
| 442 | query:{ | 466 | query:{ |
| 443 | carNumber:plateLicense, | 467 | carNumber:plateLicense, |
| 444 | - carNumberColor: this.currentColor | 468 | + carNumberColor: 0 |
| 445 | } | 469 | } |
| 446 | }) | 470 | }) |
| 447 | }, | 471 | }, |
src/main.js
| @@ -18,6 +18,10 @@ Vue.prototype.$utils = utils | @@ -18,6 +18,10 @@ Vue.prototype.$utils = utils | ||
| 18 | 18 | ||
| 19 | import 'mint-ui/lib/style.css' | 19 | import 'mint-ui/lib/style.css' |
| 20 | import { MessageBox } from 'mint-ui' | 20 | import { MessageBox } from 'mint-ui' |
| 21 | + | ||
| 22 | +import { Field } from 'mint-ui'; | ||
| 23 | + | ||
| 24 | +Vue.component(Field.name, Field); | ||
| 21 | // Vue.use(MessageBox) | 25 | // Vue.use(MessageBox) |
| 22 | Vue.prototype.$msgbox = MessageBox | 26 | Vue.prototype.$msgbox = MessageBox |
| 23 | 27 |
src/utils/utils.js
| @@ -128,7 +128,7 @@ export default { | @@ -128,7 +128,7 @@ export default { | ||
| 128 | // 微信赤峰 appid wx2af2bab90d433c86 | 128 | // 微信赤峰 appid wx2af2bab90d433c86 |
| 129 | // 黄石 appid wxa1a66cc7d263afe6 | 129 | // 黄石 appid wxa1a66cc7d263afe6 |
| 130 | 130 | ||
| 131 | - myOrgId: '10003', // 归属地 赤峰id 10003 黄石 10079 | 131 | + myOrgId: '10007', // 归属地 赤峰id 10003 黄石 10079 |
| 132 | 132 | ||
| 133 | myGetSign: function (objb) { // 获取签名 | 133 | myGetSign: function (objb) { // 获取签名 |
| 134 | var compare = function (obj1, obj2) { | 134 | var compare = function (obj1, obj2) { |