Commit 402b26c9f277be8b8c106a25a8712f4c2760f0c0
1 parent
399d88c7
西城 静态码
Showing
4 changed files
with
49 additions
and
16 deletions
src/components/noPass.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div> | |
| 3 | + <p class="noPassText" v-html="text"></p> | |
| 4 | + </div> | |
| 5 | +</template> | |
| 6 | + | |
| 7 | +<script> | |
| 8 | +export default { | |
| 9 | + name: 'noPass', | |
| 10 | + data() { | |
| 11 | + return { | |
| 12 | + text: '', | |
| 13 | + } | |
| 14 | + }, | |
| 15 | + created() { | |
| 16 | + this.text = sessionStorage.getItem('noPassText') | |
| 17 | + } | |
| 18 | +} | |
| 19 | +</script> | |
| 20 | + | |
| 21 | +<style scoped lang="scss"> | |
| 22 | +.noPassText{ | |
| 23 | + padding: 20px; | |
| 24 | + font-size: 14px; | |
| 25 | +} | |
| 26 | +</style> | ... | ... |
src/components/plateNumber.vue
| ... | ... | @@ -385,18 +385,24 @@ export default { |
| 385 | 385 | //alertMsg("出场成功"); |
| 386 | 386 | if (res.data) { |
| 387 | 387 | var tmpObj = res.data; |
| 388 | + console.log(tmpObj) | |
| 388 | 389 | //判断是否需要支付 |
| 389 | 390 | if (tmpObj.needPay) { |
| 390 | - | |
| 391 | - var queryParams = this.$utils.parseParams(tmpObj); | |
| 392 | - console.log(queryParams) | |
| 393 | - console.log(tmpObj) | |
| 394 | - // | |
| 395 | - this.$router.push({ | |
| 396 | - path: 'pay', | |
| 397 | - query: tmpObj | |
| 398 | - }) | |
| 399 | - | |
| 391 | + if(tmpObj.channelEnable){ | |
| 392 | + var queryParams = this.$utils.parseParams(tmpObj); | |
| 393 | + console.log(queryParams) | |
| 394 | + // // | |
| 395 | + this.$router.push({ | |
| 396 | + path: 'pay', | |
| 397 | + query: tmpObj | |
| 398 | + }) | |
| 399 | + }else{ | |
| 400 | + sessionStorage.setItem('noPassText',tmpObj.alertMessage) | |
| 401 | + this.$router.push({ | |
| 402 | + path: 'noPass' | |
| 403 | + // query: tmpObj.message | |
| 404 | + }) | |
| 405 | + } | |
| 400 | 406 | // window.location.href = "../pay.html?" + queryParams; |
| 401 | 407 | } else { |
| 402 | 408 | alert('无需缴费,欢迎下次光临') | ... | ... |
src/router/index.js
| ... | ... | @@ -11,7 +11,7 @@ export default new Router({ |
| 11 | 11 | { |
| 12 | 12 | path: '/', |
| 13 | 13 | redirect: { |
| 14 | - name: 'dynCodePay' | |
| 14 | + name: 'plateNumber' | |
| 15 | 15 | } |
| 16 | 16 | }, |
| 17 | 17 | // { |
| ... | ... | @@ -54,10 +54,11 @@ export default new Router({ |
| 54 | 54 | component: () => import("@/components/pay.vue") |
| 55 | 55 | }, |
| 56 | 56 | |
| 57 | - | |
| 58 | - | |
| 59 | - | |
| 60 | - | |
| 57 | + { | |
| 58 | + path: '/noPass', | |
| 59 | + name: 'noPass', | |
| 60 | + component: () => import("@/components/noPass.vue") | |
| 61 | + }, | |
| 61 | 62 | |
| 62 | 63 | |
| 63 | 64 | ] | ... | ... |
src/utils/request.js
| ... | ... | @@ -13,7 +13,7 @@ const service = axios.create({ |
| 13 | 13 | |
| 14 | 14 | // https://dev.renniting.cn/pay/ 赤峰农行测试环境 |
| 15 | 15 | |
| 16 | - baseURL: 'https://pay.renniting.cn/', // url = base url + request url | |
| 16 | + baseURL: 'https://dev.renniting.cn/pay/', // url = base url + request url | |
| 17 | 17 | // withCredentials: true, // send cookies when cross-domain requests |
| 18 | 18 | timeout: 6000 // request timeout |
| 19 | 19 | }) | ... | ... |