Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
6bb59f47
Commit
6bb59f47
authored
Dec 17, 2020
by
wufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:开始联调资料云盘接口
parent
c51c27b4
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
86 additions
and
69 deletions
+86
-69
src/bu-components/CopyFileModal.jsx
+1
-1
src/bu-components/SelectPrepareFileModal.jsx
+1
-1
src/data-source/store/request-apis.ts
+5
-2
src/domains/store-domain/storeService.ts
+9
-4
src/modules/course-manage/modal/SelectPrepareFileModal.jsx
+1
-1
src/modules/resource-disk/components/FolderManage.jsx
+1
-1
src/modules/resource-disk/index.jsx
+9
-2
src/modules/store-manage/StoreH5DecorationTab.jsx
+33
-37
src/modules/store-manage/StoreWebDecorationTab.jsx
+26
-20
No files found.
src/bu-components/CopyFileModal.jsx
View file @
6bb59f47
...
...
@@ -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/commonF
olderList'
'COMMON'
:
'public/
hadesStore/f
olderList'
}
const
defaultQuery
=
{
// 默认请求参数
size
:
10
,
...
...
src/bu-components/SelectPrepareFileModal.jsx
View file @
6bb59f47
...
...
@@ -42,7 +42,7 @@ const defaultRootDisk = {
const
FOLDERLIST_URL_MAP
=
{
'MYSELF'
:
'public/apollo/folderList'
,
'COMMON'
:
'public/
apollo/commonF
olderList'
,
'COMMON'
:
'public/
hadesStore/f
olderList'
,
'EMPLOYEE'
:
'public/apollo/employeeFolderList'
};
...
...
src/data-source/store/request-apis.ts
View file @
6bb59f47
/*
* @Author: wufan
* @Date: 2020-11-25 18:25:02
* @LastEditors:
zhangleyu
an
* @LastEditTime: 2020-12-
08 15:12:57
* @LastEditors:
wuf
an
* @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
);
...
...
src/domains/store-domain/storeService.ts
View file @
6bb59f47
/*
* @Author: wufan
* @Date: 2020-11-25 18:25:02
* @LastEditors:
zhangleyu
an
* @LastEditTime: 2020-12-
04 15:19:49
* @LastEditors:
wuf
an
* @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
)
{
...
...
src/modules/course-manage/modal/SelectPrepareFileModal.jsx
View file @
6bb59f47
...
...
@@ -39,7 +39,7 @@ const defaultRootDisk = {
const
FOLDERLIST_URL_MAP
=
{
'MYSELF'
:
'public/apollo/folderList'
,
'COMMON'
:
'public/
apollo/commonF
olderList'
,
'COMMON'
:
'public/
hadesStore/f
olderList'
,
'EMPLOYEE'
:
'public/apollo/employeeFolderList'
};
...
...
src/modules/resource-disk/components/FolderManage.jsx
View file @
6bb59f47
...
...
@@ -20,7 +20,7 @@ import FolderList from './FolderList';
const
FOLDERLIST_URL_MAP
=
{
'MYSELF'
:
'public/apollo/folderList'
,
'COMMON'
:
'public/
apollo/commonF
olderList'
,
'COMMON'
:
'public/
hadesStore/f
olderList'
,
'EMPLOYEE'
:
'public/apollo/employeeFolderList'
};
...
...
src/modules/resource-disk/index.jsx
View file @
6bb59f47
...
...
@@ -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
()
=>
{
...
...
src/modules/store-manage/StoreH5DecorationTab.jsx
View file @
6bb59f47
...
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2020-12-1
4 16:48:13
* @LastEditTime: 2020-12-1
7 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
banner
Path
:
'https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png'
,
sequence
:
0
},
{
di
:
1111
,
banner
:
'https://image.xiaomaiketang.com/xm/CMyWNaDxbM.jpg'
,
index
:
1
id
:
1111
,
banner
Path
:
'https://image.xiaomaiketang.com/xm/CMyWNaDxbM.jpg'
,
sequence
:
1
},
{
di
:
1111
,
banner
:
'https://image.xiaomaiketang.com/xm/pBcJdYkmNN.jpg'
,
index
:
2
id
:
1111
,
banner
Path
:
'https://image.xiaomaiketang.com/xm/pBcJdYkmNN.jpg'
,
sequence
:
2
},
{
di
:
1111
,
banner
:
'https://image.xiaomaiketang.com/xm/p7hG4exMFf.png'
,
index
:
3
id
:
1111
,
banner
Path
:
'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
:
"banner
Path
"
,
dataIndex
:
"banner
Path
"
,
key
:
"banner
Path
"
,
render
:
(
val
)
=>
{
return
<
img
src=
{
val
}
alt=
"banner"
className=
"banner-thumbnail"
/>;
},
...
...
src/modules/store-manage/StoreWebDecorationTab.jsx
View file @
6bb59f47
...
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2020-12-1
4 16:56:23
* @LastEditTime: 2020-12-1
7 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"
,
banner
Path
:
"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"
,
banner
Path
:
"https://image.xiaomaiketang.com/xm/CMyWNaDxbM.jpg"
,
index
:
1
,
key
:
'1'
,
name
:
'校长'
},
{
id
:
'333'
,
banner
:
"https://image.xiaomaiketang.com/xm/pBcJdYkmNN.jpg"
,
banner
Path
:
"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
:
"banner
Path
"
,
key
:
"banner
Path
"
,
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
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment