sunlupeng 1 tahun lalu
induk
melakukan
7c5c687614
15 mengubah file dengan 25 tambahan dan 15 penghapusan
  1. 2 2
      main.js
  2. TEMPAT SAMPAH
      static/images/oa/baoxiao.png
  3. TEMPAT SAMPAH
      static/images/oa/caigou.png
  4. TEMPAT SAMPAH
      static/images/oa/chuchai.png
  5. TEMPAT SAMPAH
      static/images/oa/lingyong.png
  6. TEMPAT SAMPAH
      static/images/oa/lizhi.png
  7. TEMPAT SAMPAH
      static/images/oa/qingjia.png
  8. TEMPAT SAMPAH
      static/images/oa/ruzhi.png
  9. TEMPAT SAMPAH
      static/images/oa/tongyong.png
  10. TEMPAT SAMPAH
      static/images/oa/waichu.png
  11. TEMPAT SAMPAH
      static/images/oa/xuqian.png
  12. TEMPAT SAMPAH
      static/images/oa/yongyin.png
  13. TEMPAT SAMPAH
      static/images/oa/zhuanzheng.png
  14. 12 7
      utils/request.js
  15. 11 6
      utils/upload.js

+ 2 - 2
main.js

@@ -4,8 +4,8 @@ import store from './store' // store
 import plugins from './plugins' // plugins
 import './permission' // permission
 import { parseTime,handleTree,getFileType } from "@/utils/ruoyi";
-// import VConsole from "vconsole";
-// const vConsole = new VConsole();
+import VConsole from "vconsole";
+const vConsole = new VConsole();
 Vue.use(plugins)
 
 Vue.config.productionTip = false

TEMPAT SAMPAH
static/images/oa/baoxiao.png


TEMPAT SAMPAH
static/images/oa/caigou.png


TEMPAT SAMPAH
static/images/oa/chuchai.png


TEMPAT SAMPAH
static/images/oa/lingyong.png


TEMPAT SAMPAH
static/images/oa/lizhi.png


TEMPAT SAMPAH
static/images/oa/qingjia.png


TEMPAT SAMPAH
static/images/oa/ruzhi.png


TEMPAT SAMPAH
static/images/oa/tongyong.png


TEMPAT SAMPAH
static/images/oa/waichu.png


TEMPAT SAMPAH
static/images/oa/xuqian.png


TEMPAT SAMPAH
static/images/oa/yongyin.png


TEMPAT SAMPAH
static/images/oa/zhuanzheng.png


+ 12 - 7
utils/request.js

@@ -41,13 +41,17 @@ const request = config => {
         const code = res.data.code || 200
         const msg = errorCode[code] || res.data.msg || errorCode['default']
         if (code === 401) {
-          uni.reLaunch({ url: '/' })
-          // showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
-          //   if (res.confirm) {
-          //     uni.reLaunch({ url: '/' })
-          //   }
-          // })
-          reject('无效的会话,或者会话已过期,请重新登录。')
+			store.dispatch('LogOut').then(res => {
+			  uni.reLaunch({ url: '/' })
+			})
+    //       showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
+    //         if (res.confirm) {
+    //           store.dispatch('LogOut').then(res => {
+				// uni.reLaunch({ url: '/pages/login' })
+    //           })
+    //         }
+    //       })
+			reject('无效的会话,或者会话已过期,请重新登录。')
         } else if (code === 500) {
           toast(msg)
           reject('500')
@@ -73,3 +77,4 @@ const request = config => {
 }
 
 export default request
+

+ 11 - 6
utils/upload.js

@@ -38,12 +38,16 @@ const upload = config => {
           if (code === 200) {
             resolve(result)
           } else if (code == 401) {
-            uni.reLaunch({ url: '/' })
-            // showConfirm("登录状态已过期,您可以继续留在该页面,或者重新登录?").then(res => {
-            //   if (res.confirm) {
-            //     uni.reLaunch({ url: '/' })
-            //   }
-            // })
+            store.dispatch('LogOut').then(res => {
+            		  uni.reLaunch({ url: '/' })
+            		})
+            //       showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
+            //         if (res.confirm) {
+            //           store.dispatch('LogOut').then(res => {
+            			// uni.reLaunch({ url: '/pages/login' })
+            //           })
+            //         }
+            //       })
             reject('无效的会话,或者会话已过期,请重新登录。')
           } else if (code === 500) {
             toast(msg)
@@ -70,3 +74,4 @@ const upload = config => {
 }
 
 export default upload
+