From 3c38d69bf3c221ecdab04e769863549809db7b16 Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Thu, 26 Jun 2025 15:39:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=B9=E4=BA=A7=E8=B4=AD=E7=89=A9=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/cartData.vue | 49 ++++++++++++++--------------- static/css/base.css | 15 +++++++++ subPackages/search/result.vue | 13 +++----- subPackages/search/techanResult.vue | 8 ++--- subPackages/techan/detail.vue | 2 +- subPackages/techan/index.vue | 16 ++++++---- 6 files changed, 58 insertions(+), 45 deletions(-) diff --git a/components/cartData.vue b/components/cartData.vue index 186a7e0..ee914f8 100644 --- a/components/cartData.vue +++ b/components/cartData.vue @@ -8,12 +8,12 @@ - + 全选 - + 清空 @@ -23,10 +23,10 @@ - + - + @@ -49,7 +49,12 @@ - + + + + 暂无数据 + + @@ -139,7 +144,7 @@ this.cartData = data this.setAllSelect() } else { - this.Post({},'/api/cart/get_list').then(res => { + this.Post({},'/api/cart/get_post_list').then(res => { if (res) { this.cartData = (res.data || []).map(v=>{return {...v, isSelected:selectedData.includes(v.specifications_id)}}) this.setAllSelect() @@ -190,13 +195,13 @@ addBuyNum(item, num,index){ if (num == -1 && item.num == 1) { - this.Post({sku_id: item.id, num: 0},'/api/cart/del_sku').then(res =>{ + this.Post({sku_id: item.sku_id, num: 0},'/api/cart/del_sku').then(res =>{ this.cartData.splice(index,1) this.setAllSelect() }) } else { let numData = item.num + num - this.Post({sku_id: item.id, num: numData},'/api/cart/update_sku').then(res =>{ + this.Post({sku_id: item.sku_id, num: numData},'/api/cart/update_sku').then(res =>{ item.num += num this.setAllSelect() }) @@ -229,27 +234,20 @@ }) return } - return - // todo - let orderData = this.cartData.filter(v=>v.isSelected).map(v=>{ + + + // 邮寄自提下单 + let techanOrderList = this.cartData.filter(v=>v.isSelected).map(v=>{ return { - goodsInfo: { - image: v.Specifications_image, - title:v.good_name, - merchant_name: v.merchant_name, - }, - skuInfo: { - title:v.Specifications_name, - buyNum:v.num, - money: v.Specifications_money, - id: v.specifications_id, - }, + pInfo: v.product, + sInfo: {...v.sku, buyNum: v.num}, } }) - - - + // 数据储存 todo + this.$store.commit("changeTechanOrderList", techanOrderList); + // 邮寄 > 门票 > 农家乐 > 酒店 + this.goCartNextPage(0) }, }, @@ -425,6 +423,7 @@ image{ width: 40rpx; height: 40rpx; + border-radius: 50%; } } diff --git a/static/css/base.css b/static/css/base.css index 00b79a8..dd4a34b 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -90,3 +90,18 @@ view { .h-1rpx{ height: 1rpx; } + .no-data-zhanwei{ + display: flex; + flex-direction: column; + align-items: center; + font-weight: 500; + font-size: 32rpx; + color: #000000; + text-align: center; + padding-top: 90rpx; + + } + .no-data-zhanwei image{ + width: 347.33rpx; + height: 320.67rpx; + } \ No newline at end of file diff --git a/subPackages/search/result.vue b/subPackages/search/result.vue index 21f4fc5..142080c 100644 --- a/subPackages/search/result.vue +++ b/subPackages/search/result.vue @@ -34,17 +34,12 @@ - - - - - -
- -

—— 暂无更多 ——

-
+ + + 暂无数据 + diff --git a/subPackages/search/techanResult.vue b/subPackages/search/techanResult.vue index 77a0cc2..f8bfab1 100644 --- a/subPackages/search/techanResult.vue +++ b/subPackages/search/techanResult.vue @@ -31,9 +31,9 @@ - - 暂无搜索结果 + + + 暂无数据 @@ -42,7 +42,7 @@ {{item.title}} - + {{tag}} diff --git a/subPackages/techan/detail.vue b/subPackages/techan/detail.vue index 4de665e..ab62bca 100644 --- a/subPackages/techan/detail.vue +++ b/subPackages/techan/detail.vue @@ -256,7 +256,7 @@ this.Post({sku_id: goods.id,num: this.buyNum },'/api/cart/add_sku').then(res => { if (res.code == 1) { uni.showToast({title: res.msg,icon: 'none'}); - // uni.$emit("updateDataByConnect", {msgType:'updateCartDataInfo',data:null}) + uni.$emit("updateDataByConnect", {msgType:'updateCartDataInfo',data:null}) this.closePopup() this.getCartList() // this.$refs.cartDataVueRef.openPop() diff --git a/subPackages/techan/index.vue b/subPackages/techan/index.vue index 820022d..470b73d 100644 --- a/subPackages/techan/index.vue +++ b/subPackages/techan/index.vue @@ -67,10 +67,16 @@ - + + + + 暂无数据 + + + @@ -127,7 +133,7 @@ --> - + @@ -412,7 +418,7 @@ this.Post({sku_id: goods.id,num: this.buyNum },'/api/cart/add_sku').then(res => { if (res.code == 1) { uni.showToast({title: res.msg,icon: 'none'}); - // uni.$emit("updateDataByConnect", {msgType:'updateCartDataInfo',data:null}) + uni.$emit("updateDataByConnect", {msgType:'updateCartDataInfo',data:null}) this.closePopup() // this.$refs.cartDataVueRef.openPop() } @@ -1032,6 +1038,4 @@ .active-search-item{ color: #6A8A2D; } - -