feat: 移除了本地的分词条数限制 增加domain字段

This commit is contained in:
ZiuChen 2022-09-12 00:08:57 +08:00
parent 620e37953b
commit 99edbaa907

View File

@ -86,17 +86,7 @@ const handleBtnClick = (id) => {
window.toTop()
break
case 'word-split':
// TODO: ()
const key = 'word-break-daily-used'
const val = utools.dbStorage.getItem(key)
if (val >= '\u0035') {
window.showNotify(
'今日使用次数已达5次, 请明日再使用此功能 新插件`超级分词`即将上线, 敬请期待'
)
} else {
fetchWordBreakResult(props.fullData.data)
}
fetchWordBreakResult(props.fullData.data)
break
case 'copy-select':
const checkedList = splitWords.value.filter((item) => item.checked !== false)
@ -137,6 +127,7 @@ const fetchWordBreakResult = async (origin) => {
'Content-Type': 'application/json'
},
body: JSON.stringify({
domain: 'clipboard-manager',
word: origin,
...info
})
@ -147,15 +138,6 @@ const fetchWordBreakResult = async (origin) => {
window.showNotify(msg)
} else {
//
const valueKey = 'word-break-daily-used'
const timeKey = 'last-update'
const val = utools.dbStorage.getItem(valueKey)
utools.dbStorage.setItem(valueKey, val === null ? 1 : val + 1)
if (new Date(utools.dbStorage.getItem(timeKey)).getDay() !== new Date().getDay()) {
//
utools.dbStorage.setItem(valueKey, 0)
}
utools.dbStorage.setItem(timeKey, new Date().valueOf())
splitWords.value = data.splitWord
.filter((w) => w !== '' && w !== ' ' && w.indexOf('\n') === -1)
.map((item) => ({