diff --git a/src/pages/index/about_us/company_profile/components/AddCompanyProfileDialog.vue b/src/pages/index/about_us/company_profile/components/AddCompanyProfileDialog.vue index c73e6cf..43a3a1b 100644 --- a/src/pages/index/about_us/company_profile/components/AddCompanyProfileDialog.vue +++ b/src/pages/index/about_us/company_profile/components/AddCompanyProfileDialog.vue @@ -16,6 +16,14 @@ + + + + +   {{ formData.company_profile_color }} + + + @@ -40,7 +48,15 @@ import { addCompanyProfile } from "~/service/company_profile"; import { useLoginStore } from "~/store"; // --业务参数 - +const predefineColors = ref([ + '#ff4500', + '#ff8c00', + '#ffd700', + '#90ee90', + '#00ced1', + '#1e90ff', + '#c71585', +]) // --业务方法 @@ -95,6 +111,12 @@ const rules = reactive({ message: '简介排序不能为空' } ], + company_profile_color: [ + { + required: true, + message: '简介背景色不能为空' + } + ], }); diff --git a/src/pages/index/about_us/company_profile/components/DetailCompanyProfileDialog.vue b/src/pages/index/about_us/company_profile/components/DetailCompanyProfileDialog.vue index db43239..d39c1f3 100644 --- a/src/pages/index/about_us/company_profile/components/DetailCompanyProfileDialog.vue +++ b/src/pages/index/about_us/company_profile/components/DetailCompanyProfileDialog.vue @@ -16,6 +16,14 @@ + + + + +   {{ formData.company_profile_color }} + + + @@ -33,6 +41,15 @@ import { isEmptyObject } from "~/utils/index"; // --业务参数 +const predefineColors = ref([ + '#ff4500', + '#ff8c00', + '#ffd700', + '#90ee90', + '#00ced1', + '#1e90ff', + '#c71585', +]) diff --git a/src/pages/index/about_us/company_profile/components/EditCompanyProfileDialog.vue b/src/pages/index/about_us/company_profile/components/EditCompanyProfileDialog.vue index 778af7d..e7d7f91 100644 --- a/src/pages/index/about_us/company_profile/components/EditCompanyProfileDialog.vue +++ b/src/pages/index/about_us/company_profile/components/EditCompanyProfileDialog.vue @@ -16,6 +16,14 @@ + + + + +   {{ formData.company_profile_color }} + + + @@ -39,6 +47,15 @@ import { editCompanyProfile } from "~/service/company_profile"; import { useLoginStore } from "~/store"; // --业务参数 +const predefineColors = ref([ + '#ff4500', + '#ff8c00', + '#ffd700', + '#90ee90', + '#00ced1', + '#1e90ff', + '#c71585', +]) @@ -106,6 +123,12 @@ const rules = reactive({ message: '简介排序不能为空' } ], + company_profile_color: [ + { + required: true, + message: '简介背景色不能为空' + } + ], }); @@ -118,7 +141,7 @@ const handleEditClick = async (formEl) => { return; } isBtnLod.value = true; - const { code ,msg} = await editCompanyProfile(formData.value); + const { code, msg } = await editCompanyProfile(formData.value); if (code == 0) { closeDialog(); props.done(); diff --git a/src/pages/index/about_us/company_profile/index.vue b/src/pages/index/about_us/company_profile/index.vue index fce1731..ab6f0a2 100644 --- a/src/pages/index/about_us/company_profile/index.vue +++ b/src/pages/index/about_us/company_profile/index.vue @@ -48,6 +48,11 @@ :hide-on-click-modal="true" fit="contain" class="el-avatar"> + +