init
This commit is contained in:
73
miniprogram/pages/test-comment-stats/index.wxml
Normal file
73
miniprogram/pages/test-comment-stats/index.wxml
Normal file
@@ -0,0 +1,73 @@
|
||||
<view class="container">
|
||||
<view class="header">
|
||||
<text class="title">测试评论统计数量显示</text>
|
||||
</view>
|
||||
|
||||
<view class="input-section">
|
||||
<text class="label">商品ID:</text>
|
||||
<input class="input" value="{{spuId}}" bindinput="changeSpuId" placeholder="请输入商品ID" />
|
||||
<button class="refresh-btn" bindtap="refreshStats" disabled="{{loading}}">
|
||||
{{loading ? '加载中...' : '获取统计'}}
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view class="status" wx:if="{{error}}">
|
||||
<text class="error">错误: {{error}}</text>
|
||||
</view>
|
||||
|
||||
<!-- 模拟评论页面的标签显示 -->
|
||||
<view class="comments-header">
|
||||
<view class="tag {{commentType === '' ? 'active' : ''}}">
|
||||
全部({{countObj.commentCount}})
|
||||
</view>
|
||||
<view class="tag {{commentType === '5' ? 'active' : ''}}" wx:if="{{countObj.uidCount !== '0'}}">
|
||||
自己({{countObj.uidCount}})
|
||||
</view>
|
||||
<view class="tag {{commentType === '4' ? 'active' : ''}}">
|
||||
带图({{countObj.hasImageCount}})
|
||||
</view>
|
||||
<view class="tag {{commentType === '3' ? 'active' : ''}}">
|
||||
好评({{countObj.goodCount}})
|
||||
</view>
|
||||
<view class="tag {{commentType === '2' ? 'active' : ''}}">
|
||||
中评({{countObj.middleCount}})
|
||||
</view>
|
||||
<view class="tag {{commentType === '1' ? 'active' : ''}}">
|
||||
差评({{countObj.badCount}})
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="stats-detail">
|
||||
<text class="section-title">详细统计数据:</text>
|
||||
|
||||
<view class="stat-item">
|
||||
<text class="stat-label">总评论数:</text>
|
||||
<text class="stat-value">{{countObj.commentCount}}</text>
|
||||
</view>
|
||||
|
||||
<view class="stat-item">
|
||||
<text class="stat-label">好评数:</text>
|
||||
<text class="stat-value">{{countObj.goodCount}}</text>
|
||||
</view>
|
||||
|
||||
<view class="stat-item">
|
||||
<text class="stat-label">中评数:</text>
|
||||
<text class="stat-value">{{countObj.middleCount}}</text>
|
||||
</view>
|
||||
|
||||
<view class="stat-item">
|
||||
<text class="stat-label">差评数:</text>
|
||||
<text class="stat-value">{{countObj.badCount}}</text>
|
||||
</view>
|
||||
|
||||
<view class="stat-item">
|
||||
<text class="stat-label">带图评论数:</text>
|
||||
<text class="stat-value">{{countObj.hasImageCount}}</text>
|
||||
</view>
|
||||
|
||||
<view class="stat-item">
|
||||
<text class="stat-label">我的评论数:</text>
|
||||
<text class="stat-value">{{countObj.uidCount}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user