From b0206985cc63ea85ac9d22980daf0ee37f63d908 Mon Sep 17 00:00:00 2001 From: quantulr <35954003+quantulr@users.noreply.github.com> Date: Fri, 11 Aug 2023 17:29:39 +0800 Subject: [PATCH] bugfix and performance improvements --- src/components/ImageUpload/index.vue | 17 +++++- src/components/WebsiteHeader/index.vue | 26 ++++++-- src/components/webFooter/index.vue | 28 +++++++-- src/i18n/message.js | 4 ++ src/i18n/message/admin/form/ru.js | 1 + src/i18n/message/admin/form/zh.js | 1 + src/i18n/message/common/ru.js | 2 + src/i18n/message/common/zh.js | 2 + src/router/index.js | 22 +++---- src/utils/parameter.js | 7 ++- .../admin/agent/service/enterprise/index.vue | 14 ++--- src/views/admin/enterprise/account/bill.vue | 15 +++-- .../admin/enterprise/extension/product.vue | 4 +- src/views/admin/expert/demand/think.vue | 15 +++++ .../research/research/achievement/index.vue | 1 + src/views/components/AgentForm/index.vue | 60 ++++++++++++------- src/views/components/EnterpriseForm/index.vue | 20 +++---- src/views/components/ExpertForm/index.vue | 18 ++++++ src/views/components/LaboratoryForm/index.vue | 18 ++++++ src/views/components/ReleaseForm/index.vue | 20 +++++++ src/views/website/about/about.vue | 25 +++++++- src/views/website/activity/activity.vue | 22 +++++++ src/views/website/home/comp/index8.vue | 19 +++++- src/views/website/innovate/detail.vue | 21 +++++-- src/views/website/innovate/innovate.vue | 36 +++++++---- .../website/solution/components/seeMore.vue | 12 ++-- src/views/website/solution/detail.vue | 26 ++++++-- src/views/website/solution/solution.vue | 27 ++++++--- 28 files changed, 378 insertions(+), 105 deletions(-) diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index 4ca1156..defe01d 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -22,7 +22,18 @@ -
+ +
+ Пожалуйста, загрузите файл + + + +
+
请上传 diff --git a/src/views/admin/expert/demand/think.vue b/src/views/admin/expert/demand/think.vue index 3094be4..f3528aa 100644 --- a/src/views/admin/expert/demand/think.vue +++ b/src/views/admin/expert/demand/think.vue @@ -108,6 +108,21 @@ :placeholder="t('admin.form.defaultExpertPhone')" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -203,11 +221,11 @@ const rules = reactive({ // }, ], idCard: [ - { - required: true, - message: computed(() => t("admin.form.placeholder")), - trigger: "blur", - }, + // { + // required: true, + // message: computed(() => t("admin.form.placeholder")), + // trigger: "blur", + // }, ], wordAddress: [ { @@ -224,25 +242,25 @@ const rules = reactive({ }, ], "idImage.0": [ - { - required: true, - message: computed(() => t("admin.validation.pleaseUpload")), - trigger: ["blur", "change"], - }, + // { + // required: true, + // message: computed(() => t("admin.validation.pleaseUpload")), + // trigger: ["blur", "change"], + // }, ], "idImage.1": [ - { - required: true, - message: computed(() => t("admin.validation.pleaseUpload")), - trigger: ["blur", "change"], - }, + // { + // required: true, + // message: computed(() => t("admin.validation.pleaseUpload")), + // trigger: ["blur", "change"], + // }, ], "idImage.2": [ - { - required: true, - message: computed(() => t("admin.validation.pleaseUpload")), - trigger: ["blur", "change"], - }, + // { + // required: true, + // message: computed(() => t("admin.validation.pleaseUpload")), + // trigger: ["blur", "change"], + // }, ], certificatePics: [ { diff --git a/src/views/components/EnterpriseForm/index.vue b/src/views/components/EnterpriseForm/index.vue index 33a3c2b..322bb53 100644 --- a/src/views/components/EnterpriseForm/index.vue +++ b/src/views/components/EnterpriseForm/index.vue @@ -45,21 +45,13 @@ + + @@ -67,6 +59,14 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - {{ item.title }} + {{ item[titleField] }}
@@ -39,12 +39,25 @@ import webFooter from "@/components/webFooter/index.vue"; import request from "@/utils/request"; import { banner } from "@/api/website/home/index"; import { getAboutList } from "../../../api/website/aboutUs"; +import { useI18n } from "vue-i18n"; +import { computed, onMounted, reactive, ref } from "vue"; + +const { t, locale } = useI18n(); +const titleField = computed(() => { + return locale.value === "zh" ? "title" : `${locale.value}Title`; +}); + +const contentField = computed(() => { + return locale.value === "zh" ? "content" : `${locale.value}Content`; +}); + function about() { return request({ url: "/v1/sys/about", method: "get", }); } + const loading = ref(true); const state = reactive({ data: [], @@ -74,9 +87,11 @@ function getData() { loading.value = false; }); } + onMounted(() => { getData(); }); + function handleActive(id) { kindId.value = id; } @@ -85,13 +100,16 @@ function handleActive(id) {