|
@@ -1,7 +1,11 @@
|
|
|
<template name="hot">
|
|
|
<view class="messageSection" wx:if="{{hotData.unReadMessageNum > 0}}" bindtap="goToMessage">
|
|
|
- <image class="messageIcon" src="../../static/image/message_icon.png" />
|
|
|
- <text class="messageText">您有<text class="red-text">{{hotData.unReadMessageNum}}</text>条未读消息【立即查看】</text>
|
|
|
+ <image class="messageIcon" src="../../static/image/message_icon.png" />
|
|
|
+ <text class="messageText">
|
|
|
+ 您有
|
|
|
+ <text class="red-text">{{hotData.unReadMessageNum}}</text>
|
|
|
+ 条未读消息【立即查看】
|
|
|
+ </text>
|
|
|
</view>
|
|
|
<view class="myCourseSection">
|
|
|
<view class="title-regular">我的课程</view>
|
|
@@ -31,7 +35,7 @@
|
|
|
</view>
|
|
|
<view class="swiperSection">
|
|
|
<view class="title-regular swiper-title">官方推荐</view>
|
|
|
- <swiper previous-margin="0" next-margin="243rpx" circular="{{true}}" autoplay="{{hotData.autoplay}}" interval="{{hotData.interval}}" duration="{{hotData.duration}}" circular="{{hotData.circular}}">
|
|
|
+ <swiper previous-margin="0" next-margin="243rpx" bindchange="swiperChange" current="{{hotData.swiperCurrent}}" circular="{{true}}" autoplay="{{hotData.autoplay}}" interval="{{hotData.interval}}" duration="{{hotData.duration}}" circular="{{hotData.circular}}">
|
|
|
<block wx:for="{{hotData.recommend}}" wx:key="{{index}}">
|
|
|
<swiper-item class="slide-item" bindtap="openClass" data-classId="{{item.classId}}" data-title="{{item.title}}">
|
|
|
<image src="{{item.img}}" data-type="{{item.type}}" data-id="{{item.id}}" class="slide-image" />
|
|
@@ -42,11 +46,16 @@
|
|
|
</swiper-item>
|
|
|
</block>
|
|
|
</swiper>
|
|
|
+ <view class="swiper-dots-wrapper">
|
|
|
+ <block wx:for="{{hotData.recommend}}" wx:key="{{index}}">
|
|
|
+ <view class="swiper-dots {{hotData.swiperCurrent === index ? 'dot-active' : ''}}">
|
|
|
+ <text>{{index + 1}}</text>
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="recommdSection">
|
|
|
- <view class="recommd-title">
|
|
|
- 热门作品
|
|
|
- </view>
|
|
|
+ <view class="recommd-title">热门作品</view>
|
|
|
<view class="hotWares">
|
|
|
<view wx:for="{{hotData.hotWorks}}" wx:key="{{index}}" class="worksCard" bindtap="openWorks" data-readId="{{item.classId}}" data-title="{{item.title}}">
|
|
|
<view class="topData">
|