Blame view

src/components/parkEnter.vue 2.03 KB
b67c269c   liuqimichale   入场码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  <template>
    <div>
      <p class="enter-title">请输入手机号码</p>
      <mt-field style="width: 60%;margin: 10px auto;border: 1px solid #c1bfc5;font-size: 16px;border-radius: 2px;" label="" placeholder="请输入手机号" type="tel" v-model="phone" :attr="{ maxlength: 11 }"></mt-field>
      <p style="color:#3385ff;text-align: center;">手机号码是出场凭证,请您牢记!</p>
      <div class="okBtn" @click="onHandle">确定入场</div>
    </div>
  </template>
  
  <script>
  
  import { noCarQRcodeInOutPark } from '@/api/parkEnter/parkEnter'
  
  export default {
    name: 'parkEnter',
    data() {
      return {
        query: {},
        phone: ''
      }
    },
    created() {
      this.query = this.$utils.getQueryString(window.location)
      console.log(this.query)
    },
    methods: {
      onHandle: function () {
        // noCarQRcodeInOutPark
        if (!/^1[34578]\d{9}$/.test(this.phone)) {
          this.$msgbox('提示', '请输入正确手机号')
          return
        }
        if (this.query == null) {
          this.$msgbox('提示', '没有接收到请求参数')
          return
        }
  
        this.query.app_id = 1
        this.query.salt = 2
        this.query.deviceInfo = 3
        this.query.sign_type = 'md5'
        this.query.sign = 4
        this.query.token = '666'
  
b3b129d1   刘淇   江阴通道码 入口
45
        this.query.carNumber = this.phone
b67c269c   liuqimichale   入场码
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
        this.query.terminalSource = "7";//增加字段:1:任你听 3:微信公共号 4:云平台 7:H5
        noCarQRcodeInOutPark(this.query).then(res => {
          if (res.code == 0) {
            this.$msgbox('提示', '进场信息已录入,请您进场!')
          } else {
            this.$msgbox('提示', res.message)
          }
        })
  
      }
    }
  }
  </script>
  
  <style scoped lang="scss">
    .enter-title {
      margin-top: 45px;
      text-align: center;
      font-size: 18px;
      color: #000;
    }
    .okBtn{
      background: linear-gradient(180deg, #3885D9 0%, #4194EF 100%);
      width: 60%;
      margin: 50px auto 0;
      height: 48px;
      line-height: 48px;
      text-align: center;
      border-radius: 5px;
      color: #ffffff;
      font-size: 18px;
      cursor: pointer;
    }
  </style>