You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.8 KiB
51 lines
1.8 KiB
5 years ago
|
<view class="news-module">
|
||
|
<scroll-view class="classify-tab" scroll-x="{{true}}">
|
||
|
<view class="tab-list">
|
||
|
<view
|
||
|
class="item {{item.select ? 'select' : ''}}"
|
||
|
id="{{'item' + (index + 1)}}"
|
||
|
wx:for="{{newsCategoryList}}"
|
||
|
wx:for-item="item"
|
||
|
wx:for-index="index"
|
||
|
data-tab="{{index}}"
|
||
|
bindtap="onChangeClassifyTab"
|
||
|
wx:key="index">
|
||
|
{{item.label}}
|
||
|
<view style="left: calc({{selectBarLeft}}px - 15rpx)" wx:if="{{item.select}}" class="select-bar"></view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</scroll-view>
|
||
|
<view class="news-list">
|
||
|
<block wx:if="{{newsList.length > 0}}">
|
||
|
<view class="type-3">
|
||
|
<view class="list-item" wx:for="{{newsList}}" wx:for-index="index" wx:for-item="item" wx:key="index" bindtap="toDetail" data-id="{{item.id}}" data-title="{{item.noticeTitle}}">
|
||
|
<view class="name">{{item.noticeTitle}}</view>
|
||
|
<view class="info">
|
||
|
<text class="text">{{common.getStr(item.noticeContent)}}</text>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</block>
|
||
|
|
||
|
<block wx:if="{{preloadVisible}}">
|
||
|
<view class="preload-item" wx:for="{{[1,2,3,4]}}" wx:key="index" wx:for-index="index" wx:for-item="item">
|
||
|
<view class="left">
|
||
|
<view class="top">
|
||
|
<view class="title"></view>
|
||
|
<view class="title"></view>
|
||
|
<view class="time"></view>
|
||
|
</view>
|
||
|
<view class="bottom"></view>
|
||
|
</view>
|
||
|
<view class="right"></view>
|
||
|
</view>
|
||
|
</block>
|
||
|
|
||
|
</view>
|
||
|
</view>
|
||
|
<wxs module="common">
|
||
|
module.exports.cutTime = function(time) { return time.split(' ')[0] }
|
||
|
module.exports.getStr = function(content) {
|
||
|
return content.replace(getRegExp('<\/?.+?\/?>|[ ]','g'),'')
|
||
|
}
|
||
|
</wxs>
|