Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
biz.qingxiao.com
Commits
d2dc6b14
Commit
d2dc6b14
authored
Sep 03, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bww
parent
cf99d9e8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
271 additions
and
209 deletions
+271
-209
integral.js
src/models/integral.js
+56
-0
index.js
src/pages/integralmanage/integralsetting/index.js
+209
-207
CouponAddModal.js
src/pages/integralmanage/storesetting/CouponAddModal.js
+3
-1
GoodsAddModal.js
src/pages/integralmanage/storesetting/GoodsAddModal.js
+3
-1
No files found.
src/models/integral.js
View file @
d2dc6b14
...
...
@@ -38,6 +38,12 @@ export default {
price
:
0
,
inventory
:
0
,
},
type1
:
{
single
:
0
,
copySingle
:
0
,
daily_limit
:
0
,
checked
:
true
,
},
},
subscriptions
:
{
setup
({
dispatch
,
history
})
{
// eslint-disable-line
...
...
@@ -177,6 +183,7 @@ export default {
cover
,
status
,
banner
,
callBack
,
}
=
payload
;
console
.
log
(
payload
,
'payload'
);
const
loadmessage
=
message
.
loading
(
'保存中...'
,
0
);
...
...
@@ -210,6 +217,9 @@ export default {
editGoodsModalShow
:
false
,
},
});
if
(
callBack
&&
(
typeof
callBack
==
'function'
))
{
callBack
();
}
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
...
...
@@ -341,6 +351,52 @@ export default {
},
});
},
*
handleSubmit
({
payload
},
{
call
,
put
,
select
})
{
const
{
type1
}
=
yield
select
(
state
=>
state
.
integral
);
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
console
.
log
(
type1
);
const
data
=
{
1
:
{
single
:
type1
.
single
||
0
,
day_limit
:
type1
.
day_limit
||
0
,
school_id
:
sid
,
},
// 2: type2,
};
console
.
log
(
data
,
'data'
);
},
*
valueChange
({
payload
},
{
call
,
put
,
select
})
{
const
state
=
yield
select
(
state
=>
state
.
integral
);
const
{
value
,
index
,
key
}
=
payload
;
// ley typevalue = state[]
// ley typevalue = state[]
// console.log({
// ...state[`type${index}`],
// single: 0,
// }, 'd111');
// if (key == 'checked') {
// if (!value) {
// yield put({
// type: 'updateState',
// payload: {
// [`type${index}`]: {
// ...state[`type${index}`],
// single: 0,
// },
// },
// });
// }
// }
yield
put
({
type
:
'updateState'
,
payload
:
{
[
`type
${
index
}
`
]:
{
...
state
[
`type
${
index
}
`
],
[
`
${
key
}
`
]:
value
,
},
},
});
},
},
reducers
:
{
save
(
state
,
action
)
{
...
...
src/pages/integralmanage/integralsetting/index.js
View file @
d2dc6b14
This diff is collapsed.
Click to expand it.
src/pages/integralmanage/storesetting/CouponAddModal.js
View file @
d2dc6b14
...
...
@@ -36,7 +36,6 @@ class CouponAddModal extends React.Component {
}
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
console
.
log
(
values
,
'values'
);
const
{
price
,
title
,
...
...
@@ -54,6 +53,9 @@ class CouponAddModal extends React.Component {
inventory
,
type
,
status
,
callBack
:
()
=>
{
form
.
resetFields
();
},
});
}
});
...
...
src/pages/integralmanage/storesetting/GoodsAddModal.js
View file @
d2dc6b14
...
...
@@ -27,7 +27,6 @@ class GoodsAddModal extends React.Component {
const
{
form
,
save
,
editCouponInfo
,
couponImg
,
}
=
this
.
props
;
console
.
log
(
couponImg
,
'couponImg'
);
if
(
editCouponInfo
.
id
==
0
&&
(
couponImg
==
''
||
couponImg
==
undefined
))
{
message
.
error
(
'请上传卡券封面'
,
0.5
);
return
;
...
...
@@ -52,6 +51,9 @@ class GoodsAddModal extends React.Component {
inventory
,
type
,
status
,
callBack
:
()
=>
{
form
.
resetFields
();
},
});
}
});
...
...
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