Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2c00052c
authored
Aug 22, 2020
by
TengFengLian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
畅玩banner跳转
parent
b75b92d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
pages/home/home.js
pages/play/play.js
pages/play/play.wxml
pages/home/home.js
View file @
2c00052c
...
@@ -44,8 +44,11 @@ Page({
...
@@ -44,8 +44,11 @@ Page({
// this.queryBanner()
// this.queryBanner()
// this.queryStrategy()
// this.queryStrategy()
this
.
setNavigationLogo
()
this
.
setNavigationLogo
()
},
//
onShow
:
function
()
{
this
.
setData
({
pageNo
:
1
})
var
that
=
this
var
that
=
this
app
.
login
({
app
.
login
({
success
:
function
(
token
)
{
success
:
function
(
token
)
{
...
...
pages/play/play.js
View file @
2c00052c
import
iUtils
from
'../../utils/utils.js'
import
iUtils
from
'../../utils/utils.js'
import
deviceUtil
from
"../../miniprogram_npm/lin-ui/utils/device-util.js"
import
deviceUtil
from
"../../miniprogram_npm/lin-ui/utils/device-util.js"
const
app
=
getApp
()
let
logicData
=
{
let
logicData
=
{
pageScrollLock
:
false
,
pageScrollLock
:
false
,
pageScrollTimer
:
0
,
pageScrollTimer
:
0
,
...
@@ -57,9 +59,12 @@ Page({
...
@@ -57,9 +59,12 @@ Page({
})
})
this
.
setNavigationLogo
()
this
.
setNavigationLogo
()
this
.
queryBanner
()
//
this.queryBanner()
this
.
queryDetail
()
this
.
queryDetail
()
},
},
onShow
:
function
()
{
this
.
getActivityList
(
1
)
},
queryBanner
:
function
()
{
queryBanner
:
function
()
{
let
response
=
[
let
response
=
[
'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/banner-0.png'
,
'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/banner-0.png'
,
...
@@ -196,10 +201,10 @@ Page({
...
@@ -196,10 +201,10 @@ Page({
},
},
onActivityDetail
:
function
(
funcItem
)
{
onActivityDetail
:
function
(
funcItem
)
{
console
.
log
(
funcItem
)
//
console.log(funcItem)
//
wx.navigateTo({
wx
.
navigateTo
({
// url: '/pages/activity-detail/activity-detail'
url
:
'/pages/activity-detail/activity-detail?id='
+
funcItem
.
currentTarget
.
dataset
.
id
//
})
})
},
},
onTabSelection
:
function
(
funcEvent
)
{
onTabSelection
:
function
(
funcEvent
)
{
...
@@ -269,13 +274,14 @@ Page({
...
@@ -269,13 +274,14 @@ Page({
listType
:
type
,
listType
:
type
,
pageSize
:
20
,
pageSize
:
20
,
pageNo
:
1
,
pageNo
:
1
,
tagId
:
'3c95ab1afb3a4d899ac25242c3d089ea'
,
},
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
var
tmpArr
=
[];
var
tmpArr
=
[];
res
.
data
.
list
.
forEach
(
item
=>
{
res
.
data
.
list
.
forEach
(
item
=>
{
var
tmpItem
=
{
var
tmpItem
=
{
id
:
item
.
id
,
id
:
item
.
id
,
cover
:
item
.
cover
,
cover
:
item
.
playImg
,
title
:
item
.
name
,
title
:
item
.
name
,
date
:
item
.
activeDate
+
' '
+
item
.
activeTime
,
//'6月30日-7月12日 10:00-12:00',
date
:
item
.
activeDate
+
' '
+
item
.
activeTime
,
//'6月30日-7月12日 10:00-12:00',
describe
:
item
.
summary
,
describe
:
item
.
summary
,
...
...
pages/play/play.wxml
View file @
2c00052c
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<swiper autoplay circular interval="2000" next-margin="64rpx" bindchange="eventBannerChange">
<swiper autoplay circular interval="2000" next-margin="64rpx" bindchange="eventBannerChange">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item>
<swiper-item>
<image src="{{item}}" class="{{bannerIndex !== index ? 'banner-content': 'banner-content-active'}}" data-item="{{item}}" bindtap="onActivityDetail"/>
<image src="{{item
.cover
}}" class="{{bannerIndex !== index ? 'banner-content': 'banner-content-active'}}" data-item="{{item}}" bindtap="onActivityDetail"/>
</swiper-item>
</swiper-item>
</block>
</block>
</swiper>
</swiper>
...
...
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