1
This commit is contained in:
74
miniprogram/pages/batch/index.wxml
Normal file
74
miniprogram/pages/batch/index.wxml
Normal file
@@ -0,0 +1,74 @@
|
||||
<view class="container">
|
||||
<view class="hero fade-up">
|
||||
<view class="hero-badge">BATCH SCAN</view>
|
||||
<view class="hero-title">批量文本筛查</view>
|
||||
<view class="hero-sub">每行一条文本,适用于活动文案、客服话术、私信模板的集中检测。</view>
|
||||
</view>
|
||||
|
||||
<view class="card fade-up fade-up-delay-1">
|
||||
<view class="card-title">批量输入</view>
|
||||
<view class="card-desc">请按“每行一条”粘贴文本内容,系统会自动跳过空行。</view>
|
||||
<textarea class="textarea" placeholder="示例: 点击链接领取红包 今天下午三点开会" value="{{inputText}}" bindinput="onInput" />
|
||||
|
||||
<view class="btn-row">
|
||||
<button class="btn btn-ghost" bindtap="fillDemo">填充示例</button>
|
||||
<button class="btn btn-primary" loading="{{loading}}" bindtap="submit">开始识别</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card fade-up fade-up-delay-2" wx:if="{{summary}}">
|
||||
<view class="card-title">识别汇总</view>
|
||||
<view class="grid-3">
|
||||
<view class="kpi">
|
||||
<view class="kpi-value">{{summary.total}}</view>
|
||||
<view class="kpi-label">总条数</view>
|
||||
</view>
|
||||
<view class="kpi">
|
||||
<view class="kpi-value">{{summary.spam_count}}</view>
|
||||
<view class="kpi-label">垃圾信息</view>
|
||||
</view>
|
||||
<view class="kpi">
|
||||
<view class="kpi-value">{{summary.ham_count}}</view>
|
||||
<view class="kpi-label">正常信息</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="field">
|
||||
<view class="row">
|
||||
<text class="label">垃圾占比</text>
|
||||
<text class="value">{{summary.spam_ratio_text}}</text>
|
||||
</view>
|
||||
<view class="progress-track">
|
||||
<view class="progress-fill" style="width: {{summary.spam_ratio_text}};"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="field">
|
||||
<view class="row">
|
||||
<text class="label">拦截占比</text>
|
||||
<text class="value">{{summary.blocked_ratio_text}}</text>
|
||||
</view>
|
||||
<view class="progress-track">
|
||||
<view class="progress-fill-safe" style="width: {{summary.blocked_ratio_text}};"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card fade-up fade-up-delay-3" wx:if="{{items.length}}">
|
||||
<view class="card-title">明细结果</view>
|
||||
<view class="list-item" wx:for="{{items}}" wx:key="index">
|
||||
<view class="item-title">{{item.text}}</view>
|
||||
<view class="row">
|
||||
<text class="label">判定结果</text>
|
||||
<text class="{{item.prediction === 'spam' ? 'status-spam' : 'status-ham'}}">{{item.prediction_text}}</text>
|
||||
</view>
|
||||
<view class="row">
|
||||
<text class="label">置信度</text>
|
||||
<text class="value">{{item.confidence_text}}</text>
|
||||
</view>
|
||||
<view class="progress-track">
|
||||
<view class="{{item.prediction === 'spam' ? 'progress-fill' : 'progress-fill-safe'}}" style="width: {{item.confidence_text}};"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user