Commit 7528d5a2b17790148b520f34a22664797ec460c5

Authored by liuqimichale
1 parent 6351d1dc

员工号

src/components/orderPay.vue
... ... @@ -23,7 +23,7 @@
23 23 </ul>
24 24  
25 25 <p style="margin-top: 20px;padding-left: 15px;">停车引导员工号(非必填)</p>
26   - <mt-field style="font-size: 14px;color: #333;" label="" placeholder="请输入员工号" type="number" v-model="tollNumber"></mt-field>
  26 + <mt-field style="font-size: 14px;color: #333;" label="" placeholder="请输入员工号" type="number" v-model="tollNumber" :attr="{ oninput: 'if(value.length>7)value=value.slice(0,7)' }" ></mt-field>
27 27  
28 28 <div style="padding: 20px 18px">
29 29 <div class="toPay" @click="toPay">{{clientBrowser}}支付</div>
... ... @@ -123,23 +123,41 @@ export default {
123 123 }
124 124  
125 125 if (this.clientBrowser == '支付宝') { // 支付宝支付
  126 + let me = this
126 127 var aliParams = {};
127 128 aliParams.orderId = this.orderId;
128 129 aliParams.carNumber = this.carNumber;
129 130 aliParams.payType = 1;// 1:支付宝 2:微信 3:银联 10:H5 4微信公众号
130 131 aliParams.terminalSource = 7;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付
131 132 aliParams.paySrcType = this.paySrcType;//101停车支付
132   - aliParams.orgId = this.$utils.myOrgId,
133   - aliParams.backType = 2,
134   - aliParams.backDeveloperCode = this.tollNumber,
  133 + aliParams.orgId = this.$utils.myOrgId
  134 + aliParams.backType = 2
  135 + aliParams.backDeveloperCode = this.tollNumber
135 136 aliParams.recordArreaInfos = JSON.stringify(this.orderId);
136 137 console.log(aliParams)
137 138 aliPay(aliParams).then(response => {
138 139 console.log(response)
139 140 if (response.code == 0) {//进场
140 141 document.write(response.data);//打开支付表单
141   - } else {//其他情况如【该卡号场内已存在】
  142 + } else if(response.code == 1002){//其他情况如【该卡号场内已存在】
142 143 console.log(response.message);
  144 + MessageBox.confirm('', {
  145 + message: response.message,
  146 + title: '温馨提示',
  147 + showCancelButton:false,
  148 + confirmButtonText: '确定',
  149 + }).then(action => {
  150 + if (action == 'confirm') { //确认的回调
  151 + console.log('确定');
  152 + this.$router.go(-1)
  153 + }
  154 + }).catch(err => {
  155 + if (err == 'cancel') { //取消的回调
  156 + console.log('取消');
  157 + }
  158 + });
  159 + }else{
  160 + alert(response.message)
143 161 }
144 162  
145 163 })
... ... @@ -153,9 +171,10 @@ export default {
153 171 bankabcParams.payType = 34;// 1:支付宝 2:微信 3:银联 10:H5 4微信公众号 34 农行
154 172 bankabcParams.terminalSource = 7;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付
155 173 bankabcParams.paySrcType = this.paySrcType;//101停车支付
156   - bankabcParams.orgId = this.$utils.myOrgId,
157   - bankabcParams.backType = 2,
  174 + bankabcParams.orgId = this.$utils.myOrgId
  175 + bankabcParams.backType = 2
158 176 bankabcParams.PaymentLinkType = 1
  177 + bankabcParams.backDeveloperCode = this.tollNumber
159 178 bankabcParams.recordArreaInfos = JSON.stringify(this.orderId);
160 179 console.log(bankabcParams)
161 180 bankH5Pay(bankabcParams).then(response => {
... ... @@ -190,6 +209,23 @@ export default {
190 209 window.location.href = 'https://www.abchina.com/luascript/mobilePayLua/'+ encodeURI('{"return":{"tokenID":"'+_token+'","backURL":"https://wxgzh.renniting.cn/wechatwuxi/Chifeng/TEST/sweeping_payment/codepay/index.html#/payResult","payType":""}}');
191 210  
192 211 }
  212 + }else if(response.code == 1002){//其他情况如【该卡号场内已存在】
  213 + console.log(response.message);
  214 + MessageBox.confirm('', {
  215 + message: response.message,
  216 + title: '温馨提示',
  217 + showCancelButton:false,
  218 + confirmButtonText: '确定',
  219 + }).then(action => {
  220 + if (action == 'confirm') { //确认的回调
  221 + console.log('确定');
  222 + this.$router.go(-1)
  223 + }
  224 + }).catch(err => {
  225 + if (err == 'cancel') { //取消的回调
  226 + console.log('取消');
  227 + }
  228 + });
193 229 }else{
194 230 alert('支付失败')
195 231 }
... ... @@ -250,6 +286,7 @@ export default {
250 286 wxParams.paySrcType = this.paySrcType;//101停车支付
251 287 wxParams.recordArreaInfos = JSON.stringify(orderIdData);
252 288 wxParams.openId = openIdData;
  289 + wxParams.backDeveloperCode = this.tollNumber
253 290 wxParams.appId = this.$utils.myVxAppId;
254 291 vxPayQuery(wxParams).then(res => {
255 292 if (res.code == 0) { //
... ... @@ -270,9 +307,25 @@ export default {
270 307 } else {
271 308 alert("没有找到返回值");
272 309 }
273   - } else {
  310 + }else if(res.code == 1002){//其他情况如【该卡号场内已存在】
274 311 console.log(res.message);
275   - alert(res.message);
  312 + MessageBox.confirm('', {
  313 + message: res.message,
  314 + title: '温馨提示',
  315 + showCancelButton:false,
  316 + confirmButtonText: '确定',
  317 + }).then(action => {
  318 + if (action == 'confirm') { //确认的回调
  319 + console.log('确定');
  320 + this.$router.go(-1)
  321 + }
  322 + }).catch(err => {
  323 + if (err == 'cancel') { //取消的回调
  324 + console.log('取消');
  325 + }
  326 + });
  327 + }else{
  328 + alert(res.message)
276 329 }
277 330 })
278 331 },
... ...
src/utils/request.js
... ... @@ -5,15 +5,15 @@ import axios from &#39;axios&#39;
5 5 // axios.defaults.baseURL = process.env.API_ROOT
6 6 const service = axios.create({
7 7  
8   - // https://pay.service.renniting.cn/ 赤峰
9   - // http://pay.service.huangshiparking.com/ 黄石
  8 + // https://pay.renniting.cn/ 赤峰
  9 +
10 10  
11 11 // 'http://39.98.58.92:8090'; 赤峰测试环境
12 12  
13 13  
14 14 // https://dev.renniting.cn/pay/ 赤峰农行测试环境
15 15  
16   - baseURL: 'http://39.98.58.92:8090', // url = base url + request url
  16 + baseURL: 'https://pay.renniting.cn/', // url = base url + request url
17 17 // withCredentials: true, // send cookies when cross-domain requests
18 18 timeout: 10000 // request timeout
19 19 })
... ...
src/utils/utils.js
... ... @@ -122,7 +122,7 @@ export default {
122 122  
123 123 myDeviceInfo: 'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E', // 公共请求设备信息
124 124  
125   - myVxAppId: 'wxff4cebaedbf4f886',
  125 + myVxAppId: 'wx2af2bab90d433c86',
126 126 // 测试环境 微信赤峰 appid wxff4cebaedbf4f886
127 127 // 微信赤峰 appid wx2af2bab90d433c86
128 128 // 黄石 appid wxa1a66cc7d263afe6
... ...