| | |
| | | <text>商城</text> |
| | | <view class="head-search-input"> |
| | | <u-search placeholder="搜索商品" height="30" searchIconColor="#999999" borderColor="#eeeeee" |
| | | bgColor="rgba(255,255,255,0.9)" @custom="search" :showAction="false" v-model="form.goodsName" @search="search" /> |
| | | bgColor="rgba(255,255,255,0.9)" @clear="search" :showAction="false" v-model="form.goodsName" @search="search" /> |
| | | </view> |
| | | </view> |
| | | <view class="head-tabs"> |
| | |
| | | </view> |
| | | </view> |
| | | <!-- 品牌 --> |
| | | <view class="list" style="padding-top: 30rpx; box-sizing: border-box; justify-content: flex-start;" v-if="show === 2"> |
| | | <view class="list" style="padding-top: 30rpx; box-sizing: border-box;" v-if="show === 2"> |
| | | <view :class="item.active ? 'list-cate active' : 'list-cate'" v-for="(item, index) in pingpai" :key="index" @click="getXiLie(item.id, index)">{{item.name}}</view> |
| | | <view style="width: 216rpx; height: 0;"></view> |
| | | </view> |
| | | <!-- 系列 --> |
| | | <view class="list" v-if="show === 3"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="cart"> |
| | | <view class="cart" @click="jumpCart"> |
| | | <view class="cart-box"> |
| | | <image src="/static/icon/ic_cart@2x.png" mode="widthFix"></image> |
| | | <text>购物车</text> |
| | |
| | | } from 'vuex' |
| | | export default { |
| | | computed: { |
| | | ...mapState(['navHeight', 'statusbarHeight']) |
| | | ...mapState(['navHeight', 'statusbarHeight', 'userInfo']) |
| | | }, |
| | | watch: { |
| | | paixu: { |
| | |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | this.getCartNum() |
| | | this.getLabels() |
| | | this.getGoodsList() |
| | | }, |
| | | async onShow() { |
| | | await this.$onLaunched; |
| | | if (this.userInfo) { |
| | | this.getCartNum() |
| | | } |
| | | }, |
| | | onReachBottom() { |
| | | this.getGoodsList() |
| | | }, |
| | | methods: { |
| | | jumpCart() { |
| | | uni.navigateTo({ |
| | | url: '/pages/shopping-cart/shopping-cart' |
| | | }) |
| | | }, |
| | | getCartNum() { |
| | | this.$u.api.cartGoodsTypeNum() |
| | | .then(res => { |
| | |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | margin-bottom: 24rpx; |
| | | margin-right: 20rpx; |
| | | &:last-child { |
| | | margin-right: 0 !important; |
| | | } |
| | | // margin-right: 20rpx; |
| | | // &:last-child { |
| | | // margin-right: 0 !important; |
| | | // } |
| | | } |
| | | .red { |
| | | text { |