Browse Source

fix 登录

he2802 3 years ago
parent
commit
8a60ef912f
2 changed files with 5 additions and 2 deletions
  1. 4 2
      common/request.js
  2. 1 0
      pages2/class/detail.vue

+ 4 - 2
common/request.js

@@ -33,7 +33,7 @@ export const myRequest = (options) => {
 			},
 			success: async (res) => {
 				if (res.data.code == 401) {
-					if (num <= 3) {
+					if (num <= 2) {
 						if (!uni.getStorageSync('user_account')) {
 							uni.navigateTo({
 								url: '/pages/login/login'
@@ -43,7 +43,9 @@ export const myRequest = (options) => {
 							res = await doRequest(options)
 						}
 
-					};
+					}else{
+						uni.removeStorageSync('user_account')
+					}
 				}
 				resolve(res)
 			},

+ 1 - 0
pages2/class/detail.vue

@@ -344,6 +344,7 @@ export default {
 	},
 	onUnload() {
 		if (this.playSectionId > 0) {
+			console.log(234234)
 			//退出提交记录
 			this.ossAvatarUrl = '';
 			this.postStudyRecord();