diff --git a/api/deepMate/deepMate.js b/api/deepMate/deepMate.js index f6374d3..5c50638 100644 --- a/api/deepMate/deepMate.js +++ b/api/deepMate/deepMate.js @@ -34,7 +34,7 @@ export const postIntent = (data) => { export const postStock = (data) => { return http({ method: 'POST', - url: '/testApi/api/deepMate/dmSecond', + url: '/api/deepMate/dmSecond', data }) } diff --git a/components/login-prompt.vue b/components/login-prompt.vue index a499e43..6989276 100644 --- a/components/login-prompt.vue +++ b/components/login-prompt.vue @@ -23,6 +23,8 @@ const userStore = useUserStore(); onMounted(() => { if (!userStore.userInfo) { show(); + + } }); diff --git a/main.js b/main.js index 4ef91b6..b7439b9 100644 --- a/main.js +++ b/main.js @@ -1,4 +1,4 @@ - +import LoginPrompt from './components/login-prompt.vue' import pinia from './stores/index.js' // #ifndef VUE3 import Vue from 'vue' @@ -7,17 +7,18 @@ import ElementPlus from 'element-plus' import 'element-plus/dist/index.css' import * as ElementPlusIconsVue from '@element-plus/icons-vue' +Vue.component('LoginPrompt', LoginPrompt) Vue.config.productionTip = false App.mpType = 'app' const app = new Vue({ - ...App, + ...App, pinia }) app.use(ElementPlus) -for (const [key, component] of Object.entries(ElementPlusIconsVue)){ +for (const [key, component] of Object.entries(ElementPlusIconsVue)) { app.component(key, component) } app.$mount() @@ -57,7 +58,7 @@ function getCurrentLocale() { }) console.log(language); return language - }else if (language.indexOf('zh') != -1) { + } else if (language.indexOf('zh') != -1) { if (language.indexOf('CN') != -1) { language = 'zh_CN' uni.setStorageSync('languageData', { @@ -99,24 +100,26 @@ function getCurrentLocale() { } // 创建 i18n 实例 const i18n = createI18n({ - locale: getCurrentLocale(), - legacy: false, // 使用 Composition API 模式 - globalInjection: true, // 全局注入 $t 函数 - messages: { - 'en': en, - 'ms': ms, - 'th': th, - 'vi': vi, - 'zh_CN': zh_CN, - 'zh_HK': zh_HK - } + locale: getCurrentLocale(), + legacy: false, // 使用 Composition API 模式 + globalInjection: true, // 全局注入 $t 函数 + messages: { + 'en': en, + 'ms': ms, + 'th': th, + 'vi': vi, + 'zh_CN': zh_CN, + 'zh_HK': zh_HK + } }) export function createApp() { - const app = createSSRApp(App) - app.use(pinia) - app.use(i18n) - return { - app - } + const app = createSSRApp(App) + app.component('LoginPrompt', LoginPrompt) + + app.use(pinia) + app.use(i18n) + return { + app + } } // #endif \ No newline at end of file diff --git a/pages/deepMate/deepMate.vue b/pages/deepMate/deepMate.vue index acca0a5..5497d58 100644 --- a/pages/deepMate/deepMate.vue +++ b/pages/deepMate/deepMate.vue @@ -159,13 +159,13 @@ - + 问题分析完成 - + 收集相关信息 @@ -222,39 +222,6 @@ - - + 暂无历史记录 @@ -302,15 +269,17 @@ {{ item.stockName }} ({{ item.stockCode }}) - {{ item.createdTime }} + {{ + formatTimeForHistory(item.createdTime) + }} - +