Commit 16b4c5c8d2adaf8432e5882b8a1515ff724b8c32
1 parent
fd467c34
Exists in
master
chore: 支付
Showing
1 changed file
with
8 additions
and
12 deletions
Show diff stats
src/views/Service/CheckOrder.vue
@@ -194,6 +194,7 @@ export default { | @@ -194,6 +194,7 @@ export default { | ||
194 | const Jupiter = sUserAgent.indexOf("Jupiter") > -1 | 194 | const Jupiter = sUserAgent.indexOf("Jupiter") > -1 |
195 | if (Jupiter) { | 195 | if (Jupiter) { |
196 | alert('App') | 196 | alert('App') |
197 | + console.log('App') | ||
197 | this.mgop({ | 198 | this.mgop({ |
198 | api: 'mgop.sz.hswsy.appPay', // 必须 | 199 | api: 'mgop.sz.hswsy.appPay', // 必须 |
199 | host: 'https://mapi.zjzwfw.gov.cn/', | 200 | host: 'https://mapi.zjzwfw.gov.cn/', |
@@ -214,7 +215,7 @@ export default { | @@ -214,7 +215,7 @@ export default { | ||
214 | "productId": "11", | 215 | "productId": "11", |
215 | "quit_url": "https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=hswsy&goto=", | 216 | "quit_url": "https://puser.zjzwfw.gov.cn/sso/mobile.do?action=oauth&scope=1&servicecode=hswsy&goto=", |
216 | "subject": "string", | 217 | "subject": "string", |
217 | - "totalFee": "0.01", | 218 | + "totalFee": "0.01", |
218 | }, | 219 | }, |
219 | onSuccess: res => { | 220 | onSuccess: res => { |
220 | console.log(res) | 221 | console.log(res) |
@@ -226,6 +227,7 @@ export default { | @@ -226,6 +227,7 @@ export default { | ||
226 | }); | 227 | }); |
227 | } else { | 228 | } else { |
228 | alert('H5') | 229 | alert('H5') |
230 | + console.log('h5') | ||
229 | this.mgop({ | 231 | this.mgop({ |
230 | api: 'mgop.sz.hswsy.mobilePay', // 必须 | 232 | api: 'mgop.sz.hswsy.mobilePay', // 必须 |
231 | host: 'https://mapi.zjzwfw.gov.cn/', | 233 | host: 'https://mapi.zjzwfw.gov.cn/', |
@@ -250,7 +252,11 @@ export default { | @@ -250,7 +252,11 @@ export default { | ||
250 | }, | 252 | }, |
251 | onSuccess: res => { | 253 | onSuccess: res => { |
252 | console.log(res) | 254 | console.log(res) |
253 | - this.BridgePay(res.data.message) | 255 | + // res.data.data默认是我们拿到的form代码 |
256 | + const div = document.createElement('div') | ||
257 | + div.innerHTML = res.data.message | ||
258 | + document.body.appendChild(div) | ||
259 | + document.forms[0].submit() //重要,这个才是点击跳页面的核心 | ||
254 | }, | 260 | }, |
255 | onFail: err => { | 261 | onFail: err => { |
256 | console.log('err', err) | 262 | console.log('err', err) |
@@ -267,16 +273,6 @@ export default { | @@ -267,16 +273,6 @@ export default { | ||
267 | "inSandBox": false | 273 | "inSandBox": false |
268 | } | 274 | } |
269 | }; | 275 | }; |
270 | - ZWJSBridge.pay(payMsg).then((result) => { | ||
271 | - | ||
272 | - alert('支付成功!'); | ||
273 | - console.log('#### ZWJSBridge.pay() result:' + result); | ||
274 | - | ||
275 | - }).catch((error) => { | ||
276 | - var errorMsg = JSON.stringify(error); | ||
277 | - alert('支付失败:' + errorMsg); | ||
278 | - console.log('#### ZWJSBridge.pay() error:' + error); | ||
279 | - }); | ||
280 | } | 276 | } |
281 | } | 277 | } |
282 | } | 278 | } |