diff --git a/components/common/product-seckill-card.vue b/components/common/product-seckill-card.vue index d59996d..49544b6 100644 --- a/components/common/product-seckill-card.vue +++ b/components/common/product-seckill-card.vue @@ -14,8 +14,8 @@ - + @@ -26,7 +26,8 @@ ⚡ - 加倍补{{ item.secDiscount || item.subsidy }}元 + 加倍补{{ item.secDiscount || + item.subsidy }}元 ⚡ @@ -39,15 +40,16 @@ ¥ {{ item.price }} - {{ `${attributes.leftTime ? + {{ `${attributes.leftTime ? `只剩${attributes.leftTime}` : ''}` }} - - - + + + + @@ -108,8 +110,8 @@ export default { methods: { // 商品 onSelectProct(item) { - let url = "/pages/other_package/productInfo/productInfo?id=" + item.id ; - if(this.activedType === 'seckill'){ + let url = "/pages/other_package/productInfo/productInfo?id=" + item.id; + if (this.activedType === 'seckill') { url = "/pages/other_package/productInfo/productInfo?id=" + item.id + "&activedType=" + this.activedType + "&activityId=" + item.activityId; } uni.navigateTo({ diff --git a/pages/active/limited-time/limited-time.vue b/pages/active/limited-time/limited-time.vue index b9ec3d3..c62840a 100644 --- a/pages/active/limited-time/limited-time.vue +++ b/pages/active/limited-time/limited-time.vue @@ -20,26 +20,21 @@ - - + + {{ item.name }} - - - {{ item.name }} - + + + {{ item.name }} + + - @@ -135,10 +130,10 @@ export default { url().then((res) => { if (res.bizcode === 100) { this.activityId = res.data.activityId; - console.log('获取秒杀当前时间',res.data); - - this.attributes ={ - leftTime: res.data.leftTime || null, + console.log('获取秒杀当前时间', res.data); + + this.attributes = { + leftTime: res.data.leftTime || null, } this.$nextTick(() => { this.mescroll && this.mescroll.resetUpScroll(); @@ -210,10 +205,10 @@ export default { this.activeTab = index; this.dataList = []; const item = this.activeTabList[index]; - this.onGetSeckillCurrent(item.type); + this.onGetSeckillCurrent(item.type); } }, - + init() { this.onGetSeckillCurrent(); this.cascadeCategory(); @@ -223,7 +218,7 @@ export default { delta: 1, // 返回的页面数,默认为1,返回到上一级 }); }, - onSwiper(index) { + onSwiper(index) { uni.previewImage({ current: index, loop: true, @@ -257,7 +252,7 @@ export default { .u-swiper__wrapper__item__wrapper__image { height: 600rpx !important; - border-radius: 0 !important; + border-radius: 0 !important; } } } @@ -330,13 +325,14 @@ export default { } .tab-card { - width: 100%; + width: calc(100% - 64rpx); height: 74rpx; display: flex; align-items: center; background-color: #f5f5f5; border-radius: 12rpx; padding: 0 4rpx; + margin: 0 32rpx; margin-bottom: 16rpx; .tab-item { @@ -372,20 +368,24 @@ export default { width: 100%; display: flex; flex-direction: column; - padding: 24rpx 32rpx 0; + padding: 24rpx 0 0; box-sizing: border-box; - background-color: #fff;; + background-color: #fff; + ; overflow-x: auto; position: absolute; top: 520rpx; left: 0; -.tab-list-container{ - width: 100%; - height: 60rpx; - display: flex; - flex-direction: row; - align-items: center; -} + + .tab-list-container { + width: 100%; + height: 60rpx; + display: flex; + flex-direction: row; + align-items: center; + overflow-x: auto; + } + .tab-list { margin-right: 24rpx; display: flex; diff --git a/pages/home/home.vue b/pages/home/home.vue index 586e9aa..c0c5def 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -52,7 +52,7 @@ - @@ -102,8 +102,8 @@ - {{ item.title_text }} - {{ item.title }} + {{ item.title_text }} + {{ item.title }} {{ item.rightText }} @@ -125,6 +125,10 @@ + + + + @@ -197,6 +201,7 @@ import { getGoodsDetail, searchList, getSeckillCurrent, + getSeckillPreview, getSeckillGoodsList, getGoodsTags, } from "@/api/product.js"; @@ -266,8 +271,8 @@ export default { rightText: '专属补贴 . 低价秒杀', activedType: 'seckill' }, - ], // 首页活动列表 + activedTabId: 'seckill', // 当前选中的活动类型 }; }, onShow() { @@ -311,9 +316,15 @@ export default { }, mounted() { }, methods: { + // 切换活动类型 + jumpTab(item, type) { + this.activedTabId = type; + this.onGetSeckillCurrent(); + }, // 获取秒杀 onGetSeckillCurrent() { - getSeckillCurrent().then((res) => { + const url = this.activedTabId === 'seckill' ? getSeckillCurrent : getSeckillPreview; + url().then((res) => { console.log("获取秒杀", res); if (res.bizcode === 100) { res.data.activityId && this.onGetSeckillGoodsList(res.data.activityId, 'seckillGoodsList'); @@ -812,7 +823,11 @@ export default { } .yp_item { - flex: 0 0 32%; + // flex: 0 0 32%; + flex:1; + // height: 268rpx; + max-width: 33.3%; + gap: 10rpx; min-width: 0; background-color: #ffffff; border-radius: 24rpx; @@ -828,7 +843,6 @@ export default { width: 100%; display: flex; justify-content: center; - margin-bottom: 12rpx; } .yp_item_info { @@ -1065,7 +1079,6 @@ export default { .tip_title { color: #666666; - margin-right: 12rpx; } .tip_title_lable { diff --git a/pages/order_package/order_submit/order_submit.vue b/pages/order_package/order_submit/order_submit.vue index c1132f7..aeb0949 100644 --- a/pages/order_package/order_submit/order_submit.vue +++ b/pages/order_package/order_submit/order_submit.vue @@ -37,7 +37,7 @@ - {{ addItem.address.name }} @@ -46,7 +46,7 @@ - + --> ¥{{ pItem.totalPrice - }} + }} 每件到手价¥{{ pItem.unitPrice }} @@ -84,7 +84,7 @@ ¥{{ pItem.totalPrice - }} + }} 每件到手价¥{{ pItem.unitPrice }} @@ -108,7 +108,7 @@ 运费{{ getValue(PRODUCT_DELIVERY_TIME, addItem.deliveryTime) - }} + }} {{ orderInfo.postage ? "¥" + orderInfo.postage : "包邮" }} @@ -201,7 +201,7 @@ 限时秒杀 ¥{{ - allOrderInfo.activity?.activityPrice}} + allOrderInfo.activity?.activityPrice }} @@ -256,7 +256,7 @@ - 收件地址 @@ -294,7 +294,8 @@ - + + @@ -541,8 +542,8 @@ export default { parmas.isDeduction = true; } - if(this.sed.activedType == "seckill"){ - parmas["types"] = "1,2,3"; + if (this.sed?.activedType == "seckill") { + parmas["types"] = "1,2,3"; } const result = await getSupportPay(parmas); if (result && result.bizcode === 100) { @@ -630,9 +631,10 @@ export default { if (resp && resp.bizcode === 100) { const data = resp.data; this.isPoints = data.type == 3 ? 1 : 0; + console.log("秦星星data", data); this.orderInfo = { address: null, - amount:this.sed?.activedType == "seckill" ? data.activity?.activityPrice :this.sed.goodsNum * this.sed.specsId.price || 0, + amount: this.sed?.activedType == "seckill" ? data.activity?.activityPrice : this.sed.goodsNum * this.sed.specsId.price || 0, postage: 0, shops: [ { diff --git a/pages/other_package/productInfo/productInfo.vue b/pages/other_package/productInfo/productInfo.vue index 559e7e8..27e7343 100644 --- a/pages/other_package/productInfo/productInfo.vue +++ b/pages/other_package/productInfo/productInfo.vue @@ -56,7 +56,10 @@ - + + + 下单送{{ orderInfo.contribution }}贡献值 + 销量{{ limit999(orderInfo.sales) }}件 @@ -846,7 +849,7 @@ export default { if (this.isCoupon) { params.type = -1; } - if(this.activedType === 'seckill'){ + if (this.activedType === 'seckill') { params.activityId = this.activityId; params.activityType = 'seckill'; } @@ -863,9 +866,9 @@ export default { data.addressObj = {}; // 收件人地址 data.quantity = 1; // 数量 data.inventory = 0; // 库存 - if(this.activedType === 'seckill'){ + if (this.activedType === 'seckill') { data.minPrice = data.activity?.activityPrice; - } + } this.orderInfo = data; } }, @@ -1081,25 +1084,25 @@ export default { specsId: selectTempl.id, // 规格ID goodsNum: this.orderInfo.quantity, // 商品数量 }; - + console.log("selectTempl", selectTempl); if (this.isShowCart == 1 || this.isCoupon) { - console.log("活动类型params---秦星星", params,this.isCoupon); + console.log("活动类型params---秦星星", params, this.isCoupon); params["specsId"] = selectTempl; let url = ""; - if(this.activedType == "seckill"){ - params["activedType"] = this.activedType; // 活动类型 - params["activityId"] = this.activityId;// 秒杀活动ID - url = `/pages/order_package/order_submit/order_submit?sed=${JSON.stringify( - params - )}`; - } + if (this.activedType == "seckill") { + params["activedType"] = this.activedType; // 活动类型 + params["activityId"] = this.activityId;// 秒杀活动ID + url = `/pages/order_package/order_submit/order_submit?sed=${JSON.stringify( + params + )}`; + } - if(this.isCoupon){ - url =`/pages/order_package/order_submit/order_submit?sed=${JSON.stringify( + if (this.isCoupon) { + url = `/pages/order_package/order_submit/order_submit?sed=${JSON.stringify( params )}&address=${this.selectAddress?.id}&isCoupon=${this.isCoupon}` - } + } uni.navigateTo({ url: url @@ -1236,6 +1239,24 @@ export default { font-size: 24rpx; color: #999999; margin-top: 10rpx; + + .content_data_series_tag { + font-weight: 500; + font-size: 24rpx; + height: 45rpx; + color: #7934F6; + padding: 0 12rpx; + border-radius: 8rpx; + display: flex; + align-items: center; + justify-content: center; + background: rgba(121, 52, 246, 0.1); + + .uni-image { + width: 40rpx; + height: 28rpx; + } + } } .tui-view { diff --git a/pages/shopping_cart/shopping_cart.vue b/pages/shopping_cart/shopping_cart.vue index d143d19..a0ff93b 100644 --- a/pages/shopping_cart/shopping_cart.vue +++ b/pages/shopping_cart/shopping_cart.vue @@ -1,102 +1,46 @@