li.shaoyi 2 år sedan
förälder
incheckning
b70f520ef4

+ 1 - 1
public/config/appconfig.json

@@ -2,6 +2,6 @@
   "appName": "多元世纪交易中心",
   "version": "1.0.1",
   "versionCode": "100001",
-  "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204",
+  "apiUrl": "http://103.40.249.126:18280/cfg?key=mtp_20",
   "shwoRegister": true
 }

+ 6 - 4
src/packages/gstj/views/home/Index.vue

@@ -25,7 +25,7 @@ import plus from '@/utils/h5plus'
 import AppTabbar from '@mobile/components/base/tabbar/index.vue'
 import RouterTransition from '@mobile/components/base/router-transition/index.vue'
 
-const { route, routerTo, getGlobalUrlParams } = useNavigation()
+const { route, routerTo, getGlobalUrlParams, setGlobalUrlParams } = useNavigation()
 const { userLogin } = useLogin()
 const loginStore = useLoginStore()
 const cssTransition = shallowRef(true) // 是否使用css动画
@@ -157,10 +157,12 @@ watch(() => route.name, () => {
   } else if (tabIndex.value > -1) {
     onTabClick(tabIndex.value)
   } else {
-    nextTick(() => {
-      cssTransition.value = true
-    })
+    // 如果参数不是 tabIndex,需要保留到下一个路由
+    setGlobalUrlParams(params)
   }
+  nextTick(() => {
+    cssTransition.value = true
+  })
 })
 </script>
 

+ 2 - 1
src/packages/mobile/router/navigation.ts

@@ -27,8 +27,9 @@ export function useNavigation() {
         }
     }
 
-    // 获取参数字符串
+    // 获取参数字符串----废弃待优化
     const getParamString = (name: string) => {
+        // https://github.com/vuejs/router/releases/tag/v4.1.0
         return route.params[name] ?? ''
     }
 

+ 6 - 4
src/packages/qdhs/views/home/Index.vue

@@ -25,7 +25,7 @@ import plus from '@/utils/h5plus'
 import AppTabbar from '@mobile/components/base/tabbar/index.vue'
 import RouterTransition from '@mobile/components/base/router-transition/index.vue'
 
-const { route, routerTo, getGlobalUrlParams } = useNavigation()
+const { route, routerTo, getGlobalUrlParams, setGlobalUrlParams } = useNavigation()
 const { userLogin } = useLogin()
 const loginStore = useLoginStore()
 const cssTransition = shallowRef(true) // 是否使用css动画
@@ -151,10 +151,12 @@ watch(() => route.name, () => {
   } else if (tabIndex.value > -1) {
     onTabClick(tabIndex.value)
   } else {
-    nextTick(() => {
-      cssTransition.value = true
-    })
+    // 如果参数不是 tabIndex,需要保留到下一个路由
+    setGlobalUrlParams(params)
   }
+  nextTick(() => {
+    cssTransition.value = true
+  })
 })
 </script>
 

+ 6 - 4
src/packages/qxst/views/home/Index.vue

@@ -25,7 +25,7 @@ import plus from '@/utils/h5plus'
 import AppTabbar from '@mobile/components/base/tabbar/index.vue'
 import RouterTransition from '@mobile/components/base/router-transition/index.vue'
 
-const { route, routerTo, getGlobalUrlParams } = useNavigation()
+const { route, routerTo, getGlobalUrlParams, setGlobalUrlParams } = useNavigation()
 const { userLogin } = useLogin()
 const loginStore = useLoginStore()
 const cssTransition = shallowRef(true) // 是否使用css动画
@@ -145,10 +145,12 @@ watch(() => route.name, () => {
   } else if (tabIndex.value > -1) {
     onTabClick(tabIndex.value)
   } else {
-    nextTick(() => {
-      cssTransition.value = true
-    })
+    // 如果参数不是 tabIndex,需要保留到下一个路由
+    setGlobalUrlParams(params)
   }
+  nextTick(() => {
+    cssTransition.value = true
+  })
 })
 </script>
 

+ 6 - 4
src/packages/sbyj/views/home/index.vue

@@ -24,7 +24,7 @@ import plus from '@/utils/h5plus'
 import AppTabbar from '@mobile/components/base/tabbar/index.vue'
 import RouterTransition from '@mobile/components/base/router-transition/index.vue'
 
-const { route, routerTo, getGlobalUrlParams } = useNavigation()
+const { route, routerTo, getGlobalUrlParams, setGlobalUrlParams } = useNavigation()
 const { userLogin } = useLogin()
 const loginStore = useLoginStore()
 const cssTransition = shallowRef(true) // 是否使用css动画
@@ -165,10 +165,12 @@ watch(() => route.name, () => {
   } else if (tabIndex.value > -1) {
     onTabClick(tabIndex.value)
   } else {
-    nextTick(() => {
-      cssTransition.value = true
-    })
+    // 如果参数不是 tabIndex,需要保留到下一个路由
+    setGlobalUrlParams(params)
   }
+  nextTick(() => {
+    cssTransition.value = true
+  })
 })
 </script>
 

+ 6 - 4
src/packages/tc/views/home/Index.vue

@@ -25,7 +25,7 @@ import plus from '@/utils/h5plus'
 import AppTabbar from '@mobile/components/base/tabbar/index.vue'
 import RouterTransition from '@mobile/components/base/router-transition/index.vue'
 
-const { route, routerTo, getGlobalUrlParams } = useNavigation()
+const { route, routerTo, getGlobalUrlParams, setGlobalUrlParams } = useNavigation()
 const { userLogin } = useLogin()
 const loginStore = useLoginStore()
 const cssTransition = shallowRef(true) // 是否使用css动画
@@ -157,10 +157,12 @@ watch(() => route.name, () => {
   } else if (tabIndex.value > -1) {
     onTabClick(tabIndex.value)
   } else {
-    nextTick(() => {
-      cssTransition.value = true
-    })
+    // 如果参数不是 tabIndex,需要保留到下一个路由
+    setGlobalUrlParams(params)
   }
+  nextTick(() => {
+    cssTransition.value = true
+  })
 })
 </script>
 

+ 6 - 4
src/packages/zrwyt/views/home/Index.vue

@@ -25,7 +25,7 @@ import plus from '@/utils/h5plus'
 import AppTabbar from '@mobile/components/base/tabbar/index.vue'
 import RouterTransition from '@mobile/components/base/router-transition/index.vue'
 
-const { route, routerTo, getGlobalUrlParams } = useNavigation()
+const { route, routerTo, getGlobalUrlParams, setGlobalUrlParams } = useNavigation()
 const { userLogin } = useLogin()
 const loginStore = useLoginStore()
 const cssTransition = shallowRef(true) // 是否使用css动画
@@ -157,10 +157,12 @@ watch(() => route.name, () => {
   } else if (tabIndex.value > -1) {
     onTabClick(tabIndex.value)
   } else {
-    nextTick(() => {
-      cssTransition.value = true
-    })
+    // 如果参数不是 tabIndex,需要保留到下一个路由
+    setGlobalUrlParams(params)
   }
+  nextTick(() => {
+    cssTransition.value = true
+  })
 })
 </script>