dever 4 年之前
父节点
当前提交
85b0812dd6
共有 1 个文件被更改,包括 16 次插入5 次删除
  1. 16 5
      pages/dream/view.vue

+ 16 - 5
pages/dream/view.vue

@@ -50,7 +50,7 @@
 				</dever-drawer-window>
 				
 				<y-Fab v-if="!drawer.show && fetch.user.avatar && show" :bottom="20" :right="20" :btnList="drawer.button" @click="clickDrawerButton" :text="`P`+(swiper.index+1)" :icon_o="fetch.user.avatar"></y-Fab>
-				<y-Fab v-if="!show" :bottom="20" :right="20" @click="goHome" :text="`首页`"></y-Fab>
+				<y-Fab v-if="!show" :bottom="20" :right="20" @click="goHome" :text="`更多`"></y-Fab>
 			</view>
 		</view>
 	</gracePage>
@@ -68,6 +68,7 @@ import deverDrawerWindow from "@/lib/dever/components/drawerWindow.vue";
 export default{
 	data() {
 		return {
+			login : '',
 			content_id : 0,
 			type : -1,
 			show : false,
@@ -139,8 +140,9 @@ export default{
 				title:option.name
 			});
 		}
-		this.Dever.login = 'user/login?code=' + option.code;
-		this.Dever.checkLogin();
+		//this.Dever.login = 'user/login?code=' + option.code;
+		//this.Dever.checkLogin();
+		this.login = this.Dever.getToken();
 		this.Dever.config.name = option.name;
 		this.Dever.config.code = option.code;
 		this.getData();
@@ -169,7 +171,10 @@ export default{
 				this.$refs[this.drawer.show][0].getInfo(2);
 			}
 		},
-		record : function() {
+		record : function() {
+			if (!this.login) {
+				return;
+			}
 			var content_id = this.fetch.items[this.swiper.index].id;
 			this.Dever.post('app/user/?l=api.record', {noloading:1, code:this.Dever.config.code, index: this.swiper.index, content_id: content_id});
 		},
@@ -236,12 +241,18 @@ export default{
 			});
 		},
 		getCate : function() {
+			if (!this.login) {
+				return;
+			}
 			var self = this;
 			this.Dever.get(this, 'app/collection/?l=api.getCategory', {code:this.Dever.config.code,noloading:1}, function(t) {
 				self.drawer.item['cate'].param = t;
 			});
 		},
-		getTimes : function() {
+		getTimes : function() {
+			if (!this.login) {
+				return;
+			}
 			var self = this;
 			this.Dever.get(this, 'app/collection/?l=api.getTimes', {code:this.Dever.config.code,noloading:1}, function(t) {
 				if (t && t.times && t.times.length > 0) {