12345678910111213141516171819202122232425262728293031323334353637383940 |
- <template name="qa">
- <view id="qa" class="clearfix">
- <scroll-view scroll-y="true">
- <view class="qa-content clearfix">
- <view wx:if="{{!qa.length}}" class="no-info">暂无问答</view>
- <view wx:for="{{qa}}" wx:key="{{index}}" class="qa-item clearfix">
- <view class="avatar">
- <image src="{{item.posts.userInfo.avatar}}"></image>
- </view>
- <view class="msg-wrapper clearfix">
- <view class="q-name-wrapper">
- <view wx:if="{{item.posts.userInfo.userId != teacherId}}" class="q-name">{{item.posts.userInfo.nickName}}</view>
- <view wx:if="{{item.posts.userInfo.userId == teacherId}}" class="q-name teacher">{{item.posts.userInfo.nickName}} 老师</view>
- <view class="time">{{item.posts.gmtModified}}</view>
- </view>
- <view class="question clearfix"><text>{{item.posts.title}}</text></view>
- <view class="features">
- <view class="praise-wrapper feature-item clearfix">
- <view class="{{item.like? 'praised-icon':'praise-icon'}}" bindtap="togglePraise" data-questions_id="{{item.posts.id}}" data-islike="{{item.like}}"></view>
- <text class="praise-num">{{item.likeCount}}</text>
- </view>
- <view class="answer-wrapper feature-item clearfix">
- <view class="answer-icon" data-questions_id="{{item.posts.id}}" bindtap="reply"></view>
- <text class="answer-num">{{item.posts.replyList? item.posts.replyList.length: 0}}</text>
- </view>
- <view class="share-wrapper feature-item clearfix" bindtap="share">
- <button class="share-icon" open-type="share" plain="true"></button>
- </view>
- </view>
- <view class="answer-wrapper clearfix" wx:for="{{item.posts.replyList}}" wx:for-item="answerItem" wx:key="{{index}}">
- <text wx:if="{{answerItem.userInfo.userId == teacherId}}" class="name teacher">{{answerItem.userInfo.nickName}} 老师</text>
- <text wx:if="{{answerItem.userInfo.userId != teacherId}}" class="name">{{answerItem.userInfo.nickName}}</text>
- <text>:{{answerItem.content}}</text>
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- </view>
- </template>
|