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
776dfe7c
Commit
776dfe7c
authored
Dec 22, 2020
by
wufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:完成h5banner
parent
6ba731e7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
45 deletions
+18
-45
src/modules/store-manage/StoreDecorationPage.less
+9
-0
src/modules/store-manage/StoreDecorationPage.tsx
+2
-13
src/modules/store-manage/StoreH5DecorationTab.jsx
+0
-0
src/modules/store-manage/StoreWebDecorationTab.jsx
+7
-32
No files found.
src/modules/store-manage/StoreDecorationPage.less
View file @
776dfe7c
...
...
@@ -26,6 +26,11 @@
width: 230px;
height: 79px;
}
.web-banner-thumbnail {
width: 389px;
height: 67px;
}
.index-num {
width: 30px;
height: 33px;
...
...
@@ -88,5 +93,9 @@
width: 500px;
height: 73px;
}
#H5-preview-url-box {
width: 500px;
height: 172px;
}
}
}
src/modules/store-manage/StoreDecorationPage.tsx
View file @
776dfe7c
...
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2020-12-2
1 14:12:44
* @LastEditTime: 2020-12-2
2 11:52:56
* @Description: 员工管理页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -26,7 +26,7 @@ interface StoreDecoprationProps {
}
function
StoreDecorationPage
(
props
:
StoreDecoprationProps
)
{
const
[
currentTab
,
setCurrentTab
]
=
useState
(
"
web
"
);
const
[
currentTab
,
setCurrentTab
]
=
useState
(
"
h5
"
);
const
{
match
}
=
props
;
return
(
...
...
@@ -52,17 +52,6 @@ function StoreDecorationPage(props: StoreDecoprationProps) {
currentTab
===
'web'
&&
<
StoreWebDecorationTab
/>
}
{
/* <Switch>
<Route
path="/store-decoration/h5"
component={StoreH5DecorationTab}
></Route>
<Route
path="/store-decoration/web"
component={StoreWebDecorationTab}
></Route>
</Switch> */
}
</
div
>
</
div
>
</
div
>
...
...
src/modules/store-manage/StoreH5DecorationTab.jsx
View file @
776dfe7c
This diff is collapsed.
Click to expand it.
src/modules/store-manage/StoreWebDecorationTab.jsx
View file @
776dfe7c
...
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2020-12-22 1
0:17:11
* @LastEditTime: 2020-12-22 1
3:49:20
* @Description: web店铺banner页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -41,28 +41,7 @@ class StoreWebDecoration extends React.Component {
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
storeDecorationlist
:
[
// {
// id: "1111",
// bannerPath: "https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png",
// index: 0,
// key: "0",
// name: "https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png",
// },
// {
// id: "222",
// bannerPath: "https://image.xiaomaiketang.com/xm/CMyWNaDxbM.jpg",
// index: 1,
// key: "1",
// name: "校长",
// },
// {
// id: "333",
// bannerPath: "https://image.xiaomaiketang.com/xm/pBcJdYkmNN.jpg",
// index: 2,
// key: "2",
// },
],
storeDecorationlist
:
[],
query
:
{
storeId
:
User
.
getStoreId
(),
termType
:
"WEB_ADMIN"
,
...
...
@@ -115,7 +94,7 @@ class StoreWebDecoration extends React.Component {
key
:
"bannerPath"
,
className
:
"drag-visible"
,
render
:
(
val
)
=>
{
return
<
img
src=
{
val
}
alt=
"banner"
className=
"banner-thumbnail"
/>;
return
<
img
src=
{
val
}
alt=
"banner"
className=
"
web-
banner-thumbnail"
/>;
},
},
{
...
...
@@ -299,16 +278,15 @@ class StoreWebDecoration extends React.Component {
};
editStoreBanner
=
()
=>
{
const
{
previewUrl
,
addBannerPath
,
choosedBannerId
}
=
this
.
state
;
const
{
addBannerPath
,
choosedBannerId
}
=
this
.
state
;
const
params
=
{
bannerPath
:
addBannerPath
,
storeBannerId
:
choosedBannerId
,
termType
:
"WEB_ADMIN"
,
};
StoreService
.
editStoreBanner
(
params
).
then
((
res
)
=>
{
message
.
success
(
"
替换
成功"
);
message
.
success
(
"
设置
成功"
);
this
.
getStoreDecorationList
();
// this.state.photoclip.destroy();
});
};
...
...
@@ -317,7 +295,6 @@ class StoreWebDecoration extends React.Component {
const
params
=
{
sequence
:
newSequence
,
storeBannerId
:
storeBannerId
,
// storeId: User.getStoreId(),
termType
:
"WEB_ADMIN"
,
};
StoreService
.
moveBannerSequence
(
params
).
then
((
res
)
=>
{
...
...
@@ -332,7 +309,7 @@ class StoreWebDecoration extends React.Component {
termType
:
"WEB_ADMIN"
,
};
StoreService
.
addStoreBanner
(
params
).
then
((
res
)
=>
{
message
.
success
(
"
添加
成功"
);
message
.
success
(
"
设置
成功"
);
this
.
getStoreDecorationList
();
});
};
...
...
@@ -353,7 +330,6 @@ class StoreWebDecoration extends React.Component {
storeDecorationlist
,
showSelectFileModal
,
diskList
,
previewUrl
,
visible
,
}
=
this
.
state
;
const
DraggableContainer
=
(
props
)
=>
(
...
...
@@ -370,7 +346,7 @@ class StoreWebDecoration extends React.Component {
<
div
className=
"banner-setting"
>
<
div
className=
"title"
>
banner设置
</
div
>
<
div
className=
"tip"
>
图片支持bmp、jpeg、jpg、png、gif格式,最大5M,最多可添加5张,拖动可排序。建议尺寸
750x25
2像素。
图片支持bmp、jpeg、jpg、png、gif格式,最大5M,最多可添加5张,拖动可排序。建议尺寸
1232x21
2像素。
</
div
>
</
div
>
<
Button
...
...
@@ -459,7 +435,6 @@ class StoreWebDecoration extends React.Component {
<
div
id=
"clipBtn"
style=
{
{
display
:
"none"
}
}
ref=
"hiddenBtn"
></
div
>
<
div
className=
"preview-img"
>
<
div
className=
"title"
>
效果预览
</
div
>
{
/* <img src={previewUrl} alt="图片预览" className="preview-url" /> */
}
<
div
id=
"preview-url-box"
></
div
>
</
div
>
</
div
>
...
...
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