<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
|
|
submitTitle="去结算"
|
|
@submit="$utils.navigateTo('/pages_order/mine/cart')"/>
|
|
<tabber />
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import cartAction from '../components/product/cartAction.vue'
|
|
import productList from '../components/product/productList.vue'
|
|
import mixinsList from '@/mixins/list.js'
|
|
export default {
|
|
components: {
|
|
productList,
|
|
cartAction,
|
|
},
|
|
mixins : [mixinsList],
|
|
data() {
|
|
return {
|
|
tabs: [{
|
|
name: '综合'
|
|
},
|
|
{
|
|
name: '销量'
|
|
},
|
|
{
|
|
name: '价格'
|
|
},
|
|
{
|
|
name: '上新'
|
|
},
|
|
],
|
|
mixinsListApi : 'queryWaresList',
|
|
}
|
|
},
|
|
onShow() {
|
|
this.getData()
|
|
if(uni.getStorageSync('token')){
|
|
this.$store.commit('getCartList')
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.queryParams.state = 0
|
|
},
|
|
methods: {
|
|
//点击tab栏
|
|
clickTabs(index) {
|
|
this.queryParams.state = index;
|
|
this.getData()
|
|
},
|
|
}
|
|
}
|
|
</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>
|