From 42ee373a62757fdb50aac49c64616ae7b105f836 Mon Sep 17 00:00:00 2001 From: Leo_Ding <2405260743@qq.com> Date: Fri, 4 Jul 2025 20:39:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../companyNews/components/EditDialog.vue | 2 +- src/views/dynamic/companyNews/index.vue | 3 +- .../mediaReports/components/EditDialog.vue | 2 +- src/views/dynamic/mediaReports/index.vue | 3 +- src/views/websiteRelated/contactUs/index.vue | 55 +++++++------------ .../websiteRelated/websiteStatement/index.vue | 32 ++++------- 6 files changed, 37 insertions(+), 60 deletions(-) diff --git a/src/views/dynamic/companyNews/components/EditDialog.vue b/src/views/dynamic/companyNews/components/EditDialog.vue index 7510dc4..51c8831 100644 --- a/src/views/dynamic/companyNews/components/EditDialog.vue +++ b/src/views/dynamic/companyNews/components/EditDialog.vue @@ -142,7 +142,7 @@ function handleOk() { ...values, img: formData.value.img, pushAt:dayjs(formData.value.pushAt).format("YYYY-MM-DD"), - type: 'news' + typer: 'news' } let result = null console.log(modal.value.type) diff --git a/src/views/dynamic/companyNews/index.vue b/src/views/dynamic/companyNews/index.vue index 5e63df6..fa1b2da 100644 --- a/src/views/dynamic/companyNews/index.vue +++ b/src/views/dynamic/companyNews/index.vue @@ -137,6 +137,7 @@ async function getPageList() { .getDataList({ pageSize, current:current, + type:'news', ...searchFormData.value, }) .catch(() => { @@ -144,7 +145,7 @@ async function getPageList() { }) hideLoading() if (config('http.code.success') === success) { - listData.value = data.filter(item => item.type === "news") + listData.value = data console.log('消息:',this.listData.value) paginationState.total = total } diff --git a/src/views/dynamic/mediaReports/components/EditDialog.vue b/src/views/dynamic/mediaReports/components/EditDialog.vue index 95dae12..999d2ad 100644 --- a/src/views/dynamic/mediaReports/components/EditDialog.vue +++ b/src/views/dynamic/mediaReports/components/EditDialog.vue @@ -128,7 +128,7 @@ function handleOk() { ...values, img: formData.value.img, pushAt:dayjs(formData.value.pushAt).format("YYYY-MM-DD"), - type: 'banner' + typer: 'banner' } let result = null console.log(modal.value.type) diff --git a/src/views/dynamic/mediaReports/index.vue b/src/views/dynamic/mediaReports/index.vue index 2704265..ba093f6 100644 --- a/src/views/dynamic/mediaReports/index.vue +++ b/src/views/dynamic/mediaReports/index.vue @@ -130,6 +130,7 @@ async function getPageList() { .getDataList({ pageSize, current:current, + type:'banner', ...searchFormData.value, }) .catch(() => { @@ -137,7 +138,7 @@ async function getPageList() { }) hideLoading() if (config('http.code.success') === success) { - listData.value = data.filter(item => item.type === "banner") + listData.value = data paginationState.total = total } } catch (error) { diff --git a/src/views/websiteRelated/contactUs/index.vue b/src/views/websiteRelated/contactUs/index.vue index fdfd0fb..01808b2 100644 --- a/src/views/websiteRelated/contactUs/index.vue +++ b/src/views/websiteRelated/contactUs/index.vue @@ -5,7 +5,7 @@ - +

750*500px,图片大小不超过150kb

@@ -28,44 +28,22 @@ - - - + 保存 @@ -77,7 +55,7 @@ import apis from '@/apis' // 假设这里包含 saveAffirm 接口 import { usePagination } from '@/hooks' import { useI18n } from 'vue-i18n' import { spliceUrl } from '@/utils/util' -import { getWebData,updateWebData} from '@/apis/modules/webSite' +import { getWebData, updateWebData } from '@/apis/modules/webSite' import XSearchBar from '@/components/SearchBar/SearchBar.vue' import GxUpload from '@/components/GxUpload/index.vue' // 获取声明接口 import { config } from '@/config' @@ -114,14 +92,14 @@ async function getPageList() { id.value = res.data.id affirm.value = res.data.affirm reportContent.value = res.data.reportContent - reportImage.value = [config('http.apiBasic')+res.data.reportImage] + reportImage.value = [config('http.apiBasic') + res.data.reportImage] email.value = res.data.email lat.value = res.data.lat lon.value = res.data.lon address.value = res.data.address phone.value = res.data.phone reportNum.value = res.data.reportNum - socialMedia.value = Array.isArray(res.data.socialMedia) ? res.data.socialMedia.map(item=>({link:item.link,name:item.name,image:[config('http.apiBasic')+item.image]})) : [] + socialMedia.value = Array.isArray(res.data.socialMedia) ? res.data.socialMedia.map(item => ({ link: item.link, name: item.name, image: [config('http.apiBasic') + item.image] })) : [] } } catch (e) { message.error('获取声明内容失败') @@ -159,9 +137,10 @@ async function handleSearch() { ? reportImage.value[0] : reportImage?.value; const reportImageFormatted = { - reportImage: spliceUrl(reportImageRaw)}; + reportImage: spliceUrl(reportImageRaw) + }; - await apis.webSite.updateWebData(id.value, { + const {success}=await apis.webSite.updateWebData(id.value, { affirm: affirm.value, reportContent: reportContent.value, reportImage: reportImageFormatted.reportImage, @@ -174,6 +153,11 @@ async function handleSearch() { reportNum: reportNum.value, socialMedia: formattedSocialMedia, }) + if(success){ + getPageList() + message.success('保存成功') + + } // await apis.webSite.updateWebData(id.value, { // affirm: affirm.value, // reportContent: reportContent.value, @@ -189,7 +173,6 @@ async function handleSearch() { // // socialMedia: socialMedia.value, // }) - message.success('保存成功') } catch (e) { message.error('保存失败,请重试') } finally { diff --git a/src/views/websiteRelated/websiteStatement/index.vue b/src/views/websiteRelated/websiteStatement/index.vue index d9bfe3b..933e71d 100644 --- a/src/views/websiteRelated/websiteStatement/index.vue +++ b/src/views/websiteRelated/websiteStatement/index.vue @@ -1,7 +1,7 @@