You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

160 lines
3.5 KiB
Vue

4 months ago
<template>
<view class="dropshipping">
<view class="searchTop">
<u-search placeholder="搜索商品" shape="round" height="56rpx" style="width: 270rpx;" :showAction="false" ></u-search>
<view :class="['filter-item',{act:activeId === item.value}]" v-for="item in filterList" :key="item.value" @clear="getData" @click="filterClick(item)" >
<text class="filter-name">{{item.name}}</text>
<u-icon name="arrow-down-fill" size="10"></u-icon>
</view>
</view>
<mescroll-body @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
4 months ago
<view class="detail">
<view class="goodsBox"v-for="(item,index) in 10">
4 months ago
<image src="https://wx1.sinaimg.cn/large/006zUvE2gy1hs8ubk0i3ij30iu0iu40b.jpg" mode="scaleToFill"></image>
4 months ago
<text class="goodsName">商品名称</text>
<view class="bottom">
<text class="goodsPrice">0.60</text>
<text class="sales">销量470,000+</text>
</view>
</view>
</view>
</mescroll-body>
4 months ago
</view>
</template>
<script>
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
4 months ago
export default {
mixins: [MescrollMixin], //使用mixin
4 months ago
data(){
return{
searchKeyword:"",
filterList:[
{name:"综合",value:0},
{name:"价格",value:1},
{name:"筛选",value:2},
],
activeId:0,
dataList:[],
searchForm: {
//页码
pageNum: 1,
//每页多少条
pageSize: 4,
// 筛选 1 综合 2销量 es修改后只使用于物料
sortType: 1,
// 商品名称
goodsName:'',
// 店铺id
flagshipShopId: '1',
// 最低价格
bottomPrice:'',
// 最高价格
topPrice:'',
// 价格排序
priceOrderFlag:'',
},
scrollTop: 636,
}
},
methods:{
filterClick(item){
this.activeId = item.value
},
upCallback(page){
let pageNum = page.num;
let pageSize = page.size;
4 months ago
}
}
}
</script>
<style lang="scss">
.dropshipping{
min-height: 100vh;
background: #FFFFFF;
border-radius: 20rpx 20rpx 0rpx 0rpx;
4 months ago
4 months ago
.searchTop{
width: 750rpx;
height: 92rpx;
display: flex;
align-items: center;
box-sizing: border-box;
4 months ago
padding: 36rpx;
4 months ago
.filter-item{
width: 124rpx;
height: 56rpx;
border-radius: 12rpx;
background: #F8FAFB;
font-size: 28rpx;
color: #868A9B;
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
padding: 0 18rpx;
margin-left: 8rpx ;
&.act{
color: #222222;
background: #EDEEEF;
font-weight: 600;
}
}
}
.detail{
4 months ago
padding: 8rpx 36rpx 0 36rpx;
4 months ago
display: flex;
justify-content: space-around;
flex-wrap: wrap;
}
.goodsBox{
width: 328rpx;
height: 422rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-bottom: 22rpx;
4 months ago
box-sizing: border-box;
4 months ago
>image{
width: 328rpx;
height: 320rpx;
4 months ago
4 months ago
}
.goodsName{
font-weight: 500;
font-size: 32rpx;
4 months ago
box-sizing: border-box;
4 months ago
}
.bottom{
height: 42rpx;
position: relative;
4 months ago
box-sizing: border-box;
4 months ago
.goodsPrice{
font-family: OPPOSans, OPPOSans;
font-weight: bold;
font-size: 32rpx;
color: #FF0000;
position: absolute;
left: 0;
bottom: 0;
&::before{
content: "¥";
font-size: 24rpx;
color: #FF3C26;
}
}
.sales{
font-weight: 400;
font-size: 24rpx;
color: #666666;
position: absolute;
right: 0;
bottom: 0;
}
}
}
}
</style>