提交 e861a5d9 作者: Hao

add

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