Browse Source

oa微信端跳转修复

wangtao 6 days ago
parent
commit
48d0a37630

+ 2 - 2
src/pages/common/appMessage/index.vue

@@ -158,7 +158,6 @@ function noticeDelete(e) {
  * @api接口调用
  */
 function init(obj) {
-  console.log(obj)
   uni.setNavigationBarTitle({
     title: obj.typeName ? obj.typeName : "消息列表",
   });
@@ -166,8 +165,8 @@ function init(obj) {
   state.loading = true;
   if(obj.id){
     if(obj.type == 3){
-      console.log(4444)
       if(obj?.oaType){
+        state.loading = false;
         proxy.$common.toPage(2,obj.oaType)
       }
     }else{
@@ -179,6 +178,7 @@ function init(obj) {
       })
         .then((requset) => {
           goContentDetails(requset.data.records[0]);
+          state.loading = false;
         })
         .catch((err) => {
           state.loading = false;

+ 1 - 1
src/pages/common/webview/index.vue

@@ -49,7 +49,7 @@ const { params, webviewStyles } = toRefs(state);
 
 onLoad((event) => {
   params.value = event;
-  if(params._object.params.url.indexOf('login?token=') > 0){
+  if(params._object.params.url.indexOf('login?token=') > 0 ){
     var name = '智慧办公系统(U8)'
     wx.setNavigationBarTitle({
       title: name

+ 5 - 8
src/plugins/common.plugins.js

@@ -323,7 +323,6 @@ export default {
     var name = uni.getStorageSync("storage_data").name
     let form = "https://manager.usky.cn/mobile/#/"
     let path = "https://oa.usky.cn/mobile/#/login?token"
-    console.log("跳转页面",type,to,item,name)
     if(name){
       var params = { 
           user:name,
@@ -333,10 +332,10 @@ export default {
       var jm = encrypt(JSON.stringify(params))
       //#ifdef H5 
         if(type == "1"){
-          window.open(`${item.path}=${encodeURIComponent(jm)}?form=${form}`)
+          window.open(`${item.path}=${encodeURIComponent(jm)}?form=${form}`,"_blank")
         }
         if(type == "2"){
-          window.open(`${path}=${encodeURIComponent(jm)}?form=${form}?toPage=${to}`)
+          window.open(`${path}=${encodeURIComponent(jm)}?form=${form}&toPage=${to}`,"_blank")
         }
       //#endif
       //#ifdef APP-PLUS || MP-WEIXIN 
@@ -352,11 +351,9 @@ export default {
         }
       //#endif
     }else{
-      if(item){
-        uni.navigateTo({
-          url: "/pages/common/webview/index?url=" + item.path,
-        });
-      }
+      uni.navigateTo({
+        url: "/pages/",
+      });
     }
   },