Commit 6bb59f47 by wufan

feat:开始联调资料云盘接口

parent c51c27b4
...@@ -19,7 +19,7 @@ window.currentUserInstInfo = {adminId: "1224977437688578050", adminName: "吴帆 ...@@ -19,7 +19,7 @@ window.currentUserInstInfo = {adminId: "1224977437688578050", adminName: "吴帆
const { instId } = window.currentUserInstInfo; // 机构Id const { instId } = window.currentUserInstInfo; // 机构Id
const folder_list_url = { // 文件夹url const folder_list_url = { // 文件夹url
'MYSELF': 'public/apollo/folderList', 'MYSELF': 'public/apollo/folderList',
'COMMON': 'public/apollo/commonFolderList' 'COMMON': 'public/hadesStore/folderList'
} }
const defaultQuery = { // 默认请求参数 const defaultQuery = { // 默认请求参数
size: 10, size: 10,
......
...@@ -42,7 +42,7 @@ const defaultRootDisk = { ...@@ -42,7 +42,7 @@ const defaultRootDisk = {
const FOLDERLIST_URL_MAP = { const FOLDERLIST_URL_MAP = {
'MYSELF': 'public/apollo/folderList', 'MYSELF': 'public/apollo/folderList',
'COMMON': 'public/apollo/commonFolderList', 'COMMON': 'public/hadesStore/folderList',
'EMPLOYEE': 'public/apollo/employeeFolderList' 'EMPLOYEE': 'public/apollo/employeeFolderList'
}; };
......
/* /*
* @Author: wufan * @Author: wufan
* @Date: 2020-11-25 18:25:02 * @Date: 2020-11-25 18:25:02
* @LastEditors: zhangleyuan * @LastEditors: wufan
* @LastEditTime: 2020-12-08 15:12:57 * @LastEditTime: 2020-12-17 15:21:44
* @Description: Description * @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -23,6 +23,9 @@ export function getUserList(params: object) { ...@@ -23,6 +23,9 @@ export function getUserList(params: object) {
export function getStoreDecorationList(params: object) { export function getStoreDecorationList(params: object) {
return Service.Hades("public/hades/getStoreBannerList", params); return Service.Hades("public/hades/getStoreBannerList", params);
} }
export function deleteStoreDecorationList(params: object) {
return Service.Hades("public/hades/delStoreBanner", params);
}
export function addEmployee(params: object) { export function addEmployee(params: object) {
return Service.Hades("public/hades/addStoreUser", params); return Service.Hades("public/hades/addStoreUser", params);
......
/* /*
* @Author: wufan * @Author: wufan
* @Date: 2020-11-25 18:25:02 * @Date: 2020-11-25 18:25:02
* @LastEditors: zhangleyuan * @LastEditors: wufan
* @LastEditTime: 2020-12-04 15:19:49 * @LastEditTime: 2020-12-17 15:24:51
* @Description: Description * @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
import { getEmployeeList, getUserList, getStoreDecorationList, getStoreRole, addEmployee, editEmployee, deleteEmployee,getCourseCatalogList,getAllSonCategory,addCourseCategory,delCourseCategory,editCourseCategory } from '@/data-source/store/request-apis'; import { getEmployeeList, getUserList, getStoreDecorationList, getStoreRole, addEmployee, editEmployee, deleteEmployee,getCourseCatalogList,getAllSonCategory,addCourseCategory,delCourseCategory,editCourseCategory, deleteStoreDecorationList } from '@/data-source/store/request-apis';
export default class StoreService { export default class StoreService {
// 获取员工列表 // 获取员工列表
...@@ -39,10 +39,15 @@ export default class StoreService { ...@@ -39,10 +39,15 @@ export default class StoreService {
return getUserList(params); return getUserList(params);
} }
// 获取用户列表 // 获取店铺banner列表
static getStoreDecorationList(params: any) { static getStoreDecorationList(params: any) {
return getStoreDecorationList(params); return getStoreDecorationList(params);
} }
// 获取店铺banner列表
static deleteStoreDecorationList(params: any) {
return deleteStoreDecorationList(params);
}
// 获取课程分类列表 // 获取课程分类列表
static getCourseCatalogList(params: any) { static getCourseCatalogList(params: any) {
......
...@@ -39,7 +39,7 @@ const defaultRootDisk = { ...@@ -39,7 +39,7 @@ const defaultRootDisk = {
const FOLDERLIST_URL_MAP = { const FOLDERLIST_URL_MAP = {
'MYSELF': 'public/apollo/folderList', 'MYSELF': 'public/apollo/folderList',
'COMMON': 'public/apollo/commonFolderList', 'COMMON': 'public/hadesStore/folderList',
'EMPLOYEE': 'public/apollo/employeeFolderList' 'EMPLOYEE': 'public/apollo/employeeFolderList'
}; };
......
...@@ -20,7 +20,7 @@ import FolderList from './FolderList'; ...@@ -20,7 +20,7 @@ import FolderList from './FolderList';
const FOLDERLIST_URL_MAP = { const FOLDERLIST_URL_MAP = {
'MYSELF': 'public/apollo/folderList', 'MYSELF': 'public/apollo/folderList',
'COMMON': 'public/apollo/commonFolderList', 'COMMON': 'public/hadesStore/folderList',
'EMPLOYEE': 'public/apollo/employeeFolderList' 'EMPLOYEE': 'public/apollo/employeeFolderList'
}; };
......
...@@ -17,13 +17,20 @@ class PrepareLessonPage extends React.Component { ...@@ -17,13 +17,20 @@ class PrepareLessonPage extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
diskList: [], // 可见磁盘目录 // 目前只有公共文件,先由前端定义
diskList: [
{
folderName: '公共文件',
disk: 'MYSELF',
uploadPower: false
}
], // 可见磁盘目录
currentRootDisk: defaultRootDisk currentRootDisk: defaultRootDisk
} }
} }
componentWillMount() { componentWillMount() {
this.handleFetchDiskList(); // this.handleFetchDiskList();
} }
handleFetchDiskList = async () => { handleFetchDiskList = async () => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: wufan * @Author: wufan
* @Date: 2020-11-30 10:47:38 * @Date: 2020-11-30 10:47:38
* @LastEditors: wufan * @LastEditors: wufan
* @LastEditTime: 2020-12-14 16:48:13 * @LastEditTime: 2020-12-17 15:29:38
* @Description: h5店铺banner页面 * @Description: h5店铺banner页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -21,45 +21,38 @@ import { ...@@ -21,45 +21,38 @@ import {
} from "react-sortable-hoc"; } from "react-sortable-hoc";
import { MenuOutlined } from "@ant-design/icons"; import { MenuOutlined } from "@ant-design/icons";
import arrayMove from "array-move"; import arrayMove from "array-move";
import "./StoreDecorationPage.less"; import "./StoreDecorationPage.less";
import moment from "moment"; import User from '@/common/js/user';
const { confirm } = Modal; const { confirm } = Modal;
function StoreH5Decoration(props) { function StoreH5Decoration(props) {
const [storeDecorationlist, setStoreDecorationlist] = useState([ const [storeDecorationlist, setStoreDecorationlist] = useState([
{ {
id:1111, id:1111,
banner:'https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png', bannerPath:'https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png',
index:0 sequence:0
}, },
{ {
di:1111, id:1111,
banner:'https://image.xiaomaiketang.com/xm/CMyWNaDxbM.jpg', bannerPath:'https://image.xiaomaiketang.com/xm/CMyWNaDxbM.jpg',
index: 1 sequence: 1
}, },
{ {
di:1111, id:1111,
banner:'https://image.xiaomaiketang.com/xm/pBcJdYkmNN.jpg', bannerPath:'https://image.xiaomaiketang.com/xm/pBcJdYkmNN.jpg',
index: 2 sequence: 2
}, },
{ {
di:1111, id:1111,
banner:'https://image.xiaomaiketang.com/xm/p7hG4exMFf.png', bannerPath:'https://image.xiaomaiketang.com/xm/p7hG4exMFf.png',
index: 3 sequence: 3
} }
]); ]);
const [query, setQuery] = useState({ const [query, setQuery] = useState({
current: 0, storeId: User.getStoreId(),
size: 10, termType: 'H5_ADMIN'
name: "",
phone: "",
identity: "ALL",
instId: "1837447" || window.currentUserInstInfo.instId,
registerStartDate: null,
registerEndDate: null,
}); });
const [total, setTotal] = useState(0);
const [model, setModel] = useState(null); const [model, setModel] = useState(null);
const DragHandle = sortableHandle(() => ( const DragHandle = sortableHandle(() => (
...@@ -69,23 +62,26 @@ function StoreH5Decoration(props) { ...@@ -69,23 +62,26 @@ function StoreH5Decoration(props) {
const SortableContainer = sortableContainer((props) => <tbody {...props} />); const SortableContainer = sortableContainer((props) => <tbody {...props} />);
useEffect(() => { useEffect(() => {
// getStoreDecorationList(); getStoreDecorationList();
}, [query]); }, [query]);
function getStoreDecorationList() { function getStoreDecorationList() {
let _query = _.clone(query); StoreService.getStoreDecorationList(query).then((res) => {
_query.current = query.current + 1; setStoreDecorationlist(res.result);
StoreService.getStoreDecorationList(_query).then((res) => {
console.log(res.result.records);
setStoreDecorationlist(res.result.records);
setTotal(res.result.total);
}); });
} }
function handleReplaceDecoration(record) {} function handleReplaceDecoration(record) {}
function handleDeleteDecoration(record) {} function handleDeleteDecoration(record) {
StoreService.deleteStoreDecorationList({
"storeBannerId": record.id,
"termType": "H5_ADMIN"
}).then((res) => {
message.success("已删除");
});
};
function handleDeleteDecorationConfirm(record) { function handleDeleteDecorationConfirm(record) {
return confirm({ return confirm({
title: "你确定要删除这个banner吗?", title: "你确定要删除这个banner吗?",
...@@ -127,18 +123,18 @@ function StoreH5Decoration(props) { ...@@ -127,18 +123,18 @@ function StoreH5Decoration(props) {
render: () => <DragHandle />, render: () => <DragHandle />,
}, },
{ {
title: "index", title: "sequence",
dataIndex: "index", dataIndex: "sequence",
key: "index", key: "sequence",
width: 20, width: 20,
render: (val, record, index) => { render: (val, record, index) => {
return <div className="index-num">{index + 1}</div>; return <div className="index-num">{index + 1}</div>;
}, },
}, },
{ {
title: "banner", title: "bannerPath",
dataIndex: "banner", dataIndex: "bannerPath",
key: "banner", key: "bannerPath",
render: (val) => { render: (val) => {
return <img src={val} alt="banner" className="banner-thumbnail" />; return <img src={val} alt="banner" className="banner-thumbnail" />;
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: wufan * @Author: wufan
* @Date: 2020-11-30 10:47:38 * @Date: 2020-11-30 10:47:38
* @LastEditors: wufan * @LastEditors: wufan
* @LastEditTime: 2020-12-14 16:56:23 * @LastEditTime: 2020-12-17 15:30:52
* @Description: web店铺banner页面 * @Description: web店铺banner页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -21,6 +21,7 @@ import { ...@@ -21,6 +21,7 @@ import {
import { MenuOutlined } from "@ant-design/icons"; import { MenuOutlined } from "@ant-design/icons";
import arrayMove from "array-move"; import arrayMove from "array-move";
import "./StoreDecorationPage.less"; import "./StoreDecorationPage.less";
import User from '@/common/js/user';
const { confirm } = Modal; const { confirm } = Modal;
const DragHandle = sortableHandle(() => ( const DragHandle = sortableHandle(() => (
...@@ -39,43 +40,40 @@ class StoreWebDecoration extends React.Component { ...@@ -39,43 +40,40 @@ class StoreWebDecoration extends React.Component {
storeDecorationlist: [ storeDecorationlist: [
{ {
id: '1111', id: '1111',
banner: "https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png", bannerPath: "https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png",
index: 0, index: 0,
key: "0", key: "0",
name: "https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png" name: "https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png"
}, },
{ {
id: '222', id: '222',
banner: "https://image.xiaomaiketang.com/xm/CMyWNaDxbM.jpg", bannerPath: "https://image.xiaomaiketang.com/xm/CMyWNaDxbM.jpg",
index: 1, index: 1,
key: '1', key: '1',
name: '校长' name: '校长'
}, },
{ {
id: '333', id: '333',
banner: "https://image.xiaomaiketang.com/xm/pBcJdYkmNN.jpg", bannerPath: "https://image.xiaomaiketang.com/xm/pBcJdYkmNN.jpg",
index: 2, index: 2,
key: '2' key: '2'
} }
], ],
query: { query: {
current: 0, storeId: User.getStoreId(),
size: 10, termType: 'WEB_ADMIN'
}, },
}; };
} }
componentDidMount() { componentDidMount() {
// this.getStoreDecorationList(); this.getStoreDecorationList();
} }
getStoreDecorationList = () => { getStoreDecorationList = () => {
let _query = _.clone(query); StoreService.getStoreDecorationList(this.state.query).then((res) => {
_query.current = query.current + 1;
StoreService.getStoreDecorationList(_query).then((res) => {
console.log(res.result.records);
this.setState({ this.setState({
storeDecorationlist: res.result.records, storeDecorationlist: res.result,
}); });
}); });
}; };
...@@ -90,19 +88,18 @@ class StoreWebDecoration extends React.Component { ...@@ -90,19 +88,18 @@ class StoreWebDecoration extends React.Component {
render: () => <DragHandle />, render: () => <DragHandle />,
}, },
{ {
title: "index", title: "sequence",
dataIndex: "index", dataIndex: "sequence",
key: "index", key: "sequence",
width: 20, width: 20,
className: 'drag-visible',
render: (val, record, index) => { render: (val, record, index) => {
return <div className="index-num">{index + 1}</div>; return <div className="index-num">{index + 1}</div>;
}, },
}, },
{ {
title: "banner", title: "banner",
dataIndex: "banner", dataIndex: "bannerPath",
key: "banner", key: "bannerPath",
className: 'drag-visible', className: 'drag-visible',
render: (val) => { render: (val) => {
return <img src={val} alt="banner" className="banner-thumbnail" />; return <img src={val} alt="banner" className="banner-thumbnail" />;
...@@ -125,7 +122,7 @@ class StoreWebDecoration extends React.Component { ...@@ -125,7 +122,7 @@ class StoreWebDecoration extends React.Component {
<span className="divider-line">{" | "}</span> <span className="divider-line">{" | "}</span>
<span <span
className="delete" className="delete"
onClick={() => handleDeleteDecorationConfirm(record)} onClick={() => this.handleDeleteDecorationConfirm(record)}
> >
删除 删除
</span> </span>
...@@ -138,7 +135,16 @@ class StoreWebDecoration extends React.Component { ...@@ -138,7 +135,16 @@ class StoreWebDecoration extends React.Component {
handleReplaceDecoration = (record) => {}; handleReplaceDecoration = (record) => {};
handleDeleteDecoration = (record) => {}; handleDeleteDecoration = (record) => {
StoreService.deleteStoreDecorationList({
"storeBannerId": record.id,
"termType": "WEB_ADMIN"
}).then((res) => {
message.success("已删除");
this.getStoreDecorationList();
});
};
handleDeleteDecorationConfirm = (record) => { handleDeleteDecorationConfirm = (record) => {
return confirm({ return confirm({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment