From be9efb8e607939df172446d425a6298aa66d8cad Mon Sep 17 00:00:00 2001 From: YCC Date: Thu, 27 Apr 2023 17:26:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=87=E6=A1=A3=E5=BC=95?= =?UTF-8?q?=E7=94=A8=EF=BC=8C=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=EF=BC=8C=E6=98=BE=E7=A4=BA=E5=85=AC=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 15 ++- src/views/App.jsx | 210 +++++++++++++++++----------------- src/views/feedback/Detail.jsx | 49 +++++--- 3 files changed, 151 insertions(+), 123 deletions(-) diff --git a/README.md b/README.md index 81feaad..2dac6b0 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,17 @@ Global Highlights Hub 海外供应商平台 1. 安装组件:npm install 2. 运行开发环境:npm run dev 或者 start.bat -3. 打包代码:npm run build 或者 build.bat \ No newline at end of file +3. 打包代码:npm run build 或者 build.bat + + +## 相关文档 +需求文档 https://www.kdocs.cn/l/csZrIZlpuF2i +dayjs https://dayjs.gitee.io/docs/zh-CN/manipulate/start-of +antd https://ant-design.antgroup.com/components/upload-cn#uploadfile +反馈表案例 https://www.chinahighlights.com/customerservice/feedback/PostTourSurveyFormToWLGH.asp?LGC=1&COLI_SN=988185&MEI_SN=954295&Email=jennroth18@hotmail.com&ToC=0&ShowType=&page_class=4&dei_sn=28&country=30,490 +国内供应商平台 http://p.mycht.cn/index.aspx + +## 阿里云OSS +Bucket 名称:global-highlights-hub +Endpoint:oss-cn-hongkong.aliyuncs.com +global-highlights-hub.oss-cn-hongkong.aliyuncs.com \ No newline at end of file diff --git a/src/views/App.jsx b/src/views/App.jsx index 3f5eb2c..d0091ae 100644 --- a/src/views/App.jsx +++ b/src/views/App.jsx @@ -1,117 +1,117 @@ import { Outlet, Link, useHref, useLocation } from "react-router-dom"; -import { useEffect } from 'react'; +import { useEffect } from "react"; import { observer } from "mobx-react"; -import { Layout, Menu, ConfigProvider, theme, Dropdown, Space, Row, Col, App as AntApp } from 'antd'; -import { - DownOutlined -} from '@ant-design/icons'; -import 'antd/dist/reset.css'; -import AppLogo from '@/assets/logo-gh.png' -import { useStore } from '@/stores/StoreContext.js'; +import { Layout, Menu, ConfigProvider, theme, Dropdown, Space, Row, Col, Alert, App as AntApp } from "antd"; +import { DownOutlined } from "@ant-design/icons"; +import "antd/dist/reset.css"; +import AppLogo from "@/assets/logo-gh.png"; +import { useStore } from "@/stores/StoreContext.js"; const { Header, Content, Footer } = Layout; const items = [ - { - label: ( - - Profile - - ), - key: '0', - }, - { - label: ( - - Privacy - - ), - key: '1', - }, - { - type: 'divider', - }, - { - label: ( - - Logout - - ), - key: '3', - }, -] + { + label: ( + + Profile + + ), + key: "0", + }, + { + label: ( + + Privacy + + ), + key: "1", + }, + { + type: "divider", + }, + { + label: ( + + Logout + + ), + key: "3", + }, +]; function App() { - - const { authStore } = useStore(); + const { authStore } = useStore(); - const href = useHref(); + const href = useHref(); - let location = useLocation(); - useEffect(() => { - // Check location - console.info('location.pathname: ' + location.pathname) - }, [location]); + let location = useLocation(); + useEffect(() => { + // Check location + console.info("location.pathname: " + location.pathname); + }, [location]); - const { - token: { colorBgContainer }, - } = theme.useToken(); + const { + token: { colorBgContainer }, + } = theme.useToken(); - return ( - - - -
- - - App logo - Reservation }, - { key: '/feedback', label: Feedback }, - { key: '/invoice/list', label: Invoice } - ] - } /> - - - - e.preventDefault()}> - - {authStore.login.username} - - - - - - -
- - - -
-
-
-
-
- ); + return ( + + + +
+ + + App logo + Reservation }, + { key: "/feedback", label: Feedback }, + { key: "/invoice/list", label: Invoice }, + ]} + /> + + + + e.preventDefault()}> + + {authStore.login.username} + + + + + + +
+ + + + + + +
+
+
+
+ ); } -export default observer(App); \ No newline at end of file +export default observer(App); diff --git a/src/views/feedback/Detail.jsx b/src/views/feedback/Detail.jsx index 0a9bb4e..b708683 100644 --- a/src/views/feedback/Detail.jsx +++ b/src/views/feedback/Detail.jsx @@ -5,8 +5,9 @@ import { toJS } from "mobx"; import moment from "moment"; import { Row, Col, Space, Button, Divider, Form, Typography, Rate, Radio, Modal, Upload, Input } from "antd"; import { useStore } from "../../stores/StoreContext.js"; -import { UploadOutlined } from "@ant-design/icons"; +import { PlusOutlined } from "@ant-design/icons"; const { Title, Text, Paragraph } = Typography; +import * as config from "@/config"; function Detail() { const navigate = useNavigate(); @@ -54,20 +55,26 @@ function Detail() { status: "done", url: "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png", }, - { - uid: "-xxx", - percent: 50, - name: "image.png", - status: "uploading", - url: "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png", - }, - { - uid: "-5", - name: "image.png", - status: "error", - }, ]); + const handleChange = info => { + console.log(info); + // ({ fileList: newFileList }) => setFileList(newFileList) + let newFileList = [...info.fileList]; + newFileList = newFileList.map(file => { + if (file.response) { + file.url = file.response.url; + } + return file; + }); + setFileList(newFileList); + }; + + const handRemove=info=>{ + console.log(info); + return true + } + return ( @@ -153,11 +160,19 @@ function Detail() { + 上传照片 - - 上传照片 - - + + + + + + + +
+ +
Click to Upload
+