Commit 6bb59f47 by wufan

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

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