diff --git a/common/api/market/index.js b/common/api/market/index.js index 0f3ed65..4f69fdb 100644 --- a/common/api/market/index.js +++ b/common/api/market/index.js @@ -9,3 +9,10 @@ export const consumeDiscount = (data) => { data: data }) } +export const homeData = (data) => { + return request({ + url: prveUrl + '/user/home/data', + method: 'get', + data: data + }) +} diff --git a/components/coupon/coupon-icon.vue b/components/coupon/coupon-icon.vue index d8f31bd..5a252e2 100644 --- a/components/coupon/coupon-icon.vue +++ b/components/coupon/coupon-icon.vue @@ -3,8 +3,8 @@ - - {{ props.item.discountAmount }} + + {{ props.item.discountAmount }} 满{{ props.item.fullAmount }}可用 @@ -12,8 +12,8 @@ - {{ props.item.discountNum }}件 - 商品兑换 + {{ props.item.discountNum }}件 + 商品兑换 满{{ props.item.fullAmount }}可用 @@ -21,7 +21,7 @@ - {{ props.item.discountRate/10 }}折 + {{ props.item.discountRate/10 }}折 满{{ props.item.fullAmount }}可用 @@ -29,100 +29,112 @@ - 第二件 - 半价券 + 第二件 + 半价券 - 买一送 - 一券 + 买一送 + 一券 + \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index f0f3aea..379cecf 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -334,7 +334,7 @@ onShow(async () => { proxy.$isResolve(); const shopId = uni.cache.get('shopId'); if (shopId) { - indexsRef.value.getVipConfig(); + indexsRef.value.updateData(); } } catch (error) {} await proxy.$onLaunched; diff --git a/pages/index/indexs.vue b/pages/index/indexs.vue index 89998c0..6e790d1 100644 --- a/pages/index/indexs.vue +++ b/pages/index/indexs.vue @@ -1,385 +1,623 @@ + .contentboxitemright_item:nth-child(2) { + margin-top: 30rpx; + } + + .contentboxitemright_item { + image { + width: 96rpx; + height: 96rpx; + } + + .contentboxitemright_itembox { + width: 170rpx; + + text:nth-child(1) { + font-family: Source Han Sans CN, Source Han Sans CN; + font-weight: 400; + font-size: 32rpx; + color: #333333; + } + + text:nth-child(2) { + margin-top: 2rpx; + font-family: Source Han Sans CN, Source Han Sans CN; + font-weight: 400; + font-size: 24rpx; + color: #999999; + } + } + } + } + } + } + } + + .popup-content { + width: 90vw; + background-color: #fff; + border-radius: 8px; + + .header-wrap { + height: 64px; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 1px solid #ececec; + padding: 0 28upx; + + .t { + font-size: 32upx; + color: #333; + } + + .close { + $size: 60upx; + width: $size; + height: $size; + display: flex; + align-items: center; + justify-content: center; + } + } + + .btn-content { + height: 86px; + display: flex; + align-items: center; + justify-content: center; + gap: 60upx; + + .btn { + width: 248upx; + } + } + } + + .menus { + display: flex; + padding: 32rpx 40rpx; + margin-top: 150rpx; + gap: 20rpx; + + .menu-item { + background-color: #fff; + border-radius: 16rpx; + text-align: center; + padding: 32rpx 28rpx; + box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16); + flex: 1; + } + } + + .userInfo { + display: flex; + padding: 22rpx 24rpx; + margin: 0 4rpx; + align-items: center; + align-self: stretch; + border-radius: 24rpx; + background: #FFF; + transform: translateY(-36rpx); + + .vip { + background: #FA720A; + font-size: 24rpx; + color: #ffffff; + padding: 6rpx 10rpx; + margin-left: 10rpx; + border-radius: 20rpx 20rpx 20rpx 0; + } + + .code { + width: 33px; + height: 33px; + } + } + + + + .new-menus-box { + margin: 0 16rpx 34rpx 16rpx; + + .new-menus { + display: flex; + background-color: #fff; + border-radius: 16rpx; + align-items: center; + + .icon { + width: 79px; + height: 79px; + } + + &.layout2 { + padding: 29px 0; + + .diner, + .takeout { + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + } + + .line { + width: 2rpx; + height: 156rpx; + background: #EDEDED; + } + + .takeout {} + } + + &.layout1 { + padding: 36rpx 40rpx; + justify-content: space-between; + display: flex; + align-items: center; + + .big_img { + width: 330rpx; + height: 330rpx; + } + + .title { + font-size: 48rpx; + } + + .desc { + margin-top: 20rpx; + font-size: 32rpx; + color: #999; + } + } + } + } + + .groupBuying { + padding: 16rpx 38rpx; + border-top: 2rpx solid #EDEDED; + background-color: #fff; + display: flex; + justify-content: space-between; + align-items: center; + + .img { + width: 40px; + height: 40px; + } + } + + .title { + color: #333333; + font-size: 36rpx; + font-weight: 700; + } + + .desc { + margin-top: 16rpx; + font-size: 28rpx; + color: #999; + } + + .points { + margin-top: 34rpx; + background-color: #fff; + padding: 16rpx 68rpx; + border-radius: 16rpx; + display: flex; + align-items: center; + justify-content: space-between; + + .img { + width: 98px; + height: 98px; + } + } + + .bottom_menus { + display: flex; + gap: 14rpx; + margin-top: 34rpx; + + .item { + flex: 1; + display: flex; + padding: 20rpx; + flex-direction: column; + align-items: center; + border-radius: 18rpx; + background: #FFF; + + .img { + width: 39px; + height: 39px; + } + + .title { + font-size: 32rpx; + } + + .desc { + margin-top: 8rpx; + color: #999; + font-size: 24rpx; + white-space: nowrap; + } + } + } + \ No newline at end of file diff --git a/pages/product/index.vue b/pages/product/index.vue index 708b376..6275b8e 100644 --- a/pages/product/index.vue +++ b/pages/product/index.vue @@ -2260,7 +2260,7 @@ async function getDiscountActivity() { const res = await discountActivityApi.config({ shopId: uni.cache.get('shopId') }); - if (res) { + if (res&&typeof res=='object') { fullAmountActivity.value = res; } } diff --git a/scoreShop/detail/index.vue b/scoreShop/detail/index.vue index 5c95d37..69fda93 100644 --- a/scoreShop/detail/index.vue +++ b/scoreShop/detail/index.vue @@ -7,8 +7,9 @@ @@ -75,11 +76,16 @@ 领取方式 - 需前往店铺自行兑换领取 + 系统发放 + 店内自取 - + + + + + {{item.goodsName}} @@ -116,6 +122,7 @@ } from '@/utils/uniapp.js' import modal from "@/scoreShop/components/modal.vue"; import * as pointGoodsApi from "@/common/api/order/pointGoods.js"; + import couponIcon from "@/components/coupon-icon/index"; import { pay } from '@/utils/pay.js' @@ -125,6 +132,12 @@ const modalData = reactive({ show: false, }); + + function prveImg(url){ + uni.previewImage({ + urls:[url] + }) + } const popupData = reactive({ show: false, @@ -238,13 +251,13 @@ } const type = item.couponInfo.couponType if (type == 1) { - return item.couponInfo.discountAmount + '元代金券' + ' ' + `(满${item.fullAmount}可用)` + return item.couponInfo.discountAmount + '元代金券' + ' ' + `(满${item.couponInfo.fullAmount}可用)` } if (type == 2) { - return item.couponInfo.discountNum + '件商品兑换' + ' ' + `(满${item.fullAmount}可用)` + return item.couponInfo.discountNum + '件商品兑换' + ' ' + `(满${item.couponInfo.fullAmount}可用)` } if (type == 3) { - return item.couponInfo.discountRate / 10 + '折' + ' ' + `(满${item.fullAmount}可用)` + return item.couponInfo.discountRate / 10 + '折' + ' ' + `(满${item.couponInfo.fullAmount}可用)` } if (type == 4) { return '第二件半价券' @@ -447,7 +460,11 @@ height: 184rpx; border-radius: 16rpx; background: #d9d9d9; + &.bg-fff{ + background-color: #fff; + } } + } .bottom { @@ -467,4 +484,7 @@ font-size: 700; } } + .w-full{ + width: 100%; + } \ No newline at end of file diff --git a/scoreShop/index/components/goods-list.vue b/scoreShop/index/components/goods-list.vue index 660a54e..b1445fa 100644 --- a/scoreShop/index/components/goods-list.vue +++ b/scoreShop/index/components/goods-list.vue @@ -3,10 +3,10 @@