Commit b137bb0e23de7324fc61e70e4a9f6c8d318c4479
1 parent
e38fe48c
扫码后 车牌是否 咨询页面
Showing
12 changed files
with
231 additions
and
13 deletions
package-lock.json
| @@ -286,6 +286,14 @@ | @@ -286,6 +286,14 @@ | ||
| 286 | "postcss-value-parser": "^3.2.3" | 286 | "postcss-value-parser": "^3.2.3" |
| 287 | } | 287 | } |
| 288 | }, | 288 | }, |
| 289 | + "axios": { | ||
| 290 | + "version": "0.21.1", | ||
| 291 | + "resolved": "https://registry.npm.taobao.org/axios/download/axios-0.21.1.tgz?cache=0&sync_timestamp=1608609199258&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faxios%2Fdownload%2Faxios-0.21.1.tgz", | ||
| 292 | + "integrity": "sha1-IlY0gZYvTWvemnbVFu8OXTwJsrg=", | ||
| 293 | + "requires": { | ||
| 294 | + "follow-redirects": "^1.10.0" | ||
| 295 | + } | ||
| 296 | + }, | ||
| 289 | "babel-code-frame": { | 297 | "babel-code-frame": { |
| 290 | "version": "6.26.0", | 298 | "version": "6.26.0", |
| 291 | "resolved": "https://registry.npm.taobao.org/babel-code-frame/download/babel-code-frame-6.26.0.tgz", | 299 | "resolved": "https://registry.npm.taobao.org/babel-code-frame/download/babel-code-frame-6.26.0.tgz", |
| @@ -3811,8 +3819,7 @@ | @@ -3811,8 +3819,7 @@ | ||
| 3811 | "follow-redirects": { | 3819 | "follow-redirects": { |
| 3812 | "version": "1.13.1", | 3820 | "version": "1.13.1", |
| 3813 | "resolved": "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.13.1.tgz?cache=0&sync_timestamp=1607916846877&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.13.1.tgz", | 3821 | "resolved": "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.13.1.tgz?cache=0&sync_timestamp=1607916846877&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.13.1.tgz", |
| 3814 | - "integrity": "sha1-X2m4Ezds7k/QR0o6uoNd8Eq3Y7c=", | ||
| 3815 | - "dev": true | 3822 | + "integrity": "sha1-X2m4Ezds7k/QR0o6uoNd8Eq3Y7c=" |
| 3816 | }, | 3823 | }, |
| 3817 | "for-in": { | 3824 | "for-in": { |
| 3818 | "version": "1.0.2", | 3825 | "version": "1.0.2", |
| @@ -8139,6 +8146,12 @@ | @@ -8139,6 +8146,12 @@ | ||
| 8139 | "has-flag": "^3.0.0" | 8146 | "has-flag": "^3.0.0" |
| 8140 | } | 8147 | } |
| 8141 | }, | 8148 | }, |
| 8149 | + "swiper": { | ||
| 8150 | + "version": "3.4.2", | ||
| 8151 | + "resolved": "https://registry.npm.taobao.org/swiper/download/swiper-3.4.2.tgz?cache=0&sync_timestamp=1608315084925&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fswiper%2Fdownload%2Fswiper-3.4.2.tgz", | ||
| 8152 | + "integrity": "sha1-Oda0ELGjmDPh9y07cpmd9fXjg5I=", | ||
| 8153 | + "dev": true | ||
| 8154 | + }, | ||
| 8142 | "tapable": { | 8155 | "tapable": { |
| 8143 | "version": "0.2.9", | 8156 | "version": "0.2.9", |
| 8144 | "resolved": "https://registry.npm.taobao.org/tapable/download/tapable-0.2.9.tgz?cache=0&sync_timestamp=1607088824436&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftapable%2Fdownload%2Ftapable-0.2.9.tgz", | 8157 | "resolved": "https://registry.npm.taobao.org/tapable/download/tapable-0.2.9.tgz?cache=0&sync_timestamp=1607088824436&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftapable%2Fdownload%2Ftapable-0.2.9.tgz", |
| @@ -8653,6 +8666,14 @@ | @@ -8653,6 +8666,14 @@ | ||
| 8653 | "resolved": "https://registry.npm.taobao.org/vue/download/vue-2.6.12.tgz?cache=0&sync_timestamp=1609359858533&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue%2Fdownload%2Fvue-2.6.12.tgz", | 8666 | "resolved": "https://registry.npm.taobao.org/vue/download/vue-2.6.12.tgz?cache=0&sync_timestamp=1609359858533&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue%2Fdownload%2Fvue-2.6.12.tgz", |
| 8654 | "integrity": "sha1-9evU+mvShpQD4pqJau1JBEVskSM=" | 8667 | "integrity": "sha1-9evU+mvShpQD4pqJau1JBEVskSM=" |
| 8655 | }, | 8668 | }, |
| 8669 | + "vue-h5-popup": { | ||
| 8670 | + "version": "1.0.2", | ||
| 8671 | + "resolved": "https://registry.npm.taobao.org/vue-h5-popup/download/vue-h5-popup-1.0.2.tgz", | ||
| 8672 | + "integrity": "sha1-Y6nlTOOXJzuJ3umxAyOotmRlOuk=", | ||
| 8673 | + "requires": { | ||
| 8674 | + "vue": "^2.5.11" | ||
| 8675 | + } | ||
| 8676 | + }, | ||
| 8656 | "vue-hot-reload-api": { | 8677 | "vue-hot-reload-api": { |
| 8657 | "version": "2.3.4", | 8678 | "version": "2.3.4", |
| 8658 | "resolved": "https://registry.npm.taobao.org/vue-hot-reload-api/download/vue-hot-reload-api-2.3.4.tgz", | 8679 | "resolved": "https://registry.npm.taobao.org/vue-hot-reload-api/download/vue-hot-reload-api-2.3.4.tgz", |
package.json
| @@ -46,6 +46,7 @@ | @@ -46,6 +46,7 @@ | ||
| 46 | "rimraf": "^2.6.0", | 46 | "rimraf": "^2.6.0", |
| 47 | "semver": "^5.3.0", | 47 | "semver": "^5.3.0", |
| 48 | "shelljs": "^0.7.6", | 48 | "shelljs": "^0.7.6", |
| 49 | + "swiper": "^3.4.2", | ||
| 49 | "uglifyjs-webpack-plugin": "^1.1.1", | 50 | "uglifyjs-webpack-plugin": "^1.1.1", |
| 50 | "url-loader": "^0.5.8", | 51 | "url-loader": "^0.5.8", |
| 51 | "vue-loader": "^13.3.0", | 52 | "vue-loader": "^13.3.0", |
src/api/navigation/navigation.js
0 → 100644
src/assets/images/free-tip.png renamed to src/assets/images/tip.png
1.16 KB
src/assets/images/toParkRecord.png
0 → 100644
1.97 KB
src/components/navigation.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div> | ||
| 3 | + <div style="height: 206px;"> | ||
| 4 | + <div class="swiper-container"> | ||
| 5 | + <div class="swiper-wrapper"> | ||
| 6 | + <div class="swiper-slide" v-for="item in swiperData" :key="item.id" :style="{backgroundImage:'url(' + item.url + ')'}" | ||
| 7 | + @click="openImgUrl(item)" | ||
| 8 | + ></div> | ||
| 9 | + </div> | ||
| 10 | + <!-- 如果需要分页器 --> | ||
| 11 | + <div class="swiper-pagination"></div> | ||
| 12 | + | ||
| 13 | + <!-- 如果需要滚动条 --> | ||
| 14 | + <!-- <div class="swiper-scrollbar"></div>--> | ||
| 15 | + </div> | ||
| 16 | + </div> | ||
| 17 | + <p class="carNumberTip"> | ||
| 18 | + 请确认您当前缴费车牌号 | ||
| 19 | + </p> | ||
| 20 | + | ||
| 21 | + <div class="car-wrap"> | ||
| 22 | + <div class="carBG" :class="carWrapBG | formateColor"> | ||
| 23 | + <p class="carNumber">{{carNumber}}</p> | ||
| 24 | + </div> | ||
| 25 | + | ||
| 26 | + <p class="toParkRecord"> | ||
| 27 | + 是我的车,去支付 | ||
| 28 | + </p> | ||
| 29 | + | ||
| 30 | + <p class="toPlateNumber"> | ||
| 31 | + 不是我的车,手动输入 | ||
| 32 | + </p> | ||
| 33 | + | ||
| 34 | + </div> | ||
| 35 | + | ||
| 36 | + | ||
| 37 | + </div> | ||
| 38 | +</template> | ||
| 39 | + | ||
| 40 | +<script> | ||
| 41 | +import Swiper from 'swiper' // 应入swiper | ||
| 42 | +import { swiperQuery } from '../api/navigation/navigation' | ||
| 43 | +export default { | ||
| 44 | + name: 'navigation', | ||
| 45 | + data() { | ||
| 46 | + return { | ||
| 47 | + carNumber: '', // 车牌号码 | ||
| 48 | + carWrapBG: 0,// 车牌颜色 | ||
| 49 | + swiperData: [], // 轮播数据 | ||
| 50 | + } | ||
| 51 | + }, | ||
| 52 | + mounted() { | ||
| 53 | + this.carNumber = this.$route.query.carNumber // 车牌号码 | ||
| 54 | + this.carWrapBG = this.$route.query.carNumberColor // 车牌颜色 | ||
| 55 | + console.log(this.carNumber) | ||
| 56 | + | ||
| 57 | + }, | ||
| 58 | + created() { | ||
| 59 | + this.initSWiper() | ||
| 60 | + }, | ||
| 61 | + methods: { | ||
| 62 | + initSWiper(){ | ||
| 63 | + var salt = this.$utils.myCommonSalt(32) | ||
| 64 | + var jsondata = { | ||
| 65 | + app_id: this.$utils.myVarAppid, | ||
| 66 | + deviceInfo: this.$utils.myDeviceInfo, | ||
| 67 | + salt: salt, | ||
| 68 | + sign_type: 'md5', | ||
| 69 | + sign: '1', | ||
| 70 | + orgId:this.$utils.myOrgId, | ||
| 71 | + jumpType: '8' | ||
| 72 | + }; | ||
| 73 | + // jsondata = JSON.stringify(jsondata); | ||
| 74 | + swiperQuery(jsondata).then( res => { | ||
| 75 | + this.swiperData = res.data | ||
| 76 | + console.log(this.swiperData) | ||
| 77 | + new Swiper ('.swiper-container', { | ||
| 78 | + pagination: '.swiper-pagination', | ||
| 79 | + paginationClickable: true, | ||
| 80 | + centeredSlides: true, | ||
| 81 | + notNextTick: true, | ||
| 82 | + autoplay: 5000, | ||
| 83 | + autoplayDisableOnInteraction: true, | ||
| 84 | + | ||
| 85 | + observer: true, //修改swiper自己或子元素时,自动初始化swiper | ||
| 86 | + observeParents: true, //修改swiper的父元素时,自动初始化swiper | ||
| 87 | + onSlideChangeStart: function (swiper) { | ||
| 88 | + //console.log(swiper.activeIndex) | ||
| 89 | + } | ||
| 90 | + }) | ||
| 91 | + }) | ||
| 92 | + }, | ||
| 93 | + openImgUrl(i){ // 点击图片跳转 | ||
| 94 | + window.open(i.jumpUrl) | ||
| 95 | + } | ||
| 96 | + } | ||
| 97 | +} | ||
| 98 | +</script> | ||
| 99 | + | ||
| 100 | +<style scoped lang="scss"> | ||
| 101 | + .swiper-container{ | ||
| 102 | + height: 206px; | ||
| 103 | + } | ||
| 104 | + .swiper-slide{ | ||
| 105 | + /*width: 100%;*/ | ||
| 106 | + height: 206px; | ||
| 107 | + background-repeat: no-repeat; | ||
| 108 | + background-size: 100% 100%; | ||
| 109 | + } | ||
| 110 | + .carNumberTip { | ||
| 111 | + width: 200px; | ||
| 112 | + margin: 20px auto 10px; | ||
| 113 | + padding-left: 20px; | ||
| 114 | + background: url("../assets/images/tip.png") no-repeat 0 center; | ||
| 115 | + background-size: 14px 14px; | ||
| 116 | + text-align: center; | ||
| 117 | + } | ||
| 118 | + | ||
| 119 | + .car-wrap { | ||
| 120 | + padding: 0px 40px; | ||
| 121 | + background: #FFF; | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + .carBG { | ||
| 125 | + width: 100%; | ||
| 126 | + height: 100px; | ||
| 127 | + line-height: 100px; | ||
| 128 | + text-align: center; | ||
| 129 | + font-size: 24px; | ||
| 130 | + color: #fff; | ||
| 131 | + } | ||
| 132 | + .carBlue { | ||
| 133 | + background: url("../assets/images/blueBG.png") no-repeat; | ||
| 134 | + background-size: 100% 100%; | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + .carYellow { | ||
| 138 | + background: url("../assets/images/yellowBG.png") no-repeat; | ||
| 139 | + background-size: 100% 100%; | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + .carGreen { | ||
| 143 | + background: url("../assets/images/greenBG.png") no-repeat; | ||
| 144 | + background-size: 100% 100%; | ||
| 145 | + } | ||
| 146 | + | ||
| 147 | + .carWhite { | ||
| 148 | + background: url("../assets/images/whiteBG.png") no-repeat; | ||
| 149 | + background-size: 100% 100%; | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + .carBlack { | ||
| 153 | + background: url("../assets/images/blackBG.png") no-repeat; | ||
| 154 | + background-size: 100% 100%; | ||
| 155 | + } | ||
| 156 | + .toParkRecord{ | ||
| 157 | + margin-top: 40px; | ||
| 158 | + margin-bottom: 20px; | ||
| 159 | + height: 50px; | ||
| 160 | + line-height: 50px; | ||
| 161 | + font-size: 16px; | ||
| 162 | + text-align: center; | ||
| 163 | + background: url("../assets/images/toParkRecord.png") no-repeat; | ||
| 164 | + background-size: 100% 50px; | ||
| 165 | + cursor: pointer; | ||
| 166 | + } | ||
| 167 | + .toPlateNumber{ | ||
| 168 | + text-align: right; | ||
| 169 | + cursor: pointer; | ||
| 170 | + } | ||
| 171 | + | ||
| 172 | +</style> |
src/components/orderPay.vue
| @@ -311,7 +311,7 @@ export default { | @@ -311,7 +311,7 @@ export default { | ||
| 311 | 311 | ||
| 312 | .tip { | 312 | .tip { |
| 313 | padding-left: 40px; | 313 | padding-left: 40px; |
| 314 | - background: url("../assets/images/free-tip.png") no-repeat 18px center; | 314 | + background: url("../assets/images/tip.png") no-repeat 18px center; |
| 315 | background-size: 16px 16px; | 315 | background-size: 16px 16px; |
| 316 | color: #666; | 316 | color: #666; |
| 317 | } | 317 | } |
src/components/parkRecord.vue
| @@ -357,7 +357,7 @@ export default { | @@ -357,7 +357,7 @@ export default { | ||
| 357 | height: 25px; | 357 | height: 25px; |
| 358 | line-height: 25px; | 358 | line-height: 25px; |
| 359 | padding-left: 45px; | 359 | padding-left: 45px; |
| 360 | - background: #FEF8DB url("../assets/images/free-tip.png") no-repeat 18px center; | 360 | + background: #FEF8DB url("../assets/images/tip.png") no-repeat 18px center; |
| 361 | background-size: 18px 18px; | 361 | background-size: 18px 18px; |
| 362 | } | 362 | } |
| 363 | 363 |
src/main.js
| @@ -9,9 +9,13 @@ import './assets/css/reset.css' // 引入公共样式 | @@ -9,9 +9,13 @@ import './assets/css/reset.css' // 引入公共样式 | ||
| 9 | import h5Popup from 'vue-h5-popup'; // 引入弹窗 | 9 | import h5Popup from 'vue-h5-popup'; // 引入弹窗 |
| 10 | Vue.use(h5Popup) | 10 | Vue.use(h5Popup) |
| 11 | 11 | ||
| 12 | -import utils from './utils/utils' | 12 | +import utils from './utils/utils' // 工具类 |
| 13 | Vue.prototype.$utils = utils | 13 | Vue.prototype.$utils = utils |
| 14 | 14 | ||
| 15 | + | ||
| 16 | +import 'swiper/dist/css/swiper.min.css' // 轮播 | ||
| 17 | +import 'swiper/dist/js/swiper.min' | ||
| 18 | + | ||
| 15 | import vueFilter from './utils/filters' // 公共filter | 19 | import vueFilter from './utils/filters' // 公共filter |
| 16 | for (let key in vueFilter){ | 20 | for (let key in vueFilter){ |
| 17 | Vue.filter(key,vueFilter[key]) | 21 | Vue.filter(key,vueFilter[key]) |
src/router/index.js
| @@ -2,6 +2,7 @@ import Vue from 'vue' | @@ -2,6 +2,7 @@ import Vue from 'vue' | ||
| 2 | import Router from 'vue-router' | 2 | import Router from 'vue-router' |
| 3 | import plateNumber from '@/components/plateNumber' | 3 | import plateNumber from '@/components/plateNumber' |
| 4 | import parkRecord from '@/components/parkRecord' | 4 | import parkRecord from '@/components/parkRecord' |
| 5 | +import navigation from '@/components/navigation' | ||
| 5 | 6 | ||
| 6 | Vue.use(Router) | 7 | Vue.use(Router) |
| 7 | 8 | ||
| @@ -10,10 +11,15 @@ export default new Router({ | @@ -10,10 +11,15 @@ export default new Router({ | ||
| 10 | { | 11 | { |
| 11 | path: '/', | 12 | path: '/', |
| 12 | redirect: { | 13 | redirect: { |
| 13 | - name: 'parkRecord' | 14 | + name: 'navigation' |
| 14 | } | 15 | } |
| 15 | }, | 16 | }, |
| 16 | { | 17 | { |
| 18 | + path: '/navigation', | ||
| 19 | + name: 'navigation', | ||
| 20 | + component: navigation | ||
| 21 | + }, | ||
| 22 | + { | ||
| 17 | path: '/plateNumber', | 23 | path: '/plateNumber', |
| 18 | name: 'plateNumber', | 24 | name: 'plateNumber', |
| 19 | component: plateNumber | 25 | component: plateNumber |
src/utils/request.js
| @@ -4,10 +4,10 @@ import axios from 'axios' | @@ -4,10 +4,10 @@ import axios from 'axios' | ||
| 4 | // let _url = process.env.API_ROOT | 4 | // let _url = process.env.API_ROOT |
| 5 | // axios.defaults.baseURL = process.env.API_ROOT | 5 | // axios.defaults.baseURL = process.env.API_ROOT |
| 6 | const service = axios.create({ | 6 | const service = axios.create({ |
| 7 | - // baseURL: 'http://39.98.54.240:8090', // url = base url + request url | ||
| 8 | - //baseURL: _url, // url = base url + request url | ||
| 9 | 7 | ||
| 10 | - baseURL: 'http://pay.service.huangshiparking.com/', // url = base url + request url | 8 | + // http://pay.service.renniting.cn/ 赤峰 |
| 9 | + // http://pay.service.huangshiparking.com/ 黄石 | ||
| 10 | + baseURL: 'http://pay.service.renniting.cn/', // url = base url + request url | ||
| 11 | // withCredentials: true, // send cookies when cross-domain requests | 11 | // withCredentials: true, // send cookies when cross-domain requests |
| 12 | timeout: 6000 // request timeout | 12 | timeout: 6000 // request timeout |
| 13 | }) | 13 | }) |
src/utils/utils.js
| @@ -25,13 +25,13 @@ export default { | @@ -25,13 +25,13 @@ export default { | ||
| 25 | } | 25 | } |
| 26 | } | 26 | } |
| 27 | objb.sort(compare); | 27 | objb.sort(compare); |
| 28 | - var strmd5 = '14318527b13840c2a4af63fef52c2d6e'; | 28 | + var strmd5 = 'ny1u72b6k374sg379z0kqjgfxe2ycnpw'; |
| 29 | for(var i=0;i<objb.length;i++){ | 29 | for(var i=0;i<objb.length;i++){ |
| 30 | if(objb[i].value != null&&objb[i].value != ''){ | 30 | if(objb[i].value != null&&objb[i].value != ''){ |
| 31 | strmd5 += objb[i].keyname+objb[i].value; | 31 | strmd5 += objb[i].keyname+objb[i].value; |
| 32 | } | 32 | } |
| 33 | } | 33 | } |
| 34 | - strmd5 += '14318527b13840c2a4af63fef52c2d6e'; | 34 | + strmd5 += 'ny1u72b6k374sg379z0kqjgfxe2ycnpw'; |
| 35 | // console.log('strmd5-------->'+strmd5); | 35 | // console.log('strmd5-------->'+strmd5); |
| 36 | strmd5 = md5(strmd5); | 36 | strmd5 = md5(strmd5); |
| 37 | strmd5=strmd5.toUpperCase(); | 37 | strmd5=strmd5.toUpperCase(); |
| @@ -117,11 +117,11 @@ export default { | @@ -117,11 +117,11 @@ export default { | ||
| 117 | // ny1u72b6k374sg379z0kqjgfxe2ycnpw 新的签名 | 117 | // ny1u72b6k374sg379z0kqjgfxe2ycnpw 新的签名 |
| 118 | 118 | ||
| 119 | 119 | ||
| 120 | - myVarAppid:'0eca8f5373ca4866aec2f8e9d9367104',// 公共请求Appid | 120 | + myVarAppid:'ud8yq5tv0inxupc05xfeau39jywlqoj2',// 公共请求Appid |
| 121 | 121 | ||
| 122 | myDeviceInfo: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E', // 公共请求设备信息 | 122 | myDeviceInfo: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E', // 公共请求设备信息 |
| 123 | 123 | ||
| 124 | - myVxAppId: 'wxa1a66cc7d263afe6' , // 微信赤峰 appid //黄石 appid wxa1a66cc7d263afe6 | 124 | + myVxAppId: 'wx2af2bab90d433c86' , // 微信赤峰 appid wx2af2bab90d433c86 //黄石 appid wxa1a66cc7d263afe6 |
| 125 | 125 | ||
| 126 | myOrgId: '10003' // 归属地 赤峰id | 126 | myOrgId: '10003' // 归属地 赤峰id |
| 127 | 127 |