Blame view

src/views/parkPay/plateNumber.vue 23.9 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
  
6e7e8785   刘淇   江阴领券
279
280
281
  import {
    getEncryptTime
  } from '@/api/couponPay/couponPay.js'
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
282
  
0c49c87e   liuqimichale   微信公众号 初始化
283
  export default {
92e91fa6   刘淇   江阴领取优惠券调接口
284
    data() {
0c49c87e   liuqimichale   微信公众号 初始化
285
      return {
2b4641ef   刘淇   添加车牌颜色
286
287
  
        //  0:蓝牌;1:黄牌;2:白牌;3:黑牌;4:绿色
92e91fa6   刘淇   江阴领取优惠券调接口
288
        colorList: [
0c49c87e   liuqimichale   微信公众号 初始化
289
          {
92e91fa6   刘淇   江阴领取优惠券调接口
290
291
            name: '蓝牌',
            id: '1'
0c49c87e   liuqimichale   微信公众号 初始化
292
293
          },
          {
92e91fa6   刘淇   江阴领取优惠券调接口
294
295
            name: '黄牌',
            id: '2'
0c49c87e   liuqimichale   微信公众号 初始化
296
          },
2b4641ef   刘淇   添加车牌颜色
297
  
0c49c87e   liuqimichale   微信公众号 初始化
298
          {
92e91fa6   刘淇   江阴领取优惠券调接口
299
300
            name: '白牌',
            id: '3'
0c49c87e   liuqimichale   微信公众号 初始化
301
302
          },
          {
92e91fa6   刘淇   江阴领取优惠券调接口
303
304
            name: '黑牌',
            id: '4'
0c49c87e   liuqimichale   微信公众号 初始化
305
306
          },
          {
92e91fa6   刘淇   江阴领取优惠券调接口
307
308
            name: '绿牌',
            id: '5'
0c49c87e   liuqimichale   微信公众号 初始化
309
310
          },
        ],
92e91fa6   刘淇   江阴领取优惠券调接口
311
312
        currentColor: 0,
        activeBG: '#0054C0',
0c49c87e   liuqimichale   微信公众号 初始化
313
314
        formData: {
          commonCard: '1',
eae77c58   刘淇   江阴领取优惠券
315
316
          num0: '苏',
          num1: 'B',
0c49c87e   liuqimichale   微信公众号 初始化
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
          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   赤峰微信公众号 -- 临停支付
339
        submitConfirmText: '',
92e91fa6   刘淇   江阴领取优惠券调接口
340
341
        carType: '',
        codeType: '',
04d41f2e   刘淇   领取优惠券
342
        historyList:[],
6e7e8785   刘淇   江阴领券
343
        encryptTime:'', // 加密后的时间
0c49c87e   liuqimichale   微信公众号 初始化
344
345
      }
    },
92e91fa6   刘淇   江阴领取优惠券调接口
346
    created() {
04d41f2e   刘淇   领取优惠券
347
348
      this.historyList = localStorage.getItem('historyArr')?JSON.parse(localStorage.getItem('historyArr')):[]
      console.log(this.historyList )
92e91fa6   刘淇   江阴领取优惠券调接口
349
350
      this.carType = this.$route.query.carType
      this.codeType = this.$route.query.codeType
331018f3   刘淇   江阴领取优惠券调接口
351
      console.log(this.codeType)
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
352
    },
92e91fa6   刘淇   江阴领取优惠券调接口
353
    mounted() {
7850cc26   liuqimichale   赤峰微信公众号 -- 临停支付
354
355
356
357
358
359
360
361
362
363
364
365
      //
      // 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   微信公众号 初始化
366
367
    },
    methods: {
6e9a3492   刘淇   江阴支付
368
  
92e91fa6   刘淇   江阴领取优惠券调接口
369
      chooseColor(index) { // 颜色选择    0:蓝牌;1:黄牌;2:白牌;3:黑牌;4:绿色
0c49c87e   liuqimichale   微信公众号 初始化
370
371
372
        this.currentColor = index
        switch (this.currentColor) {
          case 0 :
2b4641ef   刘淇   添加车牌颜色
373
            this.formData.commonCard = '1'
0c49c87e   liuqimichale   微信公众号 初始化
374
375
376
            return this.activeBG = '#0054C0'
            break;
          case 1 :
2b4641ef   刘淇   添加车牌颜色
377
            this.formData.commonCard = '1'
0c49c87e   liuqimichale   微信公众号 初始化
378
379
380
            return this.activeBG = '#FEBE00'
            break;
          case 2 :
2b4641ef   刘淇   添加车牌颜色
381
382
            this.formData.commonCard = '1'
            return this.activeBG = '#E4E5E7'
0c49c87e   liuqimichale   微信公众号 初始化
383
384
            break;
          case 3 :
2b4641ef   刘淇   添加车牌颜色
385
386
            this.formData.commonCard = '1'
            return this.activeBG = '#333333'
0c49c87e   liuqimichale   微信公众号 初始化
387
388
            break;
          case 4 :
2b4641ef   刘淇   添加车牌颜色
389
390
            this.formData.commonCard = '2'
            return this.activeBG = '#97DEA1'
0c49c87e   liuqimichale   微信公众号 初始化
391
392
393
            break;
        }
      },
92e91fa6   刘淇   江阴领取优惠券调接口
394
      clickFirstWrap() {
0c49c87e   liuqimichale   微信公众号 初始化
395
396
397
398
399
400
        // 点击第一个输入框
        this.firstClickStatus = true
        this.firstWrapStatus = true
        this.keyBoardStatus = false
        this.formData.num0 = ''
      },
92e91fa6   刘淇   江阴领取优惠券调接口
401
      selectFirstWord(event) {
0c49c87e   liuqimichale   微信公众号 初始化
402
403
404
405
406
407
408
409
410
411
412
413
414
        // 选择省份
        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   刘淇   江阴领取优惠券调接口
415
      clickKeyBoard(item) { // 点击自定义键盘
0c49c87e   liuqimichale   微信公众号 初始化
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
        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   刘淇   江阴领取优惠券调接口
431
      deleteWord() { // 退格
0c49c87e   liuqimichale   微信公众号 初始化
432
433
434
435
436
437
438
        // 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   刘淇   江阴领取优惠券调接口
439
      clickKeyWordWrap(activeKeyWordIndex) {
0c49c87e   liuqimichale   微信公众号 初始化
440
441
442
443
        this.keyBoardStatus = true
        this.activeKeyWordIndex = activeKeyWordIndex
        this.formData['num' + this.activeKeyWordIndex] = ''
      },
92e91fa6   刘淇   江阴领取优惠券调接口
444
      submitFn() {
0c49c87e   liuqimichale   微信公众号 初始化
445
446
447
448
449
        let plateLicense
        if (this.formData.commonCard === '1') {
          plateLicense = this.plate_license_1
          plateLicense = this.palindrome(plateLicense)
          if (plateLicense.length < 7) {
7850cc26   liuqimichale   赤峰微信公众号 -- 临停支付
450
            this.$msgbox('提示', '请输入正确的车牌号')
0c49c87e   liuqimichale   微信公众号 初始化
451
452
453
454
455
456
457
            return
          }
        }
        if (this.formData.commonCard === '2') {
          plateLicense = this.plate_license_2
          plateLicense = this.palindrome(plateLicense)
          if (plateLicense.length < 8) {
92e91fa6   刘淇   江阴领取优惠券调接口
458
            this.$msgbox('提示', '请输入正确的车牌号')
0c49c87e   liuqimichale   微信公众号 初始化
459
460
461
            return
          }
        }
92e91fa6   刘淇   江阴领取优惠券调接口
462
        this.$emit('getPlateLicense', plateLicense)
0c49c87e   liuqimichale   微信公众号 初始化
463
        console.log(plateLicense);
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
464
  
04d41f2e   刘淇   领取优惠券
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
        // 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))
        }
  
6e7e8785   刘淇   江阴领券
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
        this.getEncryptTime()
      },
      getEncryptTime() {
        let url = process.env.VUE_APP_API;
        console.log(url)
        var salt = this.$utils.myCommonSalt(32);
        var jsondata = {
          app_id: this.$utils.myVarAppid,
          deviceInfo: this.$utils.myDeviceInfo,
          salt: salt,
          sign_type: "md5",
  
          codeType: this.codeType,
          cardRelParkNo: this.$route.query.cardRelParkNo,
          key: this.$route.query.key,
  
          // carNumberColor: this.carNumberColor,
          orgId: this.$utils.myOrgId,
          terminalSource: '7',
          // token:'e2c1e43722dd43a5b7e268001b39e6f0'
        }
        jsondata.sign = this.$utils.signObject(jsondata)
        console.log(jsondata)
        getEncryptTime(url,jsondata).then(response => {
          console.log(response)
  
          if (response.code == 0) {
            this.encryptTime = response.data.encryptTime
            this.$router.push({
              path: 'coupon',
              query: {
                carNumber: plateLicense,
                carNumberColor: this.currentColor,
                carType: 2,
                codeType: this.codeType,
                cardRelParkNo: this.$route.query.cardRelParkNo,
                key: this.$route.query.key,
                encryptTime: this.encryptTime
              }
            })
          } else {
            alert(response.message)
0c49c87e   liuqimichale   微信公众号 初始化
527
          }
6e7e8785   刘淇   江阴领券
528
  
0c49c87e   liuqimichale   微信公众号 初始化
529
530
        })
      },
04d41f2e   刘淇   领取优惠券
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
      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   刘淇   江阴领取优惠券调接口
546
      palindrome(str) {
0c49c87e   liuqimichale   微信公众号 初始化
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
        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   刘淇   江阴领取优惠券调接口
569
      checkIsHasSpecialStr(str) {
0c49c87e   liuqimichale   微信公众号 初始化
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
        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   刘淇   江阴领取优惠券调接口
603
      checkIsHasChineseStr(str) {
0c49c87e   liuqimichale   微信公众号 初始化
604
605
606
607
608
609
610
611
        var Reg = /.*[\u4e00-\u9fa5]+.*/
        if (Reg.test(str)) {
          return true
        }
        return false
      }
    },
    computed: {
92e91fa6   刘淇   江阴领取优惠券调接口
612
      plate_license_1() {
0c49c87e   liuqimichale   微信公众号 初始化
613
614
615
616
617
618
619
620
621
622
        return (
          this.formData.num0 +
          this.formData.num1 +
          this.formData.num2 +
          this.formData.num3 +
          this.formData.num4 +
          this.formData.num5 +
          this.formData.num6
        )
      },
92e91fa6   刘淇   江阴领取优惠券调接口
623
      plate_license_2() {
0c49c87e   liuqimichale   微信公众号 初始化
624
625
626
627
628
629
630
631
632
633
634
        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   刘淇   领取优惠券
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
    },
    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   微信公众号 初始化
655
656
657
658
    }
  }
  </script>
  <style lang="scss" scoped>
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
659
  
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
660
  
92e91fa6   刘淇   江阴领取优惠券调接口
661
662
663
664
665
666
667
668
669
  .flex-items-center {
    display: flex;
    align-items: center;
  }
  
  .wrap {
    padding: 0 18px;
  
    .radio-box {
0c49c87e   liuqimichale   微信公众号 初始化
670
671
      display: flex;
      align-items: center;
92e91fa6   刘淇   江阴领取优惠券调接口
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
      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   微信公众号 初始化
687
688
        }
      }
92e91fa6   刘淇   江阴领取优惠券调接口
689
690
691
692
693
694
695
696
697
    }
  
    .color-choose {
      width: 265px;
      height: 34px;
      margin: 0 auto;
      background: #F3F3F3;
      border-radius: 6px;
      display: flex;
0c49c87e   liuqimichale   微信公众号 初始化
698
  
92e91fa6   刘淇   江阴领取优惠券调接口
699
700
701
702
      li {
        flex: 1;
        text-align: center;
        line-height: 34px;
0c49c87e   liuqimichale   微信公众号 初始化
703
        border-radius: 6px;
0c49c87e   liuqimichale   微信公众号 初始化
704
      }
92e91fa6   刘淇   江阴领取优惠券调接口
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
    }
  
    .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   微信公众号 初始化
724
      }
92e91fa6   刘淇   江阴领取优惠券调接口
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
  
      & > 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   微信公众号 初始化
746
747
            }
          }
92e91fa6   刘淇   江阴领取优惠券调接口
748
749
750
751
752
  
          em {
            color: #979797;
            font-size: 1.6rem;
            line-height: 1.7rem;
0c49c87e   liuqimichale   微信公众号 初始化
753
          }
92e91fa6   刘淇   江阴领取优惠券调接口
754
  
0c49c87e   liuqimichale   微信公众号 初始化
755
          span {
92e91fa6   刘淇   江阴领取优惠券调接口
756
            display: inline-block;
0c49c87e   liuqimichale   微信公众号 初始化
757
758
            width: 100%;
            height: 100%;
92e91fa6   刘淇   江阴领取优惠券调接口
759
            // background-color: #9cbce2;
0c49c87e   liuqimichale   微信公众号 初始化
760
            color: #828282;
92e91fa6   刘淇   江阴领取优惠券调接口
761
            line-height: 1.8rem;
0c49c87e   liuqimichale   微信公众号 初始化
762
763
          }
        }
92e91fa6   刘淇   江阴领取优惠券调接口
764
765
766
767
768
769
  
        &.active {
          border: 1px solid #4a90e2;
  
          &:after {
            border-bottom: 0.5rem solid #4a90e2;
0c49c87e   liuqimichale   微信公众号 初始化
770
771
          }
        }
92e91fa6   刘淇   江阴领取优惠券调接口
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
  
        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   微信公众号 初始化
788
789
790
        }
      }
    }
92e91fa6   刘淇   江阴领取优惠券调接口
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
  
    .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   微信公众号 初始化
845
        span {
92e91fa6   刘淇   江阴领取优惠券调接口
846
          box-sizing: border-box;
0c49c87e   liuqimichale   微信公众号 初始化
847
          display: flex;
0c49c87e   liuqimichale   微信公众号 初始化
848
849
          align-items: center;
          justify-content: center;
92e91fa6   刘淇   江阴领取优惠券调接口
850
851
852
          text-align: center;
          width: 100%;
          height: 100%;
0c49c87e   liuqimichale   微信公众号 初始化
853
          background-color: #fff;
92e91fa6   刘淇   江阴领取优惠券调接口
854
855
          color: #000;
          // border: 1px solid #fff;
0c49c87e   liuqimichale   微信公众号 初始化
856
          border-radius: 0.125rem;
0c49c87e   liuqimichale   微信公众号 初始化
857
        }
92e91fa6   刘淇   江阴领取优惠券调接口
858
859
860
861
862
863
864
865
  
        img {
          width: 1.6rem;
        }
      }
  
      &:nth-last-of-type(1) {
        margin-bottom: 0rem;
0c49c87e   liuqimichale   微信公众号 初始化
866
      }
92e91fa6   刘淇   江阴领取优惠券调接口
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
    }
  }
  
  .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   微信公众号 初始化
887
        display: flex;
92e91fa6   刘淇   江阴领取优惠券调接口
888
        width: 1.8rem;
0c49c87e   liuqimichale   微信公众号 初始化
889
        align-items: center;
92e91fa6   刘淇   江阴领取优惠券调接口
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
        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   微信公众号 初始化
912
          background-color: #465266;
92e91fa6   刘淇   江阴领取优惠券调接口
913
914
915
916
  
          img {
            width: 1.15rem;
          }
0c49c87e   liuqimichale   微信公众号 初始化
917
918
919
        }
      }
    }
92e91fa6   刘淇   江阴领取优惠券调接口
920
921
922
923
924
925
926
  
    .cancel {
      display: flex;
      justify-content: flex-end;
      align-items: center;
  
      span {
94c1e6a3   liuqimichale   微信公众号 个人页面集合
927
        display: flex;
92e91fa6   刘淇   江阴领取优惠券调接口
928
929
930
931
932
933
934
        align-items: center;
        justify-content: center;
        width: 3.6rem;
        height: 1.8rem;
        background-color: #465266;
        color: #fff;
        border-radius: 0.125rem;
94c1e6a3   liuqimichale   微信公众号 个人页面集合
935
936
      }
    }
92e91fa6   刘淇   江阴领取优惠券调接口
937
938
939
940
941
  }
  
  .bound-list {
    li {
      padding: 0 10px;
94c1e6a3   liuqimichale   微信公众号 个人页面集合
942
      height: 34px;
92e91fa6   刘淇   江阴领取优惠券调接口
943
      margin-bottom: 12px;
94c1e6a3   liuqimichale   微信公众号 个人页面集合
944
      line-height: 34px;
92e91fa6   刘淇   江阴领取优惠券调接口
945
      background: #F2F1F1;
94c1e6a3   liuqimichale   微信公众号 个人页面集合
946
      border-radius: 2px;
92e91fa6   刘淇   江阴领取优惠券调接口
947
948
      display: flex;
      justify-content: space-between;
94c1e6a3   liuqimichale   微信公众号 个人页面集合
949
    }
92e91fa6   刘淇   江阴领取优惠券调接口
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
  }
  
  .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   刘淇   领取优惠券
970
971
972
973
974
975
976
  
  >>> .mint-cell-wrapper{
    background-image:none;
  }
    >>> .mint-cell:last-child{
      background-image:none;
    }
0c49c87e   liuqimichale   微信公众号 初始化
977
  </style>