From 6f24c71d96993d893d626217589d65e3b5cc4d54 Mon Sep 17 00:00:00 2001 From: linxi Date: Wed, 11 Sep 2024 11:08:15 +0800 Subject: [PATCH] =?UTF-8?q?Refact(=E4=BC=98=E6=83=A0=E5=88=B8):=E4=BC=98?= =?UTF-8?q?=E6=83=A0=E5=88=B8=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/v12-style.less | 12 ++++ components/CouponsPopup.vue | 81 ++++++++++++++++++++++++++- components/ServiceWin.vue | 56 ++++++++++++++++++ pages/order/OrderSubmission/index.vue | 1 + pages/shop/GoodsCon/index.vue | 14 +++-- 5 files changed, 159 insertions(+), 5 deletions(-) create mode 100644 components/ServiceWin.vue diff --git a/assets/css/v12-style.less b/assets/css/v12-style.less index cc5065d..5cbea89 100644 --- a/assets/css/v12-style.less +++ b/assets/css/v12-style.less @@ -113,6 +113,14 @@ each(@colors, { .generateRadius(100); /*=========================================*/ +.generateSpacing(@n, @i: 0) when(@i <= @n) { + @baseSpacing:@i * 1rpx; + .v12-spacing-@{i} { + letter-spacing: @baseSpacing !important; + } + .generateSpacing(@n, (@i + 1)) +} +.generateSpacing(100); /*====================flex 函数表达式=====================*/ .v12-d-flex{ @@ -141,6 +149,10 @@ each(@colors, { display: flex; justify-content: center; } +.v12-justify-around{ + display: flex; + justify-content: space-around; +} .v12-justify-between{ display: flex; justify-content: space-between; diff --git a/components/CouponsPopup.vue b/components/CouponsPopup.vue index c3f82c1..427b3db 100644 --- a/components/CouponsPopup.vue +++ b/components/CouponsPopup.vue @@ -8,8 +8,62 @@ :not-use="notUse" radio-model @change="changeNav" + v-if="showTab" /> + + + + 券后价 + + + + ¥ + + + {{ computePrice }} + + + + + = + + + + 当前售价 + + + + ¥ + + + {{ currentPrice }} + + + + + - + + + + 满减 + + + {{ selectItem.couponPrice }} + + + + + + + + + 更多可使用券 + { + return (this.list[a].couponPrice < b.couponPrice) ? c : a + }, 0) + return maxIndex + }, + largOne() { + this.selectCoupon(this.list[this.maxIndex].id) + return this.list[this.maxIndex] } + }, methods: { changeNav(index) { diff --git a/components/ServiceWin.vue b/components/ServiceWin.vue new file mode 100644 index 0000000..d514078 --- /dev/null +++ b/components/ServiceWin.vue @@ -0,0 +1,56 @@ + + + + + \ No newline at end of file diff --git a/pages/order/OrderSubmission/index.vue b/pages/order/OrderSubmission/index.vue index ee8959c..62693d3 100644 --- a/pages/order/OrderSubmission/index.vue +++ b/pages/order/OrderSubmission/index.vue @@ -251,6 +251,7 @@ v-if="couponList.usable.length > 0" :two-list="couponList" @change="changeCoupons" + :show-tab="false" /> diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue index 2e59627..3c93014 100644 --- a/pages/shop/GoodsCon/index.vue +++ b/pages/shop/GoodsCon/index.vue @@ -171,7 +171,7 @@ - + @@ -255,8 +255,8 @@ - - + + @@ -447,6 +447,7 @@ :product-value-arr="productValueArr" :cartNum="cart_num" /> + @@ -478,6 +479,7 @@ import ProductWindow from "@/components/ProductWindow"; import StorePoster from "@/components/StorePoster"; import ShareInfo from "@/components/ShareInfo"; import CountDown from "@/components/CountDown"; +import ServiceWin from "@/components/ServiceWin"; import {getCartCount, getProductCode, getProductDetail, postCartAdd} from "@/api/store"; import {userBindParent} from "@/api/user"; import {handleQrCode, isWeixin} from "@/utils"; @@ -501,7 +503,8 @@ export default { ProductWindow, StorePoster, ShareInfo, - CouponsPopup + CouponsPopup, + ServiceWin }, mixins: [pageListenMixins], data: function () { @@ -728,6 +731,9 @@ export default { } }, methods: { + showService() { + this.$refs.serviceWin.show = true + }, toQualifications() { const merInfo = { name: this.storeInfo.merName,