合立app移动端项目-消息功能静态页开发v2

ccongli-dev-app-hl-0920
LI-CCONG\李聪聪 1 year ago
parent 242750ed89
commit 08cb9d1f3a

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

Loading…
Cancel
Save