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.
138 lines
7.7 KiB
138 lines
7.7 KiB
<!--pages/main/index.wxml-->
|
|
<wxs module="moment" src="../../moment/index.wxs"></wxs>
|
|
<cu-custom bgColor="bg-white" isBack="{{false}}">
|
|
<view slot="content" style="color:black;font-size:36rpx">纸吧</view>
|
|
</cu-custom>
|
|
|
|
<scroll-view scroll-y style="height: {{height}}rpx;" lower-threshold="200" bindscrolltolower="fetchMomentList">
|
|
<!-- <refresh-view bind:refresh="onRefreshList" height="{{height}}" triggered="{{requesting}}" scrollTop="{{top}}" bind:scrolltolower="fetchMomentList"> -->
|
|
<!----------------------------------------------------精选纸吧---------------------------------------------------------------->
|
|
<wux-skeleton active wx:if="{{!hostList.length}}">
|
|
<view class="bg-white flex flex-justify" style="padding:30rpx 0rpx 30rpx 30rpx">
|
|
<wux-skeleton-paragraph rounded rows="1" wux-class="case-class" />
|
|
<!-- <wux-skeleton-paragraph rounded rows="1" wux-class="case2-class" /> -->
|
|
</view>
|
|
<view class="bg-white flex" style="padding: 4rpx 30rpx">
|
|
<view wx:for="{{5}}" wx:key="index" class="item-host" style="padding-left:{{index == 0? 0 : 8}}rpx;">
|
|
<wux-skeleton-avatar shape="rounded" size="large" />
|
|
<wux-skeleton-paragraph rounded rows="1" wux-class="host-class" />
|
|
</view>
|
|
</view>
|
|
</wux-skeleton>
|
|
<view wx:else>
|
|
<view class="bg-white flex flex-justify" style="padding:24rpx 30rpx">
|
|
<view class="text-bold text-lg" style="color:#333333">精选纸吧</view>
|
|
<!-- <view class="text-gray text-df">全部查看<text class="cuIcon-right text-gray" style="font-size:14px"></text></view> -->
|
|
</view>
|
|
<scroll-view class="bg-white" scroll-x scroll-with-animation="{{true}}">
|
|
<view class="flex" style="padding: 4rpx 30rpx">
|
|
<view wx:for="{{hostList}}" wx:key="index" class="item-host" style="padding-left:{{index==0?0:30}}rpx;flex:1" data-index="{{index}}" bindtap="toHost">
|
|
<wux-image width="{{50}}" height="{{50}}" shape="rounded" src="{{item.logoUrl}}" mode="aspectFill">
|
|
<image class="image-load" style="border-radius: 8rpx" slot="loading" src="/assets/image/def_image.png"></image>
|
|
<image class="image-load" style="border-radius: 8rpx" slot="error" src="/assets/image/def_image.png"></image>
|
|
</wux-image>
|
|
<view class="text-sm text-cut" style="text-align: center;width:96rpx;margin-top:4rpx">{{item.name}}</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
<view class="bg-white" style="height:20rpx"></view>
|
|
<!----------------------------------------------------废纸指数---------------------------------------------------------------->
|
|
<wux-skeleton active wx:if="{{!chartList}}">
|
|
<view class="bg-white flex flex-justify" style="padding:24rpx 0rpx 24rpx 30rpx">
|
|
<wux-skeleton-paragraph rounded rows="1" wux-class="case-class" />
|
|
<wux-skeleton-paragraph rounded rows="1" wux-class="case2-class" />
|
|
</view>
|
|
<view class="bg-white flex flex-justify" style="padding:4rpx 0rpx 24rpx 30rpx">
|
|
<wux-skeleton-paragraph rounded rows="7" wux-class="case3-class" />
|
|
</view>
|
|
</wux-skeleton>
|
|
<view class="container" style="padding:30rpx;border-top:2rpx solid #eeeeee" wx:else>
|
|
<view class="flex flex-justify" style="margin-bottom:20rpx">
|
|
<view class="text-bold text-lg" style="color:#333333">千鸟纸价</view>
|
|
<view class="text-gray text-df" bindtap="toPaperList">选择品类<text class="cuIcon-right" style="font-size:14px"></text></view>
|
|
</view>
|
|
<!-- <view wx:if="{{!serieList.length}}">
|
|
<view class="list-empty" style="height:400rpx">
|
|
<view class="load-spinner text-gray" style="margin-bottom:24px" wx:if="{{loading}}" />
|
|
<image class="img-empty" src="/assets/image/list_empty.png" wx:else></image>
|
|
<view class="text-empty">{{loading? '正在加载' : '暂无数据'}}</view>
|
|
</view>
|
|
</view> -->
|
|
<!-- <view class="text-gray text-sm" style="color:#333333">千鸟纸价</view> -->
|
|
<canvas canvas-id="lineChart" disable-scroll="true" class="canvas" bindtouchstart="touchHandler" bindtouchmove="moveHandler" bindtouchend="touchEndHandler" />
|
|
</view>
|
|
<!----------------------------------------------------帖子列表---------------------------------------------------------------->
|
|
<wux-skeleton active wx:if="{{!momentList.length}}">
|
|
<view class="bg-white flex flex-justify" style="padding:24rpx 30rpx;">
|
|
<wux-skeleton-paragraph rounded rows="1" wux-class="case-class" />
|
|
<wux-skeleton-paragraph rounded rows="1" wux-class="case2-class" />
|
|
</view>
|
|
<view class="cu-card dynamic no-card" wx:for="{{2}}" wx:key="index">
|
|
<view class="cu-item shadow" style="padding-left:30rpx">
|
|
<view class="cu-list menu-avatar">
|
|
<view class="cu-item" style="justify-content: flex-start;">
|
|
<wux-skeleton-avatar shape="circle" size="large" />
|
|
<view class="content flex-sub">
|
|
<wux-skeleton-paragraph rounded rows="1" wux-class="case2-class" />
|
|
<view class="bg-white" style="height:8rpx"></view>
|
|
<wux-skeleton-paragraph rounded rows="1" wux-class="case-class" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<wux-skeleton-paragraph rounded rows="3" wux-class="case3-class" />
|
|
</view>
|
|
</view>
|
|
</wux-skeleton>
|
|
<view wx:else>
|
|
<view class="bg-white flex flex-justify" style="padding:20rpx 30rpx;border-top:2rpx solid #eeeeee">
|
|
<view class="text-bold text-lg" style="color:#333333">推荐帖子</view>
|
|
<view class="text-gray text-df" bindtap="toMomentList">我的帖子<text class="cuIcon-right text-gray" style="font-size:14px"></text></view>
|
|
</view>
|
|
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{momentList}}" wx:key="pageIndex">
|
|
<view wx:for="{{pageItem}}" wx:key="index" class="cu-card dynamic no-card" data-page="{{pageIndex}}" data-index="{{index}}" bindtap="lookItem">
|
|
<wux-divider show-text="{{ false }}" wx:if="{{pageIndex != 0 || index != 0 }}"></wux-divider>
|
|
<view class="cu-item shadow">
|
|
<view class="cu-list menu-avatar">
|
|
<view class="cu-item" style="justify-content: flex-start;padding-left:30rpx">
|
|
<wux-image width="{{50}}" height="{{50}}" shape="circle" src="{{item.ownerAvatarUrl}}" mode="aspectFill">
|
|
<image class="image-load" slot="loading" src="/assets/image/def_image.png"></image>
|
|
<image class="image-load" slot="error" src="/assets/image/def_image.png"></image>
|
|
</wux-image>
|
|
<view class="content flex-sub">
|
|
<view class="text-cut" style="max-width:400rpx">{{item.ownerNickname}}</view>
|
|
<view class="text-gray text-sm">{{moment.formatMTime(item.createTime)}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="text-black text-bold text-lg" style="padding:10rpx 30rpx 30rpx 30rpx">{{item.title}}</view>
|
|
<fold-text content="{{item.content}}"></fold-text>
|
|
<view style="padding:0rpx 30rpx">
|
|
<sudoku-image image-list="{{item.imgUrlList}}"></sudoku-image>
|
|
</view>
|
|
<view class="flex flex-justify padding text-gray">
|
|
<wux-tag color="blue">#{{item.paperBarName}}</wux-tag>
|
|
<view class="flex flex-center text-df">
|
|
<text class="cuIcon-messagefill" style="font-size:16px"></text>
|
|
<text style="margin-left:8rpx">{{item.replyQuantity}}</text>
|
|
<view style="margin-left:48rpx;" data-page="{{pageIndex}}" data-index="{{index}}" catchtap="likeItem">
|
|
<text class="cuIcon-appreciate{{item.isLiked ? 'fill' : ''}} text-{{item.isLiked ? 'blue' : 'gray'}}" style="font-size:16px"></text>
|
|
<text class="text-df" style="margin-left:8rpx">{{item.likeQuantity}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!--加载更多的UI-->
|
|
<view wx:if="{{form.pageNum > 1}}" style="padding:20rpx">
|
|
<wux-divider>
|
|
<view class="loadmore">
|
|
<text class="icon--refresher" wx:if="{{!finished}}"></text>
|
|
<text class="text-sm" style="margin-left:8rpx">{{finished?'到底啦~':'加载中...'}}</text>
|
|
</view>
|
|
</wux-divider>
|
|
</view>
|
|
</view>
|
|
<!-- </refresh-view> -->
|
|
</scroll-view>
|