| | |
| | | </view> |
| | | </view> |
| | | <view class="head-tabs"> |
| | | <u-tabs lineColor="#E4001D" :list="list" @click="clickCate"></u-tabs> |
| | | <u-tabs lineColor="#E4001D" :itemStyle="{ height: '100rpx' }" :list="list" @click="clickCate"></u-tabs> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | <view class="cart-box"> |
| | | <image src="/static/icon/ic_cart@2x.png" mode="widthFix"></image> |
| | | <text>购物车</text> |
| | | <view class="cart-num">{{cardTotal}}</view> |
| | | <view class="cart-num" v-if="cardTotal>0">{{cardTotal}}</view> |
| | | </view> |
| | | </view> |
| | | <Login ref="login" /> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | mapState |
| | | } from 'vuex' |
| | | import Login from '@/components/login/login.vue' |
| | | export default { |
| | | components: { Login }, |
| | | computed: { |
| | | ...mapState(['navHeight', 'statusbarHeight', 'userInfo']) |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | jumpCart() { |
| | | if (!this.userInfo) { |
| | | this.$refs.login.open() |
| | | return; |
| | | } |
| | | uni.navigateTo({ |
| | | url: '/pages/shopping-cart/shopping-cart' |
| | | }) |
| | |
| | | this.getGoodsList() |
| | | }, |
| | | addCard(e) { |
| | | if (!this.userInfo) { |
| | | this.$refs.login.open() |
| | | return; |
| | | } |
| | | this.$u.api.addCart({ |
| | | goodsId: e.id, |
| | | goodsSkuId: e.skuResponsesList[0].id, |
| | |
| | | .head-tabs { |
| | | width: 100%; |
| | | height: 100rpx; |
| | | display: flex; |
| | | align-items: flex-end; |
| | | // display: flex; |
| | | // align-items: flex-end; |
| | | border-bottom: 1rpx solid #E5E5E5; |
| | | } |
| | | } |