Ver Fonte

bug fix

柒零 há 1 ano atrás
pai
commit
3e88581663
1 ficheiros alterados com 9 adições e 1 exclusões
  1. 9 1
      pages/index/index.js

+ 9 - 1
pages/index/index.js

@@ -164,12 +164,20 @@ Page({
           if (index == 2) {
             var hasReportAuth = wx.getStorageSync("hasReportAuth");
             var unionid = wx.getStorageSync("unionid");
-            if (!hasReportAuth || !unionid) {
+            if (!unionid) {
               this.setData({
                 showTipsA: true
               })
               return
             }
+            if (!hasReportAuth) {
+              wx.showModal({
+                title: '提示',
+                content: '没有睡眠报告',
+                showCancel: false
+              });
+              return
+            }
           }
           this.toCardPage(index);
         } else {