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
cd72f831
Commit
cd72f831
authored
Jun 03, 2019
by
穆启卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决banner广告和视频冲突
视频有后端控制显不显示
parent
c82fc79e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
25 deletions
+34
-25
index.js
pages/index/index.js
+34
-25
No files found.
pages/index/index.js
View file @
cd72f831
...
...
@@ -535,30 +535,38 @@ Page({
if
(
app
.
globalData
.
referrerAppid
&&
app
.
globalData
.
scene
===
1038
)
{
const
bubbleLeaveTime
=
wx
.
getStorageSync
(
'bubbleLeaveTime'
)
||
0
;
const
bubbleId
=
wx
.
getStorageSync
(
'bubbleId'
);
if
(
Date
.
now
()
-
bubbleLeaveTime
>
10000
&&
bubbleId
)
{
// 体验成功,可以加步数
requestData
.
data
=
{
task_id
:
bubbleId
};
requestData
.
method
=
'POST'
;
requestData
.
success
=
res
=>
{
console
.
log
(
'earnStep'
,
res
)
if
(
res
.
data
.
code
===
0
)
{
wx
.
showToast
({
title
:
'恭喜赚取步数成功'
,
icon
:
'none'
,
duration
:
2000
});
this
.
setData
({
bubbleList
:
res
.
data
.
data
});
}
};
}
else
{
return
wx
.
showToast
({
title
:
'体验不达标,获赠步数失败'
,
icon
:
'none'
,
duration
:
2000
})
console
.
log
(
'earnStep'
,
bubbleLeaveTime
)
console
.
log
(
'earnStep'
,
bubbleId
)
wx
.
removeStorageSync
(
'bubbleLeaveTime'
);
wx
.
removeStorageSync
(
'bubbleId'
);
console
.
log
(
'earnStep'
,
bubbleLeaveTime
)
console
.
log
(
'earnStep'
,
bubbleId
)
if
(
bubbleId
)
{
if
(
Date
.
now
()
-
bubbleLeaveTime
>
10000
)
{
// 体验成功,可以加步数
requestData
.
data
=
{
task_id
:
bubbleId
};
requestData
.
method
=
'POST'
;
requestData
.
success
=
res
=>
{
console
.
log
(
'earnStep'
,
res
)
if
(
res
.
data
.
code
===
0
)
{
wx
.
showToast
({
title
:
'恭喜赚取步数成功'
,
icon
:
'none'
,
duration
:
2000
});
this
.
setData
({
bubbleList
:
res
.
data
.
data
});
}
};
}
else
{
return
wx
.
showToast
({
title
:
'体验不达标,获赠步数失败'
,
icon
:
'none'
,
duration
:
2000
})
}
}
}
wx
.
request
(
requestData
);
...
...
@@ -654,6 +662,7 @@ Page({
this
.
data
.
bubbleList
.
forEach
(
item
=>
{
if
(
item
.
task_type
===
2
)
{
earnStep
=
item
.
bonus_step
;
item
.
can_watch
=
res2
.
data
.
data
.
can_watch
;
}
});
this
.
setData
({
...
...
@@ -667,7 +676,7 @@ Page({
});
}
wx
.
showModal
({
content
:
`恭喜
增加
${
earnStep
}
步数成功
`
,
content
:
`恭喜
成功增加
${
earnStep
}
步数
`
,
showCancel
:
false
});
}
...
...
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