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,
+ });
+}