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
b567d582
Commit
b567d582
authored
Oct 21, 2020
by
慕轻风
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wnf
parent
3d6ca2e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
goodsModal.js
c_client/client/components/goodsModal/goodsModal.js
+9
-2
collectGoods.js
c_client/client/pages/collectGoods/collectGoods.js
+1
-1
No files found.
c_client/client/components/goodsModal/goodsModal.js
View file @
b567d582
...
...
@@ -53,14 +53,21 @@ Component({
* 收藏商品
*/
async
goToCollectGoods
(
e
)
{
cons
t
{
itemId
,
collected
}
=
e
.
target
.
dataset
.
item
le
t
{
itemId
,
collected
}
=
e
.
target
.
dataset
.
item
const
{
taskType
}
=
this
.
props
.
task
if
(
collected
)
{
commonToast
(
'您已收藏过该商品了'
)
return
;
}
//判断是否活动外已收藏商品
let
isCollected
=
await
checkGoodsCollectedStatus
(
+
itemId
)
if
(
isCollected
)
{
this
.
props
.
onCompleteTask
(
taskType
,
itemId
)
return
;
}
let
result
=
await
collectGoods
(
+
itemId
)
if
(
result
)
{
this
.
props
.
onCompleteTask
(
taskType
,
itemId
)
}
...
...
c_client/client/pages/collectGoods/collectGoods.js
View file @
b567d582
...
...
@@ -56,7 +56,7 @@ Page({
const
{
success
,
data
}
=
await
API
.
getCollectGoodsList
({
activityId
,
itemIds
}).
catch
(
res
=>
{
res
&&
commonToast
(
res
)
})
||
{}
if
(
!
success
||
success
)
{
if
(
success
)
{
this
.
setData
({
goodsList
:
data
||
[]
})
}
},
...
...
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