Commit 219993a9 authored by 胡's avatar

fix: ios上InAppBrowser状态刷新问题

parent 836d5e68
...@@ -11,5 +11,5 @@ module.exports = { ...@@ -11,5 +11,5 @@ module.exports = {
ocrPath:'"http://180.104.121.66:8088/r/api"', ocrPath:'"http://180.104.121.66:8088/r/api"',
fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_UAT&apiName="', fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_UAT&apiName="',
appId: '"com.xcmg.app.dev"', appId: '"com.xcmg.app.dev"',
currentVersion: '"0.5.6"' currentVersion: '"0.5.8"'
} }
...@@ -49,11 +49,17 @@ export default { ...@@ -49,11 +49,17 @@ export default {
checkList: [], // 需要进行签署的合同 checkList: [], // 需要进行签署的合同
faceListUpload: [], faceListUpload: [],
eventListener: null, // 事件监听
} }
}, },
created() { created() {
this.checkSigned(); this.checkSigned();
}, },
beforeDestroy() {
// 去除事件监听(ios独有)
if (this.eventListener) this.eventListener.removeEventListener('exit');
},
methods: { methods: {
// 检测已经签署的合同,进行过滤 // 检测已经签署的合同,进行过滤
async checkSigned() { async checkSigned() {
...@@ -140,11 +146,11 @@ export default { ...@@ -140,11 +146,11 @@ export default {
this.hlsPopup.hideLoading() this.hlsPopup.hideLoading()
if (res.result == 'S' && res.info.msg === 'success') { if (res.result == 'S' && res.info.msg === 'success') {
// this.$router.push({ // 监听 InAppBrowser 关闭
// name: 'ElectronicSign', this.eventListener = cordova.InAppBrowser.open(res.info.data.url, '_blank', 'location=yes');
// params: { url: res.info.data.url }, this.eventListener.addEventListener('exit', () => {
// }) this.checkSigned();
cordova.InAppBrowser.open(res.info.data.url, '_blank', 'location=yes') });
} else { } else {
hlsPopup.showLongCenter(res.message || res.info.msg) hlsPopup.showLongCenter(res.message || res.info.msg)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment