Blame view

src/views/parkPay/plateNumber.vue 22.8 KB
0c49c87e   liuqimichale   微信公众号 初始化
1
2
  <template>
    <div id="page">
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
3
  
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
4
  
0c49c87e   liuqimichale   微信公众号 初始化
5
      <div class="wrap">
6e9a3492   刘淇   江阴支付
6
        <p style="margin-bottom: 18px;margin-top: 18px;">请选择车牌颜色</p>
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
7
  
2b4641ef   刘淇   添加车牌颜色
8
9
        <ul class="color-choose">
          <li v-for="(i,index) in colorList" :key="i.name" @click="chooseColor(index)"
92e91fa6   刘淇   江阴领取优惠券调接口
10
              :style="{color:currentColor==index?'#FFF':'',background:  currentColor==index?activeBG:'' }"
2b4641ef   刘淇   添加车牌颜色
11
          >
92e91fa6   刘淇   江阴领取优惠券调接口
12
            {{ i.name }}
2b4641ef   刘淇   添加车牌颜色
13
          </li>
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
14
  
2b4641ef   刘淇   添加车牌颜色
15
        </ul>
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
16
17
  
  
2b4641ef   刘淇   添加车牌颜色
18
        <p style="margin-bottom: 18px;margin-top: 18px;"></p>
6e9a3492   刘淇   江阴支付
19
        <p style="margin-bottom: 18px;margin-top: 18px;">请输入车牌号码</p>
0c49c87e   liuqimichale   微信公众号 初始化
20
21
        <div class="num-box">
          <div class="num0" @click="clickFirstWrap()">
92e91fa6   刘淇   江阴领取优惠券调接口
22
            <span>{{ formData.num0 }}</span>
0c49c87e   liuqimichale   微信公众号 初始化
23
          </div>
92e91fa6   刘淇   江阴领取优惠券调接口
24
          <div class="num1" @click="clickKeyWordWrap(1)"><span>{{ formData.num1 }}</span></div>
0c49c87e   liuqimichale   微信公众号 初始化
25
          <!--<em class="spot"></em>-->
92e91fa6   刘淇   江阴领取优惠券调接口
26
27
28
29
30
31
32
          <div class="num1" @click="clickKeyWordWrap(2)"><span>{{ formData.num2 }}</span></div>
          <div class="num1" @click="clickKeyWordWrap(3)"><span>{{ formData.num3 }}</span></div>
          <div class="num1" @click="clickKeyWordWrap(4)"><span>{{ formData.num4 }}</span></div>
          <div class="num1" @click="clickKeyWordWrap(5)"><span>{{ formData.num5 }}</span></div>
          <div class="num1" @click="clickKeyWordWrap(6)"><span>{{ formData.num6 }}</span></div>
          <div v-if="formData.commonCard == '2'" class="num1" @click="clickKeyWordWrap(7)">
            <span>{{ formData.num7 }}</span></div>
0c49c87e   liuqimichale   微信公众号 初始化
33
34
35
        </div>
  
  
2b4641ef   刘淇   添加车牌颜色
36
        <!--<div class="radio-box">-->
92e91fa6   刘淇   江阴领取优惠券调接口
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
        <!--<label class="flex-items-center">-->
        <!--<img v-if="formData.commonCard == 1"-->
        <!--src="../../assets/images/parkPay/icon_chose_s@2x.png"-->
        <!--alt="">-->
        <!--<img v-else-->
        <!--src="../../assets/images/parkPay/icon_chose_n@2x.png"-->
        <!--alt="">-->
        <!--<input type="radio"-->
        <!--v-model="formData.commonCard"-->
        <!--value="1" />普通车牌-->
        <!--</label>-->
        <!--<label class="flex-items-center">-->
        <!--<img v-if="formData.commonCard == 2"-->
        <!--src="../../assets/images/parkPay/icon_chose_s@2x.png"-->
        <!--alt="">-->
        <!--<img v-else-->
        <!--src="../../assets/images/parkPay/icon_chose_n@2x.png"-->
        <!--alt="">-->
        <!--<input type="radio"-->
        <!--v-model="formData.commonCard"-->
        <!--value="2" />新能源车牌-->
        <!--</label>-->
2b4641ef   刘淇   添加车牌颜色
59
        <!--</div>-->
0c49c87e   liuqimichale   微信公众号 初始化
60
  
04d41f2e   刘淇   领取优惠券
61
62
63
64
65
66
67
68
69
        <div v-if="historyList.length>0">
          <p style="margin-bottom: 18px;margin-top: 18px;"></p>
          <p style="margin-bottom: 18px;margin-top: 18px;">历史输入车牌号码</p>
  
          <mt-cell :title="i.carNumberColor | filterCarNumberColor" is-link v-for="(i, index) in historyList" :key="index" @click.native="toNext(i)">
            <span style="color: green">{{i.carNumber}}</span>
          </mt-cell>
  
        </div>
0c49c87e   liuqimichale   微信公众号 初始化
70
71
  
        <div class="submit-box" @click="submitFn()">
6e9a3492   刘淇   江阴支付
72
          领取
94c1e6a3   liuqimichale   微信公众号 个人页面集合
73
74
75
        </div>
  
  
0c49c87e   liuqimichale   微信公众号 初始化
76
77
78
79
80
81
      </div>
      <div class="first-word-wrap"
           v-if="firstWrapStatus">
        <div class="first-word"
             @click="selectFirstWord($event)">
          <div class="word">
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
82
            <span>蒙</span>
0c49c87e   liuqimichale   微信公众号 初始化
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
          </div>
          <div class="word">
            <span>湘</span>
          </div>
          <div class="word">
            <span>津</span>
          </div>
          <div class="word">
            <span>鄂</span>
          </div>
          <div class="word">
            <span>沪</span>
          </div>
          <div class="word">
            <span>粤</span>
          </div>
          <div class="word">
            <span>渝</span>
          </div>
          <div class="word">
            <span>琼</span>
          </div>
        </div>
        <div class="first-word"
             @click="selectFirstWord($event)">
          <div class="word">
12fc10d2   liuqimichale   赤峰 输入车牌停车记录
109
            <span>冀</span>
0c49c87e   liuqimichale   微信公众号 初始化
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
          </div>
          <div class="word">
            <span>川</span>
          </div>
          <div class="word">
            <span>晋</span>
          </div>
          <div class="word">
            <span>贵</span>
          </div>
          <div class="word">
            <span>辽</span>
          </div>
          <div class="word">
            <span>云</span>
          </div>
          <div class="word">
            <span>吉</span>
          </div>
          <div class="word">
            <span>陕</span>
          </div>
        </div>
        <div class="first-word"
             @click="selectFirstWord($event)">
          <div class="word">
            <span>黑</span>
          </div>
          <div class="word">
            <span>甘</span>
          </div>
          <div class="word">
            <span>苏</span>
          </div>
          <div class="word">
            <span>青</span>
          </div>
          <div class="word">
            <span>浙</span>
          </div>
          <div class="word">
            <span>皖</span>
          </div>
          <div class="word">
            <span>藏</span>
          </div>
          <div class="word">
            <span>闽</span>
          </div>
        </div>
        <div class="first-word"
             @click="selectFirstWord($event)">
          <div class="word">
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
163
            <span>京</span>
0c49c87e   liuqimichale   微信公众号 初始化
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
          </div>
          <div class="word">
            <span>赣</span>
          </div>
          <div class="word">
            <span>桂</span>
          </div>
          <div class="word">
            <span>鲁</span>
          </div>
          <div class="word">
            <span>宁</span>
          </div>
          <div class="word">
            <span>豫</span>
          </div>
          <div class="word">
            <span>新</span>
          </div>
7850cc26   liuqimichale   赤峰微信公众号 -- 临停支付
183
          <!--<div class="word">-->
92e91fa6   刘淇   江阴领取优惠券调接口
184
          <!--<span>学</span>-->
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
185
          <!--</div>-->
7850cc26   liuqimichale   赤峰微信公众号 -- 临停支付
186
          <div class="word bordernone">
92e91fa6   刘淇   江阴领取优惠券调接口
187
            <!-- <img src="../assets/images/icon-switch.png" alt=""> -->
7850cc26   liuqimichale   赤峰微信公众号 -- 临停支付
188
          </div>
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
189
190
        </div>
  
7850cc26   liuqimichale   赤峰微信公众号 -- 临停支付
191
        <!--<div class="first-word"-->
92e91fa6   刘淇   江阴领取优惠券调接口
192
193
194
195
196
197
198
199
200
201
        <!--@click="selectFirstWord($event)">-->
        <!--<div class="word">-->
        <!--<span>港</span>-->
        <!--</div>-->
        <!--<div class="word">-->
        <!--<span>澳</span>-->
        <!--</div>-->
        <!--<div class="word">-->
        <!--<span>领</span>-->
        <!--</div>-->
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
202
  
92e91fa6   刘淇   江阴领取优惠券调接口
203
204
205
        <!--<div class="word">-->
        <!--<span>警</span>-->
        <!--</div>-->
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
206
207
  
  
92e91fa6   刘淇   江阴领取优惠券调接口
208
209
210
211
212
213
214
215
        <!--<div class="word bordernone">-->
        <!--</div>-->
        <!--<div class="word bordernone">-->
        <!--</div>-->
        <!--<div class="word bordernone">-->
        <!--</div>-->
        <!--<div class="word bordernone">-->
        <!--</div>-->
7850cc26   liuqimichale   赤峰微信公众号 -- 临停支付
216
        <!--</div>-->
0c49c87e   liuqimichale   微信公众号 初始化
217
218
219
220
221
222
223
224
      </div>
      <div class="keyboard-wrap" v-if="keyBoardStatus === true">
        <!-- <div class="number-wrap"></div>
        <div class="letter-wrap"></div>
        <div class="cn-wrap"></div> -->
        <div class="keyboard" v-if="activeKeyWordIndex !== 1">
          <span v-for="(item,index) in allKeyWord._1"
                :key="index"
92e91fa6   刘淇   江阴领取优惠券调接口
225
                @click="clickKeyBoard(item)">{{ item }}</span>
0c49c87e   liuqimichale   微信公众号 初始化
226
227
228
229
        </div>
        <div class="keyboard" v-if="activeKeyWordIndex !== 1">
          <span v-for="(item,index) in allKeyWord._2"
                :key="index"
92e91fa6   刘淇   江阴领取优惠券调接口
230
                @click="clickKeyBoard(item)">{{ item }}</span>
0c49c87e   liuqimichale   微信公众号 初始化
231
232
233
234
235
236
237
238
          <span class="bordernone"></span>
          <span class="bordernone"></span>
          <span class="bordernone"></span>
          <span class="bordernone"></span>
        </div>
        <div class="keyboard">
          <span v-for="(item,index) in allKeyWord._3"
                :key="index"
92e91fa6   刘淇   江阴领取优惠券调接口
239
                @click="clickKeyBoard(item)">{{ item }}</span>
0c49c87e   liuqimichale   微信公众号 初始化
240
241
242
243
        </div>
        <div class="keyboard">
          <span v-for="(item,index) in allKeyWord._4"
                :key="index"
92e91fa6   刘淇   江阴领取优惠券调接口
244
                @click="clickKeyBoard(item)">{{ item }}</span>
0c49c87e   liuqimichale   微信公众号 初始化
245
246
247
248
        </div>
        <div class="keyboard">
          <span v-for="(item,index) in allKeyWord._5"
                :key="index"
92e91fa6   刘淇   江阴领取优惠券调接口
249
                @click="clickKeyBoard(item)">{{ item }}</span>
0c49c87e   liuqimichale   微信公众号 初始化
250
251
252
253
        </div>
        <div class="keyboard">
          <span v-for="(item,index) in allKeyWord._6"
                :key="index"
92e91fa6   刘淇   江阴领取优惠券调接口
254
                @click="clickKeyBoard(item)">{{ item }}</span>
0c49c87e   liuqimichale   微信公众号 初始化
255
256
257
258
259
260
261
262
263
264
          <span class="bordernone"></span>
          <span class="bordernone"></span>
          <span class="bordernone"></span>
          <!-- <span class="bordernone" v-if="activeKeyWordIndex === 1"></span>
          <span class="bordernone" v-if="activeKeyWordIndex === 1"></span> -->
          <!-- <span @click="deleteWord" v-if="activeKeyWordIndex === 1">x</span> -->
        </div>
        <div class="keyboard" v-if="activeKeyWordIndex !== 1">
          <span v-for="(item,index) in allKeyWord._7"
                :key="index"
92e91fa6   刘淇   江阴领取优惠券调接口
265
                @click="clickKeyBoard(item)">{{ item }}</span>
0c49c87e   liuqimichale   微信公众号 初始化
266
          <span class="bordernone"></span>
94c1e6a3   liuqimichale   微信公众号 个人页面集合
267
          <span class="delete" @click="deleteWord"><img src="../../assets/images/parkPay/icon-delete.png" alt=""></span>
0c49c87e   liuqimichale   微信公众号 初始化
268
269
270
271
272
273
274
        </div>
        <div class="cancel">
          <span @click="keyBoardStatus = false">完成</span>
        </div>
      </div>
  
  
0c49c87e   liuqimichale   微信公众号 初始化
275
276
277
    </div>
  </template>
  <script>
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
278
279
280
281
  
  import Swiper from 'swiper' //  应入swiper
  import {swiperQuery} from '../../api/plateNumber/plateNumber'
  
0c49c87e   liuqimichale   微信公众号 初始化
282
  export default {
92e91fa6   刘淇   江阴领取优惠券调接口
283
    data() {
0c49c87e   liuqimichale   微信公众号 初始化
284
      return {
2b4641ef   刘淇   添加车牌颜色
285
286
  
        //  0:蓝牌;1:黄牌;2:白牌;3:黑牌;4:绿色
92e91fa6   刘淇   江阴领取优惠券调接口
287
        colorList: [
0c49c87e   liuqimichale   微信公众号 初始化
288
          {
92e91fa6   刘淇   江阴领取优惠券调接口
289
290
            name: '蓝牌',
            id: '1'
0c49c87e   liuqimichale   微信公众号 初始化
291
292
          },
          {
92e91fa6   刘淇   江阴领取优惠券调接口
293
294
            name: '黄牌',
            id: '2'
0c49c87e   liuqimichale   微信公众号 初始化
295
          },
2b4641ef   刘淇   添加车牌颜色
296
  
0c49c87e   liuqimichale   微信公众号 初始化
297
          {
92e91fa6   刘淇   江阴领取优惠券调接口
298
299
            name: '白牌',
            id: '3'
0c49c87e   liuqimichale   微信公众号 初始化
300
301
          },
          {
92e91fa6   刘淇   江阴领取优惠券调接口
302
303
            name: '黑牌',
            id: '4'
0c49c87e   liuqimichale   微信公众号 初始化
304
305
          },
          {
92e91fa6   刘淇   江阴领取优惠券调接口
306
307
            name: '绿牌',
            id: '5'
0c49c87e   liuqimichale   微信公众号 初始化
308
309
          },
        ],
92e91fa6   刘淇   江阴领取优惠券调接口
310
311
        currentColor: 0,
        activeBG: '#0054C0',
0c49c87e   liuqimichale   微信公众号 初始化
312
313
        formData: {
          commonCard: '1',
eae77c58   刘淇   江阴领取优惠券
314
315
          num0: '苏',
          num1: 'B',
0c49c87e   liuqimichale   微信公众号 初始化
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
          num2: '',
          num3: '',
          num4: '',
          num5: '',
          num6: '',
          num7: ''
        },
        allKeyWord: {
          _1: [1, 2, 3, 4, 5, 6, 7],
          _2: [8, 9, 0],
          _3: ['A', 'B', 'C', 'D', 'E', 'F', 'G'],
          _4: ['H', 'J', 'K', 'L', 'M', 'N', 'O'],
          _5: ['P', 'Q', 'R', 'S', 'T', 'U', 'V'],
          _6: ['W', 'X', 'Y', 'Z'],
          _7: ['港', '澳', '学', '领', '警']
        },
        activeKeyWordIndex: 1, // 当前车牌号
        keyBoardStatus: false,
        firstWrapStatus: false, // 选择弹窗
        confirmTitle: '',
        submitConfirm: false,
        submitConfirmFalse: false,
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
338
        submitConfirmText: '',
92e91fa6   刘淇   江阴领取优惠券调接口
339
340
        carType: '',
        codeType: '',
04d41f2e   刘淇   领取优惠券
341
        historyList:[],
0c49c87e   liuqimichale   微信公众号 初始化
342
343
      }
    },
92e91fa6   刘淇   江阴领取优惠券调接口
344
    created() {
04d41f2e   刘淇   领取优惠券
345
346
      this.historyList = localStorage.getItem('historyArr')?JSON.parse(localStorage.getItem('historyArr')):[]
      console.log(this.historyList )
92e91fa6   刘淇   江阴领取优惠券调接口
347
348
      this.carType = this.$route.query.carType
      this.codeType = this.$route.query.codeType
331018f3   刘淇   江阴领取优惠券调接口
349
      console.log(this.codeType)
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
350
    },
92e91fa6   刘淇   江阴领取优惠券调接口
351
    mounted() {
7850cc26   liuqimichale   赤峰微信公众号 -- 临停支付
352
353
354
355
356
357
358
359
360
361
362
363
      //
      // if (this.$utils.clientBrowser() == "微信") {
      //   var appID = this.$utils.myVxAppId;
      //   var code = this.getUrlParam('code');
      //   var local = window.location.href;
      //   if (code == null || code === '') {
      //     window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid='+appID+'&redirect_uri='+encodeURIComponent(local)+'&response_type=code&scope=snsapi_userinfo&state=1,0#wechat_redirect'
      //   } else {
      //     return code;
      //   }
      // }
  
0c49c87e   liuqimichale   微信公众号 初始化
364
365
    },
    methods: {
6e9a3492   刘淇   江阴支付
366
  
92e91fa6   刘淇   江阴领取优惠券调接口
367
      chooseColor(index) { // 颜色选择    0:蓝牌;1:黄牌;2:白牌;3:黑牌;4:绿色
0c49c87e   liuqimichale   微信公众号 初始化
368
369
370
        this.currentColor = index
        switch (this.currentColor) {
          case 0 :
2b4641ef   刘淇   添加车牌颜色
371
            this.formData.commonCard = '1'
0c49c87e   liuqimichale   微信公众号 初始化
372
373
374
            return this.activeBG = '#0054C0'
            break;
          case 1 :
2b4641ef   刘淇   添加车牌颜色
375
            this.formData.commonCard = '1'
0c49c87e   liuqimichale   微信公众号 初始化
376
377
378
            return this.activeBG = '#FEBE00'
            break;
          case 2 :
2b4641ef   刘淇   添加车牌颜色
379
380
            this.formData.commonCard = '1'
            return this.activeBG = '#E4E5E7'
0c49c87e   liuqimichale   微信公众号 初始化
381
382
            break;
          case 3 :
2b4641ef   刘淇   添加车牌颜色
383
384
            this.formData.commonCard = '1'
            return this.activeBG = '#333333'
0c49c87e   liuqimichale   微信公众号 初始化
385
386
            break;
          case 4 :
2b4641ef   刘淇   添加车牌颜色
387
388
            this.formData.commonCard = '2'
            return this.activeBG = '#97DEA1'
0c49c87e   liuqimichale   微信公众号 初始化
389
390
391
            break;
        }
      },
92e91fa6   刘淇   江阴领取优惠券调接口
392
      clickFirstWrap() {
0c49c87e   liuqimichale   微信公众号 初始化
393
394
395
396
397
398
        // 点击第一个输入框
        this.firstClickStatus = true
        this.firstWrapStatus = true
        this.keyBoardStatus = false
        this.formData.num0 = ''
      },
92e91fa6   刘淇   江阴领取优惠券调接口
399
      selectFirstWord(event) {
0c49c87e   liuqimichale   微信公众号 初始化
400
401
402
403
404
405
406
407
408
409
410
411
412
        // 选择省份
        if (event.target.localName !== 'span') {
          return
        }
        this.formData.num0 = event.target.innerText
        this.firstSelectStatus = true
        this.firstWrapStatus = false
        this.firstClickStatus = false
        this.keyBoardStatus = true
        this.activeKeyWordIndex = 1
        // this.$refs.num1.focus()
        // document.getElementById('num1').focus()
      },
92e91fa6   刘淇   江阴领取优惠券调接口
413
      clickKeyBoard(item) { // 点击自定义键盘
0c49c87e   liuqimichale   微信公众号 初始化
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
        console.log(item)
        this.formData['num' + this.activeKeyWordIndex] = item
  
        if (this.formData.commonCard === '1') {
          this.activeKeyWordIndex++
          if (this.activeKeyWordIndex > 6) {
            this.keyBoardStatus = false
          }
        } else {
          this.activeKeyWordIndex++
          if (this.activeKeyWordIndex > 7) {
            this.keyBoardStatus = false
          }
        }
      },
92e91fa6   刘淇   江阴领取优惠券调接口
429
      deleteWord() { // 退格
0c49c87e   liuqimichale   微信公众号 初始化
430
431
432
433
434
435
436
        // console.log(this.activeKeyWordIndex)
        // console.log(this.formData['num' + (this.activeKeyWordIndex - 1)])
        if (this.activeKeyWordIndex > 1) {
          this.formData['num' + (this.activeKeyWordIndex - 1)] = ''
          this.activeKeyWordIndex--
        }
      },
92e91fa6   刘淇   江阴领取优惠券调接口
437
      clickKeyWordWrap(activeKeyWordIndex) {
0c49c87e   liuqimichale   微信公众号 初始化
438
439
440
441
        this.keyBoardStatus = true
        this.activeKeyWordIndex = activeKeyWordIndex
        this.formData['num' + this.activeKeyWordIndex] = ''
      },
92e91fa6   刘淇   江阴领取优惠券调接口
442
      submitFn() {
0c49c87e   liuqimichale   微信公众号 初始化
443
444
445
446
447
        let plateLicense
        if (this.formData.commonCard === '1') {
          plateLicense = this.plate_license_1
          plateLicense = this.palindrome(plateLicense)
          if (plateLicense.length < 7) {
7850cc26   liuqimichale   赤峰微信公众号 -- 临停支付
448
            this.$msgbox('提示', '请输入正确的车牌号')
0c49c87e   liuqimichale   微信公众号 初始化
449
450
451
452
453
454
455
            return
          }
        }
        if (this.formData.commonCard === '2') {
          plateLicense = this.plate_license_2
          plateLicense = this.palindrome(plateLicense)
          if (plateLicense.length < 8) {
92e91fa6   刘淇   江阴领取优惠券调接口
456
            this.$msgbox('提示', '请输入正确的车牌号')
0c49c87e   liuqimichale   微信公众号 初始化
457
458
459
            return
          }
        }
92e91fa6   刘淇   江阴领取优惠券调接口
460
        this.$emit('getPlateLicense', plateLicense)
0c49c87e   liuqimichale   微信公众号 初始化
461
        console.log(plateLicense);
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
462
  
04d41f2e   刘淇   领取优惠券
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
        // historyArr    0:蓝牌;1:黄牌;2:白牌;3:黑牌;4:绿色
        // indexOf
        if(JSON.stringify(this.historyList).includes(JSON.stringify({
          carNumber:plateLicense,
          carNumberColor:this.currentColor,
        })) ){
          console.log('122')
  
        }else{
          if(this.historyList.length==3){
            this.historyList.splice(0,1)
          }
          this.historyList.push({
            carNumber:plateLicense,
            carNumberColor:this.currentColor,
          })
  
          localStorage.setItem('historyArr',JSON.stringify(this.historyList))
        }
  
6e9a3492   刘淇   江阴支付
483
  
0c49c87e   liuqimichale   微信公众号 初始化
484
        this.$router.push({
92e91fa6   刘淇   江阴领取优惠券调接口
485
486
487
488
          path: 'coupon',
          query: {
            carNumber: plateLicense,
            carNumberColor: this.currentColor,
331018f3   刘淇   江阴领取优惠券调接口
489
490
491
492
            carType: 2,
            codeType: this.codeType,
            cardRelParkNo: this.$route.query.cardRelParkNo,
            key: this.$route.query.key
0c49c87e   liuqimichale   微信公众号 初始化
493
494
495
          }
        })
      },
04d41f2e   刘淇   领取优惠券
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
      toNext(i){
        console.log(i)
  
        this.$router.push({
          path: 'coupon',
          query: {
            carNumber: i.carNumber,
            carNumberColor: i.currentColor,
            carType: 2,
            codeType: this.codeType,
            cardRelParkNo: this.$route.query.cardRelParkNo,
            key: this.$route.query.key
          }
        })
      },
92e91fa6   刘淇   江阴领取优惠券调接口
511
      palindrome(str) {
0c49c87e   liuqimichale   微信公众号 初始化
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
        var arr = str.split('')
        arr = arr.filter(function (val) {
          return (
            val !== ' ' &&
            val !== ',' &&
            val !== '.' &&
            val !== '?' &&
            val !== ':' &&
            val !== ';' &&
            val !== '`' &&
            val !== "'" &&
            val !== '_' &&
            val !== '/' &&
            val !== '-' &&
            val !== '\\' &&
            val !== '' &&
            val !== '(' &&
            val !== ')'
          )
        })
        return arr.join('')
      },
92e91fa6   刘淇   江阴领取优惠券调接口
534
      checkIsHasSpecialStr(str) {
0c49c87e   liuqimichale   微信公众号 初始化
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
        var flag = false
        var arr = str.split('')
        arr.forEach(val => {
          if (
            val === '!' ||
            val === '}' ||
            val === '{' ||
            val === ']' ||
            val === '[' ||
            val === '&' ||
            val === '$' ||
            val === '@' ||
            val === ' ' ||
            val === ',' ||
            val === '.' ||
            val === '?' ||
            val === ':' ||
            val === ';' ||
            val === '`' ||
            val === "'" ||
            val === '_' ||
            val === '/' ||
            val === '-' ||
            val === '\\' ||
            val === '' ||
            val === '(' ||
            val === ')'
          ) {
            flag = true
          }
        })
        return flag
      },
92e91fa6   刘淇   江阴领取优惠券调接口
568
      checkIsHasChineseStr(str) {
0c49c87e   liuqimichale   微信公众号 初始化
569
570
571
572
573
574
575
576
        var Reg = /.*[\u4e00-\u9fa5]+.*/
        if (Reg.test(str)) {
          return true
        }
        return false
      }
    },
    computed: {
92e91fa6   刘淇   江阴领取优惠券调接口
577
      plate_license_1() {
0c49c87e   liuqimichale   微信公众号 初始化
578
579
580
581
582
583
584
585
586
587
        return (
          this.formData.num0 +
          this.formData.num1 +
          this.formData.num2 +
          this.formData.num3 +
          this.formData.num4 +
          this.formData.num5 +
          this.formData.num6
        )
      },
92e91fa6   刘淇   江阴领取优惠券调接口
588
      plate_license_2() {
0c49c87e   liuqimichale   微信公众号 初始化
589
590
591
592
593
594
595
596
597
598
599
        return (
          this.formData.num0 +
          this.formData.num1 +
          this.formData.num2 +
          this.formData.num3 +
          this.formData.num4 +
          this.formData.num5 +
          this.formData.num6 +
          this.formData.num7
        )
      }
04d41f2e   刘淇   领取优惠券
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
    },
    filters:{
      filterCarNumberColor(val){
        // 0:蓝牌;1:黄牌;2:白牌;3:黑牌;4:绿色
        if(val==0){
          return '蓝牌'
        }
        if(val==1){
          return '黄牌'
        }
        if(val==2){
          return '白牌'
        }
        if(val==3){
          return '黑牌'
        }
        if(val==4){
          return '绿色'
        }
      }
0c49c87e   liuqimichale   微信公众号 初始化
620
621
622
623
    }
  }
  </script>
  <style lang="scss" scoped>
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
624
  
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
625
  
92e91fa6   刘淇   江阴领取优惠券调接口
626
627
628
629
630
631
632
633
634
  .flex-items-center {
    display: flex;
    align-items: center;
  }
  
  .wrap {
    padding: 0 18px;
  
    .radio-box {
0c49c87e   liuqimichale   微信公众号 初始化
635
636
      display: flex;
      align-items: center;
92e91fa6   刘淇   江阴领取优惠券调接口
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
      justify-content: flex-end;
      margin-top: 18px;
      text-align: right;
  
      input[type="radio"] {
        display: none;
      }
  
      label {
        padding-left: 0.6rem;
        cursor: pointer;
  
        img {
          width: 0.8rem;
          margin-right: 0.1rem;
0c49c87e   liuqimichale   微信公众号 初始化
652
653
        }
      }
92e91fa6   刘淇   江阴领取优惠券调接口
654
655
656
657
658
659
660
661
662
    }
  
    .color-choose {
      width: 265px;
      height: 34px;
      margin: 0 auto;
      background: #F3F3F3;
      border-radius: 6px;
      display: flex;
0c49c87e   liuqimichale   微信公众号 初始化
663
  
92e91fa6   刘淇   江阴领取优惠券调接口
664
665
666
667
      li {
        flex: 1;
        text-align: center;
        line-height: 34px;
0c49c87e   liuqimichale   微信公众号 初始化
668
        border-radius: 6px;
0c49c87e   liuqimichale   微信公众号 初始化
669
      }
92e91fa6   刘淇   江阴领取优惠券调接口
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
    }
  
    .card-header {
      font-size: 0.75rem;
      margin: 0.2rem 0 0.5rem;
      color: #4a4a4a;
    }
  
    // input输入框
    .num-box {
      display: flex;
      justify-content: space-between;
      align-items: center;
  
      .spot {
        width: 0.2rem;
        height: 0.2rem;
        border-radius: 50%;
        background-color: #d8d8d8;
0c49c87e   liuqimichale   微信公众号 初始化
689
      }
92e91fa6   刘淇   江阴领取优惠券调接口
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
  
      & > div {
        width: 1.8rem;
        height: 1.8rem;
        border: 1px solid #e4e4e4;
  
        &.first {
          position: relative;
          text-align: center;
          line-height: 1.7rem;
          font-weight: 200;
  
          .input-wrap {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
  
            &.active {
              z-index: 100;
0c49c87e   liuqimichale   微信公众号 初始化
711
712
            }
          }
92e91fa6   刘淇   江阴领取优惠券调接口
713
714
715
716
717
  
          em {
            color: #979797;
            font-size: 1.6rem;
            line-height: 1.7rem;
0c49c87e   liuqimichale   微信公众号 初始化
718
          }
92e91fa6   刘淇   江阴领取优惠券调接口
719
  
0c49c87e   liuqimichale   微信公众号 初始化
720
          span {
92e91fa6   刘淇   江阴领取优惠券调接口
721
            display: inline-block;
0c49c87e   liuqimichale   微信公众号 初始化
722
723
            width: 100%;
            height: 100%;
92e91fa6   刘淇   江阴领取优惠券调接口
724
            // background-color: #9cbce2;
0c49c87e   liuqimichale   微信公众号 初始化
725
            color: #828282;
92e91fa6   刘淇   江阴领取优惠券调接口
726
            line-height: 1.8rem;
0c49c87e   liuqimichale   微信公众号 初始化
727
728
          }
        }
92e91fa6   刘淇   江阴领取优惠券调接口
729
730
731
732
733
734
  
        &.active {
          border: 1px solid #4a90e2;
  
          &:after {
            border-bottom: 0.5rem solid #4a90e2;
0c49c87e   liuqimichale   微信公众号 初始化
735
736
          }
        }
92e91fa6   刘淇   江阴领取优惠券调接口
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
  
        span {
          display: flex;
          align-items: center;
          justify-content: center;
          width: 100%;
          height: 100%;
          font-size: 1rem;
          color: #828282;
  
          &.first {
            background-color: #9cbce2;
            color: #fff;
            text-indent: 0.4rem;
            border-radius: 0;
          }
0c49c87e   liuqimichale   微信公众号 初始化
753
754
755
        }
      }
    }
92e91fa6   刘淇   江阴领取优惠券调接口
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
  
    .submit-box {
      width: 100%;
      height: 44px;
      line-height: 44px;
      border-radius: 4px;
      font-size: 20px;
      margin-top: 18px;
      background: linear-gradient(180deg, #3885D9 0%, #4194EF 100%);
      color: #fff;
      text-align: center;
    }
  
    .info {
      font-size: 0.5rem;
      margin-top: 0.9rem;
      color: #828282;
      text-align: left;
  
      img {
        width: 0.6rem;
        vertical-align: middle;
      }
    }
  }
  
  .first-word-wrap {
    // height: 9.4rem;
    background-color: #D2D5DB;
    padding: 0.6rem 0.8rem 1.1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  
    .first-word {
      display: flex;
      justify-content: space-between;
      margin-bottom: 0.45rem;
  
      .word {
        box-sizing: border-box;
        width: 1.8rem;
        height: 1.8rem;
        // border: 1px solid #9cbce2;
        box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.35);
        border-radius: 0.16rem;
        text-align: center;
  
        &.bordernone {
          border: none;
          box-shadow: none
        }
  
0c49c87e   liuqimichale   微信公众号 初始化
810
        span {
92e91fa6   刘淇   江阴领取优惠券调接口
811
          box-sizing: border-box;
0c49c87e   liuqimichale   微信公众号 初始化
812
          display: flex;
0c49c87e   liuqimichale   微信公众号 初始化
813
814
          align-items: center;
          justify-content: center;
92e91fa6   刘淇   江阴领取优惠券调接口
815
816
817
          text-align: center;
          width: 100%;
          height: 100%;
0c49c87e   liuqimichale   微信公众号 初始化
818
          background-color: #fff;
92e91fa6   刘淇   江阴领取优惠券调接口
819
820
          color: #000;
          // border: 1px solid #fff;
0c49c87e   liuqimichale   微信公众号 初始化
821
          border-radius: 0.125rem;
0c49c87e   liuqimichale   微信公众号 初始化
822
        }
92e91fa6   刘淇   江阴领取优惠券调接口
823
824
825
826
827
828
829
830
  
        img {
          width: 1.6rem;
        }
      }
  
      &:nth-last-of-type(1) {
        margin-bottom: 0rem;
0c49c87e   liuqimichale   微信公众号 初始化
831
      }
92e91fa6   刘淇   江阴领取优惠券调接口
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
    }
  }
  
  .keyboard-wrap {
    background-color: #D2D5DB;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.6rem 0.6rem 0.4rem;
  
    .keyboard {
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: 2rem;
      margin-bottom: 0.3rem;
  
      span {
        text-align: center;
0c49c87e   liuqimichale   微信公众号 初始化
852
        display: flex;
92e91fa6   刘淇   江阴领取优惠券调接口
853
        width: 1.8rem;
0c49c87e   liuqimichale   微信公众号 初始化
854
        align-items: center;
92e91fa6   刘淇   江阴领取优惠券调接口
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
        justify-content: center;
        height: 1.8rem;
        margin: 0 0.3rem;
        box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.35);
        background-color: #fff;
        border-radius: 0.125rem;
  
        &:active {
          background-color: #e4e4e4;
        }
  
        &.bordernone {
          border: none;
          box-shadow: none;
          background-color: #D2D5DB;
  
          &:active {
            background-color: #D2D5DB;
          }
        }
  
        &.delete {
0c49c87e   liuqimichale   微信公众号 初始化
877
          background-color: #465266;
92e91fa6   刘淇   江阴领取优惠券调接口
878
879
880
881
  
          img {
            width: 1.15rem;
          }
0c49c87e   liuqimichale   微信公众号 初始化
882
883
884
        }
      }
    }
92e91fa6   刘淇   江阴领取优惠券调接口
885
886
887
888
889
890
891
  
    .cancel {
      display: flex;
      justify-content: flex-end;
      align-items: center;
  
      span {
94c1e6a3   liuqimichale   微信公众号 个人页面集合
892
        display: flex;
92e91fa6   刘淇   江阴领取优惠券调接口
893
894
895
896
897
898
899
        align-items: center;
        justify-content: center;
        width: 3.6rem;
        height: 1.8rem;
        background-color: #465266;
        color: #fff;
        border-radius: 0.125rem;
94c1e6a3   liuqimichale   微信公众号 个人页面集合
900
901
      }
    }
92e91fa6   刘淇   江阴领取优惠券调接口
902
903
904
905
906
  }
  
  .bound-list {
    li {
      padding: 0 10px;
94c1e6a3   liuqimichale   微信公众号 个人页面集合
907
      height: 34px;
92e91fa6   刘淇   江阴领取优惠券调接口
908
      margin-bottom: 12px;
94c1e6a3   liuqimichale   微信公众号 个人页面集合
909
      line-height: 34px;
92e91fa6   刘淇   江阴领取优惠券调接口
910
      background: #F2F1F1;
94c1e6a3   liuqimichale   微信公众号 个人页面集合
911
      border-radius: 2px;
92e91fa6   刘淇   江阴领取优惠券调接口
912
913
      display: flex;
      justify-content: space-between;
94c1e6a3   liuqimichale   微信公众号 个人页面集合
914
    }
92e91fa6   刘淇   江阴领取优惠券调接口
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
  }
  
  .addCarNum {
    height: 34px;
    line-height: 34px;
    background: #FFFFFF;
    border-radius: 2px;
    border: 1px solid #F2F1F1;
    text-align: center;
  
    span {
      width: 16px;
      height: 16px;
      display: inline-block;
      background: url("../../assets/images/parkPay/addCarNum.png") no-repeat;
      margin-right: 10px;
      vertical-align: sub;
      cursor: pointer;
    }
  }
04d41f2e   刘淇   领取优惠券
935
936
937
938
939
940
941
  
  >>> .mint-cell-wrapper{
    background-image:none;
  }
    >>> .mint-cell:last-child{
      background-image:none;
    }
0c49c87e   liuqimichale   微信公众号 初始化
942
  </style>