Compare commits

...

4 Commits

14 changed files with 1116 additions and 1193 deletions

View File

@ -1,13 +1,17 @@
<!-- 拼团活动列表 --> <!-- 拼团活动列表 -->
<template> <template>
<s-layout title="拼团列表" navbar="normal" :bgStyle="{ color: '#FE832A',backgroundColor: 'rgba(233,51,35)' }"> <s-layout navbar="inner" :bgStyle="{ color: '#FE832A' }">
<!-- <view class="page-bg" :style="[{ marginTop: '-' + Number(statusBarHeight + 88) + 'rpx' }]" /> --> <view class="page-bg" :style="[{ marginTop: '-' + Number(statusBarHeight + 88) + 'rpx' }]" />
<view class="list-content"> <view class="list-content">
<!-- 参团会员统计 --> <!-- 参团会员统计 -->
<view class="content-header ss-flex-col ss-col-center ss-row-center"> <view class="content-header ss-flex-col ss-col-center ss-row-center">
<view class="content-header-title ss-flex ss-row-center"> <view class="content-header-title ss-flex ss-row-center">
<view v-for="(item, index) in state.summaryData.avatars" :key="index" class="picture" <view
:style="index === 6 ? 'position: relative' : 'position: static'"> v-for="(item, index) in state.summaryData.avatars"
:key="index"
class="picture"
:style="index === 6 ? 'position: relative' : 'position: static'"
>
<span class="avatar" :style="`background-image: url(${item})`" /> <span class="avatar" :style="`background-image: url(${item})`" />
<span v-if="index === 6 && state.summaryData.avatars.length > 3" class="mengceng"> <span v-if="index === 6 && state.summaryData.avatars.length > 3" class="mengceng">
<i>···</i> <i>···</i>
@ -16,38 +20,45 @@
<text class="pic_count">{{ state.summaryData.userCount || 0 }}人参与</text> <text class="pic_count">{{ state.summaryData.userCount || 0 }}人参与</text>
</view> </view>
</view> </view>
<scroll-view class="scroll-box" :style="{ height: pageHeight + 'rpx' }" scroll-y="true" <scroll-view
:scroll-with-animation="false" :enable-back-to-top="true"> class="scroll-box"
:style="{ height: pageHeight + 'rpx' }"
scroll-y="true"
:scroll-with-animation="false"
:enable-back-to-top="true"
>
<view class="goods-box ss-m-b-20" v-for="item in state.pagination.list" :key="item.id"> <view class="goods-box ss-m-b-20" v-for="item in state.pagination.list" :key="item.id">
<s-goods-column class="" size="lg" :data="item" :grouponTag="true" <s-goods-column
@click="sheep.$router.go('/pages/goods/groupon', { id: item.id })"> class=""
size="lg"
:data="item"
:grouponTag="true"
@click="sheep.$router.go('/pages/goods/groupon', { id: item.id })"
>
<template v-slot:cart> <template v-slot:cart>
<button class="ss-reset-button cart-btn">去拼团</button> <button class="ss-reset-button cart-btn">去拼团</button>
</template> </template>
</s-goods-column> </s-goods-column>
</view> </view>
<uni-load-more color="white" v-if="state.pagination.total > 0" :status="state.loadStatus" :content-text="{ <uni-load-more
v-if="state.pagination.total > 0"
:status="state.loadStatus"
:content-text="{
contentdown: '上拉加载更多', contentdown: '上拉加载更多',
}" @tap="loadMore" /> }"
@tap="loadMore"
/>
</scroll-view> </scroll-view>
</view> </view>
</s-layout> </s-layout>
</template> </template>
<script setup> <script setup>
import { import { reactive } from 'vue';
reactive import { onLoad, onReachBottom } from '@dcloudio/uni-app';
} from 'vue';
import {
onLoad,
onReachBottom
} from '@dcloudio/uni-app';
import sheep from '@/sheep'; import sheep from '@/sheep';
import CombinationApi from '@/sheep/api/promotion/combination'; import CombinationApi from '@/sheep/api/promotion/combination';
const { const { safeAreaInsets, safeArea } = sheep.$platform.device;
safeAreaInsets,
safeArea
} = sheep.$platform.device;
const sysNavBar = sheep.$platform.navbar; const sysNavBar = sheep.$platform.navbar;
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2; const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
const pageHeight = const pageHeight =
@ -67,26 +78,19 @@
// //
const getSummary = async () => { const getSummary = async () => {
const { const { data } = await CombinationApi.getCombinationRecordSummary();
data
} = await CombinationApi.getCombinationRecordSummary();
state.summaryData = data; state.summaryData = data;
}; };
// //
async function getList() { async function getList() {
state.loadStatus = 'loading'; state.loadStatus = 'loading';
const { const { data } = await CombinationApi.getCombinationActivityPage({
data
} = await CombinationApi.getCombinationActivityPage({
pageNo: state.pagination.pageNo, pageNo: state.pagination.pageNo,
pageSize: state.pagination.pageSize, pageSize: state.pagination.pageSize,
}); });
data.list.forEach((activity) => { data.list.forEach((activity) => {
state.pagination.list.push({ state.pagination.list.push({ ...activity, price: activity.combinationPrice });
...activity,
price: activity.combinationPrice
});
}); });
state.pagination.total = data.total; state.pagination.total = data.total;
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore'; state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
@ -118,44 +122,17 @@
background: url('https://zysc.fjptzykj.com:3000/shangcheng/fea9ad54f32d4705a633874efd534e70e507030ea5a7604b0110fdf7292f1f4d.png'); background: url('https://zysc.fjptzykj.com:3000/shangcheng/fea9ad54f32d4705a633874efd534e70e507030ea5a7604b0110fdf7292f1f4d.png');
background-size: 100% 100%; background-size: 100% 100%;
} }
.list-content { .list-content {
position: relative; position: relative;
z-index: 3; z-index: 3;
margin: 0 20rpx 0 20rpx; margin: -190rpx 20rpx 0 20rpx;
// background: #fff; // background: #fff;
border-radius: 20rpx 20rpx 0 0; border-radius: 20rpx 20rpx 0 0;
.content-header { .content-header {
width: 100%; width: 100%;
border-radius: 20rpx 20rpx 0 0; border-radius: 20rpx 20rpx 0 0;
height: 50rpx; height: 100rpx;
margin: 10px 0; background: linear-gradient(180deg, #fff4f7, #ffe4d1);
position: relative;
// background: linear-gradient(180deg, #fff4f7, #ffe4d1);
&::after {
content: '';
position: absolute;
right: 15%;
height: 1px;
width: 50px;
background: white;
top: 50%;
transform: translateY(-50%);
}
&::before {
content: '';
position: absolute;
left: 15%;
height: 1px;
width: 50px;
background: white;
top: 50%;
transform: translateY(-50%);
}
.content-header-title { .content-header-title {
width: 100%; width: 100%;
font-size: 30rpx; font-size: 30rpx;
@ -163,7 +140,6 @@
color: #ff2923; color: #ff2923;
line-height: 30rpx; line-height: 30rpx;
position: relative; position: relative;
.more { .more {
position: absolute; position: absolute;
right: 30rpx; right: 30rpx;
@ -219,7 +195,6 @@
left: -2rpx; left: -2rpx;
color: #fff; color: #fff;
top: 2rpx; top: 2rpx;
i { i {
font-style: normal; font-style: normal;
font-size: 20rpx; font-size: 20rpx;
@ -227,15 +202,12 @@
} }
} }
} }
.scroll-box { .scroll-box {
// margin-top: 13px; margin-top: 13px;
height: 900rpx; height: 900rpx;
.goods-box { .goods-box {
position: relative; position: relative;
padding: 0 10px; padding: 0 10px;
.cart-btn { .cart-btn {
position: absolute; position: absolute;
bottom: 10rpx; bottom: 10rpx;

View File

@ -264,7 +264,7 @@
// //
.header { .header {
width: 710rpx; width: 100%;
height: 330rpx; height: 330rpx;
margin: 0 auto 0 auto; margin: 0 auto 0 auto;
border-radius: 14rpx; border-radius: 14rpx;

View File

@ -90,7 +90,7 @@
</view> </view>
<!-- 规格与数量弹框 --> <!-- 规格与数量弹框 -->
<s-select-groupon-sku :show="state.showSelectSku" :goodsInfo="state.goodsInfo" <s-select-groupon-sku :activity="state.activity" :show="state.showSelectSku" :goodsInfo="state.goodsInfo"
:grouponAction="state.grouponAction" :grouponNum="state.grouponNum" @buy="onBuy" :grouponAction="state.grouponAction" :grouponNum="state.grouponNum" @buy="onBuy"
@change="onSkuChange" @close="onSkuClose" /> @change="onSkuChange" @close="onSkuClose" />
</view> </view>
@ -115,7 +115,7 @@
state.activity.status === 0 && state.goodsInfo.stock !== 0 state.activity.status === 0 && state.goodsInfo.stock !== 0
? 'check-btn-box' ? 'check-btn-box'
: 'disabled-btn-box' : 'disabled-btn-box'
" :disabled="state.goodsInfo.stock === 0 || state.activity.status !== 0"> " :disabled="state.goodsInfo.stock === 0 || state.activity.status !== 0 || state.activity.remainingPurchases == 0"">
<view class="btn-price">{{ <view class="btn-price">{{
fen2yuan(state.activity.price || state.goodsInfo.price) fen2yuan(state.activity.price || state.goodsInfo.price)
}}</view> }}</view>
@ -263,6 +263,7 @@
data: activity data: activity
} = await CombinationApi.getCombinationActivity(state.grouponId); } = await CombinationApi.getCombinationActivity(state.grouponId);
state.activity = activity; state.activity = activity;
// console.log(activity,"activity")
// //
const { const {
data: spu data: spu

View File

@ -68,7 +68,7 @@
<detail-cell-sku :sku="state.selectedSku" @tap="state.showSelectSku = true" /> <detail-cell-sku :sku="state.selectedSku" @tap="state.showSelectSku = true" />
</view> </view>
<!-- 规格与数量弹框 --> <!-- 规格与数量弹框 -->
<s-select-seckill-sku v-model="state.goodsInfo" :show="state.showSelectSku" <s-select-seckill-sku :activity="activity" v-model="state.goodsInfo" :show="state.showSelectSku"
:single-limit-count="activity.singleLimitCount" @buy="onBuy" @change="onSkuChange" :single-limit-count="activity.singleLimitCount" @buy="onBuy" @change="onSkuChange"
@close="state.showSelectSku = false" /> @close="state.showSelectSku = false" />
@ -102,14 +102,16 @@
timeStatusEnum === TimeStatusEnum.STARTED && state.goodsInfo.stock != 0 timeStatusEnum === TimeStatusEnum.STARTED && state.goodsInfo.stock != 0
? 'check-btn-box' ? 'check-btn-box'
: 'disabled-btn-box' : 'disabled-btn-box'
" :disabled="state.goodsInfo.stock === 0 || timeStatusEnum !== TimeStatusEnum.STARTED"> " :disabled="state.goodsInfo.stock === 0 || timeStatusEnum !== TimeStatusEnum.STARTED || activity.remainingPurchases == 0">
<view class="btn-price">{{ fen2yuan(state.goodsInfo.price) }}</view> <view class="btn-price">{{ fen2yuan(state.goodsInfo.price) }}</view>
<view v-if="timeStatusEnum === TimeStatusEnum.STARTED"> <view v-if="timeStatusEnum === TimeStatusEnum.STARTED">
<view v-if="state.goodsInfo.stock === 0">已售罄</view> <view v-if="state.goodsInfo.stock === 0">已售罄</view>
<!-- <view v-else-if=" activity.remainingPurchases == 0">立即秒杀</view> -->
<view v-else>立即秒杀</view> <view v-else>立即秒杀</view>
</view> </view>
<view v-else>{{ timeStatusEnum }}</view> <view v-else>{{ timeStatusEnum }}</view>
</button> </button>
<!-- {{timeStatusEnum}}---{{TimeStatusEnum.STARTED}} -->
</view> </view>
</detail-tabbar> </detail-tabbar>
</view> </view>
@ -223,6 +225,7 @@
data data
} = await SeckillApi.getSeckillActivity(id); } = await SeckillApi.getSeckillActivity(id);
activity.value = data; activity.value = data;
// console.log(activity.value,"activity.value")
timeStatusEnum.value = getTimeStatusEnum(activity.startTime, activity.endTime); timeStatusEnum.value = getTimeStatusEnum(activity.startTime, activity.endTime);
// //

View File

@ -3,20 +3,10 @@
<s-layout title="个人中心" tabbar="/pages/index/user" navbar="normal" :bgStyle="template.page" <s-layout title="个人中心" tabbar="/pages/index/user" navbar="normal" :bgStyle="template.page"
:navbarStyle="template.navigationBar" onShareAppMessage> :navbarStyle="template.navigationBar" onShareAppMessage>
<s-block class="" v-for="(item, index) in template.components" :key="index" :styles="item.property.style">
<s-block-item style="" :class="item.id == 'UserOrder'? 'ss': ''" :type="item.id" :data="item.property" :styles="item.property.style" />
</s-block>
<view class="new-huiy" @click="
sheep.$router.go('/pages/user/user_vip/index')
">
<image class="seckill" src="@/static/images/seckilbg.png"></image> <image class="seckill" src="@/static/images/seckilbg.png"></image>
<view class="new-button">立即开通</view> <s-block class="" v-for="(item, index) in template.components" :key="index" :styles="item.property.style">
<img class="seckill1" mode="aspectFit" <s-block-item :type="item.id" :data="item.property" :styles="item.property.style" />
src="https://zysc.fjptzykj.com:3000/shangcheng/64776e2edc3c2f15295e7c3976ba301e08f9170f99a2e845d8f33bd65179b177.png" /> </s-block>
</view>
</s-layout> </s-layout>
</template> </template>
@ -51,40 +41,13 @@
onPageScroll(() => {}); onPageScroll(() => {});
</script> </script>
<style lang="scss" scoped> <style>
.new-huiy { .new-main{
width: 100%;
height: 240px;
position: absolute;
top: 0;
.new-button {
background: white;
padding: 8px;
text-align: center;
position: absolute;
border-radius: 20px;
right: 29px;
bottom: 17px;
font-size: 14px;
color: rgba(148, 109, 45, 1);
// z-index: 33;
}
.seckill1 {
position: absolute;
bottom: 0;
// z-index: 22;
/* left: 50%; */
/* transform: translateX(-50%); */
width: 96%;
height: 72px;
}
}
/* .new-main {} */
}
.seckill1 { .seckill1 {
position: absolute; position: absolute;
top: 117px;
z-index: 22; z-index: 22;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
@ -99,11 +62,4 @@
view { view {
position: relative; position: relative;
} }
::v-deep .ss{
z-index: 99999;
&>view{
margin-top: 94px;
}
}
</style> </style>

View File

@ -51,7 +51,7 @@
class="score-img" class="score-img"
/> />
<text class="item-value ss-m-r-24"> <text class="item-value ss-m-r-24">
{{ state.orderInfo.usePoint }} {{ state.orderInfo.usedPoint }}
</text> </text>
</view> </view>
</view> </view>
@ -69,7 +69,7 @@
<text class="item-value ss-m-r-24"> <text class="item-value ss-m-r-24">
{{ {{
state.pointStatus || state.orderPayload.pointActivityId state.pointStatus || state.orderPayload.pointActivityId
? state.orderInfo.totalPoint - state.orderInfo.usePoint ? state.orderInfo.totalPoint - state.orderInfo.usedPoint
: state.orderInfo.totalPoint || 0 : state.orderInfo.totalPoint || 0
}} }}
</text> </text>

View File

@ -68,11 +68,20 @@
<!-- 用户组件用户卡片 --> <!-- 用户组件用户卡片 -->
<s-user-card v-if="type === 'UserCard'" /> <s-user-card v-if="type === 'UserCard'" />
<view v-if="type === 'UserOrder'" class="new-huiy"
@click="
sheep.$router.go('/pages/user/user_vip/index')
"
>
<view class="new-button">立即开通</view>
<img class="seckill1" mode="aspectFit"
src="https://zysc.fjptzykj.com:3000/shangcheng/64776e2edc3c2f15295e7c3976ba301e08f9170f99a2e845d8f33bd65179b177.png"
/>
</view>
<!-- 用户组件用户订单 --> <!-- 用户组件用户订单 -->
<s-order-card v-if="type === 'UserOrder'" :data="data" /> <s-order-card v-if="type === 'UserOrder'" :data="data" />
<!-- 用户组件用户资产 --> <!-- 用户组件用户资产 -->
<s-wallet-card v-if="type === 'UserWallet'" /> <s-wallet-card v-if="type === 'UserCard'" />
<!-- 用户组件用户卡券 --> <!-- 用户组件用户卡券 -->
<s-coupon-card v-if="type === 'UserCoupon'" /> <s-coupon-card v-if="type === 'UserCoupon'" />
</view> </view>
@ -124,7 +133,30 @@
:deep(.uni-border-bottom){ :deep(.uni-border-bottom){
height:0; height:0;
} }
.new-huiy{
width:100%;
height:100px;
.new-button{
background:white;
padding:4px 8px;
text-align:center;
position: absolute;
border-radius: 20px;
right: 29px;
top: 37px;
font-size:14px;
color: rgba(148, 109, 45, 1);
z-index: 33;
}
.seckill1{
position: absolute;
top: -71px;
z-index: 22;
/* left: 50%; */
/* transform: translateX(-50%); */
width: 94%;
}
}
.floxt { .floxt {

View File

@ -2,49 +2,32 @@
<template> <template>
<view class="ss-goods-wrap"> <view class="ss-goods-wrap">
<!-- xs卡片横向紧凑型一行放两个图片左内容右边 --> <!-- xs卡片横向紧凑型一行放两个图片左内容右边 -->
<view <view v-if="size === 'xs'" class="xs-goods-card ss-flex ss-col-stretch" :style="[elStyles]" @tap="onClick">
v-if="size === 'xs'"
class="xs-goods-card ss-flex ss-col-stretch"
:style="[elStyles]"
@tap="onClick"
>
<view v-if="tagStyle.show" class="tag-icon-box"> <view v-if="tagStyle.show" class="tag-icon-box">
<image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)"></image> <image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)"></image>
</view> </view>
<image class="xs-img-box" :src="sheep.$url.cdn(data.image || data.picUrl)" mode="aspectFit" /> <image class="xs-img-box" :src="sheep.$url.cdn(data.image || data.picUrl)" mode="aspectFit" />
<view <view v-if="goodsFields.title?.show || goodsFields.name?.show || goodsFields.price?.show"
v-if="goodsFields.title?.show || goodsFields.name?.show || goodsFields.price?.show" class="xs-goods-content ss-flex-col ss-row-around">
class="xs-goods-content ss-flex-col ss-row-around" <view v-if="goodsFields.title?.show || goodsFields.name?.show" class="xs-goods-title ss-line-1"
> :style="[{ color: titleColor, width: titleWidth ? titleWidth + 'rpx' : '' }]">
<view
v-if="goodsFields.title?.show || goodsFields.name?.show"
class="xs-goods-title ss-line-1"
:style="[{ color: titleColor, width: titleWidth ? titleWidth + 'rpx' : '' }]"
>
{{ data.title || data.name }} {{ data.title || data.name }}
</view> </view>
<!-- 活动信息 --> <!-- 活动信息 -->
<view class="iconBox" v-if="data.promotionType > 0 || data.rewardActivity"> <view class="iconBox" v-if="data.promotionType > 0 || data.rewardActivity">
<view class="card" v-if="discountText">{{ discountText }}</view> <view class="card" v-if="discountText">{{ discountText }}</view>
<view <view class="card2"
class="card2"
v-for="item in getRewardActivityRuleItemDescriptions(data.rewardActivity).slice(0, 1)" v-for="item in getRewardActivityRuleItemDescriptions(data.rewardActivity).slice(0, 1)"
:key="item" :key="item">
>
{{ item }} {{ item }}
</view> </view>
</view> </view>
<view <view v-if="goodsFields.price?.show" class="xs-goods-price font-OPPOSANS"
v-if="goodsFields.price?.show" :style="[{ color: goodsFields.price.color }]">
class="xs-goods-price font-OPPOSANS"
:style="[{ color: goodsFields.price.color }]"
>
<!-- 活动价格 --> <!-- 活动价格 -->
<view class="ss-flex" v-if="data.activityType && data.activityType === PromotionActivityTypeEnum.POINT.type"> <view class="ss-flex"
<image v-if="data.activityType && data.activityType === PromotionActivityTypeEnum.POINT.type">
:src="sheep.$url.static('/static/img/shop/goods/score1.svg')" <image :src="sheep.$url.static('/static/img/shop/goods/score1.svg')" class="point-img"></image>
class="point-img"
></image>
<text class="point-text ss-m-r-16"> <text class="point-text ss-m-r-16">
{{ data.point }} {{ data.point }}
{{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${priceUnit}${fen2yuan(data.pointPrice)}` }} {{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${priceUnit}${fen2yuan(data.pointPrice)}` }}
@ -66,51 +49,36 @@
<view v-if="tagStyle.show" class="tag-icon-box"> <view v-if="tagStyle.show" class="tag-icon-box">
<image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)"></image> <image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)"></image>
</view> </view>
<image <image class="sm-img-box" :src="sheep.$url.cdn(data.image || data.picUrl)" mode="aspectFill"></image>
class="sm-img-box"
:src="sheep.$url.cdn(data.image || data.picUrl)"
mode="aspectFill"
></image>
<view <view v-if="goodsFields.title?.show || goodsFields.name?.show || goodsFields.price?.show"
v-if="goodsFields.title?.show || goodsFields.name?.show || goodsFields.price?.show" class="sm-goods-content" :style="[{ color: titleColor, width: titleWidth ? titleWidth + 'rpx' : '' }]">
class="sm-goods-content" <view v-if="goodsFields.title?.show || goodsFields.name?.show"
:style="[{ color: titleColor, width: titleWidth ? titleWidth + 'rpx' : '' }]" class="sm-goods-title ss-line-1 ss-m-b-16">
>
<view
v-if="goodsFields.title?.show || goodsFields.name?.show"
class="sm-goods-title ss-line-1 ss-m-b-16"
>
{{ data.title || data.name }} {{ data.title || data.name }}
</view> </view>
<!-- 活动信息 --> <!-- 活动信息 -->
<view class="iconBox" v-if="data.promotionType > 0 || data.rewardActivity"> <view class="iconBox" v-if="data.promotionType > 0 || data.rewardActivity">
<view class="card" v-if="discountText">{{ discountText }}</view> <view class="card" v-if="discountText">{{ discountText }}</view>
<view <view class="card2"
class="card2"
v-for="item in getRewardActivityRuleItemDescriptions(data.rewardActivity).slice(0, 1)" v-for="item in getRewardActivityRuleItemDescriptions(data.rewardActivity).slice(0, 1)"
:key="item" :key="item">
>
{{ item }} {{ item }}
</view> </view>
</view> </view>
<view <view v-if="goodsFields.price?.show" class="new-ii sm-goods-price font-OPPOSANS"
v-if="goodsFields.price?.show" :style="[{ color: goodsFields.price.color }]">
class="sm-goods-price font-OPPOSANS"
:style="[{ color: goodsFields.price.color }]"
>
<!-- 活动价格 --> <!-- 活动价格 -->
<view class="ss-flex" v-if="data.activityType && data.activityType === PromotionActivityTypeEnum.POINT.type"> <view class="ss-flex"
<image v-if="data.activityType && data.activityType === PromotionActivityTypeEnum.POINT.type">
:src="sheep.$url.static('/static/img/shop/goods/score1.svg')" <image :src="sheep.$url.static('/static/img/shop/goods/score1.svg')" class="point-img"></image>
class="point-img"
></image>
<text class="point-text ss-m-r-16"> <text class="point-text ss-m-r-16">
{{ data.point }} {{ data.point }}
{{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${priceUnit}${fen2yuan(data.pointPrice)}` }} {{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${priceUnit}${fen2yuan(data.pointPrice)}` }}
</text> </text>
</view> </view>
<template v-else> <template v-else>
<view class="fff" v-if="btn == 'ms'"></view>
<text class="price-unit ss-font-24">{{ priceUnit }}</text> <text class="price-unit ss-font-24">{{ priceUnit }}</text>
<text v-if="data.promotionPrice > 0">{{ fen2yuan(data.promotionPrice) }}</text> <text v-if="data.promotionPrice > 0">{{ fen2yuan(data.promotionPrice) }}</text>
<text v-else> <text v-else>
@ -118,6 +86,7 @@
</text> </text>
</template> </template>
</view> </view>
<view class="sss" v-if="btn == 'pt'">参与拼团</view>
</view> </view>
</view> </view>
@ -127,31 +96,19 @@
<image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)" /> <image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)" />
</view> </view>
<image class="md-img-box" :src="sheep.$url.cdn(data.image || data.picUrl)" mode="widthFix" /> <image class="md-img-box" :src="sheep.$url.cdn(data.image || data.picUrl)" mode="widthFix" />
<view <view class="md-goods-content ss-flex-col ss-row-around ss-p-b-20 ss-p-t-20 ss-p-x-16" :id="elId">
class="md-goods-content ss-flex-col ss-row-around ss-p-b-20 ss-p-t-20 ss-p-x-16" <view v-if="goodsFields.title?.show || goodsFields.name?.show" class="md-goods-title ss-line-1"
:id="elId" :style="[{ color: titleColor, width: titleWidth ? titleWidth + 'rpx' : '' }]">
>
<view
v-if="goodsFields.title?.show || goodsFields.name?.show"
class="md-goods-title ss-line-1"
:style="[{ color: titleColor, width: titleWidth ? titleWidth + 'rpx' : '' }]"
>
{{ data.title || data.name }} {{ data.title || data.name }}
</view> </view>
<view <view v-if="goodsFields.subtitle?.show || goodsFields.introduction?.show"
v-if="goodsFields.subtitle?.show || goodsFields.introduction?.show"
class="md-goods-subtitle ss-m-t-16 ss-line-1" class="md-goods-subtitle ss-m-t-16 ss-line-1"
:style="[{ color: subTitleColor, background: subTitleBackground }]" :style="[{ color: subTitleColor, background: subTitleBackground }]">
>
{{ data.subtitle || data.introduction }} {{ data.subtitle || data.introduction }}
</view> </view>
<slot name="activity"> <slot name="activity">
<view v-if="data.promos?.length" class="tag-box ss-flex-wrap ss-flex ss-col-center"> <view v-if="data.promos?.length" class="tag-box ss-flex-wrap ss-flex ss-col-center">
<view <view class="activity-tag ss-m-r-10 ss-m-t-16" v-for="item in data.promos" :key="item.id">
class="activity-tag ss-m-r-10 ss-m-t-16"
v-for="item in data.promos"
:key="item.id"
>
{{ item.title }} {{ item.title }}
</view> </view>
</view> </view>
@ -159,26 +116,20 @@
<!-- 活动信息 --> <!-- 活动信息 -->
<view class="iconBox" v-if="data.promotionType > 0 || data.rewardActivity"> <view class="iconBox" v-if="data.promotionType > 0 || data.rewardActivity">
<view class="card" v-if="discountText">{{ discountText }}</view> <view class="card" v-if="discountText">{{ discountText }}</view>
<view <view class="card2"
class="card2"
v-for="item in getRewardActivityRuleItemDescriptions(data.rewardActivity).slice(0, 1)" v-for="item in getRewardActivityRuleItemDescriptions(data.rewardActivity).slice(0, 1)"
:key="item" :key="item">
>
{{ item }} {{ item }}
</view> </view>
</view> </view>
<view class="ss-flex ss-col-bottom"> <view class="ss-flex ss-col-bottom">
<view <view v-if="goodsFields.price?.show" class="md-goods-price ss-m-t-16 font-OPPOSANS ss-m-r-10"
v-if="goodsFields.price?.show" :style="[{ color: goodsFields.price.color }]">
class="md-goods-price ss-m-t-16 font-OPPOSANS ss-m-r-10"
:style="[{ color: goodsFields.price.color }]"
>
<!-- 活动价格 --> <!-- 活动价格 -->
<view class="ss-flex" v-if="data.activityType && data.activityType === PromotionActivityTypeEnum.POINT.type"> <view class="ss-flex"
<image v-if="data.activityType && data.activityType === PromotionActivityTypeEnum.POINT.type">
:src="sheep.$url.static('/static/img/shop/goods/score1.svg')" <image :src="sheep.$url.static('/static/img/shop/goods/score1.svg')" class="point-img">
class="point-img" </image>
></image>
<text class="point-text ss-m-r-16"> <text class="point-text ss-m-r-16">
{{ data.point }} {{ data.point }}
{{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${priceUnit}${fen2yuan(data.pointPrice)}` }} {{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${priceUnit}${fen2yuan(data.pointPrice)}` }}
@ -192,14 +143,10 @@
</text> </text>
</template> </template>
</view> </view>
<view <view v-if="
v-if="
(goodsFields.original_price?.show || goodsFields.marketPrice?.show) && (goodsFields.original_price?.show || goodsFields.marketPrice?.show) &&
(data.original_price > 0 || data.marketPrice > 0) (data.original_price > 0 || data.marketPrice > 0)
" " class="goods-origin-price ss-m-t-16 font-OPPOSANS ss-flex" :style="[{ color: originPriceColor }]">
class="goods-origin-price ss-m-t-16 font-OPPOSANS ss-flex"
:style="[{ color: originPriceColor }]"
>
<text class="price-unit ss-font-20">{{ priceUnit }}</text> <text class="price-unit ss-font-20">{{ priceUnit }}</text>
<view class="ss-m-l-8">{{ fen2yuan(data.marketPrice) }}</view> <view class="ss-m-l-8">{{ fen2yuan(data.marketPrice) }}</view>
</view> </view>
@ -218,12 +165,7 @@
</view> </view>
<!-- lg卡片横向型一行放一个图片左内容右边 --> <!-- lg卡片横向型一行放一个图片左内容右边 -->
<view <view v-if="size === 'lg'" class="lg-goods-card ss-flex ss-col-stretch" :style="[elStyles]" @tap="onClick">
v-if="size === 'lg'"
class="lg-goods-card ss-flex ss-col-stretch"
:style="[elStyles]"
@tap="onClick"
>
<view v-if="tagStyle.show" class="tag-icon-box"> <view v-if="tagStyle.show" class="tag-icon-box">
<image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)"></image> <image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)"></image>
</view> </view>
@ -231,25 +173,16 @@
<view v-if="grouponTag" class="groupon-tag ss-flex ss-row-center"> <view v-if="grouponTag" class="groupon-tag ss-flex ss-row-center">
<view class="tag-icon">拼团</view> <view class="tag-icon">拼团</view>
</view> </view>
<image <image class="lg-img-box" :src="sheep.$url.cdn(data.image || data.picUrl)" mode="aspectFill" />
class="lg-img-box"
:src="sheep.$url.cdn(data.image || data.picUrl)"
mode="aspectFill"
/>
<view class="lg-goods-content ss-flex-1 ss-flex-col ss-row-between ss-p-b-10 "> <view class="lg-goods-content ss-flex-1 ss-flex-col ss-row-between ss-p-b-10 ">
<view> <view>
<view <view v-if="goodsFields.title?.show || goodsFields.name?.show" class="lg-goods-title ss-line-2"
v-if="goodsFields.title?.show || goodsFields.name?.show" :style="[{ color: titleColor }]">
class="lg-goods-title ss-line-2"
:style="[{ color: titleColor }]"
>
{{ data.title || data.name }} {{ data.title || data.name }}
</view> </view>
<view <view v-if="goodsFields.subtitle?.show || goodsFields.introduction?.show"
v-if="goodsFields.subtitle?.show || goodsFields.introduction?.show"
class="lg-goods-subtitle ss-m-t-10 ss-line-1" class="lg-goods-subtitle ss-m-t-10 ss-line-1"
:style="[{ color: subTitleColor, background: subTitleBackground }]" :style="[{ color: subTitleColor, background: subTitleBackground }]">
>
{{ data.subtitle || data.introduction }} {{ data.subtitle || data.introduction }}
</view> </view>
</view> </view>
@ -264,22 +197,20 @@
<!-- 活动信息 --> <!-- 活动信息 -->
<view class="iconBox" v-if="data.promotionType > 0 || data.rewardActivity"> <view class="iconBox" v-if="data.promotionType > 0 || data.rewardActivity">
<view class="card" v-if="discountText">{{ discountText }}</view> <view class="card" v-if="discountText">{{ discountText }}</view>
<view <view class="card2"
class="card2"
v-for="item in getRewardActivityRuleItemDescriptions(data.rewardActivity).slice(0, 1)" v-for="item in getRewardActivityRuleItemDescriptions(data.rewardActivity).slice(0, 1)"
:key="item" :key="item">
>
{{ item }} {{ item }}
</view> </view>
</view> </view>
<view v-if="goodsFields.price?.show" class="ss-flex ss-col-bottom font-OPPOSANS"> <view v-if="goodsFields.price?.show" class="ss-flex ss-col-bottom font-OPPOSANS">
<view class="sl-goods-price ss-m-r-12" :style="[{ color: goodsFields.price.color }]"> <view class="sl-goods-price ss-m-r-12" :style="[{ color: goodsFields.price.color }]">
<!-- 活动价格 --> <!-- 活动价格 -->
<view class="ss-flex" v-if="data.activityType && data.activityType === PromotionActivityTypeEnum.POINT.type"> <view class="ss-flex"
v-if="data.activityType && data.activityType === PromotionActivityTypeEnum.POINT.type">
<image <image
src="https://zysc.fjptzykj.com:3000/shangcheng/b0c400b1b30a9ca45031093595e42533de267823285c702fed250061920debf0.png" src="https://zysc.fjptzykj.com:3000/shangcheng/b0c400b1b30a9ca45031093595e42533de267823285c702fed250061920debf0.png"
class="point-img" class="point-img"></image>
></image>
<text class="point-text ss-m-r-16"> <text class="point-text ss-m-r-16">
{{ data.point }} {{ data.point }}
{{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${priceUnit}${fen2yuan(data.pointPrice)}` }} {{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${priceUnit}${fen2yuan(data.pointPrice)}` }}
@ -293,14 +224,10 @@
</text> </text>
</template> </template>
</view> </view>
<view <view v-if="
v-if="
(goodsFields.original_price?.show || goodsFields.marketPrice?.show) && (goodsFields.original_price?.show || goodsFields.marketPrice?.show) &&
(data.original_price > 0 || data.marketPrice > 0) (data.original_price > 0 || data.marketPrice > 0)
" " class="goods-origin-price ss-m-t-16 font-OPPOSANS ss-flex" :style="[{ color: originPriceColor }]">
class="goods-origin-price ss-m-t-16 font-OPPOSANS ss-flex"
:style="[{ color: originPriceColor }]"
>
<text class="price-unit ss-font-20">{{ priceUnit }}</text> <text class="price-unit ss-font-20">{{ priceUnit }}</text>
<view class="ss-m-l-8">{{ fen2yuan(data.marketPrice) }}</view> <view class="ss-m-l-8">{{ fen2yuan(data.marketPrice) }}</view>
</view> </view>
@ -321,36 +248,23 @@
<view v-if="tagStyle.show" class="tag-icon-box"> <view v-if="tagStyle.show" class="tag-icon-box">
<image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)" /> <image class="tag-icon" :src="sheep.$url.cdn(tagStyle.src || tagStyle.imgUrl)" />
</view> </view>
<image <image class="sl-img-box" :src="sheep.$url.cdn(data.image || data.picUrl)" mode="aspectFill" />
class="sl-img-box"
:src="sheep.$url.cdn(data.image || data.picUrl)"
mode="aspectFill"
/>
<view class="sl-goods-content"> <view class="sl-goods-content">
<view> <view>
<view <view v-if="goodsFields.title?.show || goodsFields.name?.show" class="sl-goods-title ss-line-1"
v-if="goodsFields.title?.show || goodsFields.name?.show" :style="[{ color: titleColor }]">
class="sl-goods-title ss-line-1"
:style="[{ color: titleColor }]"
>
{{ data.title || data.name }} {{ data.title || data.name }}
</view> </view>
<view <view v-if="goodsFields.subtitle?.show || goodsFields.introduction?.show"
v-if="goodsFields.subtitle?.show || goodsFields.introduction?.show"
class="sl-goods-subtitle ss-m-t-16" class="sl-goods-subtitle ss-m-t-16"
:style="[{ color: subTitleColor, background: subTitleBackground }]" :style="[{ color: subTitleColor, background: subTitleBackground }]">
>
{{ data.subtitle || data.introduction }} {{ data.subtitle || data.introduction }}
</view> </view>
</view> </view>
<view> <view>
<slot name="activity"> <slot name="activity">
<view v-if="data.promos?.length" class="tag-box ss-flex ss-col-center ss-flex-wrap"> <view v-if="data.promos?.length" class="tag-box ss-flex ss-col-center ss-flex-wrap">
<view <view class="activity-tag ss-m-r-10 ss-m-t-16" v-for="item in data.promos" :key="item.id">
class="activity-tag ss-m-r-10 ss-m-t-16"
v-for="item in data.promos"
:key="item.id"
>
{{ item.title }} {{ item.title }}
</view> </view>
</view> </view>
@ -358,22 +272,20 @@
<!-- 活动信息 --> <!-- 活动信息 -->
<view class="iconBox" v-if="data.promotionType > 0 || data.rewardActivity"> <view class="iconBox" v-if="data.promotionType > 0 || data.rewardActivity">
<view class="card" v-if="discountText">{{ discountText }}</view> <view class="card" v-if="discountText">{{ discountText }}</view>
<view <view class="card2"
class="card2"
v-for="item in getRewardActivityRuleItemDescriptions(data.rewardActivity).slice(0, 1)" v-for="item in getRewardActivityRuleItemDescriptions(data.rewardActivity).slice(0, 1)"
:key="item" :key="item">
>
{{ item }} {{ item }}
</view> </view>
</view> </view>
<view v-if="goodsFields.price?.show" class="ss-flex ss-col-bottom font-OPPOSANS"> <view v-if="goodsFields.price?.show" class="ss-flex ss-col-bottom font-OPPOSANS">
<view class="sl-goods-price ss-m-r-12" :style="[{ color: goodsFields.price.color }]"> <view class="sl-goods-price ss-m-r-12" :style="[{ color: goodsFields.price.color }]">
<!-- 活动价格 --> <!-- 活动价格 -->
<view class="ss-flex" v-if="data.activityType && data.activityType === PromotionActivityTypeEnum.POINT.type"> <view class="ss-flex"
v-if="data.activityType && data.activityType === PromotionActivityTypeEnum.POINT.type">
<image <image
src="https://zysc.fjptzykj.com:3000/shangcheng/b0c400b1b30a9ca45031093595e42533de267823285c702fed250061920debf0.png" src="https://zysc.fjptzykj.com:3000/shangcheng/b0c400b1b30a9ca45031093595e42533de267823285c702fed250061920debf0.png"
class="point-img" class="point-img"></image>
></image>
<text class="ss-m-r-16"> <text class="ss-m-r-16">
{{ data.point }} {{ data.point }}
{{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${priceUnit}${fen2yuan(data.pointPrice)}` }} {{ !data.pointPrice || data.pointPrice === 0 ? '' : `+${priceUnit}${fen2yuan(data.pointPrice)}` }}
@ -387,14 +299,10 @@
</text> </text>
</template> </template>
</view> </view>
<view <view v-if="
v-if="
(goodsFields.original_price?.show || goodsFields.marketPrice?.show) && (goodsFields.original_price?.show || goodsFields.marketPrice?.show) &&
(data.original_price > 0 || data.marketPrice > 0) (data.original_price > 0 || data.marketPrice > 0)
" " class="goods-origin-price ss-m-t-16 font-OPPOSANS ss-flex" :style="[{ color: originPriceColor }]">
class="goods-origin-price ss-m-t-16 font-OPPOSANS ss-flex"
:style="[{ color: originPriceColor }]"
>
<text class="price-unit ss-font-20">{{ priceUnit }}</text> <text class="price-unit ss-font-20">{{ priceUnit }}</text>
<view class="ss-m-l-8">{{ fen2yuan(data.marketPrice) }}</view> <view class="ss-m-l-8">{{ fen2yuan(data.marketPrice) }}</view>
</view> </view>
@ -441,7 +349,12 @@
* @event {Function()} click - 点击卡片 * @event {Function()} click - 点击卡片
* *
*/ */
import { computed, getCurrentInstance, nextTick, onMounted } from 'vue'; import {
computed,
getCurrentInstance,
nextTick,
onMounted
} from 'vue';
import sheep from '@/sheep'; import sheep from '@/sheep';
import { import {
fen2yuan, fen2yuan,
@ -450,8 +363,12 @@
formatStock, formatStock,
getRewardActivityRuleItemDescriptions, getRewardActivityRuleItemDescriptions,
} from '@/sheep/hooks/useGoods'; } from '@/sheep/hooks/useGoods';
import { isArray } from 'lodash-es'; import {
import { PromotionActivityTypeEnum } from '@/sheep/util/const'; isArray
} from 'lodash-es';
import {
PromotionActivityTypeEnum
} from '@/sheep/util/const';
// //
const props = defineProps({ const props = defineProps({
@ -538,6 +455,10 @@
type: String, type: String,
default: '', default: '',
}, },
btn: {
type: String,
default: '',
},
buttonShow: { buttonShow: {
type: Boolean, type: Boolean,
default: true, default: true,
@ -579,7 +500,8 @@
let text = []; let text = [];
if (props.goodsFields.salesCount?.show) { if (props.goodsFields.salesCount?.show) {
if (props.data.activityType && props.data.activityType === PromotionActivityTypeEnum.POINT.type) { if (props.data.activityType && props.data.activityType === PromotionActivityTypeEnum.POINT.type) {
text.push(formatExchange(props.data.sales_show_type, (props.data.pointTotalStock || 0) - (props.data.pointStock || 0))); text.push(formatExchange(props.data.sales_show_type, (props.data.pointTotalStock || 0) - (props
.data.pointStock || 0)));
} else { } else {
text.push(formatSales(props.data.sales_show_type, props.data.salesCount)); text.push(formatSales(props.data.sales_show_type, props.data.salesCount));
} }
@ -602,7 +524,9 @@
}; };
// //
const { proxy } = getCurrentInstance(); const {
proxy
} = getCurrentInstance();
const elId = `sheep_${Math.ceil(Math.random() * 10e5).toString(36)}`; const elId = `sheep_${Math.ceil(Math.random() * 10e5).toString(36)}`;
function getGoodsPriceCardWH() { function getGoodsPriceCardWH() {
@ -830,6 +754,7 @@
// height: 280rpx; // height: 280rpx;
border-radius: 10px !important; border-radius: 10px !important;
padding: 10px; padding: 10px;
.lg-img-box { .lg-img-box {
width: 180rpx; width: 180rpx;
height: 180rpx; height: 180rpx;
@ -957,4 +882,28 @@
justify-content: flex-start; justify-content: flex-start;
flex-wrap: wrap; flex-wrap: wrap;
} }
.sss {
margin-top: 10px;
padding: 3px;
font-size: 13px;
background: #e93422;
text-align: center;
color: white;
border-radius: 0px 0px 5px 5px;
}
.fff{
padding: 3px;
font-size: 13px;
background: #e93422;
text-align: center;
color: white;
border-radius: 5px;
width: 20px;
margin-right:5px;
}
.new-ii{
display:flex;
align-items: baseline;
}
</style> </style>

View File

@ -72,7 +72,7 @@
padding: data.space + 'rpx', padding: data.space + 'rpx',
}, },
]"> ]">
<s-goods-column class="goods-card" size="sm" :goodsFields="data.fields" :tagStyle="tagStyle" <s-goods-column btn='pt' class="goods-card" size="sm" :goodsFields="data.fields" :tagStyle="tagStyle"
:data="product" :titleColor="data.fields.name?.color" :topRadius="data.borderRadiusTop" :data="product" :titleColor="data.fields.name?.color" :topRadius="data.borderRadiusTop"
:bottomRadius="data.borderRadiusBottom" @click=" :bottomRadius="data.borderRadiusBottom" @click="
sheep.$router.go('/pages/goods/groupon', { sheep.$router.go('/pages/goods/groupon', {

View File

@ -105,7 +105,7 @@
padding: data.space + 'rpx', padding: data.space + 'rpx',
}, },
]"> ]">
<s-goods-column class="goods-card" size="sm" :goodsFields="data.fields" :tagStyle="tagStyle" <s-goods-column btn='ms' class="goods-card" size="sm" :goodsFields="data.fields" :tagStyle="tagStyle"
:data="product" :titleColor="data.fields.name?.color" :topRadius="data.borderRadiusTop" :data="product" :titleColor="data.fields.name?.color" :topRadius="data.borderRadiusTop"
:bottomRadius="data.borderRadiusBottom" @click=" :bottomRadius="data.borderRadiusBottom" @click="
sheep.$router.go('/pages/goods/seckill', { sheep.$router.go('/pages/goods/seckill', {

View File

@ -65,7 +65,7 @@
<view class="label-text">购买数量</view> <view class="label-text">购买数量</view>
<su-number-box <su-number-box
:min="1" :min="1"
:max="state.selectedSku.stock" :max="min([skuList[0].stock,activity.singleLimitCount,activity.remainingPurchases])"
:step="1" :step="1"
v-model="state.selectedSku.count" v-model="state.selectedSku.count"
@change="onNumberChange($event)" @change="onNumberChange($event)"
@ -97,6 +97,7 @@
<script setup> <script setup>
import { computed, reactive, watch } from 'vue'; import { computed, reactive, watch } from 'vue';
import sheep from '@/sheep'; import sheep from '@/sheep';
import { isEmpty, min } from 'lodash-es';
import { convertProductPropertyList, fen2yuan } from '@/sheep/hooks/useGoods'; import { convertProductPropertyList, fen2yuan } from '@/sheep/hooks/useGoods';
const headerBg = sheep.$url.css('/static/img/shop/goods/groupon-btn-long.png'); const headerBg = sheep.$url.css('/static/img/shop/goods/groupon-btn-long.png');
@ -118,6 +119,10 @@
type: [Number, String], type: [Number, String],
default: 0, default: 0,
}, },
activity:{
type: Array,
default: 0,
}
}); });
const state = reactive({ const state = reactive({
selectedSku: {}, // SKU selectedSku: {}, // SKU
@ -133,6 +138,7 @@
for (let price of skuPrices) { for (let price of skuPrices) {
price.value_id_array = price.properties.map((item) => item.valueId); price.value_id_array = price.properties.map((item) => item.valueId);
} }
console.log(props.activity,"skuPrices")
return skuPrices; return skuPrices;
}); });
@ -152,8 +158,8 @@
if (e === 0) return; if (e === 0) return;
if (state.selectedSku.count === e) return; if (state.selectedSku.count === e) return;
state.selectedSku.count = e; state.selectedSku.count = e;
console.log(state.selectedSku)
} }
// //
function onBuy() { function onBuy() {
if (!state.selectedSku.id || state.selectedSku.id <= 0) { if (!state.selectedSku.id || state.selectedSku.id <= 0) {
@ -166,7 +172,6 @@
} }
emits('buy', state.selectedSku); emits('buy', state.selectedSku);
} }
// property // property
function changeDisabled(isChecked = false, propertyId = 0, valueId = 0) { function changeDisabled(isChecked = false, propertyId = 0, valueId = 0) {
let newSkus = []; // sku let newSkus = []; // sku

View File

@ -75,7 +75,7 @@
<view class="label-text">购买数量</view> <view class="label-text">购买数量</view>
<su-number-box <su-number-box
:min="1" :min="1"
:max="min([singleLimitCount, state.selectedSku.stock])" :max="min([skuList[0].stock,activity.singleLimitCount,activity.remainingPurchases])"
:step="1" :step="1"
v-model="state.selectedSku.count" v-model="state.selectedSku.count"
@change="onBuyCountChange($event)" @change="onBuyCountChange($event)"
@ -122,12 +122,17 @@
type: Number, type: Number,
default: 1, default: 1,
}, },
activity:{
type: Array,
default: 0,
}
}); });
const state = reactive({ const state = reactive({
goodsInfo: computed(() => props.modelValue), goodsInfo: computed(() => props.modelValue),
selectedSku: {}, selectedSku: {},
currentPropertyArray: [], currentPropertyArray: [],
}); });
// console.log(props.activity,"activity");
const getShowPriceText = computed(() => { const getShowPriceText = computed(() => {
let priceText = `${fen2yuan(state.goodsInfo.price)}`; let priceText = `${fen2yuan(state.goodsInfo.price)}`;
if (!isEmpty(state.selectedSku)) { if (!isEmpty(state.selectedSku)) {

View File

@ -1,6 +1,6 @@
<!-- 装修用户组件用户卡片 --> <!-- 装修用户组件用户卡片 -->
<template> <template>
<view class="ss-user-info-wrap ss-p-t-50" style="z-index: 9999;"> <view class="ss-user-info-wrap ss-p-t-50" style="z-index: 9999;margin-top: 23px;">
<view class="ss-flex ss-col-center ss-row-between "> <view class="ss-flex ss-col-center ss-row-between ">
<view class="left-box ss-flex ss-col-center ss-m-l-36"> <view class="left-box ss-flex ss-col-center ss-m-l-36">
<view class="avatar-box ss-m-r-24"> <view class="avatar-box ss-m-r-24">

View File

@ -42,7 +42,7 @@
<image class="new-image" src="https://zysc.fjptzykj.com:3000/shangcheng/e0d70e9bac714465b87d22d19e30f3fb008dbcdea21842674b355340d6dedceb.png"></image> <image class="new-image" src="https://zysc.fjptzykj.com:3000/shangcheng/e0d70e9bac714465b87d22d19e30f3fb008dbcdea21842674b355340d6dedceb.png"></image>
</view> --> </view> -->
<view v-if="tools === 'search'" class="" <view v-if="tools === 'search'" class=""
:style="`width:${sheep.$platform.device.windowWidth - sheep.$platform.capsule.width - 37}px;display: flex;align-items: center;`" :style="`width:${sheep.$platform.device.windowWidth - sheep.$platform.capsule.width - 30}px;display: flex;align-items: center;`"
@click="onSearch"> @click="onSearch">
<slot name="center"> <slot name="center">
<uni-search-bar class="ss-flex-1 search-box" :radius="20" placeholder="请输入关键词" <uni-search-bar class="ss-flex-1 search-box" :radius="20" placeholder="请输入关键词"