From f3fa995d7dffa10590a02105474151911bb36dd6 Mon Sep 17 00:00:00 2001 From: chen <2659004835@qq.com> Date: Mon, 6 Jun 2022 13:49:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=B1=BB=E9=A1=B5=E9=9D=A2=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E8=B4=AD=E7=89=A9=E8=BD=A6=E6=95=B0=E9=87=8F=E5=8F=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/shopping-carts/cart-slide.vue | 11 +++++++++-- pages/tabbar/cate/cate.vue | 2 ++ pagesB/search/search.vue | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/components/shopping-carts/cart-slide.vue b/components/shopping-carts/cart-slide.vue index a72e056..edbca82 100644 --- a/components/shopping-carts/cart-slide.vue +++ b/components/shopping-carts/cart-slide.vue @@ -9,8 +9,8 @@ :style="{ transform: 'translate3d(' + item.slide_x + 'px, 0, 0)' }"> - - + + @@ -268,6 +268,13 @@ }) } }, + // 查看商品详情 + goDetail(id) { + uni.navigateTo({ + url:'/pagesB/shop-detail/shop-detail?id='+id + }) + }, + // 输入框获取焦点事件 focusEv(num) { // 储存当前商品的原始数值 diff --git a/pages/tabbar/cate/cate.vue b/pages/tabbar/cate/cate.vue index 00baa97..c7094a8 100644 --- a/pages/tabbar/cate/cate.vue +++ b/pages/tabbar/cate/cate.vue @@ -52,6 +52,7 @@ import swiperTabJl from '@/components/swiper-tab/swiper-tab-jl.vue'; // 底部组件 import footTab from '@/components/foot-tabs/foot-tab.vue'; + import {getCartNum} from '@/jsFile/public-api.js'; import { mapState } from 'vuex'//引入mapState export default { components:{ @@ -181,6 +182,7 @@ this.$requst.post('/api/order/shopping-cart-add',{sku_id:id,num:1}).then(res=>{ if(res.code==0) { this.$toolAll.tools.showToast('加入购物车成功(*^▽^*)'); + getCartNum(); } else { this.$toolAll.tools.showToast(res.msg) } diff --git a/pagesB/search/search.vue b/pagesB/search/search.vue index 46100e3..40d532b 100644 --- a/pagesB/search/search.vue +++ b/pagesB/search/search.vue @@ -1,5 +1,5 @@