Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
qinhaitao
taobao-mini-template
Commits
3ce4a255
Commit
3ce4a255
authored
Oct 14, 2020
by
luofangping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:useStock字段问题
parent
2d11d900
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
activityconfig.service.js
server/duibats/dist/service/activityconfig.service.js
+5
-2
activityconfig.service.js.map
server/duibats/dist/service/activityconfig.service.js.map
+1
-1
activityconfig.service.ts
server/duibats/src/service/activityconfig.service.ts
+4
-2
No files found.
server/duibats/dist/service/activityconfig.service.js
View file @
3ce4a255
...
...
@@ -208,8 +208,11 @@ var ActivityConfigService = /** @class */ (function () {
case
3
:
isEditPrize
=
bothIds
.
includes
(
allPrizeList
[
i
].
_id
);
if
(
!
isEditPrize
)
return
[
3
/*break*/
,
5
];
if
(
allPrizeList
[
i
].
switchStock
===
constants_1
.
STOCK_TYPE
.
LIMIT
)
{
allPrizeList
[
i
].
useStock
?
delete
allPrizeList
[
i
].
useStock
:
''
;
if
(
allPrizeList
[
i
].
switchStock
===
constants_1
.
STOCK_TYPE
.
NO_LIMIT
)
{
allPrizeList
[
i
].
useStock
=
0
;
}
else
if
(
allPrizeList
[
i
].
switchStock
===
constants_1
.
STOCK_TYPE
.
LIMIT
)
{
(
allPrizeList
[
i
].
useStock
||
allPrizeList
[
i
].
useStock
===
0
)
&&
delete
allPrizeList
[
i
].
useStock
;
}
return
[
4
/*yield*/
,
this
.
updateOnePrizeById
(
allPrizeList
[
i
].
_id
,
allPrizeList
[
i
])];
case
4
:
...
...
server/duibats/dist/service/activityconfig.service.js.map
View file @
3ce4a255
This diff is collapsed.
Click to expand it.
server/duibats/src/service/activityconfig.service.ts
View file @
3ce4a255
...
...
@@ -119,8 +119,10 @@ export default class ActivityConfigService {
// 更新的奖品
const
isEditPrize
=
bothIds
.
includes
(
allPrizeList
[
i
].
_id
)
if
(
isEditPrize
)
{
if
(
allPrizeList
[
i
].
switchStock
===
STOCK_TYPE
.
LIMIT
)
{
allPrizeList
[
i
].
useStock
?
delete
allPrizeList
[
i
].
useStock
:
''
if
(
allPrizeList
[
i
].
switchStock
===
STOCK_TYPE
.
NO_LIMIT
)
{
allPrizeList
[
i
].
useStock
=
0
;
}
else
if
(
allPrizeList
[
i
].
switchStock
===
STOCK_TYPE
.
LIMIT
)
{
(
allPrizeList
[
i
].
useStock
||
allPrizeList
[
i
].
useStock
===
0
)
&&
delete
allPrizeList
[
i
].
useStock
;
}
const
editResult
=
await
this
.
updateOnePrizeById
(
allPrizeList
[
i
].
_id
,
allPrizeList
[
i
])
if
(
editResult
)
{
...
...
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