Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
merchant-manage-ui
Commits
0bca1fa9
Commit
0bca1fa9
authored
Dec 16, 2022
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加草稿
parent
885f1aaa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
env.config.js
config/env.config.js
+1
-1
index.jsx
src/pages/ServiceGoods/index.jsx
+14
-0
No files found.
config/env.config.js
View file @
0bca1fa9
const
isProduction
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
isPre
=
process
.
env
.
PRE_ENV
===
'
pre
'
;
const
environment
=
'
yxm2
'
;
const
environment
=
'
xyqb
'
;
const
envAPi
=
{
api
:
`https://security-
${
environment
}
.liangkebang.net`
,
//'https://security-xyqb.liangkebang.net',
kdspOpApi
:
`https://sc-merchant-api-
${
environment
}
.liangkebang.net`
,
...
...
src/pages/ServiceGoods/index.jsx
View file @
0bca1fa9
...
...
@@ -8,6 +8,7 @@ import FormRuleSetting from './components/FormRuleSetting';
import
FormRuleVPictures
from
'
./components/FormRuleVPictures
'
;
import
FormSettlementOthers
from
'
./components/FormSettlementOthers
'
;
import
FormAttr
from
'
./components/FormAttr
'
;
import
localStorage
from
'
@/utils/localStorage
'
;
import
{
merchantBrandList
,
merchantSpecList
,
...
...
@@ -152,6 +153,7 @@ const ServiceGoods = options => {
}
};
// 保存商品
const
submitEvent
=
async
()
=>
{
const
checkPromiseList
=
clearCurrent
(
checkFormList
).
map
(({
current
})
=>
current
.
onCheck
());
const
resuslt
=
await
Promise
.
all
(
checkPromiseList
);
...
...
@@ -244,9 +246,18 @@ const ServiceGoods = options => {
});
}
};
// 切换类目
const
onCategoryChange
=
e
=>
{
setCategoryIds
(
e
);
};
// 保存草稿
const
onSaveDraft
=
()
=>
{
const
localkey
=
'
good-info-auto-save
'
;
const
info
=
localStorage
.
get
(
localkey
);
if
(
info
)
{
localStorage
.
remove
(
localkey
);
}
};
const
providerValue
=
{
pageId
,
...
...
@@ -273,6 +284,9 @@ const ServiceGoods = options => {
maskClosable=
{
false
}
keyboard=
{
false
}
footer=
{
[
<
Button
key=
"draft"
type=
"primary"
ghost
loading=
{
pageLoading
}
onClick=
{
onSaveDraft
}
>
保存草稿
</
Button
>,
<
Button
key=
"submit"
type=
"primary"
loading=
{
pageLoading
}
onClick=
{
submitEvent
}
>
提交
</
Button
>,
...
...
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