|
|
|
@ -4,31 +4,30 @@
|
|
|
|
|
<u-navbar leftText="返回" title="系统消息" :placeholder="true" leftIconColor=" #409eff" @leftClick="backHomeClick" />
|
|
|
|
|
|
|
|
|
|
<!-- 条件检索 -->
|
|
|
|
|
<view class="condition">
|
|
|
|
|
<view class="date">
|
|
|
|
|
<uni-datetime-picker v-model="dateRange" type="daterange" @change="changeDataRange" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="unread">
|
|
|
|
|
<u-checkbox-group @change="changeStatus">
|
|
|
|
|
<u-checkbox activeColor="green" label="只看未读" :checked="onlyUnread" :name="name"></u-checkbox>
|
|
|
|
|
</u-checkbox-group>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="condition">
|
|
|
|
|
<view class="date">
|
|
|
|
|
<uni-datetime-picker v-model="dateRange" type="daterange" @change="changeDataRange" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="unread">
|
|
|
|
|
<u-checkbox-group @change="changeStatus">
|
|
|
|
|
<u-checkbox activeColor="green" label="只看未读" :checked="onlyUnread" :name="name"></u-checkbox>
|
|
|
|
|
</u-checkbox-group>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 消息列表 -->
|
|
|
|
|
<view class="list">
|
|
|
|
|
<u-list @scrolltolower="scrolltolower" enableFlex>
|
|
|
|
|
<u-list-item v-for="(item, index) in indexList" :key="index">
|
|
|
|
|
<u-cell :title="`系统消息-${index + 1}`">
|
|
|
|
|
<u-avatar slot="icon" shape="square" size="35" :src="item.url"
|
|
|
|
|
customStyle="margin: -3px 5px -3px 0"></u-avatar>
|
|
|
|
|
</u-cell>
|
|
|
|
|
</u-list-item>
|
|
|
|
|
</u-list>
|
|
|
|
|
</view>
|
|
|
|
|
<u-list @scrolltolower="scrolltolower" enableBackToTop enableFlex>
|
|
|
|
|
<u-list-item v-for="(item, index) in indexList" :key="index">
|
|
|
|
|
<u-cell :title="`系统消息-${index + 1}`">
|
|
|
|
|
<u-avatar slot="icon" shape="square" size="35" :src="item.url"
|
|
|
|
|
customStyle="margin: -3px 5px -3px 0"></u-avatar>
|
|
|
|
|
</u-cell>
|
|
|
|
|
</u-list-item>
|
|
|
|
|
<!-- 加载更多 -->
|
|
|
|
|
<u-loadmore :status="status" loadmoreText="上拉加载更多" loadingText="加载中" height="30" marginTop="10" line/>
|
|
|
|
|
</u-list>
|
|
|
|
|
|
|
|
|
|
<!-- 加载更多 -->
|
|
|
|
|
<u-loadmore :status="status" loadmoreText="上拉加载更多" loadingText="加载中" height="30" marginTop="10" line/>
|
|
|
|
|
<!-- <view style="height: 50px;"></view> -->
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -80,11 +79,11 @@
|
|
|
|
|
scrolltolower() {
|
|
|
|
|
if (this.status == "nomore") return;
|
|
|
|
|
this.status = 'loading';
|
|
|
|
|
this.loadMore(false);
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
if (this.indexList.length >= 100) {
|
|
|
|
|
this.status = 'nomore';
|
|
|
|
|
} else {
|
|
|
|
|
this.loadMore(false);
|
|
|
|
|
this.status = 'loadmore';
|
|
|
|
|
}
|
|
|
|
|
}, 1000);
|
|
|
|
|