diff --git a/config/index.js b/config/index.js index 44e1caf..2b2c992 100644 --- a/config/index.js +++ b/config/index.js @@ -13,14 +13,14 @@ module.exports = { open: true,//vue项目启动时自动打开浏览器 proxyTable: { '/api':{ - target:"https://bus.jycrtc.com",//这里设置你要访问的域名(或IP+端口) + target:"http://221.228.70.87:8096",//这里设置你要访问的域名(或IP+端口) changeOrigin:true, pathRewrite:{ '^/api':''//base_api是自定义用来代替 } }, '/payapi':{ - target:"https://pay.jycrtc.com",//这里设置你要访问的域名(或IP+端口) + target:"http://221.228.70.87:8096",//这里设置你要访问的域名(或IP+端口) changeOrigin:true, pathRewrite:{ '^/payapi':''//base_api是自定义用来代替 diff --git a/config/prod.env.js b/config/prod.env.js index db4cb54..bd7463b 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,9 +1,9 @@ 'use strict' module.exports = { - APP_BASE_APP_API:'"https://bus.jycrtc.com"', //项目api地址1 注意里面的双引号 - APP_BASE_WWW_API:'"https://pay.jycrtc.com"', //项目api地址2 - VUE_APP_API:'"https://bus.jycrtc.com"', - VUE_APP_PAYAPI:'"https://pay.jycrtc.com"', + APP_BASE_APP_API:'"http://221.228.70.87:8096"', //项目api地址1 注意里面的双引号 + APP_BASE_WWW_API:'"http://221.228.70.87:8096"', //项目api地址2 + VUE_APP_API:'"http://221.228.70.87:8096"', + VUE_APP_PAYAPI:'"http://221.228.70.87:8096"', NODE_ENV: '"production"' } diff --git a/src/views/parkPay/coupon.vue b/src/views/parkPay/coupon.vue index de82acd..05400ed 100644 --- a/src/views/parkPay/coupon.vue +++ b/src/views/parkPay/coupon.vue @@ -5,9 +5,12 @@

尊敬的车主您好:{{ tipText }}

- 去查询停车费用 + + {{btnText}} 返回 +
@@ -21,32 +24,33 @@ import { queryParkingRecordPageByCarNumbers, appApplyParkOut, parkingQuery -} from '@/api/couponPay/couponPay.js' - +} from "@/api/couponPay/couponPay.js"; export default { name: "coupon", data() { return { - imgurl: require('../../assets/images/successIcon.png'), - successiconUrl: require('../../assets/images/successIcon.png'), - loseiconUrl: require('../../assets/images/loseIcon.png'), - carNum: '', - carNumberColor: '', + imgurl: require("../../assets/images/successIcon.png"), + successiconUrl: require("../../assets/images/successIcon.png"), + loseiconUrl: require("../../assets/images/loseIcon.png"), + carNum: "", + carNumberColor: "", parkingData: [], - carType: '', - codeType: '', - tipText: '', + carType: "", + codeType: "", + tipText: "", payFlag: true, - couponsType:1,// 1:按次优惠,2:按时优惠,3:折扣优惠(打折),4:满减优惠' - cardRuleName:'', - loadFlag:false, - } + couponsType: 1,// 1:按次优惠,2:按时优惠,3:折扣优惠(打折),4:满减优惠' + cardRuleName: "", + loadFlag: false, // + disabledFlag: false, + btnText: "去查询停车费用" + }; }, created() { - this.carNum = this.$route.query.carNumber - this.carType = this.$route.query.carType - this.codeType = this.$route.query.codeType - this.cardRelParkNo = this.$route.query.cardRelParkNo + this.carNum = this.$route.query.carNumber; + this.carType = this.$route.query.carType; + this.codeType = this.$route.query.codeType; + this.cardRelParkNo = this.$route.query.cardRelParkNo; // this.carNum = this.$route.query.carNumber // 获取车牌号 // this.carNumberColor = this.$route.query.carNumberColor // 获取颜色 0:蓝牌;1:黄牌;2:白牌;3:黑牌;4:绿色 // this.currentTabActive = this.$route.query.parkFlag ? this.$route.query.parkFlag : 0 @@ -56,16 +60,15 @@ export default { }, methods: { scanCouponQR() { - let url = process.env.VUE_APP_API; - console.log(url) + console.log(url); var salt = this.$utils.myCommonSalt(32); var jsondata = { app_id: this.$utils.myVarAppid, deviceInfo: this.$utils.myDeviceInfo, salt: salt, sign_type: "md5", - carType: '2', + carType: "2", codeType: this.codeType, cardRelParkNo: this.cardRelParkNo, key: this.$route.query.key, @@ -73,43 +76,43 @@ export default { carNum: this.carNum, // carNumberColor: this.carNumberColor, orgId: this.$utils.myOrgId, - terminalSource: '7', + terminalSource: "7" // token:'e2c1e43722dd43a5b7e268001b39e6f0' - } - jsondata.sign = this.$utils.signObject(jsondata) - console.log(jsondata) - scanCouponQR(url,jsondata).then(response => { - console.log(response) - + }; + jsondata.sign = this.$utils.signObject(jsondata); + console.log(jsondata); + scanCouponQR(url, jsondata).then(response => { + console.log(response); if (response.code == 0) { - this.payFlag = true - this.imgurl = this.successiconUrl - this.tipText = '领取优惠券成功' - this.cardRuleName = response.data.cardRuleName - this.couponsType = response.data.cardType - console.log(this.couponsType) + this.payFlag = true; + this.imgurl = this.successiconUrl; + this.tipText = "领取优惠券成功"; + this.cardRuleName = response.data.cardRuleName; + this.couponsType = response.data.cardType; + console.log(this.couponsType); } else { - this.payFlag = false - this.imgurl = this.loseiconUrl - this.tipText = response.message + this.payFlag = false; + this.imgurl = this.loseiconUrl; + this.tipText = response.message; } setTimeout(() => { - this.loadFlag = true + this.loadFlag = true; }, 300); - // this.tipText = - }) + }); }, toPay() { - this.parkRecordList() + this.parkRecordList(); // this.$router.push({ // path: 'couponPay' // }) }, toBackPage() { - this.$router.back() + this.$router.back(); }, parkRecordList() { // 获取停车记录数据 + this.disabledFlag = true + this.btnText = "查询中,请等待" let url = process.env.VUE_APP_PAYAPI; var salt = this.$utils.myCommonSalt(32); var jsondata = { @@ -117,32 +120,29 @@ export default { deviceInfo: this.$utils.myDeviceInfo, salt: salt, sign_type: "md5", - pageNum: '1', - pageSize: '1000', - parkState: '10', - terminalSource: '7', + pageNum: "1", + pageSize: "1000", + parkState: "10", + terminalSource: "7", // parkState:'10', carNumber: this.carNum, // carNumberColor: '1', - orgId: this.$utils.myOrgId, - - } - jsondata.sign = this.$utils.signObject(jsondata) - - + orgId: this.$utils.myOrgId + }; + jsondata.sign = this.$utils.signObject(jsondata); // jsondata.sign = md5sign - console.log('停车记录传参 ' + JSON.stringify(jsondata)); - queryParkingRecordPageByCarNumbers(url,jsondata).then(response => { - console.log(response) + console.log("停车记录传参 " + JSON.stringify(jsondata)); + queryParkingRecordPageByCarNumbers(url, jsondata).then(response => { + console.log(response); + this.disabledFlag = false + this.btnText = "去查询停车费用" // this.parkList = response.data.dataList - this.parkingData = response.data.dataList.filter(item => { - return item.parkState == '10' - }) - console.log(this.parkingData) - this.toPayCurrent(this.parkingData) - - }) + return item.parkState == "10"; + }); + console.log(this.parkingData); + this.toPayCurrent(this.parkingData); + }); }, toPayCurrent(i) { // 缴纳本次在停费用 let url = process.env.VUE_APP_PAYAPI; @@ -153,14 +153,13 @@ export default { salt: salt, sign_type: "md5", orderId: i[0].orderId, - payOrderType: '101', - terminalSource: '7', - } - params.sign = this.$utils.signObject(params) - appApplyParkOut(url,params).then(response => { - console.log(response) - - if (response.code == '5005') { + payOrderType: "101", + terminalSource: "7" + }; + params.sign = this.$utils.signObject(params); + appApplyParkOut(url, params).then(response => { + console.log(response); + if (response.code == "5005") { var salt = this.$utils.myCommonSalt(32); var jsondata = { app_id: this.$utils.myVarAppid, @@ -170,20 +169,20 @@ export default { payType: this.$utils.clientBrowsePayType(), appId: this.$utils.myVxAppId, orderId: i[0].orderId, - terminalSource: '7', + terminalSource: "7", parkCode: i[0].parkCode, - carNumber: this.carNum, - } - jsondata.sign = this.$utils.signObject(jsondata) - parkingQuery(url,jsondata).then(result => { - console.log(result) - let res = result.data - let _dis = res.discountFee - let discountFee = _dis.slice(1, _dis.length - 1) - sessionStorage.setItem('couponPark', JSON.stringify(result.data)) + carNumber: this.carNum + }; + jsondata.sign = this.$utils.signObject(jsondata); + parkingQuery(url, jsondata).then(result => { + console.log(result); + let res = result.data; + let _dis = res.discountFee; + let discountFee = _dis.slice(1, _dis.length - 1); + sessionStorage.setItem("couponPark", JSON.stringify(result.data)); this.$router.push( { - path: 'couponPay', + path: "couponPay", query: { carColor: this.carColor,// 车牌颜色 arrearageTotalFee: res.orderTotalFee,// 应收 @@ -193,20 +192,17 @@ export default { paySrcType: 101, //支付的类型 101 是本次 103是历史欠费 ordeID: i.orderId, //支付的订单号 appOrderTimeout: res.appOrderTimeout, // 超时描述 - couponsType:this.couponsType + couponsType: this.couponsType } } - ) - }) - + ); + }); } else { //$('.dialog-out').show() - this.$msgbox('提示', '成功领取'+this.cardRuleName+',离场时自动抵扣') + this.$msgbox("提示", "成功领取" + this.cardRuleName + ",离场时自动抵扣"); } - - }) - - }, + }); + } } }; diff --git a/src/views/parkPay/plateNumber.vue b/src/views/parkPay/plateNumber.vue index 9ea634a..f4d2bca 100644 --- a/src/views/parkPay/plateNumber.vue +++ b/src/views/parkPay/plateNumber.vue @@ -1,276 +1,282 @@ @@ -283,6 +289,7 @@ import { export default { data() { return { + imgurl: require('../../assets/images/loseIcon.png'), // 0:蓝牌;1:黄牌;2:白牌;3:黑牌;4:绿色 colorList: [ @@ -341,6 +348,8 @@ export default { codeType: '', historyList:[], encryptTime:'', // 加密后的时间 + alertmsg:'', + alertFlag:false } }, created() { @@ -362,6 +371,7 @@ export default { // return code; // } // } + this.getEncryptTime() }, methods: { @@ -482,7 +492,19 @@ export default { localStorage.setItem('historyArr',JSON.stringify(this.historyList)) } - this.getEncryptTime() + + this.$router.push({ + path: 'coupon', + query: { + carNumber: plateLicense, + carNumberColor: this.currentColor, + carType: 2, + codeType: this.codeType, + cardRelParkNo: this.$route.query.cardRelParkNo, + key: this.$route.query.key, + encryptTime: this.encryptTime + } + }) }, getEncryptTime() { let url = process.env.VUE_APP_API; @@ -510,20 +532,21 @@ export default { if (response.code == 0) { this.encryptTime = response.data.encryptTime - this.$router.push({ - path: 'coupon', - query: { - carNumber: plateLicense, - carNumberColor: this.currentColor, - carType: 2, - codeType: this.codeType, - cardRelParkNo: this.$route.query.cardRelParkNo, - key: this.$route.query.key, - encryptTime: this.encryptTime - } - }) + this.alertFlag = true + + + } else { - alert(response.message) + // this.$msgbox({ + // title: '提示', + // message: response.message, + // // showCancelButton: false, + // closeOnClickModal:false, + // showConfirmButton:false + // }); + // this.alertFlag = true + this.alertmsg = response.message + // this.$refs.alert.open() } }) @@ -539,7 +562,8 @@ export default { carType: 2, codeType: this.codeType, cardRelParkNo: this.$route.query.cardRelParkNo, - key: this.$route.query.key + key: this.$route.query.key, + encryptTime : this.encryptTime } }) }, @@ -974,4 +998,7 @@ export default { >>> .mint-cell:last-child{ background-image:none; } +/*>>> .mint-msgbox{*/ + /*display: none;*/ +/*}*/