Initial commit
This commit is contained in:
36
miniprogram/pages/test-my-comments/index.wxml
Normal file
36
miniprogram/pages/test-my-comments/index.wxml
Normal file
@@ -0,0 +1,36 @@
|
||||
<view class="container">
|
||||
<view class="header">
|
||||
<text class="title">测试我的评论列表功能</text>
|
||||
</view>
|
||||
|
||||
<view class="buttons">
|
||||
<button class="test-btn" bindtap="testGetMyCommentsList" disabled="{{loading}}">
|
||||
{{loading ? '加载中...' : '测试fetchUserComments'}}
|
||||
</button>
|
||||
|
||||
<button class="test-btn" bindtap="testChangeTag" disabled="{{loading}}">
|
||||
测试getMyCommentsList方法
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view class="status" wx:if="{{error}}">
|
||||
<text class="error">错误: {{error}}</text>
|
||||
</view>
|
||||
|
||||
<view class="results">
|
||||
<text class="section-title">评论列表 ({{commentList.length}}条):</text>
|
||||
|
||||
<view class="comment-item" wx:for="{{commentList}}" wx:key="id">
|
||||
<view class="comment-header">
|
||||
<text class="comment-id">ID: {{item.id}}</text>
|
||||
<text class="comment-rating">评分: {{item.rating}}</text>
|
||||
</view>
|
||||
<view class="comment-content">{{item.content}}</view>
|
||||
<view class="comment-time">{{item.created_at}}</view>
|
||||
</view>
|
||||
|
||||
<view class="empty" wx:if="{{commentList.length === 0 && !loading}}">
|
||||
<text>暂无评论数据</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user