Blame view

src/components/navigation.vue 4.9 KB
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
1
  <template>
f9976583   刘淇   跳转 最江阴app
2
    <div v-show="showCon">
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
3
4
5
      <div style="height: 206px;">
        <div class="swiper-container">
          <div class="swiper-wrapper">
c865a00f   liuqimichale   赤峰支付宝支付
6
7
8
            <div class="swiper-slide" v-for="item in swiperData" :key="item.id"
                 :style="{backgroundImage:'url(' + item.url + ')'}"
                 @click="openImgUrl(item)"
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
            ></div>
          </div>
          <!-- 如果需要分页器 -->
          <div class="swiper-pagination"></div>
  
          <!-- 如果需要滚动条 -->
          <!--    <div class="swiper-scrollbar"></div>-->
        </div>
      </div>
      <p class="carNumberTip">
        请确认您当前缴费车牌号
      </p>
  
      <div class="car-wrap">
        <div class="carBG" :class="carWrapBG | formateColor">
          <p class="carNumber">{{carNumber}}</p>
        </div>
  
c865a00f   liuqimichale   赤峰支付宝支付
27
        <p class="toParkRecord" @click="toParkRecord">
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
28
29
30
          是我的车,去支付
        </p>
  
c865a00f   liuqimichale   赤峰支付宝支付
31
        <p class="toPlateNumber" @click="toPlateNumber">
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
32
33
34
35
36
37
38
39
40
41
42
          不是我的车,手动输入
        </p>
  
      </div>
  
  
    </div>
  </template>
  
  <script>
  import Swiper from 'swiper' //  应入swiper
c865a00f   liuqimichale   赤峰支付宝支付
43
44
  import {swiperQuery} from '../api/navigation/navigation'
  
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
45
46
47
48
49
50
51
  export default {
    name: 'navigation',
    data() {
      return {
        carNumber: '',  // 车牌号码
        carWrapBG: 0,// 车牌颜色
        swiperData: [], // 轮播数据
f9976583   刘淇   跳转 最江阴app
52
        showCon:false,
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
53
54
55
56
57
58
      }
    },
    mounted() {
      this.carNumber = this.$route.query.carNumber  // 车牌号码
      this.carWrapBG = this.$route.query.carNumberColor // 车牌颜色
      console.log(this.carNumber)
a8afa949   刘淇   江阴app扫码
59
60
61
      console.log(this.$utils.clientBrowsePayType())
      if(this.$utils.clientBrowsePayType() == 5){
        window.location.href = 'https://park.ijiangyin.com?carNumber='+this.carNumber+'&carType='+this.$route.query.carType+'&carNumberColor='+this.$route.query.carNumberColor+'&orgId='+this.$route.query.orgId+'&codeType='+this.$route.query.codeType
f9976583   刘淇   跳转 最江阴app
62
63
      }else {
        this.showCon = true
a8afa949   刘淇   江阴app扫码
64
65
66
      }
  
  
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
67
68
69
70
71
72
  
    },
    created() {
      this.initSWiper()
    },
    methods: {
c865a00f   liuqimichale   赤峰支付宝支付
73
      initSWiper() {
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
74
75
76
77
78
79
80
        var salt = this.$utils.myCommonSalt(32)
        var jsondata = {
          app_id: this.$utils.myVarAppid,
          deviceInfo: this.$utils.myDeviceInfo,
          salt: salt,
          sign_type: 'md5',
          sign: '1',
c865a00f   liuqimichale   赤峰支付宝支付
81
          orgId: this.$utils.myOrgId,
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
82
83
84
          jumpType: '8'
        };
        // jsondata = JSON.stringify(jsondata);
c865a00f   liuqimichale   赤峰支付宝支付
85
        swiperQuery(jsondata).then(res => {
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
86
87
          this.swiperData = res.data
          console.log(this.swiperData)
c865a00f   liuqimichale   赤峰支付宝支付
88
          new Swiper('.swiper-container', {
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
            pagination: '.swiper-pagination',
            paginationClickable: true,
            centeredSlides: true,
            notNextTick: true,
            autoplay: 5000,
            autoplayDisableOnInteraction: true,
  
            observer: true,       //修改swiper自己或子元素时,自动初始化swiper
            observeParents: true, //修改swiper的父元素时,自动初始化swiper
            onSlideChangeStart: function (swiper) {
              //console.log(swiper.activeIndex)
            }
          })
        })
      },
c865a00f   liuqimichale   赤峰支付宝支付
104
      openImgUrl(i) { // 点击图片跳转
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
105
        window.open(i.jumpUrl)
c865a00f   liuqimichale   赤峰支付宝支付
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
      },
      toPlateNumber() { //  前往输入车牌页面
        this.$router.push({
            path: 'plateNumber',
  
          }
        )
      },
      toParkRecord() { //  前往停车记录页面
        this.$router.push({
          path: 'parkRecord',
          query: {
            carNumber: this.carNumber,
            carNumberColor: this.carWrapBG
          }
        })
      },
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
123
124
125
126
127
    }
  }
  </script>
  
  <style scoped lang="scss">
c865a00f   liuqimichale   赤峰支付宝支付
128
    .swiper-container {
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
129
130
      height: 206px;
    }
c865a00f   liuqimichale   赤峰支付宝支付
131
132
  
    .swiper-slide {
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
133
134
135
136
137
      /*width: 100%;*/
      height: 206px;
      background-repeat: no-repeat;
      background-size: 100% 100%;
    }
c865a00f   liuqimichale   赤峰支付宝支付
138
  
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
    .carNumberTip {
      width: 200px;
      margin: 20px auto 10px;
      padding-left: 20px;
      background: url("../assets/images/tip.png") no-repeat 0 center;
      background-size: 14px 14px;
      text-align: center;
    }
  
    .car-wrap {
      padding: 0px 40px;
      background: #FFF;
    }
  
    .carBG {
      width: 100%;
      height: 100px;
      line-height: 100px;
      text-align: center;
      font-size: 24px;
      color: #fff;
    }
c865a00f   liuqimichale   赤峰支付宝支付
161
  
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
    .carBlue {
      background: url("../assets/images/blueBG.png") no-repeat;
      background-size: 100% 100%;
    }
  
    .carYellow {
      background: url("../assets/images/yellowBG.png") no-repeat;
      background-size: 100% 100%;
    }
  
    .carGreen {
      background: url("../assets/images/greenBG.png") no-repeat;
      background-size: 100% 100%;
    }
  
    .carWhite {
      background: url("../assets/images/whiteBG.png") no-repeat;
      background-size: 100% 100%;
    }
  
    .carBlack {
      background: url("../assets/images/blackBG.png") no-repeat;
      background-size: 100% 100%;
    }
c865a00f   liuqimichale   赤峰支付宝支付
186
187
  
    .toParkRecord {
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
188
189
190
191
192
193
194
195
196
197
      margin-top: 40px;
      margin-bottom: 20px;
      height: 50px;
      line-height: 50px;
      font-size: 16px;
      text-align: center;
      background: url("../assets/images/toParkRecord.png") no-repeat;
      background-size: 100% 50px;
      cursor: pointer;
    }
c865a00f   liuqimichale   赤峰支付宝支付
198
199
  
    .toPlateNumber {
b137bb0e   liuqimichale   扫码后 车牌是否 咨询页面
200
201
202
203
204
      text-align: right;
      cursor: pointer;
    }
  
  </style>