Przeglądaj źródła

feat: 新增惠融钱包跳转公众号文章

await 2 miesięcy temu
rodzic
commit
babe3bdade
1 zmienionych plików z 46 dodań i 13 usunięć
  1. 46 13
      src/app.tsx

+ 46 - 13
src/app.tsx

@@ -36,27 +36,60 @@ const App = (props: PropsWithChildren<IAppProps>) => {
     return UserHelper.cacheTabMenu();
   });
   useDidShow((options: any) => {
-    console.log('11111111111111111111111', options)
-    if (options.query?.source === "app" && options.query?.platform) {
-      let jumpUrls = "";
 
-      switch (options.query?.platform) {
-        case "cyqb":
-          jumpUrls = "https://mp.weixin.qq.com/s/TBP2VhzYRaMWf_CWbo5mBA";
+    console.log('This is Options', options)
+    
+    let jumpUrls = ""
+    if (options.query?.source) {
+      switch (options.query?.source) {
+        case "app": {
+          if (options.query?.platform) {
+            switch (options.query?.platform) {
+              case "cyqb":
+                jumpUrls = "https://mp.weixin.qq.com/s/TBP2VhzYRaMWf_CWbo5mBA";
+                break;
+              case "hrqb":
+                jumpUrls = "https://mp.weixin.qq.com/s/JJrWlgaA1lvIBAp7eNZjxg";
+                break;
+              default:
+                // 默认惠融钱包的文章
+                jumpUrls = "https://mp.weixin.qq.com/s/JJrWlgaA1lvIBAp7eNZjxg";
+                break;
+            }
+          }
+          break
+        }
+        case "gxh": {
+          jumpUrls = 'https://mp.weixin.qq.com/s/RvsITI6t7_T-2UFC2pJvww'
           break;
-        case "hrqb":
-          jumpUrls = "https://mp.weixin.qq.com/s/JJrWlgaA1lvIBAp7eNZjxg";
-          break;
-        default:
-          // 默认惠融钱包的文章
-          jumpUrls = "https://mp.weixin.qq.com/s/JJrWlgaA1lvIBAp7eNZjxg";
+        }
+        case "wallet": {
+          jumpUrls = 'https://mp.weixin.qq.com/s/M-lkx1MTMRv2p7v-6ZFykg'
           break;
+        }
       }
-
       RouteUtil.toWebViewPage({
         url: jumpUrls,
       });
     }
+    // if (options.query?.source === "app" && options.query?.platform) {
+    //   let jumpUrls = "";
+
+    //   switch (options.query?.platform) {
+    //     case "cyqb":
+    //       jumpUrls = "https://mp.weixin.qq.com/s/TBP2VhzYRaMWf_CWbo5mBA";
+    //       break;
+    //     case "hrqb":
+    //       jumpUrls = "https://mp.weixin.qq.com/s/JJrWlgaA1lvIBAp7eNZjxg";
+    //       break;
+    //     default:
+    //       // 默认惠融钱包的文章
+    //       jumpUrls = "https://mp.weixin.qq.com/s/JJrWlgaA1lvIBAp7eNZjxg";
+    //       break;
+    //   }
+
+
+    // }
 
     if (StorageUtil.get(EStorage.channelCode)) {
       StorageUtil.remove(EStorage.channelCode);