From e0f8d6c5745fcd75452a0f561f8ba4252844d784 Mon Sep 17 00:00:00 2001 From: yangchunlong <292345300@qq.com> Date: Fri, 28 Mar 2025 16:55:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=A7=A9=20=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/banner.ts | 5 +- src/api/modules/productLink.ts | 6 +- src/api/modules/videoList.ts | 4 ++ .../SearchForm/components/SearchFormItem.vue | 2 +- src/components/Upload/UploadImg.vue | 2 +- src/components/Upload/UploadImgs.vue | 2 +- src/components/Upload/UploadVideo.vue | 2 +- src/utils/url.ts | 1 + src/views/QAManagement/list/index.vue | 2 +- .../articleManagement/list/constant/edit.ts | 2 +- .../articleManagement/list/constant/search.ts | 4 +- .../articleManagement/list/constant/table.ts | 11 +++- src/views/articleManagement/list/index.vue | 11 +++- src/views/articleManagement/recycle/index.vue | 2 +- src/views/articleManagement/remark/index.vue | 7 ++- src/views/bannerManagement/class/index.vue | 15 ++++- .../bannerManagement/list/constant/edit.ts | 32 ++++------ src/views/bannerManagement/list/index.vue | 63 +++++++++++-------- src/views/downloadManagement/class/index.vue | 2 +- src/views/downloadManagement/list/index.vue | 2 +- .../downloadManagement/recycle/index.vue | 2 +- src/views/feedbackManagement/agent/index.vue | 5 +- .../feedbackManagement/contact/index.vue | 5 +- .../feedbackManagement/purchase/index.vue | 5 +- src/views/productManagement/link/index.vue | 22 ++++--- .../list/components/basicInfo.vue | 4 +- .../productManagement/list/constant/edit.ts | 2 +- src/views/productManagement/list/edit.vue | 4 +- src/views/productManagement/list/index.vue | 10 +-- src/views/productManagement/recycle/index.vue | 2 +- src/views/videoManagement/class/index.vue | 2 +- src/views/videoManagement/list/index.vue | 20 +++--- src/views/videoManagement/recycle/index.vue | 2 +- .../webManagement/configuration/index.vue | 2 +- src/views/webManagement/menu/index.vue | 2 +- 35 files changed, 165 insertions(+), 101 deletions(-) create mode 100644 src/utils/url.ts diff --git a/src/api/modules/banner.ts b/src/api/modules/banner.ts index e0ed5a4..5b3a23b 100644 --- a/src/api/modules/banner.ts +++ b/src/api/modules/banner.ts @@ -6,7 +6,6 @@ export const getBannerListApi = (params: any) => { }; //新增 export const getBannerListSaveApi = (params: any) => { - console.log("1232323"); return http.post(`${B}/save`, params, { headers: { "Content-Type": "application/x-www-form-urlencoded" @@ -37,3 +36,7 @@ export const getBannerListExportApi = (params: any) => { responseType: "arraybuffer" }); }; +//分类 +export const getBannerClassListApi = () => { + return http.get(`/banner/list`); //v1/banner/list +}; diff --git a/src/api/modules/productLink.ts b/src/api/modules/productLink.ts index 99cec3a..07d5918 100644 --- a/src/api/modules/productLink.ts +++ b/src/api/modules/productLink.ts @@ -26,5 +26,9 @@ export const getProductBuypassUpdateApi = (params: any) => { //新增 export const getProductBuypassListSaveApi = (params: any) => { - return http.post(`${PRODUCT_BUYPASS}/save`, params); + return http.post(`${PRODUCT_BUYPASS}/save`, params, { + headers: { + "Content-Type": "application/x-www-form-urlencoded" + } + }); }; diff --git a/src/api/modules/videoList.ts b/src/api/modules/videoList.ts index ae13edd..1bc0c50 100644 --- a/src/api/modules/videoList.ts +++ b/src/api/modules/videoList.ts @@ -26,3 +26,7 @@ export const getVideoListExportApi = (params: any) => { responseType: "arraybuffer" }); }; +//视频分类 +export const getVideoClassListApi = () => { + return http.get(`/video/categorys`); +}; diff --git a/src/components/SearchForm/components/SearchFormItem.vue b/src/components/SearchForm/components/SearchFormItem.vue index 8205c34..42d8d63 100644 --- a/src/components/SearchForm/components/SearchFormItem.vue +++ b/src/components/SearchForm/components/SearchFormItem.vue @@ -189,7 +189,7 @@ const handlePicker = (item: any) => { if (Array.isArray(_searchParam.value[prop]) && _searchParam.value[prop].length > 0) { let _date: any = cloneDeep(_searchParam.value[prop]); _date[0] = _date[0] + " " + "00:00:00"; - _date[1] = _date[1] + " " + "00:00:00"; + _date[1] = _date[1] + " " + "23:59:59"; _searchParam.value[item.startDate] = _date.join(","); } else { _searchParam.value[item.startDate] = ""; diff --git a/src/components/Upload/UploadImg.vue b/src/components/Upload/UploadImg.vue index a98bca3..54b9c97 100644 --- a/src/components/Upload/UploadImg.vue +++ b/src/components/Upload/UploadImg.vue @@ -102,7 +102,7 @@ const formItemContext = inject(formItemContextKey, void 0); const self_disabled = computed(() => { return props.disabled || formContext?.disabled; }); -const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL; +import { h } from "@/utils/url"; /** * @description 图片上传 * @param options upload 所有配置项 diff --git a/src/components/Upload/UploadImgs.vue b/src/components/Upload/UploadImgs.vue index 4771bb7..666f5ab 100644 --- a/src/components/Upload/UploadImgs.vue +++ b/src/components/Upload/UploadImgs.vue @@ -88,7 +88,7 @@ const self_disabled = computed(() => { }); const _fileList = ref(props.fileList); -const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL; +import { h } from "@/utils/url"; // 监听 props.fileList 列表默认值改变 watch( () => props.fileList, diff --git a/src/components/Upload/UploadVideo.vue b/src/components/Upload/UploadVideo.vue index d4e89ad..1ed8f10 100644 --- a/src/components/Upload/UploadVideo.vue +++ b/src/components/Upload/UploadVideo.vue @@ -37,7 +37,7 @@ import { ElNotification, formContextKey, formItemContextKey } from "element-plus import type { UploadProps, UploadRequestOptions } from "element-plus"; interface UploadFileProps { - videoUrl: string; // 图片地址 ==> 必传 + videoUrl: any; // 图片地址 ==> 必传 api?: (params: any) => Promise; // 上传图片的 api 方法,一般项目上传都是同一个 api 方法,在组件里直接引入即可 ==> 非必传 width?: string; disabled?: boolean; // 是否禁用上传组件 ==> 非必传(默认为 false) diff --git a/src/utils/url.ts b/src/utils/url.ts new file mode 100644 index 0000000..8d2596a --- /dev/null +++ b/src/utils/url.ts @@ -0,0 +1 @@ +export const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL; diff --git a/src/views/QAManagement/list/index.vue b/src/views/QAManagement/list/index.vue index 3c2b0fe..f0488b3 100644 --- a/src/views/QAManagement/list/index.vue +++ b/src/views/QAManagement/list/index.vue @@ -28,7 +28,7 @@ diff --git a/src/views/feedbackManagement/purchase/index.vue b/src/views/feedbackManagement/purchase/index.vue index 2e02c45..5667c74 100644 --- a/src/views/feedbackManagement/purchase/index.vue +++ b/src/views/feedbackManagement/purchase/index.vue @@ -40,7 +40,10 @@ const handleExport = () => { }; //导出 const getBPListExport = async () => { - const result = await getBPListExportApi(dataStore.ruleForm); + const result = await getBPListExportApi({ + ...proTableRef?.value?.searchParam, + ...proTableRef?.value?.pageable + }); await useExport(result); }; // diff --git a/src/views/productManagement/link/index.vue b/src/views/productManagement/link/index.vue index 39f3863..482a6ec 100644 --- a/src/views/productManagement/link/index.vue +++ b/src/views/productManagement/link/index.vue @@ -97,6 +97,7 @@ const dataStore = reactive({ const getProductBuypassListSave = async (params: any) => { const result = await getProductBuypassListSaveApi(params); if (result?.code === 0) { + useMsg("success", result?.msg); // proTableRef?.value?.getTableList(); // console.log(result?.data); } @@ -105,6 +106,7 @@ const getProductBuypassListSave = async (params: any) => { const getProductBuypassUpdate = async (params: any) => { const result = await getProductBuypassUpdateApi(params); if (result?.code === 0) { + useMsg("success", result?.msg); // console.log(result?.data); } }; @@ -136,17 +138,16 @@ const handleInputOrChange = (it: any, scope: any, itIndex: any) => { platform_id = item.id; } }); - //更新 - if (link_id) { + + //添加 + if (!link_id) { getProductBuypassListSave({ - id: link_id, - param: { - platform_id, - link - } + product_id: scope.row.id, + platform_id, + link }); } else { - //添加 + // 更新 getProductBuypassUpdate({ id: link_id, param: { @@ -177,7 +178,10 @@ const handleExport = () => { //导出接口 const getProductBuypassListExport = async () => { - const result = await getProductBuypassListExportApi(dataStore.ruleForm); + const result = await getProductBuypassListExportApi({ + ...proTableRef?.value?.searchParam, + ...proTableRef?.value?.pageable + }); await useExport(result); }; diff --git a/src/views/productManagement/list/components/basicInfo.vue b/src/views/productManagement/list/components/basicInfo.vue index 5cda214..a72a221 100644 --- a/src/views/productManagement/list/components/basicInfo.vue +++ b/src/views/productManagement/list/components/basicInfo.vue @@ -53,7 +53,7 @@ - + @@ -63,7 +63,7 @@ - + diff --git a/src/views/productManagement/list/constant/edit.ts b/src/views/productManagement/list/constant/edit.ts index 67ca920..a10b652 100644 --- a/src/views/productManagement/list/constant/edit.ts +++ b/src/views/productManagement/list/constant/edit.ts @@ -118,7 +118,7 @@ export const BASIC_INFO_FORM_DATA: FormItem[] = [ prop: "seo_keyword", placeholder: "请输入", type: "input", - label: "SEO关键字: " + label: "SEO关键词: " }, { prop: "seo_desc", diff --git a/src/views/productManagement/list/edit.vue b/src/views/productManagement/list/edit.vue index 47b5b58..0757537 100644 --- a/src/views/productManagement/list/edit.vue +++ b/src/views/productManagement/list/edit.vue @@ -14,12 +14,12 @@ - +
- +
添加行 diff --git a/src/views/productManagement/list/index.vue b/src/views/productManagement/list/index.vue index d14312e..bfbb895 100644 --- a/src/views/productManagement/list/index.vue +++ b/src/views/productManagement/list/index.vue @@ -52,7 +52,7 @@ import ProTable from "@/components/ProTable/index.vue"; import { integerRexg } from "@/utils/regexp/index"; import { useMsg } from "@/hooks/useMsg"; import { useExport } from "@/hooks/useExport"; -const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL; +import { h } from "@/utils/url"; //列表接口 //getProductDelApi import { @@ -85,7 +85,10 @@ const handleExport = () => { }; //导出接口 const getProductListExport = async () => { - const result = await getProductListExportApi(dataStore.ruleForm); + const result = await getProductListExportApi({ + ...proTableRef?.value?.searchParam, + ...proTableRef?.value?.pageable + }); await useExport(result); }; //上下架 @@ -128,9 +131,6 @@ const handleInput = (row: any) => { //按钮点击事件 const handleBtnClick = (type: any, row: any) => { - // if (type === "删除") { - // // getProductDel(row.id); - // } //添加SUK和删除暂时无法操作 if (type == "添加SUK" || type === "删除") { return false; diff --git a/src/views/productManagement/recycle/index.vue b/src/views/productManagement/recycle/index.vue index 32fe0ad..d4ae1ac 100644 --- a/src/views/productManagement/recycle/index.vue +++ b/src/views/productManagement/recycle/index.vue @@ -26,7 +26,7 @@