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 | 8 | dev: { |
9 | 9 | |
10 | 10 | // Paths |
11 | - assetsSubDirectory: 'static', | |
11 | + assetsSubDirectory: 'select', | |
12 | 12 | assetsPublicPath: '/', |
13 | 13 | proxyTable: {}, |
14 | 14 | // proxyTable: { |
... | ... | @@ -48,11 +48,11 @@ module.exports = { |
48 | 48 | |
49 | 49 | build: { |
50 | 50 | // Template for index.html |
51 | - index: path.resolve(__dirname, '../dist/index.html'), | |
51 | + index: path.resolve(__dirname, '../select/select.html'), | |
52 | 52 | |
53 | 53 | // Paths |
54 | - assetsRoot: path.resolve(__dirname, '../dist'), | |
55 | - assetsSubDirectory: 'static', | |
54 | + assetsRoot: path.resolve(__dirname, '../select'), | |
55 | + assetsSubDirectory: 'select', | |
56 | 56 | assetsPublicPath: './', |
57 | 57 | |
58 | 58 | /** | ... | ... |
index.html
src/components/parkRecord.vue
... | ... | @@ -422,26 +422,26 @@ export default { |
422 | 422 | font-weight: bold; |
423 | 423 | li:first-child { |
424 | 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 | 446 | li:last-child { |
447 | 447 | margin-right: 18px; | ... | ... |
src/components/plateNumber.vue
1 | 1 | <template> |
2 | 2 | <div id="page"> |
3 | 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 | 35 | </div> |
29 | 36 | |
30 | 37 | |
38 | + | |
31 | 39 | <div class="radio-box"> |
32 | 40 | <label class="flex-items-center"> |
33 | - <img v-if="formData.commonCard == 1" | |
41 | + <img v-if="formData.sgFlage == 1" | |
34 | 42 | src="../assets/images/icon_chose_s@2x.png" |
35 | 43 | alt=""> |
36 | 44 | <img v-else |
37 | 45 | src="../assets/images/icon_chose_n@2x.png" |
38 | 46 | alt=""> |
39 | 47 | <input type="radio" |
40 | - v-model="formData.commonCard" | |
48 | + v-model="formData.sgFlage" | |
41 | 49 | value="1" />普通车牌 |
42 | 50 | </label> |
43 | 51 | <label class="flex-items-center"> |
44 | - <img v-if="formData.commonCard == 2" | |
52 | + <img v-if="formData.sgFlage == 2" | |
45 | 53 | src="../assets/images/icon_chose_s@2x.png" |
46 | 54 | alt=""> |
47 | 55 | <img v-else |
48 | 56 | src="../assets/images/icon_chose_n@2x.png" |
49 | 57 | alt=""> |
50 | 58 | <input type="radio" |
51 | - v-model="formData.commonCard" | |
52 | - value="2" />新能源车牌 | |
59 | + v-model="formData.sgFlage" | |
60 | + value="2" />使馆车牌 | |
53 | 61 | </label> |
54 | 62 | </div> |
55 | 63 | |
... | ... | @@ -295,10 +303,12 @@ export default { |
295 | 303 | id:'5' |
296 | 304 | }, |
297 | 305 | ], |
306 | + username:'', | |
298 | 307 | currentColor:0, |
299 | 308 | activeBG:'#0054C0', |
300 | 309 | formData: { |
301 | 310 | commonCard: '1', |
311 | + sgFlage:1, | |
302 | 312 | num0: '', |
303 | 313 | num1: '', |
304 | 314 | num2: '', |
... | ... | @@ -349,6 +359,11 @@ export default { |
349 | 359 | }, |
350 | 360 | chooseColor (index){ // 颜色选择 |
351 | 361 | this.currentColor = index |
362 | + if(index == 4){ | |
363 | + this.formData.commonCard = 2 | |
364 | + }else{ | |
365 | + this.formData.commonCard = 1 | |
366 | + } | |
352 | 367 | switch (this.currentColor) { |
353 | 368 | case 0 : |
354 | 369 | return this.activeBG = '#0054C0' |
... | ... | @@ -363,6 +378,7 @@ export default { |
363 | 378 | return this.activeBG = '#333333' |
364 | 379 | break; |
365 | 380 | case 4 : |
381 | + | |
366 | 382 | return this.activeBG = '#97DEA1' |
367 | 383 | break; |
368 | 384 | } |
... | ... | @@ -418,30 +434,38 @@ export default { |
418 | 434 | this.formData['num' + this.activeKeyWordIndex] = '' |
419 | 435 | }, |
420 | 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 | 464 | this.$router.push({ |
441 | 465 | path:'parkRecord', |
442 | 466 | query:{ |
443 | 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 | 18 | |
19 | 19 | import 'mint-ui/lib/style.css' |
20 | 20 | import { MessageBox } from 'mint-ui' |
21 | + | |
22 | +import { Field } from 'mint-ui'; | |
23 | + | |
24 | +Vue.component(Field.name, Field); | |
21 | 25 | // Vue.use(MessageBox) |
22 | 26 | Vue.prototype.$msgbox = MessageBox |
23 | 27 | ... | ... |
src/utils/utils.js
... | ... | @@ -128,7 +128,7 @@ export default { |
128 | 128 | // 微信赤峰 appid wx2af2bab90d433c86 |
129 | 129 | // 黄石 appid wxa1a66cc7d263afe6 |
130 | 130 | |
131 | - myOrgId: '10003', // 归属地 赤峰id 10003 黄石 10079 | |
131 | + myOrgId: '10007', // 归属地 赤峰id 10003 黄石 10079 | |
132 | 132 | |
133 | 133 | myGetSign: function (objb) { // 获取签名 |
134 | 134 | var compare = function (obj1, obj2) { | ... | ... |