修复pages/history/index
This commit is contained in:
@@ -214,6 +214,19 @@ Page({
|
|||||||
this.fetchList()
|
this.fetchList()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
showTokenWeight(e) {
|
||||||
|
const token = e.currentTarget.dataset.token
|
||||||
|
const weight = e.currentTarget.dataset.weight
|
||||||
|
const weightNum = Number(weight || 0)
|
||||||
|
const direction = weightNum >= 0 ? '倾向垃圾判定' : '倾向正常判定'
|
||||||
|
wx.showModal({
|
||||||
|
title: '关键词权重',
|
||||||
|
content: `关键词"${token}"\n权重贡献:${weightNum >= 0 ? '+' : ''}${weightNum.toFixed(4)}\n(${direction})`,
|
||||||
|
showCancel: false,
|
||||||
|
confirmText: '关闭'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
removeItem(e) {
|
removeItem(e) {
|
||||||
const id = Number(e.currentTarget.dataset.id)
|
const id = Number(e.currentTarget.dataset.id)
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
<view class="field" wx:if="{{item.reason_tokens && item.reason_tokens.length}}">
|
<view class="field" wx:if="{{item.reason_tokens && item.reason_tokens.length}}">
|
||||||
<text class="field-label">风险关键词</text>
|
<text class="field-label">风险关键词</text>
|
||||||
<view class="chip-group">
|
<view class="chip-group">
|
||||||
<text class="tag" wx:for="{{item.reason_tokens}}" wx:key="*this">{{item}}</text>
|
<text class="tag tag-danger" wx:for="{{item.reason_tokens}}" wx:for-item="tokenItem" wx:key="token" data-token="{{tokenItem.token}}" data-weight="{{tokenItem.weight}}" bindtap="showTokenWeight">{{tokenItem.token}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user