From c5879e4376629e1a58ba2fec77fe94d39976c14a Mon Sep 17 00:00:00 2001 From: Pang Date: Sat, 16 Dec 2023 22:58:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=87=E4=BB=B6=E9=A1=B5=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E6=BB=91=E5=8A=A8=E8=BF=94=E5=9B=9E=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/js/components/Mobile/Back.vue | 43 +++++++++++-------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/resources/assets/js/components/Mobile/Back.vue b/resources/assets/js/components/Mobile/Back.vue index 57affea68..5422cdca7 100644 --- a/resources/assets/js/components/Mobile/Back.vue +++ b/resources/assets/js/components/Mobile/Back.vue @@ -133,15 +133,18 @@ export default { } // 微应用 let microAppIsVisible = false; - microApp.setGlobalData({ type:'modalVisible', callback: (appName, isVisible) => { - if(isVisible){ - microAppIsVisible = true; + microApp.setGlobalData({ + type: 'modalVisible', + callback: (appName, isVisible) => { + if (isVisible) { + microAppIsVisible = true; + } } - }}) - if(microAppIsVisible){ + }) + if (microAppIsVisible) { return true; } - // + // return false; }, @@ -149,32 +152,36 @@ export default { // 微应用通知 let microAppIsAccept = false; microApp.setGlobalData({ - type:'route', + type: 'route', action: 'back', route: this.$route, callback: (appName, isAccept) => { - if(isAccept){ + if (isAccept) { microAppIsAccept = true; } } }) - if(microAppIsAccept){ + if (microAppIsAccept) { return; } - // + // if (this.$Modal.removeLast()) { return; } - if (this.fileFolderId > 0) { - const file = this.fileLists.find(({id, permission}) => id == this.fileFolderId && permission > -1) - if (file) { - const prevFile = this.fileLists.find(({id, permission}) => id == file.pid && permission > -1) - if (prevFile) { - this.goForward({name: 'manage-file', params: {folderId: prevFile.id, fileId: null}}); - return; + if (this.routeName === 'manage-file') { + if (this.fileFolderId > 0) { + const file = this.fileLists.find(({id, permission}) => id == this.fileFolderId && permission > -1) + if (file) { + const prevFile = this.fileLists.find(({id, permission}) => id == file.pid && permission > -1) + if (prevFile) { + this.goForward({name: 'manage-file', params: {folderId: prevFile.id, fileId: null}}); + return; + } } + this.goForward({name: 'manage-file'}); + return; } - this.goForward({name: 'manage-file'}); + this.goForward({name: 'manage-application'}, true); return; } if (this.routeName === 'manage-messenger') {