From fd847944b7e4031cb49702212e7558c7ef59febd Mon Sep 17 00:00:00 2001 From: paulGao Date: Fri, 2 Sep 2022 10:42:12 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=BF=98=E5=8E=9Froutes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seller/src/store/modules/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seller/src/store/modules/app.js b/seller/src/store/modules/app.js index db6f59c5..a7efba23 100644 --- a/seller/src/store/modules/app.js +++ b/seller/src/store/modules/app.js @@ -46,11 +46,11 @@ const app = { // 动态添加主界面路由,需要缓存 updateAppRouter(state, routes) { state.routers.push(...routes); - routes.forEach(route => router.addRoute(route)); + router.addRoutes(routes); }, // 动态添加全局路由404、500等页面,不需要缓存 updateDefaultRouter(state, routes) { - routes.forEach(route => router.addRoute(route)); + router.addRoutes(routes); }, setLoading(state, v) { state.loading = v; From 8b22b73f3d2cbc5cda2a39845cc3b5ce2434e2f3 Mon Sep 17 00:00:00 2001 From: paulGao Date: Fri, 2 Sep 2022 11:00:01 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BC=98=E5=8C=96pc=E7=AB=AF=E5=95=86?= =?UTF-8?q?=E5=93=81=E8=AF=A6=E6=83=85=E9=A1=B5=E7=9A=84=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=88=B8=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/goodsDetail/ShowGoods.vue | 169 ++++++++++++++---- 1 file changed, 133 insertions(+), 36 deletions(-) diff --git a/buyer/src/components/goodsDetail/ShowGoods.vue b/buyer/src/components/goodsDetail/ShowGoods.vue index cc916800..7b844042 100644 --- a/buyer/src/components/goodsDetail/ShowGoods.vue +++ b/buyer/src/components/goodsDetail/ShowGoods.vue @@ -76,7 +76,6 @@
-
@@ -84,14 +83,23 @@ 价     格
-
{{ - item | unitPrice("¥") - }}
+
+ {{ item | unitPrice("¥") }} +
起 批 量
-
{{item}}{{skuDetail.goodsUnit}}
- +
+ {{ item }}{{ skuDetail.goodsUnit }} +
@@ -106,24 +114,47 @@ -
-

+

+

优 惠 券 - - 满{{ item.consumeThreshold }}减{{ item.price }} - 满{{ item.consumeThreshold }}打{{ - item.couponDiscount - }}折 + + 满{{ item.consumeThreshold }}减{{ item.price }} + 满{{ item.consumeThreshold }}打{{ + item.couponDiscount + }}折 + + +

@@ -285,7 +316,7 @@ export default { detail: { handler(val) { this.skuDetail = val.data; - this.wholesaleList = val.wholesaleList + this.wholesaleList = val.wholesaleList; this.swiperGoodsImg(); }, deep: true, @@ -294,7 +325,7 @@ export default { }, data() { return { - wholesaleList:[], + wholesaleList: [], count: 1, // 商品数量 imgIndex: 0, // 展示图片下标 currentSelceted: [], // 当前商品sku @@ -313,17 +344,24 @@ export default { loading: false, // 立即购买loading loading1: false, // 加入购物车loading isCollected: false, // 是否收藏 - }; }, components: { PicZoom, Promotion }, computed: { - wholesalePrice(key){ - return this.wholesaleList.length ? this.wholesaleList.map(item=>{ return item.price }) :[] + wholesalePrice(key) { + return this.wholesaleList.length + ? this.wholesaleList.map((item) => { + return item.price; + }) + : []; + }, + wholesaleNum(key) { + return this.wholesaleList.length + ? this.wholesaleList.map((item) => { + return item.num; + }) + : []; }, - wholesaleNum(key){ - return this.wholesaleList.length ? this.wholesaleList.map(item=>{ return item.num }) :[] - } }, methods: { select(index, value) { @@ -519,23 +557,22 @@ export default { width: 175px; margin-left: 30px; } -.flex{ +.flex { display: flex; } .inventory { padding-left: 4px; } - .wrapper { @include white_background_color(); } -.item-num{ - text-align:center; +.item-num { + text-align: center; width: 100px; } -.item-price-num{ +.item-price-num { font-size: 16px; color: #666; } @@ -647,14 +684,65 @@ export default { margin-left: 5px; } +.item-price-coupon-row { + display: flex; + align-items: center; + margin: 5px 0px; +} + +.Ellipsis { + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 2; //控制显示几行 + -webkit-box-orient: vertical; //webbox方向 +} + +.dropdown { + position: relative; + display: inline-block; + cursor: pointer; + z-index: 999; +} + +.dropdown .item-coupon { + display: flex; + align-content: center; + align-items: center; + color: $theme_color; + margin: 5px 0; + font-size: 12px; + background-color: #ffdedf; + border: 1px dotted $theme_color; + cursor: pointer; + + span { + padding: 3px; + } +} +.dropdown-content { + display: none; + position: absolute; + background-color: #f9f9f9; + min-width: 160px; + box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); + padding: 12px 16px; +} +.dropdown:hover .dropdown-content { + display: block; +} + .item-coupon { margin-right: 5px; - padding: 3px; + padding: 0 5px; color: $theme_color; font-size: 12px; background-color: #ffdedf; border: 1px dotted $theme_color; cursor: pointer; + + span { + padding: 3px; + } } .item-promotion { margin-right: 5px; @@ -663,8 +751,17 @@ export default { font-size: 12px; border: 1px solid $theme_color; } + +.item-price-right { + display: flex; + align-content: center; + align-items: center; +} + .item-remarks-sum { - padding-left: 8px; + width: 70px; + text-align: center; + padding: 0 10px; border-left: 1px solid $border_color; } From 96b6565272a83e948e81981c0bd2f4b3d87b77e5 Mon Sep 17 00:00:00 2001 From: paulGao Date: Fri, 2 Sep 2022 11:12:02 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=95=86=E5=93=81?= =?UTF-8?q?=E8=A7=84=E6=A0=BC=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/goods/goods-seller/goodsOperationSec.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue index ae9a2580..9054742b 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue @@ -289,8 +289,6 @@ @@ -311,7 +309,7 @@ size="small" style="margin-left: 10px" type="primary" - @click="handleCloseSkuValue(val, index)" + @click="handleCloseSkuValue(val, index, item)" > 删除 @@ -1494,14 +1492,18 @@ export default { this.renderTableData(this.skuTableData); }, /** 移除当前规格值 */ - handleCloseSkuValue(item, index) { + handleCloseSkuValue(item, index, spec) { + if (spec.spec_values.length <= 1) { + this.$Message.error("至少保留一个规格值!"); + return; + } this.skuInfo.forEach((i) => { - if (i.name === item.name) { + if (i.name === spec.name) { i.spec_values.splice(index, 1); } }); this.skuTableData = this.skuTableData.filter( - (e) => e[item.name] !== item.value + (e) => e[spec.name] !== item.value ); this.baseInfoForm.regeneratorSkuFlag = true; }, From 36c4584970939d0b88efae70241075bbc36112b2 Mon Sep 17 00:00:00 2001 From: paulGao Date: Fri, 2 Sep 2022 16:44:55 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=BA=97=E9=93=BA=E6=97=B6=EF=BC=8C=E6=AD=A5=E9=AA=A4=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E4=B8=8D=E6=AD=A3=E7=A1=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/src/views/seller/shop/shopOperation.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/manager/src/views/seller/shop/shopOperation.vue b/manager/src/views/seller/shop/shopOperation.vue index bb3335b9..5d4ab169 100644 --- a/manager/src/views/seller/shop/shopOperation.vue +++ b/manager/src/views/seller/shop/shopOperation.vue @@ -361,12 +361,12 @@ @click="prev" >上一步 -