dever před 4 roky
rodič
revize
5689a46f17
2 změnil soubory, kde provedl 42 přidání a 4 odebrání
  1. 2 1
      pages/dream/videoPlay.vue
  2. 40 3
      pages/dream/view/moment.vue

+ 2 - 1
pages/dream/videoPlay.vue

@@ -1,7 +1,8 @@
 <template>
 	<view>
 		<dever-video
-		:src="video" 
+		:src="video"
+		:pic="pic"
 		:auto="true"
 		:index="0" 
 		:vid="1" 

+ 40 - 3
pages/dream/view/moment.vue

@@ -42,8 +42,10 @@
 							<!--<text class="nickname" v-for="(user,index_like) in post.like" :key="index_like">{{user.username}}</text>-->
 						</view>
 						<view v-if="v.child.length" class="footer_content" v-for="(v2, k2) in v.child" :key="k2" @tap="reply(k,k2)">
-							<text class="comment-nickname">{{v2.user.username}}: <text class="comment-content">{{v2.content}}</text></text>
-						</view>
+							<text class="comment-nickname">{{v2.user.username}}: </text>
+							<text class="comment-content">{{v2.content}}</text>
+						</view>
+						<view class="text-grey flex solid-bottom padding justify-center more" @click="getMore" v-if="v.child_total > 1">{{more}}</view>
 					</view>
 				</view>
 				<!-- 结束 post -->
@@ -121,7 +123,8 @@
 				to_id : 0,
 				to_uid : 0,
 				is_upload : true,
-				showComment : false,
+				showComment : false,
+				more : '',
 			}
 		},
 		mounted() {
@@ -199,6 +202,40 @@
 			getRefresh : function(cate_id, type, type_id, content) {
 				this.getData(1);
 				this.hideModal();
+			},
+			getMore : function(page, push) {
+				var self = this;
+				if (page && typeof(page) != 'object') {
+					self.page = page;
+				}
+				
+				if (self.page > 1 && self.more == '收起') {
+					// 收起
+					self.item.child = self.child;
+					self.more = '展开'+(self.item.child_total-1)+'条回复';
+					self.page = 1;
+					return;
+				}
+				
+				var send = {cate_id:self.cate_id, type:self.type, type_id:self.item.id, pg:self.page, noconcat:true};
+				send.code = self.Dever.config.code;
+				send.info_id = self.id;
+				this.Dever.get(this, 'app/community/?l=api.moment', send, function(t) {
+					if (self.page == 1) {
+						self.item.child = self.child;
+					}
+					
+					if (t.info && t.info.length > 0) {
+						self.item.child = self.item.child.concat(t.info);
+						self.page = self.page + 1;
+					}
+					if (self.Dever.pageData.status == 0) {
+						self.more = '收起';
+					} else {
+						self.more = '展开更多回复';
+					}
+					self.hideModal();
+				});
 			},
 			publish : function() {
 				this.publish_type = 3;