Commit 2c00052c by TengFengLian

畅玩banner跳转

parent b75b92d0
......@@ -44,8 +44,11 @@ Page({
// this.queryBanner()
// this.queryStrategy()
this.setNavigationLogo()
//
},
onShow: function() {
this.setData({
pageNo: 1
})
var that = this
app.login({
success: function(token) {
......
import iUtils from '../../utils/utils.js'
import deviceUtil from "../../miniprogram_npm/lin-ui/utils/device-util.js"
const app = getApp()
let logicData = {
pageScrollLock: false,
pageScrollTimer: 0,
......@@ -57,9 +59,12 @@ Page({
})
this.setNavigationLogo()
this.queryBanner()
// this.queryBanner()
this.queryDetail()
},
onShow: function () {
this.getActivityList(1)
},
queryBanner: function () {
let response = [
'https://image-1256588539.cos.ap-shanghai.myqcloud.com/miniapp/play/banner-0.png',
......@@ -196,10 +201,10 @@ Page({
},
onActivityDetail: function (funcItem) {
console.log(funcItem)
// wx.navigateTo({
// url: '/pages/activity-detail/activity-detail'
// })
// console.log(funcItem)
wx.navigateTo({
url: '/pages/activity-detail/activity-detail?id='+funcItem.currentTarget.dataset.id
})
},
onTabSelection: function (funcEvent) {
......@@ -269,13 +274,14 @@ Page({
listType: type,
pageSize: 20,
pageNo: 1,
tagId: '3c95ab1afb3a4d899ac25242c3d089ea',
},
success: function(res) {
var tmpArr = [];
res.data.list.forEach(item => {
var tmpItem = {
id: item.id,
cover: item.cover,
cover: item.playImg,
title: item.name,
date: item.activeDate + ' ' + item.activeTime,//'6月30日-7月12日 10:00-12:00',
describe: item.summary,
......
......@@ -10,7 +10,7 @@
<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">
<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>
</block>
</swiper>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment