<template>
|
|
<view class="page">
|
|
<navbar title="文创好物" leftClick @leftClick="$utils.navigateBack" />
|
|
<view class="search">
|
|
<uv-search placeholder="请输入搜索服务" :showAction="false" search-icon-size="40rpx" v-model="keyword"></uv-search>
|
|
</view>
|
|
<view class="dropDown">
|
|
<uv-tabs :list="tabs" lineColor="#B12026" lineHeight="8rpx" lineWidth="50rpx" :scrollable="false"
|
|
@click="clickTabs"></uv-tabs>
|
|
</view>
|
|
|
|
<view class="list">
|
|
<productList :list="list" />
|
|
</view>
|
|
|
|
<cartAction />
|
|
<tabber />
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import cartAction from '../components/product/cartAction.vue'
|
|
import productList from '../components/product/productList.vue'
|
|
export default {
|
|
components: {
|
|
productList,
|
|
cartAction,
|
|
},
|
|
data() {
|
|
return {
|
|
tabs: [{
|
|
name: '综合'
|
|
},
|
|
{
|
|
name: '销量'
|
|
},
|
|
{
|
|
name: '价格'
|
|
},
|
|
{
|
|
name: '上新'
|
|
},
|
|
],
|
|
queryParams: {
|
|
pageNo: 1,
|
|
pageSize: 10,
|
|
},
|
|
list: [],
|
|
state: 0,
|
|
}
|
|
},
|
|
onShow() {
|
|
this.getProductList()
|
|
},
|
|
methods: {
|
|
//点击tab栏
|
|
clickTabs(index) {
|
|
if (index == 0) {
|
|
this.queryParams.state = -1;
|
|
} else {
|
|
this.queryParams.state = index - 1;
|
|
}
|
|
// this.getOrderList()
|
|
},
|
|
getProductList() {
|
|
this.$api('queryWaresList', this.queryParams,
|
|
res => {
|
|
if (res.code == 200) {
|
|
this.list = res.result
|
|
console.log(this.list);
|
|
}
|
|
})
|
|
}
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.page {
|
|
.search {
|
|
background-color: #fff;
|
|
padding: 20rpx 30rpx;
|
|
|
|
/deep/ .uv-search__content__icon {
|
|
padding: 15rpx 0;
|
|
}
|
|
}
|
|
|
|
.dropDown {
|
|
background-color: #fff;
|
|
}
|
|
|
|
.list {
|
|
padding: 0 20rpx;
|
|
}
|
|
}
|
|
</style>
|