提交 e861a5d9 作者: Hao

add

父级 c48a4b09
// axios.js
import axios from "axios";
const instance = axios.create({
// baseURL: "http://192.168.31.228:8080", // 设置基础 URL
baseURL:'/api',
baseURL: "http://192.168.31.228:8080", // 设置基础 URL
// baseURL:'/api',
timeout: 1000, // 设置请求超时时间
});
......
......@@ -117,13 +117,7 @@ const customerInfo = ref({})
const messages = ref([])
const count = ref(0)
const store = useUserStore()
const userList = ref([])
const automaticPromptRef = ref('')
const inquiryInfo = ref({
price: '20.00',
unit: 'USD',
name: 'Industrial 5V 12V RS232 RS-232 Parallel PCI PC',
})
const rules = reactive({
customerName: [
{
......@@ -171,17 +165,17 @@ const rules = reactive({
let msg = ''
//进入页面直接发送请求从后端获取热点数据
onMounted(async () => {
// connectMsg().then((res) => {
const translate = appContext.config.globalProperties.$translate
connectMsg().then((res) => {
// const translate = appContext.config.globalProperties.$translate
getHistoryMessage()
setMessage()
// })
})
})
const connectMsg = () => {
return new Promise((resolve, reject) => {
const useUser = useUserStore()
useUser.setUserInfo({
username: '17340570937',
username: Date.now(),
})
const toIp = `ws://192.168.31.228:8081?type=yk&code=${useUser.userInfo.username}&kf=${store.customerInfo.username}`
console.log(toIp)
......@@ -247,6 +241,8 @@ const handleButtonClick = () => {
cmd: '11',
msgType: 0,
chatType: '2',
fromLang: 'cn',
toLang: 'en',
group_id: '',
time: getShortDate(),
to: customerInfo.value.username,
......
......@@ -33,16 +33,16 @@ export default defineConfig({
resolvers: [VantResolver(), ElementPlusResolver()],
}),
vuePlugin,
vuePluginsAutoI18n({
option: {
globalPath: "./lang", // 配置文件生成位置
namespace: "lang", // 命名空间
targetLangList: ["en", "ko", "ja"], // 翻译目标语言
originLang: "zh-cn", // 翻译源语言
distPath: "./dist/assets", // 打包后生成文件位置
distKey: "index", // 打包后主文件名称
},
}),
// vuePluginsAutoI18n({
// option: {
// globalPath: "./lang", // 配置文件生成位置
// namespace: "lang", // 命名空间
// targetLangList: ["en", "ko", "ja"], // 翻译目标语言
// originLang: "zh-cn", // 翻译源语言
// distPath: "./dist/assets", // 打包后生成文件位置
// distKey: "index", // 打包后主文件名称
// },
// }),
],
server: {
host: "0.0.0.0",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论