ソースを参照

Merge branch 'wangtao-daily' of uskycloud/usky-web-mobile into master

gez 1 週間 前
コミット
9d28f6d210
1 ファイル変更10 行追加5 行削除
  1. 10 5
      src/pages/index.vue

+ 10 - 5
src/pages/index.vue

@@ -277,17 +277,22 @@ function navItemClick(item) {
 
     if (item.path.indexOf("http") != -1) {
       if(item.path.indexOf("token") > 0){
-        var name = JSON.parse(localStorage.getItem("storage_data"))?.data?.name
+        var name = uni.getStorageSync("storage_data").name
         if(name){
-          var params = {
+          var params = { 
               user:name,
               time:new Date().getTime(),
               form:"SAAS_mob"
           }
           var jm = encrypt(JSON.stringify(params))
-          uni.navigateTo({
-            url: `/pages/common/webview/index?url=${item.path}=${encodeURIComponent(jm)}&urlF=https://manager.usky.cn/mobile/#/`,
-          });
+          //#ifdef H5 
+            window.open(`${item.path}=${encodeURIComponent(jm)}?urlF=https://manager.usky.cn/mobile/#/`)
+          //#endif
+          //#ifdef APP-PLUS || MP-WEIXIN 
+            uni.navigateTo({
+              url: `/pages/common/webview/index?url=${item.path}=${encodeURIComponent(jm)}?urlF=https://manager.usky.cn/mobile/#/`,
+            });
+          //#endif
         }else{
           uni.navigateTo({
             url: "/pages/common/webview/index?url=" + item.path,