Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
walk_daka_wx
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
穆启卓
walk_daka_wx
Commits
125eb59d
Commit
125eb59d
authored
May 22, 2019
by
穆启卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
74b0b106
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
29 deletions
+45
-29
index.js
pages/index/index.js
+45
-29
No files found.
pages/index/index.js
View file @
125eb59d
...
...
@@ -617,19 +617,27 @@ Page({
method
:
'POST'
,
success
:
res2
=>
{
if
(
res2
.
data
.
code
===
0
)
{
wx
.
showToast
({
title
:
'视频错误,请尝试其他方式赚取步数'
,
icon
:
'none'
,
duration
:
2000
});
this
.
data
.
bubbleList
.
forEach
(
item
=>
{
if
(
item
.
task_type
===
2
)
{
item
.
can_watch
=
false
;
}
});
this
.
setData
({
bubbleList
:
this
.
data
.
bubbleList
});
if
(
this
.
data
.
targetSteps
)
{
wx
.
showToast
({
title
:
'视频错误,请尝试其他方式赚取步数'
,
icon
:
'none'
,
duration
:
2000
});
this
.
data
.
bubbleList
.
forEach
(
item
=>
{
if
(
item
.
task_type
===
2
)
{
item
.
can_watch
=
false
;
}
});
this
.
setData
({
bubbleList
:
this
.
data
.
bubbleList
});
}
else
{
wx
.
showToast
({
title
:
'报名后将获取步数'
,
icon
:
'none'
,
duration
:
2000
});
}
}
}
});
...
...
@@ -648,22 +656,30 @@ Page({
method
:
'POST'
,
success
:
res2
=>
{
if
(
res2
.
data
.
code
===
0
)
{
wx
.
showToast
({
title
:
'获取步数成功'
,
icon
:
'none'
,
duration
:
2000
});
let
earnStep
=
0
;
this
.
data
.
bubbleList
.
forEach
(
item
=>
{
if
(
item
.
task_type
===
2
)
{
item
.
can_watch
=
false
;
earnStep
=
item
.
bonus_step
;
}
});
this
.
setData
({
bubbleList
:
this
.
data
.
bubbleList
,
currentSteps
:
this
.
data
.
currentSteps
+
earnStep
});
if
(
this
.
data
.
targetSteps
)
{
wx
.
showToast
({
title
:
'获取步数成功'
,
icon
:
'none'
,
duration
:
2000
});
let
earnStep
=
0
;
this
.
data
.
bubbleList
.
forEach
(
item
=>
{
if
(
item
.
task_type
===
2
)
{
item
.
can_watch
=
false
;
earnStep
=
item
.
bonus_step
;
}
});
this
.
setData
({
bubbleList
:
this
.
data
.
bubbleList
,
currentSteps
:
this
.
data
.
currentSteps
+
earnStep
});
}
else
{
wx
.
showToast
({
title
:
'报名后将获取步数'
,
icon
:
'none'
,
duration
:
2000
});
}
}
}
});
...
...
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