1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <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>
- </view>
- <view class="myCourseSection">
- <view class="title">
- <view class="title-regular">我的课程</view>
- <view class="right" bindtap="toMyCourse" wx:if="{{hotData.myCourse.length > 3}}">
- 更多
- <image src="../../static/image/black_to.png" />
- </view>
- </view>
-
- <view class="myCoursePlaceHolder" wx:if="{{hotData.myCourse.length === 0}}" bindtap="goToBooks">
- <image src="../../static/image/add_class.png" />
- </view>
- <view class="book-box" wx:if="{{hotData.myCourse.length !== 0}}">
- <block wx:for="{{hotData.myCourse}}" wx:key="{{index}}">
- <view class="book-item" data-id="{{item.productId}}" bindtap="goToBook" data-title="{{item.title}}">
- <image class="book-img" src="{{item.iconImg}}"></image>
- <view class="book-title">{{item.title}}</view>
- </view>
- </block>
- </view>
- </view>
- <view class="searchSection">
- <input bindinput="inputHandler" value="{{hotData.inputValue}}" focus="{{hotData.inputFocus}}" bindfocus="searchIconDisappear" bindblur="searchIconCome" bindconfirm="searchHandler" placeholder="{{hotData.hotSearch}}" placeholder-style="text-indent:20rpx" confirm-type="search"></input>
- <view>{{searchIcon}}</view>
- <view bindtap="inputFocus" class="searchBtn" wx:if="{{hotData.searchIcon}}">
- <!-- <icon type="search" size="14" /> -->
- <image src="../../static/image/search_new.png" alt="" />
- </view>
- <view class="allBooks" bindtap="goToBooks">全部课程</view>
- <!-- <form bindsubmit="submitTest" report-submit="{{true}}" class="allBooks">
- <button formType="submit">Reset</button>
- </form> -->
- </view>
- <view class="swiperSection">
- <view class="title-regular swiper-title">官方推荐</view>
- <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" />
- <view class="slide-summary">
- <text class="slide-title">{{item.title}}</text>
- <text class="slide-tip">{{item.summary}}</text>
- </view>
- </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="hotWares">
- <view wx:for="{{hotData.hotWorks}}" wx:key="{{index}}" class="worksCard" bindtap="openWorks" data-readId="{{item.classId}}" data-title="{{item.title}}">
- <view class="topData">
- <view class="worksLeft" catchtap="goToUsers" data-uid="{{item.uid}}">
- <image class="authorAvatar" lazy-load="true" src="{{item.avatar}}" />
- <view class="profession" wx:if="{{item.profession}}">
- {{item.profession}}
- </view>
- <view class="worksInfo">
- <view class="authorName">{{item.nickName}}</view>
- <view class="time">{{item.time}}</view>
- </view>
- </view>
- <view class="numberInfo">
- <view class="wareCardPlays">
- <image class="wareCardPlaysImg" lazy-load="true" src="../../static/image/hotPlays.png" />
- <text>{{item.plays}}</text>
- </view>
- <view class="wareCardLikes">
- <image class="wareCardLikesImg" lazy-load="true" src="../../static/image/flower_small_pink.png" />
- <text>{{item.likes}}</text>
- </view>
- </view>
- </view>
- <image class="wareCardImg" src="{{item.img}}" />
- <view class="titleSummary">
- <text class="wareCardTitle">{{item.title}}</text>
- <text class="wareCardTip">{{item.summary}}</text>
- </view>
- </view>
- </view>
- </view>
- </template>
|