diff --git a/public/images/knowledge-base-logo/cyber-ghost.png b/public/images/knowledge-base-logo/cyber-ghost.png
new file mode 100644
index 00000000..2ed2038b
Binary files /dev/null and b/public/images/knowledge-base-logo/cyber-ghost.png differ
diff --git a/public/images/knowledge-base-logo/hospot-vpn.png b/public/images/knowledge-base-logo/hospot-vpn.png
new file mode 100644
index 00000000..b67d20ed
Binary files /dev/null and b/public/images/knowledge-base-logo/hospot-vpn.png differ
diff --git a/src/components/table/setting/knowledgeBaseTableForCard.vue b/src/components/table/setting/knowledgeBaseTableForCard.vue
index 913c0e4e..5ca5809c 100644
--- a/src/components/table/setting/knowledgeBaseTableForCard.vue
+++ b/src/components/table/setting/knowledgeBaseTableForCard.vue
@@ -17,7 +17,7 @@
{{data.label}}
@@ -747,20 +747,26 @@ export default {
const hint = this.aiTaggingList.find(d => d.knowledgeId === this.switchKnowledgeId)
const toStatus = hint.status === 0 ? 1 : 0
const url = toStatus === 0 ? api.knowledgeBaseLearningStop : api.knowledgeBaseLearningStart
- axios.post(`${url}?knowledgeId=${hint.knowledgeId}`).then(res => {
- if (res.status === 200) {
- hint.status = toStatus
- this.$message.success(this.$t('tip.success'))
- } else {
- console.error(res.message)
- this.$message.error(this.errorMsgHandler(res))
- }
- }).catch(e => {
- console.error(e)
- this.$message.error(this.errorMsgHandler(e))
- }).finally(() => {
+ if (hint.knowledgeId === 101 || hint.knowledgeId === 102) {
+ hint.status = toStatus
+ this.$message.success(this.$t('tip.success'))
this.showConfirmSwitch = false
- })
+ } else {
+ axios.post(`${url}?knowledgeId=${hint.knowledgeId}`).then(res => {
+ if (res.status === 200) {
+ hint.status = toStatus
+ this.$message.success(this.$t('tip.success'))
+ } else {
+ console.error(res.message)
+ this.$message.error(this.errorMsgHandler(res))
+ }
+ }).catch(e => {
+ console.error(e)
+ this.$message.error(this.errorMsgHandler(e))
+ }).finally(() => {
+ this.showConfirmSwitch = false
+ })
+ }
}
},
watch: {
@@ -799,6 +805,40 @@ export default {
}
}
})
+ // 2024-01-15 以下两个是为105环境演示准备的假数据
+ const data1 = {
+ knowledgeId: 101,
+ name: 'CyberGhost',
+ category: 'ai_tagging',
+ description: 'CyberGhost is a VPN service used to unblock sites and browse privately and anonymously.',
+ isBuiltIn: 1,
+ isPublished: 1,
+ status: 1,
+ showUpdate: false
+ }
+ const basicInfo1 = builtInKnowledgeBaseBasicInfo.find(bi => bi.knowledgeId === data1.knowledgeId)
+ this.aiTaggingList.push({
+ ...data1,
+ ...basicInfo1
+ })
+ const data2 = {
+ knowledgeId: 102,
+ name: 'HotSpotshield VPN',
+ category: 'ai_tagging',
+ description: 'Hotspot Shield is a public VPN service, providing\n' +
+ 'a secure proxy connection through an encrypted\n' +
+ 'channel between your device and the target\n' +
+ 'website, using VPN technology.',
+ isBuiltIn: 1,
+ isPublished: 1,
+ status: 1,
+ showUpdate: false
+ }
+ const basicInfo2 = builtInKnowledgeBaseBasicInfo.find(bi => bi.knowledgeId === data2.knowledgeId)
+ this.aiTaggingList.push({
+ ...data2,
+ ...basicInfo2
+ })
}
}
},
@@ -872,9 +912,9 @@ export default {
const find = this.aiTaggingList.find(item => item.knowledgeId === this.switchKnowledgeId)
if (find) {
if (find.status === 0) {
- tip = this.$t('tip.confirmEnablePsiphon3') + '?'
+ tip = this.$t('tip.confirmEnable') + '?'
} else if (find.status === 1) {
- tip = this.$t('tip.confirmDisablePsiphon3') + '?'
+ tip = this.$t('tip.confirmDisable') + '?'
}
}
}
diff --git a/src/utils/constants.js b/src/utils/constants.js
index 7ae05c84..3daa1be9 100644
--- a/src/utils/constants.js
+++ b/src/utils/constants.js
@@ -1859,6 +1859,22 @@ export const builtInKnowledgeBaseBasicInfo = [
label: 'Anonymity',
iconUrl: 'images/knowledge-base-logo/anonymity.png',
desc: 'Communication system that conceals users\' identities and activities to protect privacy and prevent tracking or surveillance. This database provides lists of Tor nodes, I2P nodes, obfs4, etc.'
+ },
+ // 2024-01-15 以下两个是为105环境演示准备的假数据
+ {
+ knowledgeId: 101,
+ label: 'CyberGhost',
+ iconUrl: 'images/knowledge-base-logo/cyber-ghost.png',
+ desc: 'CyberGhost is a VPN service used to unblock sites and browse privately and anonymously.'
+ },
+ {
+ knowledgeId: 102,
+ label: 'HotSpotshield VPN',
+ iconUrl: 'images/knowledge-base-logo/hospot-vpn.png',
+ desc: 'Hotspot Shield is a public VPN service, providing\n' +
+ 'a secure proxy connection through an encrypted\n' +
+ 'channel between your device and the target\n' +
+ 'website, using VPN technology.'
}
]