Commit 94a4ee91f90338b9b2f77f5199d8bf51feb28b25
1 parent
2dcc276a
宣化 聚合支付
Showing
8 changed files
with
59 additions
and
32 deletions
config/index.js
| @@ -8,7 +8,7 @@ module.exports = { | @@ -8,7 +8,7 @@ module.exports = { | ||
| 8 | dev: { | 8 | dev: { |
| 9 | 9 | ||
| 10 | // Paths | 10 | // Paths |
| 11 | - assetsSubDirectory: 'static', | 11 | + assetsSubDirectory: 'ceshi', |
| 12 | assetsPublicPath: '/', | 12 | assetsPublicPath: '/', |
| 13 | // proxyTable: { | 13 | // proxyTable: { |
| 14 | // '/api':{ | 14 | // '/api':{ |
| @@ -47,11 +47,11 @@ module.exports = { | @@ -47,11 +47,11 @@ module.exports = { | ||
| 47 | 47 | ||
| 48 | build: { | 48 | build: { |
| 49 | // Template for index.html | 49 | // Template for index.html |
| 50 | - index: path.resolve(__dirname, '../dist/index.html'), | 50 | + index: path.resolve(__dirname, '../ceshi/ceshi.html'), |
| 51 | 51 | ||
| 52 | // Paths | 52 | // Paths |
| 53 | - assetsRoot: path.resolve(__dirname, '../dist'), | ||
| 54 | - assetsSubDirectory: 'static', | 53 | + assetsRoot: path.resolve(__dirname, '../ceshi'), |
| 54 | + assetsSubDirectory: 'ceshi', | ||
| 55 | assetsPublicPath: './', | 55 | assetsPublicPath: './', |
| 56 | 56 | ||
| 57 | /** | 57 | /** |
src/router/index.js
src/utils/filters.js
| @@ -19,6 +19,26 @@ const vFilter = { | @@ -19,6 +19,26 @@ const vFilter = { | ||
| 19 | } | 19 | } |
| 20 | } | 20 | } |
| 21 | }; | 21 | }; |
| 22 | + | ||
| 23 | +const formateColor = function(val) { | ||
| 24 | + switch (val) { | ||
| 25 | + case "0": | ||
| 26 | + return "carBlue"; | ||
| 27 | + break; | ||
| 28 | + case "1": | ||
| 29 | + return "carYellow"; | ||
| 30 | + break; | ||
| 31 | + case "2": | ||
| 32 | + return "carWhite"; | ||
| 33 | + break; | ||
| 34 | + case "3": | ||
| 35 | + return "carBlack"; | ||
| 36 | + break; | ||
| 37 | + case "4": | ||
| 38 | + return "carGreen"; | ||
| 39 | + break; | ||
| 40 | + } | ||
| 41 | +} | ||
| 22 | const numFilter = function(value) { | 42 | const numFilter = function(value) { |
| 23 | // 截取当前数据到小数点后两位 | 43 | // 截取当前数据到小数点后两位 |
| 24 | let realVal = (Number(value) / 100).toFixed(2); | 44 | let realVal = (Number(value) / 100).toFixed(2); |
| @@ -62,4 +82,4 @@ const cardType = function(cardType) { | @@ -62,4 +82,4 @@ const cardType = function(cardType) { | ||
| 62 | 82 | ||
| 63 | 83 | ||
| 64 | 84 | ||
| 65 | -export default { vFilter, numFilter, carType, cardType }; | 85 | +export default { vFilter, formateColor, numFilter, carType, cardType }; |
src/utils/utils.js
| @@ -117,7 +117,9 @@ export default { | @@ -117,7 +117,9 @@ export default { | ||
| 117 | myVxAppId: "wx1489e48e6a547023", | 117 | myVxAppId: "wx1489e48e6a547023", |
| 118 | userToken:localStorage.getItem('userToken'), | 118 | userToken:localStorage.getItem('userToken'), |
| 119 | userPhoneNum:localStorage.getItem('userPhoneNum'), | 119 | userPhoneNum:localStorage.getItem('userPhoneNum'), |
| 120 | - openId: "oWw3o5rY_bFsiT_nFd2CEQWGZfhs", | 120 | + // openId: "oWw3o5rY_bFsiT_nFd2CEQWGZfhs", |
| 121 | + | ||
| 122 | + openId:localStorage.getItem('openId'), | ||
| 121 | myOrgId: "10120", // 归属地 赤峰id 10003 黄石 10079 | 123 | myOrgId: "10120", // 归属地 赤峰id 10003 黄石 10079 |
| 122 | 124 | ||
| 123 | 125 | ||
| @@ -129,8 +131,8 @@ export default { | @@ -129,8 +131,8 @@ export default { | ||
| 129 | jsonObj.app_id = "lrpo55tmveqe07w3gpovzgx34pdez7eh"; | 131 | jsonObj.app_id = "lrpo55tmveqe07w3gpovzgx34pdez7eh"; |
| 130 | jsonObj.deviceInfo = "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E"; | 132 | jsonObj.deviceInfo = "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E"; |
| 131 | jsonObj.salt = myCommonSalt(32); | 133 | jsonObj.salt = myCommonSalt(32); |
| 132 | - // jsonObj.token = localStorage.getItem('userToken'); | ||
| 133 | - jsonObj.token = 'e3b5417a987641219efb8dc1f8b5fbce' // 为了测试 | 134 | + jsonObj.token = localStorage.getItem('userToken'); |
| 135 | + // jsonObj.token = 'e3b5417a987641219efb8dc1f8b5fbce' // 为了测试 | ||
| 134 | 136 | ||
| 135 | let sort = []; | 137 | let sort = []; |
| 136 | for (let k in jsonObj) { | 138 | for (let k in jsonObj) { |
src/views/binding/binDing.vue
| @@ -29,7 +29,7 @@ export default { | @@ -29,7 +29,7 @@ export default { | ||
| 29 | }, | 29 | }, |
| 30 | created() { | 30 | created() { |
| 31 | this.timeNum = this.timeText; | 31 | this.timeNum = this.timeText; |
| 32 | - // this.webAppCode = this.getWxCode(); // 正式打开注释 | 32 | + this.webAppCode = this.getWxCode(); // 正式打开注释 |
| 33 | }, | 33 | }, |
| 34 | methods: { | 34 | methods: { |
| 35 | getWxCode() { | 35 | getWxCode() { |
| @@ -87,35 +87,36 @@ export default { | @@ -87,35 +87,36 @@ export default { | ||
| 87 | }, | 87 | }, |
| 88 | getOpenIdByCode() { // 获取openid | 88 | getOpenIdByCode() { // 获取openid |
| 89 | 89 | ||
| 90 | - this.bindCustByOpenId() // 正式注释 | 90 | + // this.bindCustByOpenId() // 正式注释 |
| 91 | 91 | ||
| 92 | 92 | ||
| 93 | 93 | ||
| 94 | // 正式打开注释 | 94 | // 正式打开注释 |
| 95 | 95 | ||
| 96 | - // let jsondata = { | ||
| 97 | - // appId: this.$utils.myVxAppId, | ||
| 98 | - // code: this.webAppCode | ||
| 99 | - // }; | ||
| 100 | - // jsondata.sign = this.$utils.signObject(jsondata); | ||
| 101 | - // console.log("停车记录传参 " + JSON.stringify(jsondata)); | ||
| 102 | - // getOpenIdByCode(jsondata).then(response => { | ||
| 103 | - // if(response.code=='0'){ | ||
| 104 | - // this.bindCustByOpenId() // 获取token和用户手机号 | ||
| 105 | - // } | ||
| 106 | - // }); | 96 | + let jsondata = { |
| 97 | + appId: this.$utils.myVxAppId, | ||
| 98 | + code: this.webAppCode | ||
| 99 | + }; | ||
| 100 | + jsondata.sign = this.$utils.signObject(jsondata); | ||
| 101 | + console.log("停车记录传参 " + JSON.stringify(jsondata)); | ||
| 102 | + getOpenIdByCode(jsondata).then(response => { | ||
| 103 | + if(response.code=='0'){ | ||
| 104 | + let openId = response.data | ||
| 105 | + this.bindCustByOpenId(openId) // 获取token和用户手机号 | ||
| 106 | + } | ||
| 107 | + }); | ||
| 107 | }, | 108 | }, |
| 108 | - bindCustByOpenId(){ // | 109 | + bindCustByOpenId(openId){ // |
| 109 | let jsondata = { | 110 | let jsondata = { |
| 110 | phoneNum: this.phone, | 111 | phoneNum: this.phone, |
| 111 | verifyCode: this.codeText, | 112 | verifyCode: this.codeText, |
| 112 | - // openid: this.$utils.openId // 正式打开注释 | ||
| 113 | - openid:'oWw3o5rY_bFsiT_nFd2CEQWGZfhs' // 正式注释 | 113 | + openid: openId // 正式打开注释 |
| 114 | + // openid:'oWw3o5rY_bFsiT_nFd2CEQWGZfhs' // 正式注释 | ||
| 114 | }; | 115 | }; |
| 115 | jsondata.sign = this.$utils.signObject(jsondata); | 116 | jsondata.sign = this.$utils.signObject(jsondata); |
| 116 | bindCustByOpenId(jsondata).then(response => { | 117 | bindCustByOpenId(jsondata).then(response => { |
| 117 | if(response.code=='0'){ | 118 | if(response.code=='0'){ |
| 118 | - this.getTokenByOpenId() // 获取token和用户手机号 | 119 | + this.getTokenByOpenId(openId) // 获取token和用户手机号 |
| 119 | 120 | ||
| 120 | }else if(response.code=='1017'||response.code==1017){ | 121 | }else if(response.code=='1017'||response.code==1017){ |
| 121 | this.$toast("已经绑定过"); | 122 | this.$toast("已经绑定过"); |
| @@ -124,10 +125,10 @@ export default { | @@ -124,10 +125,10 @@ export default { | ||
| 124 | } | 125 | } |
| 125 | }); | 126 | }); |
| 126 | }, | 127 | }, |
| 127 | - getTokenByOpenId(){ // 获取token和用户手机号 | 128 | + getTokenByOpenId(openId){ // 获取token和用户手机号 |
| 128 | let jsondata = { | 129 | let jsondata = { |
| 129 | - // openid: this.$utils.openId // 正式打开注释 | ||
| 130 | - openid:'oWw3o5rY_bFsiT_nFd2CEQWGZfhs' // 正式注释 | 130 | + openid:openId // 正式打开注释 |
| 131 | + // openid:'oWw3o5rY_bFsiT_nFd2CEQWGZfhs' // 正式注释 | ||
| 131 | }; | 132 | }; |
| 132 | jsondata.sign = this.$utils.signObject(jsondata); | 133 | jsondata.sign = this.$utils.signObject(jsondata); |
| 133 | getTokenByOpenId(jsondata).then(response => { | 134 | getTokenByOpenId(jsondata).then(response => { |
src/views/cards/buyVipCard.vue
| @@ -228,7 +228,7 @@ export default { | @@ -228,7 +228,7 @@ export default { | ||
| 228 | this.carList = response.data; | 228 | this.carList = response.data; |
| 229 | if (this.carList.length == 0) { | 229 | if (this.carList.length == 0) { |
| 230 | this.carNum = "点击选择车牌"; | 230 | this.carNum = "点击选择车牌"; |
| 231 | - this.carList = { | 231 | + this.actions = { |
| 232 | name: "前往绑定车牌页面" | 232 | name: "前往绑定车牌页面" |
| 233 | }; | 233 | }; |
| 234 | } else if (this.carList.length == 3) { | 234 | } else if (this.carList.length == 3) { |
src/views/mySelf/selfNav.vue
| @@ -61,14 +61,17 @@ export default { | @@ -61,14 +61,17 @@ export default { | ||
| 61 | phoneNum: ""//手机号 | 61 | phoneNum: ""//手机号 |
| 62 | }; | 62 | }; |
| 63 | }, | 63 | }, |
| 64 | + | ||
| 65 | + created() { | ||
| 66 | + | ||
| 67 | + }, | ||
| 64 | mounted() { | 68 | mounted() { |
| 65 | // this.openId = this.$utils.openId; | 69 | // this.openId = this.$utils.openId; |
| 66 | // if (this.openId) { | 70 | // if (this.openId) { |
| 67 | // this.getTokenAndphoneNum(); | 71 | // this.getTokenAndphoneNum(); |
| 68 | // } | 72 | // } |
| 69 | // console.log(this.openId); | 73 | // console.log(this.openId); |
| 70 | - }, | ||
| 71 | - created() { | 74 | + |
| 72 | this.phoneNum = this.$utils.userPhoneNum | 75 | this.phoneNum = this.$utils.userPhoneNum |
| 73 | console.log(this.$utils.userPhoneNum) | 76 | console.log(this.$utils.userPhoneNum) |
| 74 | }, | 77 | }, |
src/views/parkPay/orderPay.vue
| @@ -72,6 +72,7 @@ export default { | @@ -72,6 +72,7 @@ export default { | ||
| 72 | }, | 72 | }, |
| 73 | created() { | 73 | created() { |
| 74 | this.carWrapBG = this.$route.query.carColor //车牌颜色 | 74 | this.carWrapBG = this.$route.query.carColor //车牌颜色 |
| 75 | + console.log(this.carWrapBG) | ||
| 75 | this.carNumber = this.$route.query.carNumber | 76 | this.carNumber = this.$route.query.carNumber |
| 76 | this.arrearageTotalFee = this.$route.query.arrearageTotalFee // 应收 | 77 | this.arrearageTotalFee = this.$route.query.arrearageTotalFee // 应收 |
| 77 | this.arrearageDiscFee = this.$route.query.arrearageDiscFee // 优惠 | 78 | this.arrearageDiscFee = this.$route.query.arrearageDiscFee // 优惠 |