Browse Source

处理不同环境下问卷网页域名;微信中填写完问卷后直接打开设备文档列表页

任一存 2 years ago
parent
commit
8a2d309c77
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/views/HomeMobile.vue

+ 9 - 1
src/views/HomeMobile.vue

@@ -174,6 +174,7 @@
 import Swiper from 'swiper/swiper-bundle.esm.js'
 import Swiper from 'swiper/swiper-bundle.esm.js'
 import 'swiper/swiper-bundle.css'
 import 'swiper/swiper-bundle.css'
 import { deepProcess } from "@/utils/other.js"
 import { deepProcess } from "@/utils/other.js"
+import browser from '@/utils/browser'
 
 
 export default {
 export default {
   data() {
   data() {
@@ -257,6 +258,14 @@ export default {
         // }
         // }
       })
       })
     })
     })
+
+    if (browser.weixin) {
+      const isFormJustSubmitted = localStorage.getItem("HDB_WJ_JUST_SUBMITTED")
+      if (isFormJustSubmitted) {
+        localStorage.removeItem('HDB_WJ_JUST_SUBMITTED')
+        this.showDeviceList()
+      }
+    }
   },
   },
   beforeDestroy() {
   beforeDestroy() {
     window.removeEventListener('storage', this.onStorageChange, {
     window.removeEventListener('storage', this.onStorageChange, {
@@ -309,7 +318,6 @@ export default {
     },
     },
     onClickDownload() {
     onClickDownload() {
       const haiDeBaoWenJuanRecord = localStorage.getItem('HDB_WJ')
       const haiDeBaoWenJuanRecord = localStorage.getItem('HDB_WJ')
-      console.log(haiDeBaoWenJuanRecord)
       if (haiDeBaoWenJuanRecord) {
       if (haiDeBaoWenJuanRecord) {
         this.showDeviceList()
         this.showDeviceList()
       } else {
       } else {