c89cad6643
- Rename UI/prompt labels: "品牌主问题" → "优化关键词", "搜索问题" → "搜索词" - Add brand/competitor entity exclusion filter in question expansion (AI distill path) - Refactor combination question text normalization, remove manual question-mark appending - Update prompts to emphasize commercial-intent search queries over editorial phrasing - Sync prompt changes across server/configs, deploy, and k3s configs - Update i18n, frontend views (BrandQuestionCreate, TemplateWizard), and test fixtures Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
164 lines
2.7 KiB
TypeScript
164 lines
2.7 KiB
TypeScript
import { createFromIconfontCN } from '@ant-design/icons-vue'
|
|
import { QueryClient, VueQueryPlugin } from '@tanstack/vue-query'
|
|
import {
|
|
Alert,
|
|
App as AntApp,
|
|
AutoComplete,
|
|
Avatar,
|
|
Badge,
|
|
Button,
|
|
Card,
|
|
Checkbox,
|
|
Col,
|
|
ConfigProvider,
|
|
DatePicker,
|
|
Descriptions,
|
|
Divider,
|
|
Drawer,
|
|
Dropdown,
|
|
Empty,
|
|
Form,
|
|
Input,
|
|
InputNumber,
|
|
Layout,
|
|
List,
|
|
Menu,
|
|
Modal,
|
|
Pagination,
|
|
Popconfirm,
|
|
Popover,
|
|
Progress,
|
|
Radio,
|
|
Result,
|
|
Row,
|
|
Select,
|
|
Skeleton,
|
|
Slider,
|
|
Space,
|
|
Spin,
|
|
Statistic,
|
|
Steps,
|
|
Switch,
|
|
Table,
|
|
Tabs,
|
|
Tag,
|
|
TimePicker,
|
|
Tooltip,
|
|
Tree,
|
|
TreeSelect,
|
|
Upload,
|
|
message,
|
|
} from 'ant-design-vue'
|
|
import { createApp } from 'vue'
|
|
|
|
import 'ant-design-vue/dist/reset.css'
|
|
import App from './App.vue'
|
|
import { i18n } from './i18n'
|
|
import { registerChunkReloadHandlers } from './lib/chunk-reload'
|
|
import { subscribeAuthExpired, subscribeStoredSession } from './lib/session'
|
|
import { router } from './router'
|
|
import { pinia } from './stores/pinia'
|
|
import './styles.css'
|
|
|
|
registerChunkReloadHandlers()
|
|
|
|
const queryClient = new QueryClient({
|
|
defaultOptions: {
|
|
queries: {
|
|
staleTime: 30000,
|
|
refetchOnWindowFocus: false,
|
|
retry: false,
|
|
},
|
|
},
|
|
})
|
|
|
|
const app = createApp(App)
|
|
let authExpiredNotified = false
|
|
|
|
message.config({
|
|
maxCount: 1,
|
|
})
|
|
|
|
subscribeStoredSession((snapshot) => {
|
|
if (snapshot.accessToken) {
|
|
authExpiredNotified = false
|
|
}
|
|
})
|
|
|
|
subscribeAuthExpired(() => {
|
|
const current = router.currentRoute.value
|
|
if (current.name === 'login') {
|
|
return
|
|
}
|
|
|
|
if (!authExpiredNotified) {
|
|
authExpiredNotified = true
|
|
message.destroy()
|
|
message.warning('登录已过期,请重新登录')
|
|
void router.replace({
|
|
name: 'login',
|
|
query: current.fullPath ? { redirect: current.fullPath } : undefined,
|
|
})
|
|
}
|
|
})
|
|
|
|
const IconFont = createFromIconfontCN({
|
|
// 需要替换为你自己真实项目的 js 地址,才能显示出你的 '#icon-line-global_undo'。
|
|
scriptUrl: '//at.alicdn.com/t/c/font_5154382_922oh81rh1.js',
|
|
})
|
|
app.component('IconFont', IconFont)
|
|
|
|
app.component('ATextarea', Input.TextArea)
|
|
;[
|
|
Alert,
|
|
AntApp,
|
|
AutoComplete,
|
|
Avatar,
|
|
Badge,
|
|
Button,
|
|
Card,
|
|
Checkbox,
|
|
Col,
|
|
ConfigProvider,
|
|
DatePicker,
|
|
Descriptions,
|
|
Divider,
|
|
Drawer,
|
|
Dropdown,
|
|
Empty,
|
|
Form,
|
|
Input,
|
|
InputNumber,
|
|
Layout,
|
|
List,
|
|
Menu,
|
|
Modal,
|
|
Pagination,
|
|
Popconfirm,
|
|
Popover,
|
|
Progress,
|
|
Radio,
|
|
Result,
|
|
Row,
|
|
Select,
|
|
Skeleton,
|
|
Space,
|
|
Spin,
|
|
Statistic,
|
|
Switch,
|
|
Slider,
|
|
Steps,
|
|
Table,
|
|
Tabs,
|
|
Tag,
|
|
TimePicker,
|
|
Tooltip,
|
|
Tree,
|
|
TreeSelect,
|
|
Upload,
|
|
].forEach((component) => {
|
|
app.use(component)
|
|
})
|
|
|
|
app.use(i18n).use(pinia).use(router).use(VueQueryPlugin, { queryClient }).mount('#app')
|