瀏覽代碼

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

任一存 2 年之前
父節點
當前提交
8a2d309c77
共有 1 個文件被更改,包括 9 次插入1 次删除
  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/swiper-bundle.css'
 import { deepProcess } from "@/utils/other.js"
+import browser from '@/utils/browser'
 
 export default {
   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() {
     window.removeEventListener('storage', this.onStorageChange, {
@@ -309,7 +318,6 @@ export default {
     },
     onClickDownload() {
       const haiDeBaoWenJuanRecord = localStorage.getItem('HDB_WJ')
-      console.log(haiDeBaoWenJuanRecord)
       if (haiDeBaoWenJuanRecord) {
         this.showDeviceList()
       } else {