Commit 219993a9 authored by 胡's avatar

fix: ios上InAppBrowser状态刷新问题

parent 836d5e68
......@@ -11,5 +11,5 @@ module.exports = {
ocrPath:'"http://180.104.121.66:8088/r/api"',
fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_UAT&apiName="',
appId: '"com.xcmg.app.dev"',
currentVersion: '"0.5.6"'
currentVersion: '"0.5.8"'
}
......@@ -49,11 +49,17 @@ export default {
checkList: [], // 需要进行签署的合同
faceListUpload: [],
eventListener: null, // 事件监听
}
},
created() {
this.checkSigned();
},
beforeDestroy() {
// 去除事件监听(ios独有)
if (this.eventListener) this.eventListener.removeEventListener('exit');
},
methods: {
// 检测已经签署的合同,进行过滤
async checkSigned() {
......@@ -140,11 +146,11 @@ export default {
this.hlsPopup.hideLoading()
if (res.result == 'S' && res.info.msg === 'success') {
// this.$router.push({
// name: 'ElectronicSign',
// params: { url: res.info.data.url },
// })
cordova.InAppBrowser.open(res.info.data.url, '_blank', 'location=yes')
// 监听 InAppBrowser 关闭
this.eventListener = cordova.InAppBrowser.open(res.info.data.url, '_blank', 'location=yes');
this.eventListener.addEventListener('exit', () => {
this.checkSigned();
});
} else {
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