diff --git a/app.vue b/app.vue index f1405b8..fc2a3a4 100644 --- a/app.vue +++ b/app.vue @@ -4,6 +4,10 @@ diff --git a/pages/index_about.vue b/pages/index_about.vue index 1ccfdf8..48d95c0 100644 --- a/pages/index_about.vue +++ b/pages/index_about.vue @@ -3,7 +3,7 @@
-

{{ $t('index_name') }}

+

{{ locale=='zh'?info.about_title:info.en_about_title }}

@@ -33,7 +33,7 @@
-

{{ $t('about_a3') }}

+

{{ locale=='zh'?info.about_desc:info.en_about_desc }}

@@ -67,7 +67,7 @@
import { onMounted } from 'vue' - +import bgImage4 from '../public/images/group195.png' +import bgImage5 from '../public/images/maskgroup1.png' +import $api from '@/service/webRequest' +import { useStore } from '~/store' +import { useI18n } from 'vue-i18n' +const { locale } = useI18n() onMounted(() => { + getInfo(); }) +const info=ref({}); +const getInfo=()=>{ + $api.get("/api/sys_config?name=about_us") + .then((res: any) => { + console.log(res) + info.value = res.data.data.config + }) + .catch((err) => { + console.dir(err) + }) +} diff --git a/pages/index_contact.vue b/pages/index_contact.vue index 98f6b5c..b6dbe2b 100644 --- a/pages/index_contact.vue +++ b/pages/index_contact.vue @@ -15,11 +15,11 @@
Phone - +86-186-379-00319 + {{ store.tempApiData.luoyang_sales_hotline }}
Email - hwang@joker019.com + {{ store.tempApiData.site_mail }}
@@ -62,10 +62,7 @@
- Youtube - Facebook - Instagram - Twitter + Youtube
@@ -77,18 +74,25 @@ diff --git a/pages/index_service.vue b/pages/index_service.vue index f43a47a..69ee07d 100644 --- a/pages/index_service.vue +++ b/pages/index_service.vue @@ -2,7 +2,7 @@
{{ $t('servers_b15') }}

{{ $t('servers_b16') }}

- {{ $t('index_contact') }} + {{ $t('index_contact') }}

@@ -120,6 +120,11 @@ + \ No newline at end of file diff --git a/plugins/locales/en.ts b/plugins/locales/en.ts index cf964fd..d4ab4ea 100644 --- a/plugins/locales/en.ts +++ b/plugins/locales/en.ts @@ -84,5 +84,13 @@ export default { contact_b3: 'Your contact information', contact_b4: 'Leave what you want to say', contact_b5: 'Send Out', - contact_b6: 'Follow us' + contact_b6: 'Follow us', + + contact_name_required: 'Name is required', + contact_phone_required: 'Phone number is required', + contact_message_required: 'Message is required', + //提交成功 + contact_success_title: 'Thank you for your submission', + //提交失败 + contact_fail_title: 'Submission failed', } diff --git a/plugins/locales/zh.ts b/plugins/locales/zh.ts index 95630b3..ab78734 100644 --- a/plugins/locales/zh.ts +++ b/plugins/locales/zh.ts @@ -83,5 +83,13 @@ export default { contact_b3: '您的联系方式', contact_b4: '留言', contact_b5: '发送', - contact_b6: '关注我们' + contact_b6: '关注我们', + + contact_name_required: '请输入您的姓名', + contact_phone_required: '请输入您的联系方式', + contact_message_required: '请输入留言内容', + //提交成功 + contact_success: '提交成功', + //提交失败 + contact_error:'提交失败', } diff --git a/public/images/clients11.png b/public/images/clients11.png deleted file mode 100644 index f12f4f3..0000000 Binary files a/public/images/clients11.png and /dev/null differ diff --git a/public/images/clients163.png b/public/images/clients163.png deleted file mode 100644 index 1727288..0000000 Binary files a/public/images/clients163.png and /dev/null differ diff --git a/public/images/clients56.png b/public/images/clients56.png deleted file mode 100644 index 387e9f3..0000000 Binary files a/public/images/clients56.png and /dev/null differ diff --git a/public/images/contact2.png b/public/images/contact2.png deleted file mode 100644 index 577d7b8..0000000 Binary files a/public/images/contact2.png and /dev/null differ diff --git a/public/images/contact7.png b/public/images/contact7.png deleted file mode 100644 index 64942fa..0000000 Binary files a/public/images/contact7.png and /dev/null differ diff --git a/public/images/contact8.png b/public/images/contact8.png deleted file mode 100644 index 58c0495..0000000 Binary files a/public/images/contact8.png and /dev/null differ diff --git a/public/images/contact9.png b/public/images/contact9.png deleted file mode 100644 index fa009d8..0000000 Binary files a/public/images/contact9.png and /dev/null differ diff --git a/public/images/group11-1.png b/public/images/group11-1.png deleted file mode 100644 index 65a960d..0000000 Binary files a/public/images/group11-1.png and /dev/null differ diff --git a/public/images/group11.png b/public/images/group11.png deleted file mode 100644 index 2719812..0000000 Binary files a/public/images/group11.png and /dev/null differ diff --git a/public/images/group12-1.png b/public/images/group12-1.png deleted file mode 100644 index 5fb4e3f..0000000 Binary files a/public/images/group12-1.png and /dev/null differ diff --git a/public/images/group12.png b/public/images/group12.png deleted file mode 100644 index 90db8ed..0000000 Binary files a/public/images/group12.png and /dev/null differ diff --git a/public/images/group13-1.png b/public/images/group13-1.png deleted file mode 100644 index 4f8ce8d..0000000 Binary files a/public/images/group13-1.png and /dev/null differ diff --git a/public/images/group13.png b/public/images/group13.png deleted file mode 100644 index a1e256d..0000000 Binary files a/public/images/group13.png and /dev/null differ diff --git a/public/images/group14-1.png b/public/images/group14-1.png deleted file mode 100644 index 2478f86..0000000 Binary files a/public/images/group14-1.png and /dev/null differ diff --git a/public/images/group14.png b/public/images/group14.png deleted file mode 100644 index af525ff..0000000 Binary files a/public/images/group14.png and /dev/null differ diff --git a/public/images/image8.png b/public/images/image8.png deleted file mode 100644 index e27c30c..0000000 Binary files a/public/images/image8.png and /dev/null differ diff --git a/public/images/maskgroup3.png b/public/images/maskgroup3.png deleted file mode 100644 index 637600f..0000000 Binary files a/public/images/maskgroup3.png and /dev/null differ diff --git a/service/request.ts b/service/request.ts index 19aa1d3..379aefb 100644 --- a/service/request.ts +++ b/service/request.ts @@ -2,10 +2,13 @@ import axios, { type AxiosInstance } from 'axios' import { handleError } from './handleError' function createRequestInstance(getServerUrl: () => string): AxiosInstance { + //获取域名 + const serverUrl = window.location.origin; + //console.log(serverUrl); const instance = axios.create({ timeout: 1000 * 60 * 5, // 超时时间 withCredentials: true, // 允许跨域携带cookie - baseURL: `${getServerUrl()}/`, // 请求地址 + baseURL: serverUrl, // 请求地址 }) instance.interceptors.response.use( diff --git a/store/index.ts b/store/index.ts index 994239a..fd949f9 100644 --- a/store/index.ts +++ b/store/index.ts @@ -3,16 +3,30 @@ import { defineStore, acceptHMRUpdate } from 'pinia' export const useStore = defineStore({ id: 'index', state: () => ({ - name: 'old name', + // 添加临时数据存储字段 + tempApiData: {}, // 存储API返回的临时数据 + serApiData: {}, // 存储API返回的临时数据 + isEnglish: 'zh', // 判断是否是英文 }), getters: { - myName: state => { - return `getters ${state.name}` - }, + // 获取临时API数据的getter + getTempApiData: state => state.tempApiData, }, actions: { - changeName(name: string) { - this.name = name + // 保存API返回的临时数据 + saveTempApiData(data: any) { + this.tempApiData = data + }, + saveSerApiData(data: any) { + this.serApiData = data + }, + // 判断是否是英文 + setIsEnglish(value: string) { + this.isEnglish = value + }, + // 清除临时数据 + clearTempApiData() { + this.tempApiData = {} }, }, })