Commit 94a4ee91f90338b9b2f77f5199d8bf51feb28b25

Authored by 刘淇
1 parent 2dcc276a

宣化 聚合支付

config/index.js
... ... @@ -8,7 +8,7 @@ module.exports = {
8 8 dev: {
9 9  
10 10 // Paths
11   - assetsSubDirectory: 'static',
  11 + assetsSubDirectory: 'ceshi',
12 12 assetsPublicPath: '/',
13 13 // proxyTable: {
14 14 // '/api':{
... ... @@ -47,11 +47,11 @@ module.exports = {
47 47  
48 48 build: {
49 49 // Template for index.html
50   - index: path.resolve(__dirname, '../dist/index.html'),
  50 + index: path.resolve(__dirname, '../ceshi/ceshi.html'),
51 51  
52 52 // Paths
53   - assetsRoot: path.resolve(__dirname, '../dist'),
54   - assetsSubDirectory: 'static',
  53 + assetsRoot: path.resolve(__dirname, '../ceshi'),
  54 + assetsSubDirectory: 'ceshi',
55 55 assetsPublicPath: './',
56 56  
57 57 /**
... ...
src/router/index.js
... ... @@ -9,7 +9,7 @@ export default new Router({
9 9 {
10 10 path: "/",
11 11 redirect: {
12   - name: "plateNumber"
  12 + name: "selfNav"
13 13 }
14 14 },
15 15 // {
... ...
src/utils/filters.js
... ... @@ -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 42 const numFilter = function(value) {
23 43 // 截取当前数据到小数点后两位
24 44 let realVal = (Number(value) / 100).toFixed(2);
... ... @@ -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 117 myVxAppId: "wx1489e48e6a547023",
118 118 userToken:localStorage.getItem('userToken'),
119 119 userPhoneNum:localStorage.getItem('userPhoneNum'),
120   - openId: "oWw3o5rY_bFsiT_nFd2CEQWGZfhs",
  120 + // openId: "oWw3o5rY_bFsiT_nFd2CEQWGZfhs",
  121 +
  122 + openId:localStorage.getItem('openId'),
121 123 myOrgId: "10120", // 归属地 赤峰id 10003 黄石 10079
122 124  
123 125  
... ... @@ -129,8 +131,8 @@ export default {
129 131 jsonObj.app_id = "lrpo55tmveqe07w3gpovzgx34pdez7eh";
130 132 jsonObj.deviceInfo = "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E";
131 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 137 let sort = [];
136 138 for (let k in jsonObj) {
... ...
src/views/binding/binDing.vue
... ... @@ -29,7 +29,7 @@ export default {
29 29 },
30 30 created() {
31 31 this.timeNum = this.timeText;
32   - // this.webAppCode = this.getWxCode(); // 正式打开注释
  32 + this.webAppCode = this.getWxCode(); // 正式打开注释
33 33 },
34 34 methods: {
35 35 getWxCode() {
... ... @@ -87,35 +87,36 @@ export default {
87 87 },
88 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 110 let jsondata = {
110 111 phoneNum: this.phone,
111 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 116 jsondata.sign = this.$utils.signObject(jsondata);
116 117 bindCustByOpenId(jsondata).then(response => {
117 118 if(response.code=='0'){
118   - this.getTokenByOpenId() // 获取token和用户手机号
  119 + this.getTokenByOpenId(openId) // 获取token和用户手机号
119 120  
120 121 }else if(response.code=='1017'||response.code==1017){
121 122 this.$toast("已经绑定过");
... ... @@ -124,10 +125,10 @@ export default {
124 125 }
125 126 });
126 127 },
127   - getTokenByOpenId(){ // 获取token和用户手机号
  128 + getTokenByOpenId(openId){ // 获取token和用户手机号
128 129 let jsondata = {
129   - // openid: this.$utils.openId // 正式打开注释
130   - openid:'oWw3o5rY_bFsiT_nFd2CEQWGZfhs' // 正式注释
  130 + openid:openId // 正式打开注释
  131 + // openid:'oWw3o5rY_bFsiT_nFd2CEQWGZfhs' // 正式注释
131 132 };
132 133 jsondata.sign = this.$utils.signObject(jsondata);
133 134 getTokenByOpenId(jsondata).then(response => {
... ...
src/views/cards/buyVipCard.vue
... ... @@ -228,7 +228,7 @@ export default {
228 228 this.carList = response.data;
229 229 if (this.carList.length == 0) {
230 230 this.carNum = "点击选择车牌";
231   - this.carList = {
  231 + this.actions = {
232 232 name: "前往绑定车牌页面"
233 233 };
234 234 } else if (this.carList.length == 3) {
... ...
src/views/mySelf/selfNav.vue
... ... @@ -61,14 +61,17 @@ export default {
61 61 phoneNum: ""//手机号
62 62 };
63 63 },
  64 +
  65 + created() {
  66 +
  67 + },
64 68 mounted() {
65 69 // this.openId = this.$utils.openId;
66 70 // if (this.openId) {
67 71 // this.getTokenAndphoneNum();
68 72 // }
69 73 // console.log(this.openId);
70   - },
71   - created() {
  74 +
72 75 this.phoneNum = this.$utils.userPhoneNum
73 76 console.log(this.$utils.userPhoneNum)
74 77 },
... ...
src/views/parkPay/orderPay.vue
... ... @@ -72,6 +72,7 @@ export default {
72 72 },
73 73 created() {
74 74 this.carWrapBG = this.$route.query.carColor //车牌颜色
  75 + console.log(this.carWrapBG)
75 76 this.carNumber = this.$route.query.carNumber
76 77 this.arrearageTotalFee = this.$route.query.arrearageTotalFee // 应收
77 78 this.arrearageDiscFee = this.$route.query.arrearageDiscFee // 优惠
... ...