Browse Source

去掉存储

张文飞 3 years ago
parent
commit
c480b981a0
2 changed files with 2 additions and 12 deletions
  1. 2 11
      App.vue
  2. 0 1
      components/subComponents/dmLogin.vue

+ 2 - 11
App.vue

@@ -52,19 +52,12 @@
 			this.globalData.env = env;
 		},
 		onShow: function() {
-			let token = this.$cache.get('_token_owner_union');
-			let userId =  this.$cache.get('_user_id');
 			let shareToken  = this.getQueryString('shareToken');
 			let projectId  = this.getQueryString('projectId');
 			this.globalData.projectId = projectId||'';
 			this.globalData.shareToken = shareToken||'';
-			if (!token||!userId) {
-				this.regist();
-			} else {
-				this.globalData.token = token;
-				this.globalData.userId = userId;
-			}
-			document.body.style.setProperty("background-color",this.globalData.color4)
+			this.regist();
+			document.body.style.setProperty("background-color",this.globalData.color4);
 		},
 		onHide: function() {
 
@@ -89,11 +82,9 @@
 				});
 				if (ret.data.success) {
 					let userId = ret.data.single.userId;
-					this.$cache.set("_user_id",userId);
 					this.globalData.userId = userId;
 					if (ret.data.single.authed == 1) {
 						let token = ret.data.single.token;
-						this.$cache.set('_token_owner_union', token);
 						this.globalData.token = token
 					}
 					uni.$emit('request')

+ 0 - 1
components/subComponents/dmLogin.vue

@@ -166,7 +166,6 @@
 					getApp().globalData.token = token;
 					uni.$emit('request');
 					this.knowAction();
-					this.$cache.set('_token_owner_union', token);
 					
 				}else{
 					uni.showToast({