dever 5 лет назад
Родитель
Сommit
b01ed9a1cb
3 измененных файлов с 12 добавлено и 8 удалено
  1. 7 1
      pages/dream/view.vue
  2. 1 3
      pages/dream/view/cate.vue
  3. 4 4
      pages/dream/view/community.vue

+ 7 - 1
pages/dream/view.vue

@@ -66,7 +66,13 @@ export default{
 	},
 	// 重新加载
 	onPullDownRefresh: function() {
-		this.getData();
+		if (this.cate_drawer.show == true) {
+			this.$refs.cate.getData();
+		} else if (this.community_drawer.show == true) {
+			this.$refs.community.getData();
+		} else {
+			this.getData();
+		}
 	},
 	methods:{
 		change : function(e) {

+ 1 - 3
pages/dream/view/cate.vue

@@ -75,9 +75,7 @@ export default {
 	},
 	methods:{
 		getData : function() {
-			if (this.fetch.cate.length <= 0) {
-				this.Dever.get(this, 'app/collection/?l=api.category', {id:this.info_id, parent_page_id:this.parent_page_id, page_id:this.page_id});
-			}
+			this.Dever.get(this, 'app/collection/?l=api.category', {id:this.info_id, parent_page_id:this.parent_page_id, page_id:this.page_id});
 		},
 		choose : function(id) {
 			if (this.fetch.show[id] == 1) {

+ 4 - 4
pages/dream/view/community.vue

@@ -117,13 +117,13 @@ export default {
 		};
 	},
 	created() {
-		this.loadData('add');
+		this.getData('add');
 		//this.rightList = this.$store.state.diary.rightList;
 	},
 	onReachBottom() {
 		this.startNum++;
 		//上滑加载
-		this.loadData('add');
+		this.getData('add');
 	},
 	methods:{
 		toDetails : function(id){
@@ -136,13 +136,13 @@ export default {
 				url: '../mine/other/other?id=' + id
 			})
 		},
-		loadData : function(type) {
+		getData : function(type) {
 			
 		},
 		//下拉刷新
 		onPulldownReresh : function() {
 			console.info(222)
-			this.loadData('refresh');
+			this.getData('refresh');
 		},
 		handleTab : function(index) {
 			this.activeTab = index;