wq hace 5 años
padre
commit
fe55aa2a90
Se han modificado 1 ficheros con 10 adiciones y 2 borrados
  1. 10 2
      pages/messageInfo/index.js

+ 10 - 2
pages/messageInfo/index.js

@@ -26,8 +26,16 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    var that = this;
-    that.searchInfo('正在加载数据...')
+   
+    if (wx.getStorageSync('uid') == ""){
+      wx.redirectTo({
+      url: '/pages/login/index'
+    })
+    }else{
+      var that = this;
+      that.searchInfo('正在加载数据...')
+    }
+    
   },
 
   /**