zhangli 5 ヶ月 前
コミット
aedc558585
4 ファイル変更13 行追加3 行削除
  1. 2 2
      pages/index/index.vue
  2. 5 0
      pages/user/index.vue
  3. 1 1
      pagesClass/classDetail.vue
  4. 5 0
      pagesClass/classList.vue

+ 2 - 2
pages/index/index.vue

@@ -51,11 +51,11 @@
 			// 	key: 'token',
 			// 	data: 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJDT0FDSDo4OSJ9.7DPbdHQIkhpCXE2Tf6eHkdl0Y69C6kbRwntVdKm4DXu1_LlP1ue_2t4LKW0CYLm-enBRzBvIxkgvYjZSoKhqSA'
 			// })
-			if (!uni.getStorageSync('token')) {
+			/*if (!uni.getStorageSync('token')) {
 				uni.navigateTo({
 					url: '/pages/login/index'
 				});
-			}
+			}*/
 		},
 		methods: {
 			//  跳转

+ 5 - 0
pages/user/index.vue

@@ -74,6 +74,11 @@
 			}
 		},
 		onLoad() {
+			if (!uni.getStorageSync('token')) {
+				uni.navigateTo({
+					url: '/pages/login/index'
+				});
+			}
 			if (uni.getStorageSync('userData')) {
 				this.userData = uni.getStorageSync('userData')
 			}

+ 1 - 1
pagesClass/classDetail.vue

@@ -83,7 +83,7 @@
 				</view>
 			</view>
 		</u-card>
-		<view class="handle-fix-box">
+		<view class="handle-fix-box" v-if="classInfo.state==1">
 			<u-button type="warning" shape="circle" :ripple="true" :custom-style="customStyle" @click="goToSignForm">立即签到</u-button>
 		</view>
 		<u-action-sheet :list="uploadTypeList" v-model="uploadTypeShow" @click="selectUploadType"></u-action-sheet>

+ 5 - 0
pagesClass/classList.vue

@@ -81,6 +81,11 @@
 			}
 		},
 		onShow() {
+			if (!uni.getStorageSync('token')) {
+				uni.navigateTo({
+					url: '/pages/login/index'
+				});
+			}
 			this.tabList.forEach((site, index) => {
 				site.isOver = false
 				site.pageIndex = 1