<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="https://www.thymeleaf.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="https://www.thymeleaf.org ">
<head>
    <title>采美365网-中国美业全方位线上交易服务互动平台，做美业，上采美</title>
    <template th:replace="components/head-link"></template>
    <link th:href="@{/css/flea-market/list.css(v=${version})}" rel="stylesheet" type="text/css">
</head>
<body>
<!-- 引用头部 -->
<template th:replace="components/header"></template>

<!-- 二手商品列表 -->
<div id="fleaMarketList">
    <div class="wrap">
        <div class="ListImg">
            <img src="/img/flea-market/banner.png" />
        </div>
        <template>
            <ul class="secondTitle " v-if="isPC">
                <li class="ClassA icon " v-for="(item, index) in tabTitle" :key="index" @click="handle(item)" :class="[currentId==item.value?'active':'',item.value==1?'jqSelect':'']">{{item.name}} </li>
                <li class="fabu">
                    <a href="/flea-market/form.html">我要发布</a>
                <li/>
            </ul>
            <ul class="secondTitle" v-else>
                <li class="ClassA  mIcon" v-for="(item, index) in tabTitle" :key="index" @click="handle(item)" :class="[currentId==item.value?'active':'',item.value==1?'off':'']">{{item.name}}
                    <span class="line" v-if="currentId==item.value"></span>
                </li>
                <li class="fabu">
                    <a href="/flea-market/form.html">我要发布</a>
                <li/>
            </ul>
        </template>
        <ul class="mainTab" v-if="mainflag">
            <li v-for="(item,index) in tabList" @click='handleChild(item)' :class="currentID2 ==index?'addstyle':' '">{{item.name}}</li>
        </ul>
        <div class="shopList">
            <div class="Listitem" v-if="isShow" v-for="(item, index) in tabchildList">
                <a class="itemImg onhref" :href="'/flea-market-'+item.productID+'.html'">
                    <img :src="item.imageList[0]" :class="item.sold==1?'activeImg':''" class="bigImg">
                </a>
                <div class="ItemInfo">
                    <div class="tag">
                        <span class="infotag news" v-if="item.sold==0&&item.newAdded==1">最新</span>
                        <span class="infotag brand" v-if="item.brandName==null&&item.brandName==''">{{item.brandName}}</span>
                        <span class="infotag sold" v-if="item.sold==1&&item.newAdded==1||item.sold==1&&item.newAdded==0">已售</span>
                        <span class="infotag other" v-if="item.brandID==161&&item.brandName!=''&&item.brandName!=null">{{item.brandName}}</span>
                    </div>
                    <a class="productname" :href="'/flea-market-'+item.productID+'.html'">
                        {{item.name}}
                    </a>
                    <div class="targetprice">
                        <span v-if="item.detailTalkFlag ==2 && userID==null">价格详聊</span>
                        <span v-else-if="userID==null" class="priceparam" @click="toLogin">登录查看价格></span>
                        <span v-else-if="userID!=null && item.detailTalkFlag==2">价格详聊</span>
                        <span v-else>￥{{item.price1Str}}</span>
                    </div>
                    <div class="shijian">
                        <div>
                            <i class="icon mIcon  liulanliang"></i> {{item.viewingNum}}
                        </div>
                        <div>
                            <i class="icon mIcon  shijian"></i> {{item.onLineDateStr}}
                        </div>
                    </div>
                    <div class="dizhi">
                        <i class="icon mIcon dizhi"></i>
                        {{item.provinceCityDistrict}}
                    </div>
                </div>
            </div>
            <div class="no-content" v-show="showflag" :class="showflag?'show':''">
                <img src="/img/flea-market/nologo.png" v-if="isPC" />
                <img src="/img/flea-market/kong_m.png" v-else />
                <div class="error-message">
                    <p>此分类下面没有商品，换其它分类瞅瞅</p>
                </div>
            </div>
        </div>
    </div>
    <div class="pageWrap clear" v-if="isPC">
        <a v-if="listQuery.pageNum>1" class="prev" @click="toPagination(listQuery.pageNum*1-1)" href="javascript:void(0);"></a>
        <template v-for="n in showPageBtn">
            <a v-if="n" :class="{ 'on': (n==listQuery.pageNum) }" @click="toPagination(n)" href="javascript:void(0);">{{ n }}</a>
            <template v-else>···</template>
        </template>
        <a v-if="listQuery.pageNum<pageTotal" class="next" @click="toPagination(listQuery.pageNum*1+1)" href="javascript:void(0);"> </a>
        <span>共<b v-text="pageTotal>1?pageTotal:1"></b>页</span>
        <span>跳至</span>
        <input v-model="pageInput" @blur="checkNum()" />
        <span>页</span>&nbsp;
        <a class="btn" href="javascript:void(0);" @click="toPagination(pageInput)">点击跳转</a>
    </div>
</div>


<!-- 引入底部 -->
<template th:replace="components/footer"></template>
<template th:replace="components/foot-link"></template>
<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/second.service.js(v=${version})}"></script>
<script charset="utf-8" type="text/javascript" th:src="@{/js/flea-market/list.js(v=${version})}"></script>
</body>
</html>
