提交 12dd8e6d 作者: 龚洪江

Merge remote-tracking branch 'origin/develop' into develop

...@@ -31,6 +31,21 @@ jobs: ...@@ -31,6 +31,21 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: WeChat Work notification by markdown
uses: chf007/action-wechat-work@master
env:
WECHAT_WORK_BOT_WEBHOOK: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9be1b073-1760-442d-8e3d-faa0fd32ea16
with:
msgtype: markdown
content: "
### GitHub提交信息 \n
> - 提交人: ${{github.actor}} \n
> - 提交信息: ${{ github.event.head_commit.message }} \n
> - 提交到仓库: ${{github.repository}} \n
> - 提交到分支: ${{github.ref}} \n
即将开始更新,请关注Argocd同步状态...
"
- name: Login to ACR EE with the AccessKey pair - name: Login to ACR EE with the AccessKey pair
uses: aliyun/acr-login@v1 uses: aliyun/acr-login@v1
with: with:
...@@ -56,5 +71,20 @@ jobs: ...@@ -56,5 +71,20 @@ jobs:
git config user.name "Chuck" git config user.name "Chuck"
git config user.email "Chuck@users.noreply.github.com" git config user.email "Chuck@users.noreply.github.com"
git remote set-url origin "$GITLAB_URL" git remote set-url origin "$GITLAB_URL"
git commit -am "Generated Image Update" git commit -am "Update Image Tag"
git push origin "develop" git tag -a $TAG -m "日常迭代"
git push origin "develop" --tags
- name: Send Error Notification by WeChat
if: ${{ failure() }}
run: |
curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9be1b073-1760-442d-8e3d-faa0fd32ea16' -H 'Content-Type: application/json' -d '
{
"msgtype": "markdown",
"markdown": {
"content": "### GitHub构建并推送镜像失败 \n
> - 提交人: ${{github.actor}} \n
> - 提交信息: ${{github.event.head_commit.message}} \n
> - 提交到仓库: ${{github.repository}} \n
> - 提交到分支: ${{github.ref}} \n 请修复错误后重新提交..."
}'
\ No newline at end of file
...@@ -32,6 +32,21 @@ jobs: ...@@ -32,6 +32,21 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: WeChat Work notification by markdown
uses: chf007/action-wechat-work@master
env:
WECHAT_WORK_BOT_WEBHOOK: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9be1b073-1760-442d-8e3d-faa0fd32ea16
with:
msgtype: markdown
content: "
### GitHub提交信息 \n
> - 提交人: ${{github.actor}} \n
> - 提交信息: ${{ github.event.head_commit.message }} \n
> - 提交到仓库: ${{github.repository}} \n
> - 提交到分支: ${{github.ref}} \n
即将开始更新,请关注Argocd同步状态...
"
- name: Login to ACR EE with the AccessKey pair - name: Login to ACR EE with the AccessKey pair
uses: aliyun/acr-login@v1 uses: aliyun/acr-login@v1
with: with:
...@@ -57,5 +72,20 @@ jobs: ...@@ -57,5 +72,20 @@ jobs:
git config user.name "Chuck" git config user.name "Chuck"
git config user.email "Chuck@users.noreply.github.com" git config user.email "Chuck@users.noreply.github.com"
git remote set-url origin "$GITLAB_URL" git remote set-url origin "$GITLAB_URL"
git commit -am "generated Image update" git commit -am "Update Image Tag"
git push origin "master" git tag -a $TAG -m "日常迭代"
git push origin "master" --tags
- name: Send Error Notification by WeChat
if: ${{ failure() }}
run: |
curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9be1b073-1760-442d-8e3d-faa0fd32ea16' -H 'Content-Type: application/json' -d '
{
"msgtype": "markdown",
"markdown": {
"content": "### GitHub构建并推送镜像失败 \n
> - 提交人: ${{github.actor}} \n
> - 提交信息: ${{github.event.head_commit.message}} \n
> - 提交到仓库: ${{github.repository}} \n
> - 提交到分支: ${{github.ref}} \n 请修复错误后重新提交..."
}'
\ No newline at end of file
#请求接口地址 #请求接口地址
#VITE_REQUEST_BASE_URL='https://www.iuav.shop' #VITE_REQUEST_BASE_URL='https://www.iuav.shop'
VITE_REQUEST_BASE_URL='https://test.iuav.shop' #VITE_REQUEST_BASE_URL='https://test.iuav.shop' // 测试服
#VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn' #VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn'
#VITE_REQUEST_BASE_URL='/api' VITE_REQUEST_BASE_URL='/api'
#旧版接口地址 #旧版接口地址
#VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn' #VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn'
#VITE_REQUEST_BASE_URL='https://test.iuav.mmcuav.cn' #VITE_REQUEST_BASE_URL='https://test.iuav.mmcuav.cn'
...@@ -10,6 +10,7 @@ VITE_REQUEST_BASE_URL='https://test.iuav.shop' ...@@ -10,6 +10,7 @@ VITE_REQUEST_BASE_URL='https://test.iuav.shop'
#VITE_REQUEST_BASE_URL='http://192.168.3.22:10001' #VITE_REQUEST_BASE_URL='http://192.168.3.22:10001'
#VITE_REQUEST_BASE_URL='http://192.168.3.17:8099' #VITE_REQUEST_BASE_URL='http://192.168.3.17:8099'
#VITE_REQUEST_BASE_URL='http://192.168.3.23:35150' #VITE_REQUEST_BASE_URL='http://192.168.3.23:35150'
#VITE_REQUEST_BASE_URL='http://192.168.3.111:10001'
#版本 #版本
NODE_ENV='development' NODE_ENV='development'
VERSION='2.2.4.230217.Release' VERSION='2.2.4.230217.Release'
#请求接口地址 #请求接口地址
#VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn' #VITE_REQUEST_BASE_URL='https://www.iuav.shop'
VITE_REQUEST_BASE_URL='https://test.iuav.shop' VITE_REQUEST_BASE_URL='https://test.iuav.shop'
#VITE_REQUEST_BASE_URL='/api' #VITE_REQUEST_BASE_URL='/api'
#旧版接口地址 #旧版接口地址
......
...@@ -4,7 +4,7 @@ metadata: ...@@ -4,7 +4,7 @@ metadata:
name: admin-deployment name: admin-deployment
namespace: default namespace: default
spec: spec:
minReadySeconds: 5 minReadySeconds: 10
revisionHistoryLimit: 2 revisionHistoryLimit: 2
replicas: 1 replicas: 1
selector: selector:
...@@ -27,6 +27,7 @@ spec: ...@@ -27,6 +27,7 @@ spec:
cpu: 100m cpu: 100m
ports: ports:
- containerPort: 80 - containerPort: 80
name: admin-port
volumes: volumes:
- name: log-of-nginx - name: log-of-nginx
hostPath: hostPath:
......
...@@ -3,9 +3,9 @@ kind: Deployment ...@@ -3,9 +3,9 @@ kind: Deployment
metadata: metadata:
name: admin-deployment name: admin-deployment
spec: spec:
replicas: 2 replicas: 1
strategy: strategy:
type: RollingUpdate type: RollingUpdate
rollingUpdate: rollingUpdate:
maxSurge: 1 maxSurge: 1
maxUnavailable: 1 maxUnavailable: 0
\ No newline at end of file
...@@ -14,4 +14,4 @@ patches: ...@@ -14,4 +14,4 @@ patches:
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag: 6734c922902c32116dbfda98fbd95793607fb835 newTag: bac794979fb129c97afb5c04e149709b916230bb
...@@ -31,6 +31,7 @@ export type releaseTenderNews = InterListFunction< ...@@ -31,6 +31,7 @@ export type releaseTenderNews = InterListFunction<
port: number; port: number;
tenderName: string; tenderName: string;
using: number; using: number;
url: string;
} }
>; >;
// 新增招标快讯 // 新增招标快讯
......
...@@ -2,6 +2,8 @@ import React, { useEffect, useState } from 'react'; ...@@ -2,6 +2,8 @@ import React, { useEffect, useState } from 'react';
import { message, Upload, UploadProps } from 'antd'; import { message, Upload, UploadProps } from 'antd';
import { CommonAPI } from '~/api'; import { CommonAPI } from '~/api';
import './index.scss'; import './index.scss';
import Viewer from '~/components/viewer';
import saveAs from 'file-saver';
interface PropsType { interface PropsType {
listType?: 'text' | 'picture' | 'picture-card'; // 上传列表的内建样式 listType?: 'text' | 'picture' | 'picture-card'; // 上传列表的内建样式
...@@ -43,6 +45,11 @@ export const Uploader: React.FC<PropsType> = (props) => { ...@@ -43,6 +45,11 @@ export const Uploader: React.FC<PropsType> = (props) => {
defaultFileList, defaultFileList,
disabled, disabled,
} = props; } = props;
// 是否上传图片
const [visible, setVisible] = useState<boolean>(false);
// 当前选择的文件
const [currentFile, setCurrentFile] = useState<string>();
// 文件列表
const [fileList, setFileList] = useState<any[]>([]); const [fileList, setFileList] = useState<any[]>([]);
// 上传文件配置 // 上传文件配置
const uploadProps: UploadProps = { const uploadProps: UploadProps = {
...@@ -114,7 +121,23 @@ export const Uploader: React.FC<PropsType> = (props) => { ...@@ -114,7 +121,23 @@ export const Uploader: React.FC<PropsType> = (props) => {
setFileList(newFileList); setFileList(newFileList);
onChange?.(newFileList); onChange?.(newFileList);
}, },
// onPreview: { onPreview }, onPreview: (res) => {
const { url } = res;
const fileType = url?.substring(url?.lastIndexOf('.') + 1) || '';
if (['png', 'jpg', 'bmp', 'gif', 'jpeg', 'webp'].includes(fileType)) {
setCurrentFile(url);
setVisible(true);
} else {
if (url) {
// 如果有oss地址,则直接下载
saveAs(url.replace(/^http:/, 'https:'), res?.name ? res.name : '未命名文件');
} else {
// 没有就直接保存文件
const blob = new Blob([res as any]);
saveAs(blob, res.name);
}
}
},
}; };
useEffect(() => { useEffect(() => {
// 如果有默认文件列表 // 如果有默认文件列表
...@@ -135,6 +158,19 @@ export const Uploader: React.FC<PropsType> = (props) => { ...@@ -135,6 +158,19 @@ export const Uploader: React.FC<PropsType> = (props) => {
{fileList.length < (fileLength || 1) && children} {fileList.length < (fileLength || 1) && children}
</Upload> </Upload>
)} )}
<Viewer
visible={visible}
currentImgList={[
{
src: currentFile,
alt: '图片',
},
]}
activeViewerIndex={0}
setVisible={() => {
setVisible(false);
}}
/>
</div> </div>
); );
}; };
...@@ -5,6 +5,7 @@ interface propsType { ...@@ -5,6 +5,7 @@ interface propsType {
visible: boolean; visible: boolean;
currentImgList: any; currentImgList: any;
activeViewerIndex: number; activeViewerIndex: number;
// eslint-disable-next-line @typescript-eslint/ban-types
setVisible: Function; setVisible: Function;
} }
......
...@@ -65,9 +65,9 @@ export const ChangeModal: FC<PropsType> = (props) => { ...@@ -65,9 +65,9 @@ export const ChangeModal: FC<PropsType> = (props) => {
return ( return (
<Modal open={open} title='变更' onCancel={handleClosed} destroyOnClose onOk={handleSubmit}> <Modal open={open} title='变更' onCancel={handleClosed} destroyOnClose onOk={handleSubmit}>
<Form form={form} labelCol={{ span: 5 }} wrapperCol={{ span: 16 }}> <Form form={form} labelCol={{ span: 5 }} wrapperCol={{ span: 16 }}>
<Form.Item label='等级标签' name='cooperationTagIds'> <Form.Item label='加盟身份' name='cooperationTagIds'>
<Select <Select
placeholder='请选择等级标签' placeholder='请选择加盟身份'
disabled={!data?.userName && !data?.companyName} disabled={!data?.userName && !data?.companyName}
allowClear allowClear
options={cooperationTagIdList} options={cooperationTagIdList}
......
...@@ -147,7 +147,7 @@ function CustomListView() { ...@@ -147,7 +147,7 @@ function CustomListView() {
render: (text) => (text ? '普通用户' : '游客用户'), render: (text) => (text ? '普通用户' : '游客用户'),
}, },
{ {
title: '渠道等级', title: '加盟身份',
dataIndex: 'cooperationTagVOS', dataIndex: 'cooperationTagVOS',
align: 'center', align: 'center',
render: (_text, record) => render: (_text, record) =>
......
...@@ -38,6 +38,8 @@ const bannerType = [ ...@@ -38,6 +38,8 @@ const bannerType = [
{ label: '链接', value: 8 }, { label: '链接', value: 8 },
{ label: '富文本', value: 11 }, { label: '富文本', value: 11 },
]; ];
// 全部数据
// let tableDataAll: TableType = [];
const MaterielManageDetail = () => { const MaterielManageDetail = () => {
const { confirm } = Modal; const { confirm } = Modal;
...@@ -121,6 +123,7 @@ const MaterielManageDetail = () => { ...@@ -121,6 +123,7 @@ const MaterielManageDetail = () => {
if (res && res.code === '200') { if (res && res.code === '200') {
const { list } = res.result; // 解构 const { list } = res.result; // 解构
setTableDataAll(list || []); setTableDataAll(list || []);
// tableDataAll = list || [];
} }
}; };
// 切换排序 // 切换排序
...@@ -148,24 +151,30 @@ const MaterielManageDetail = () => { ...@@ -148,24 +151,30 @@ const MaterielManageDetail = () => {
setSortBtnDisabled(true); setSortBtnDisabled(true);
// 转换位置 // 转换位置
const res = await CommonAPI.exchangeBannerInfo( const res = await CommonAPI.exchangeBannerInfo(
from === 'up' ? [tableDataAll[index - 1], item] : [tableDataAll[index + 1], item], from === 'up'
? [tableDataAll[index - 1], tableDataAll[index]]
: [tableDataAll[index + 1], tableDataAll[index]],
); );
if (res && res.code === '200') { if (res && res.code === '200') {
message.success('操作成功').then(); message.success('操作成功').then();
setSortBtnDisabled(false);
// setSelectedRows(from === 'up' ? [tableDataAll[index - 1]] : [tableDataAll[index + 1]]); // setSelectedRows(from === 'up' ? [tableDataAll[index - 1]] : [tableDataAll[index + 1]]);
// 如果是当前页的第一条数据 // 如果是当前页的第一条数据
if (tableIndex === 0 && from === 'up') { if (tableIndex === 0 && from === 'up') {
paginationChange(pagination.current - 1, pagination.pageSize); paginationChange(pagination.current - 1, pagination.pageSize);
await getAllData();
await setSortBtnDisabled(false);
return; return;
} }
// 如果是当前页的最后一条数据 // 如果是当前页的最后一条数据
if (tableIndex === tableData.length - 1 && from === 'down') { if (tableIndex === tableData.length - 1 && from === 'down') {
paginationChange(pagination.current + 1, pagination.pageSize); paginationChange(pagination.current + 1, pagination.pageSize);
await getAllData();
await setSortBtnDisabled(false);
return; return;
} }
paginationChange(pagination.current, pagination.pageSize); paginationChange(pagination.current, pagination.pageSize);
getAllData().then(); await getAllData();
await setSortBtnDisabled(false);
} }
}; };
// 修改提交数据 // 修改提交数据
...@@ -209,6 +218,13 @@ const MaterielManageDetail = () => { ...@@ -209,6 +218,13 @@ const MaterielManageDetail = () => {
width: '50px', width: '50px',
render: (_text, _record, index) => (pagination.current - 1) * pagination.pageSize + index + 1, render: (_text, _record, index) => (pagination.current - 1) * pagination.pageSize + index + 1,
}, },
// {
// title: 'sort',
// dataIndex: 'sort',
// align: 'center',
// width: '100px',
// ellipsis: true,
// },
{ {
title: '名称', title: '名称',
dataIndex: 'bannerName', dataIndex: 'bannerName',
...@@ -411,6 +427,7 @@ const MaterielManageDetail = () => { ...@@ -411,6 +427,7 @@ const MaterielManageDetail = () => {
setAddModalVisible(false); setAddModalVisible(false);
setEditData(undefined); setEditData(undefined);
paginationChange(pagination.current, pagination.pageSize); paginationChange(pagination.current, pagination.pageSize);
getAllData().then();
}} }}
moduleId={Number(qs.parse(location.search).id)} moduleId={Number(qs.parse(location.search).id)}
/> />
......
...@@ -184,7 +184,7 @@ const MaterielManageView = () => { ...@@ -184,7 +184,7 @@ const MaterielManageView = () => {
search={[ search={[
{ {
label: '模块名称', label: '模块名称',
name: 'keyword', name: 'moduleName',
type: 'input', type: 'input',
placeholder: '请输入模块名称', placeholder: '请输入模块名称',
}, },
......
...@@ -5,6 +5,7 @@ import { releaseTenderNewsUpdate, releaseTenderNews } from '~/api/interface/reso ...@@ -5,6 +5,7 @@ import { releaseTenderNewsUpdate, releaseTenderNews } from '~/api/interface/reso
import { ResourceManageAPI } from '~/api'; import { ResourceManageAPI } from '~/api';
import { Uploader } from '~/components/uploader'; import { Uploader } from '~/components/uploader';
import { UploadOutlined } from '@ant-design/icons'; import { UploadOutlined } from '@ant-design/icons';
import { uploadFile } from '~/utils/uploadFile';
// 列表的类型 // 列表的类型
type TableType = InterListType<releaseTenderNews>; type TableType = InterListType<releaseTenderNews>;
...@@ -48,11 +49,23 @@ const AddEditModal: React.FC<propType> = (props) => { ...@@ -48,11 +49,23 @@ const AddEditModal: React.FC<propType> = (props) => {
}; };
// 提交事件 // 提交事件
const handleSubmit = async (values: ReqType & { file: any[] }) => { const handleSubmit = async (values: ReqType & { file: any[] }) => {
// 上传文件
const filePath = await uploadFile(values?.file?.at(-1));
// 新建formData
const formData = new FormData(); const formData = new FormData();
formData.append('file', values?.file?.at(-1)); formData.append('file', values?.file?.at(-1));
const blob = new Blob([JSON.stringify({ ...values, id: data?.id ? data?.id : null })], { const blob = new Blob(
[
JSON.stringify({
...values,
id: data?.id ? data?.id : null,
url: filePath ? filePath : null,
}),
],
{
type: 'application/json', type: 'application/json',
}); },
);
formData.append('tenderNewsVO', blob); formData.append('tenderNewsVO', blob);
const res = await ResourceManageAPI[ const res = await ResourceManageAPI[
data?.id ? 'releaseTenderNewsUpdate' : 'releaseTenderNewsAdd' data?.id ? 'releaseTenderNewsUpdate' : 'releaseTenderNewsAdd'
...@@ -115,6 +128,7 @@ const AddEditModal: React.FC<propType> = (props) => { ...@@ -115,6 +128,7 @@ const AddEditModal: React.FC<propType> = (props) => {
onChange={(e) => { onChange={(e) => {
form.setFieldValue('file', e); form.setFieldValue('file', e);
}} }}
defaultFileList={data?.url ? [{ url: data?.url, name: `${data.tenderName}.xlsx` }] : []}
> >
<Button icon={<UploadOutlined />} type={'primary'}> <Button icon={<UploadOutlined />} type={'primary'}>
上传 上传
......
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import { useLocation, useNavigate } from 'react-router-dom'; import { useLocation, useNavigate } from 'react-router-dom';
import SearchBox from '~/components/search-box'; import SearchBox from '~/components/search-box';
import { Button, Table } from 'antd'; import { Button, Table, Tooltip } from 'antd';
import { ArrowLeftOutlined } from '@ant-design/icons'; import { ArrowLeftOutlined } from '@ant-design/icons';
import qs from 'query-string'; import qs from 'query-string';
import { InterListType } from '~/api/interface'; import { InterListType } from '~/api/interface';
...@@ -85,6 +85,28 @@ const TenderManageDetail = () => { ...@@ -85,6 +85,28 @@ const TenderManageDetail = () => {
align: 'center', align: 'center',
width: '300px', width: '300px',
ellipsis: true, ellipsis: true,
render: (text) =>
text && (
<Tooltip
placement='top'
title={
<div
dangerouslySetInnerHTML={{ __html: text.replace(/<img(?:(?!\/>).|\n)*?\/>/gm, '') }}
/>
}
>
<div
style={{
height: '20px',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
wordBreak: 'break-all',
}}
dangerouslySetInnerHTML={{ __html: text }}
/>
</Tooltip>
),
}, },
{ {
title: '价格(万元)', title: '价格(万元)',
......
...@@ -138,7 +138,7 @@ const TenderManageFeedback = () => { ...@@ -138,7 +138,7 @@ const TenderManageFeedback = () => {
placeholder: '请选择编号', placeholder: '请选择编号',
options: tenderInfoList, options: tenderInfoList,
}, },
{ label: '用户姓名', name: 'userName', type: 'input', placeholder: '请输入编号' }, { label: '用户姓名', name: 'userName', type: 'input', placeholder: '请输入用户姓名' },
]} ]}
searchData={onFinish} searchData={onFinish}
child={ child={
......
...@@ -27,6 +27,11 @@ import { ...@@ -27,6 +27,11 @@ import {
MessageOutlined, MessageOutlined,
AliwangwangOutlined, AliwangwangOutlined,
AuditOutlined, AuditOutlined,
MonitorOutlined,
PictureOutlined,
PaperClipOutlined,
ReadOutlined,
ThunderboltOutlined,
} from '@ant-design/icons'; } from '@ant-design/icons';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore // @ts-ignore
...@@ -234,7 +239,7 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -234,7 +239,7 @@ export const routerList: Array<RouteObjectType> = [
meta: { meta: {
id: 30200, id: 30200,
title: '需求收集', title: '需求收集',
icon: <SketchOutlined />, icon: <MonitorOutlined />,
}, },
}, },
{ {
...@@ -243,7 +248,7 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -243,7 +248,7 @@ export const routerList: Array<RouteObjectType> = [
meta: { meta: {
id: 30100, id: 30100,
title: '宣传管理', title: '宣传管理',
icon: <SketchOutlined />, icon: <PictureOutlined />,
}, },
}, },
{ {
...@@ -262,7 +267,7 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -262,7 +267,7 @@ export const routerList: Array<RouteObjectType> = [
meta: { meta: {
id: 30300, id: 30300,
title: '标签管理', title: '标签管理',
icon: <SketchOutlined />, icon: <PaperClipOutlined />,
}, },
}, },
{ {
...@@ -271,7 +276,7 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -271,7 +276,7 @@ export const routerList: Array<RouteObjectType> = [
meta: { meta: {
id: 30400, id: 30400,
title: '行业新闻', title: '行业新闻',
icon: <SketchOutlined />, icon: <ReadOutlined />,
}, },
}, },
{ {
...@@ -330,7 +335,7 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -330,7 +335,7 @@ export const routerList: Array<RouteObjectType> = [
meta: { meta: {
id: 40100, id: 40100,
title: '动态列表', title: '动态列表',
icon: <SketchOutlined />, icon: <ThunderboltOutlined />,
}, },
}, },
], ],
......
import { CommonAPI } from '~/api';
import { message } from 'antd';
// 上传文件
export const uploadFile = (file: any): Promise<string> =>
new Promise((resolve, reject) => {
// 上传到服务器
const formData = new FormData();
formData.append('uploadFile', file);
CommonAPI.uploadOssBP(formData).then((res) => {
if (res && res.code === '200') {
resolve(res.result);
return;
} else {
reject(res);
message.error('文件上传失败').then();
return;
}
});
});
...@@ -13,6 +13,8 @@ export default defineConfig({ ...@@ -13,6 +13,8 @@ export default defineConfig({
'/api': { '/api': {
// target: 'http://192.168.3.111:8099', // 后端女pms // target: 'http://192.168.3.111:8099', // 后端女pms
// target: 'http://192.168.3.111:8077', // 后端女oms // target: 'http://192.168.3.111:8077', // 后端女oms
// target: 'http://192.168.3.111:10001', // 后端女release
// target: 'http://192.168.3.111:35150', // 后端女user
// target: 'http://192.168.3.17:8099', // 狗旺 // target: 'http://192.168.3.17:8099', // 狗旺
target: 'https://test.iuav.shop', target: 'https://test.iuav.shop',
changeOrigin: true, changeOrigin: true,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论