diff --git a/src/stores/Feedback.js b/src/stores/Feedback.js index c319848..1a8b2c3 100644 --- a/src/stores/Feedback.js +++ b/src/stores/Feedback.js @@ -19,11 +19,11 @@ class Feedback { feedbackReview = []; //站外好评 feedbackInfo = []; //地接社反馈的信息 - onDateRangeChange = (dates) =>{ + onDateRangeChange = dates => { console.log(dates); this.search_date_start = dates[0]; - this.search_date_end = dates[1]; - } + this.search_date_end = dates[1]; + }; /* 查询地接社的团列表 地接社sn @@ -111,6 +111,20 @@ class Feedback { console.log("fetch data failed", error); }); } + //删除照片 + removeFeedbackImages(fileurl) { + let url = `/service-fileServer/FileDelete`; + url += `?fileurl=${fileurl}`; + return fetch(config.HT_HOST + url) + .then(response => response.json()) + .then(json => { + console.log(json); + return json.Result; + }) + .catch(error => { + console.log("fetch data failed", error); + }); + } //提交供应商反馈信息 postFeedbackInfo(VEI_SN, GRI_SN, EOI_SN, info_content) { diff --git a/src/views/App.jsx b/src/views/App.jsx index 34ad535..65b949f 100644 --- a/src/views/App.jsx +++ b/src/views/App.jsx @@ -1,4 +1,4 @@ -import { Outlet, Link, useHref, useLocation } from "react-router-dom"; +import { Outlet, Link, useHref, useLocation, NavLink } from "react-router-dom"; import { useEffect } from "react"; import { observer } from "mobx-react"; import { Layout, Menu, ConfigProvider, theme, Dropdown, Space, Row, Col, Alert, App as AntApp } from "antd"; @@ -10,18 +10,18 @@ import { useStore } from "@/stores/StoreContext.js"; const { Header, Content, Footer } = Layout; const items = [ { - label: (Change password), + label: Change password, key: "0", }, { - label: (Profile), + label: Profile, key: "1", }, { type: "divider", }, { - label: (Logout), + label: Logout, key: "3", }, ]; @@ -34,15 +34,15 @@ function App() { useEffect(() => { // Check location console.info("location.pathname: " + location.pathname); - console.info(location.pathname.split('/')); + console.info(location.pathname.split("/")); }, [location]); - const splitPath = location.pathname.split('/'); - let defaultPath = 'reservation'; + const splitPath = location.pathname.split("/"); + let defaultPath = "reservation"; - if (splitPath.length > 1) { - defaultPath = splitPath[1]; - } + if (splitPath.length > 1) { + defaultPath = splitPath[1]; + } const { token: { colorBgContainer }, @@ -64,7 +64,9 @@ function App() {
- App logo + + App logo +
- + 公告 查看后不再显示,或者一直显示,或者放到页面底部} description="" type="info" banner closable /> { - console.log(info); - feedbackStore.removeFeedbackImages(info.url); - return true; + return feedbackStore.removeFeedbackImages(info.url); }; const onFinish = values => {