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
748aa02a
Commit
748aa02a
authored
Dec 21, 2020
by
wufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:联调店铺图片上传
parent
afb1f37d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
33 deletions
+67
-33
src/common/less/icon-font.less
+6
-6
src/index.html
+2
-2
src/modules/store-manage/StoreH5DecorationTab.jsx
+57
-24
src/modules/store-manage/StoreWebDecorationTab.jsx
+2
-1
No files found.
src/common/less/icon-font.less
View file @
748aa02a
@font-face {
font-family: 'iconfont'; /* project id 2223403 */
src: url('//at.alicdn.com/t/font_2223403_
66rskwvxbny
.eot');
src: url('//at.alicdn.com/t/font_2223403_
66rskwvxbny
.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_2223403_
66rskwvxbny
.woff2') format('woff2'),
url('//at.alicdn.com/t/font_2223403_
66rskwvxbny
.woff') format('woff'),
url('//at.alicdn.com/t/font_2223403_
66rskwvxbny
.ttf') format('truetype'),
url('//at.alicdn.com/t/font_2223403_
66rskwvxbny
.svg#iconfont') format('svg');
src: url('//at.alicdn.com/t/font_2223403_
how93r9yw6h
.eot');
src: url('//at.alicdn.com/t/font_2223403_
how93r9yw6h
.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_2223403_
how93r9yw6h
.woff2') format('woff2'),
url('//at.alicdn.com/t/font_2223403_
how93r9yw6h
.woff') format('woff'),
url('//at.alicdn.com/t/font_2223403_
how93r9yw6h
.ttf') format('truetype'),
url('//at.alicdn.com/t/font_2223403_
how93r9yw6h
.svg#iconfont') format('svg');
}
.iconfont{
font-family:"iconfont" !important;
...
...
src/index.html
View file @
748aa02a
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-24 12:20:57
* @LastEditors: wufan
* @LastEditTime: 2020-12-
18 11:26:06
* @LastEditTime: 2020-12-
21 10:51:02
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
-->
...
...
@@ -25,7 +25,7 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link
rel=
"manifest"
href=
"%PUBLIC_URL%/manifest.json"
/>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_2223403_
66rskwvxbny
.css"
>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_2223403_
how93r9yw6h
.css"
>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
...
...
src/modules/store-manage/StoreH5DecorationTab.jsx
View file @
748aa02a
...
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2020-12-
17 15:29:38
* @LastEditTime: 2020-12-
21 10:43:50
* @Description: h5店铺banner页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -22,41 +22,46 @@ import {
import
{
MenuOutlined
}
from
"@ant-design/icons"
;
import
arrayMove
from
"array-move"
;
import
"./StoreDecorationPage.less"
;
import
User
from
'@/common/js/user'
;
import
User
from
"@/common/js/user"
;
import
SelectPrepareFileModal
from
"@/modules/prepare-lesson/modal/SelectPrepareFileModal"
;
const
{
confirm
}
=
Modal
;
function
StoreH5Decoration
(
props
)
{
const
[
storeDecorationlist
,
setStoreDecorationlist
]
=
useState
([
{
id
:
1111
,
bannerPath
:
'https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png'
,
sequence
:
0
id
:
1111
,
bannerPath
:
"https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png"
,
sequence
:
0
,
},
{
id
:
1111
,
bannerPath
:
'https://image.xiaomaiketang.com/xm/CMyWNaDxbM.jpg'
,
sequence
:
1
id
:
1111
,
bannerPath
:
"https://image.xiaomaiketang.com/xm/CMyWNaDxbM.jpg"
,
sequence
:
1
,
},
{
id
:
1111
,
bannerPath
:
'https://image.xiaomaiketang.com/xm/pBcJdYkmNN.jpg'
,
sequence
:
2
id
:
1111
,
bannerPath
:
"https://image.xiaomaiketang.com/xm/pBcJdYkmNN.jpg"
,
sequence
:
2
,
},
{
id
:
1111
,
bannerPath
:
'https://image.xiaomaiketang.com/xm/p7hG4exMFf.png'
,
sequence
:
3
}
id
:
1111
,
bannerPath
:
"https://image.xiaomaiketang.com/xm/p7hG4exMFf.png"
,
sequence
:
3
,
}
,
]);
const
[
query
,
setQuery
]
=
useState
({
storeId
:
User
.
getStoreId
(),
termType
:
'H5_ADMIN'
termType
:
"H5_ADMIN"
,
});
const
[
model
,
setModel
]
=
useState
(
null
);
const
[
showSelectFileModal
,
setShowSelectFileModal
]
=
useState
(
false
);
const
[
diskList
,
setDiskList
]
=
useState
([]);
const
DragHandle
=
sortableHandle
(()
=>
(
<
MenuOutlined
style=
{
{
cursor
:
"pointer"
,
color
:
"#999"
}
}
className=
"drag-icon"
/>
<
MenuOutlined
style=
{
{
cursor
:
"pointer"
,
color
:
"#999"
}
}
className=
"drag-icon"
/>
));
const
SortableItem
=
sortableElement
((
props
)
=>
<
tr
{
...
props
}
/>);
const
SortableContainer
=
sortableContainer
((
props
)
=>
<
tbody
{
...
props
}
/>);
...
...
@@ -74,14 +79,13 @@ function StoreH5Decoration(props) {
function
handleReplaceDecoration
(
record
)
{}
function
handleDeleteDecoration
(
record
)
{
StoreService
.
deleteStoreDecorationList
({
"storeBannerId"
:
record
.
id
,
"termType"
:
"H5_ADMIN"
storeBannerId
:
record
.
id
,
termType
:
"H5_ADMIN"
,
}).
then
((
res
)
=>
{
message
.
success
(
"已删除"
);
});
}
;
}
function
handleDeleteDecorationConfirm
(
record
)
{
return
confirm
({
title
:
"你确定要删除这个banner吗?"
,
...
...
@@ -142,7 +146,7 @@ function StoreH5Decoration(props) {
{
title
:
"操作"
,
dataIndex
:
"operation"
,
width
:
'20%'
,
width
:
"20%"
,
render
:
(
val
,
record
)
=>
{
return
(
<
div
className=
"operation"
>
...
...
@@ -166,7 +170,24 @@ function StoreH5Decoration(props) {
];
}
function
handleToAddStoreDecoration
()
{}
function
handleToAddStoreDecoration
()
{
setShowSelectFileModal
(
true
);
}
// 选择暖场资源
function
handleSelectVideo
(
file
)
{
setShowSelectFileModal
(
false
);
const
{
ossUrl
,
resourceId
,
folderName
,
folderFormat
,
folderSize
}
=
file
;
const
liveCourseWarmMedia
=
{
contentType
:
"WARMUP"
,
mediaType
:
folderFormat
===
"MP4"
?
"VIDEO"
:
"PICTURE"
,
mediaContent
:
resourceId
,
mediaUrl
:
ossUrl
,
mediaName
:
folderName
,
size
:
folderSize
,
};
console
.
log
(
"liveCourseWarmMedia"
,
liveCourseWarmMedia
);
}
const
DraggableContainer
=
(
props
)
=>
(
<
SortableContainer
...
...
@@ -212,6 +233,18 @@ function StoreH5Decoration(props) {
bordered
/>
</
div
>
<
SelectPrepareFileModal
operateType=
"select"
accept=
"image/jpeg,image/png,image/jpg"
selectTypeList=
{
[
"JPG"
,
"JPEG"
,
"PNG"
]
}
tooltip=
"支持文件类型:jpg、jpeg、png、mp4"
isOpen=
{
showSelectFileModal
}
diskList=
{
diskList
}
onClose=
{
()
=>
{
setShowSelectFileModal
(
false
);
}
}
onSelect=
{
handleSelectVideo
}
/>
</
div
>
);
}
...
...
src/modules/store-manage/StoreWebDecorationTab.jsx
View file @
748aa02a
...
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2020-12-
17 15:30:52
* @LastEditTime: 2020-12-
21 10:28:03
* @Description: web店铺banner页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -22,6 +22,7 @@ import { MenuOutlined } from "@ant-design/icons";
import
arrayMove
from
"array-move"
;
import
"./StoreDecorationPage.less"
;
import
User
from
'@/common/js/user'
;
import
SelectPrepareFileModal
from
'@/modules/prepare-lesson/modal/SelectPrepareFileModal'
;
const
{
confirm
}
=
Modal
;
const
DragHandle
=
sortableHandle
(()
=>
(
...
...
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