107 lines
4.5 KiB
Plaintext
107 lines
4.5 KiB
Plaintext
<!--pages/home.wxml-->
|
|
<view class="search-wrap">
|
|
<view class="flex-row">
|
|
<view class="code-con">
|
|
<image src="/images/home/code.png" class="icon-code"></image>
|
|
</view>
|
|
<view class="flex-col">
|
|
<view class="search-con flex-row">
|
|
<view>
|
|
<image src="/images/home/search.png" class="icon-search"></image>
|
|
</view>
|
|
<view class="flex-col">
|
|
<input type="text" class="search-text" placeholder="搜索商家/美食" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="msg-con">
|
|
<image src="/images/home/msg.png" class="icon-msg"></image>
|
|
<view>消息</view>
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
<view class="home-top">
|
|
<view class="top-menu flex-row">
|
|
<view class="flex-col tc" data-url="/pages/article/publish" bindtap="onbindtap">
|
|
<image class="img1" src="/images/home/icon_shake.png"></image>
|
|
<view class="top-name">上传文章</view>
|
|
</view>
|
|
<view class="flex-col tc" data-url="/pages/article/publish2" bindtap="onbindtap">
|
|
<image class="img2" src="/images/home/icon_pocket.png"></image>
|
|
<view class="top-name">商家优惠</view>
|
|
</view>
|
|
<view class="flex-col tc" data-url="/pages/article/publish1" bindtap="onbindtap">
|
|
<image class="img3" src="/images/home/icon_love.png"></image>
|
|
<view class="top-name">上传商品</view>
|
|
</view>
|
|
<view class="flex-col tc" data-url="/pages/category/category" bindtap="onbindtap">
|
|
<image class="img4" src="/images/home/icon_chen.png"></image>
|
|
<view class="top-name">成就任务</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- <view class="bar-menu flex-row">
|
|
<view class="flex-col tc">
|
|
<image src="/images/home/icon_menu1.png"></image>
|
|
<view class="bar-name">会员卡</view>
|
|
</view>
|
|
<view class="flex-col tc">
|
|
<image src="/images/home/icon_menu2.png"></image>
|
|
<view class="bar-name">附近美食</view>
|
|
</view>
|
|
<view class="flex-col tc">
|
|
<image src="/images/home/icon_menu3.png"></image>
|
|
<view class="bar-name">我的发布</view>
|
|
</view>
|
|
<view class="flex-col tc">
|
|
<image src="/images/home/icon_menu4.png"></image>
|
|
<view class="bar-name">成就任务</view>
|
|
</view>
|
|
</view> -->
|
|
<view class="article-con">
|
|
<view class="tab-con">
|
|
<text class="{{display==3?'tab-active':''}}" data-id="3" bindtap="tab">推荐</text>
|
|
<!-- <text class="{{categoryId==1?'tab-active':''}}" data-id="1" bindtap="tab">和谐</text>
|
|
<text class="{{categoryId==2?'tab-active':''}}" data-id="2" bindtap="tab">敬业</text> -->
|
|
<!-- <text class="{{categoryId==3?'tab-active':''}}" data-id="3" bindtap="tab">关注</text> -->
|
|
<text class="{{display==0?'tab-active':''}}" data-id="0" bindtap="tab">正能量</text>
|
|
<text class="{{display==1?'tab-active':''}}" data-id="1" bindtap="tab">视频</text>
|
|
<!-- <text class="{{categoryId==5?'tab-active':''}}" data-id="5" bindtap="tab">文明</text>
|
|
<text class="{{categoryId==6?'tab-active':''}}" data-id="6" bindtap="tab">友善</text> -->
|
|
</view>
|
|
</view>
|
|
<view class="article-list">
|
|
<view class="list-item flex-row" wx:for="{{list}}" wx:key='index' data-item="{{item}}" data-id="{{item.id}}" bindtap="detail">
|
|
<view class="flex-col">
|
|
<view class="list-title">{{item.title}}</view>
|
|
<view class="list-des">
|
|
<!-- {{item.content}} -->
|
|
<!-- <rich-text nodes="{{item.content}}"></rich-text> -->
|
|
</view>
|
|
<view wx:if="{{item.mediaList.length>2}}" class="mt10 flex-row">
|
|
<image wx:if="{{index<3}}" wx:for="{{item.mediaList}}" wx:key="index" src="{{item.mediaPath}}" mode='aspectFill' class="goods-img-list"></image>
|
|
</view>
|
|
<view class="list-func">
|
|
<image src="{{item.avatarUrl}}" class="pl-img"></image>
|
|
<text class="list-name">{{item.nickName}}</text>
|
|
<text class="list-date">{{item.updatedAt}}</text>
|
|
</view>
|
|
</view>
|
|
<image wx:if="{{item.mediaList.length<3}}" src="{{item.mediaList[0].mediaPath}}" mode='aspectFill' class="goods-img"></image>
|
|
</view>
|
|
</view>
|
|
<view class="list" wx:if="{{display == 1}}">
|
|
<view class="item" wx:for='{{listData}}' data-id="{{item.id}}" bindtap="listTap">
|
|
<image src="{{item.cover}}" mode="aspectFill"></image>
|
|
<view class="title">{{item.title}}</view>
|
|
<view class="mt flex-row">
|
|
<view class="user-info flex-col">
|
|
<image src="{{item.avatarUrl}}"></image>{{item.nickName}}
|
|
</view>
|
|
<view class="date">{{item.updatedAt}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<empty wx:if="{{list.length===0 && display != 1}}" />
|
|
<!-- <tab-list step="1"/> --> |