From da323690db0ef9ef70cea6d9eee7b172cd56c594 Mon Sep 17 00:00:00 2001 From: chashaobao Date: Sun, 18 Jan 2026 09:35:45 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A5=20feat(=E6=A8=A1=E5=9D=97):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E4=B8=AA=E5=BE=88=E6=A3=92=E7=9A=84?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants/api.ts | 1 + src/pages/table-list/city-operation/index.tsx | 10 +++++----- src/services/file.ts | 10 ++++++++++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/constants/api.ts b/src/constants/api.ts index 8b9d2ba..98942ce 100644 --- a/src/constants/api.ts +++ b/src/constants/api.ts @@ -27,6 +27,7 @@ export enum AdminAPI { MATERIAL_UPDATE = '/api/bo/resume/update', // 七牛 UPLOAD_FILE = '/api/backend/file/upload', + UPLOAD_FILE_WX = '/api/cityOperator/wxCp/uploadImg', // 运营人员 STAFF_LIST = '/api/staff/getStaffPageList', STAFF_ALL = '/api/staff/getAllStaff', diff --git a/src/pages/table-list/city-operation/index.tsx b/src/pages/table-list/city-operation/index.tsx index 1f3fbaf..1ffa324 100644 --- a/src/pages/table-list/city-operation/index.tsx +++ b/src/pages/table-list/city-operation/index.tsx @@ -19,7 +19,7 @@ import React, { useEffect, useMemo, useRef, useState } from 'react'; import { CITY_OPTIONS } from '@/constants/city'; import { TIME_FORMAT } from '@/constants/global'; -import { uploadFile } from '@/services/file'; +import { uploadFileWx } from '@/services/file'; import { deleteCityOperator, getAllStaffList, getCityOpratorList, updateCityOperator } from '@/services/list'; const useStyles = createStyles(({ token }) => { @@ -69,7 +69,7 @@ const TableList: React.FC = () => { actionRef.current?.reload(); }; const handleUpload = async (file: File) => { - const { url } = await uploadFile({ file, type: 'IMAGE' }); + const url = await uploadFileWx({ file }); return url; }; useEffect(() => { @@ -121,7 +121,7 @@ const TableList: React.FC = () => { copyable: true, search: false, render(_dom, { contactQrCode }) { - return ; + return contactQrCode ? : '-'; }, }, { @@ -131,7 +131,7 @@ const TableList: React.FC = () => { copyable: true, search: false, render(_dom, { groupQrCode }) { - return ; + return groupQrCode ? : '-'; }, }, { @@ -245,7 +245,7 @@ const TableList: React.FC = () => { { + return request(AdminAPI.UPLOAD_FILE_WX, { + method: 'POST', + headers: { + 'Content-Type': 'multipart/form-data', + }, + data: options, + }); +}