Compare commits
No commits in common. "e0abf62c25ff45a760a1fc6bda7f04913f065fc9" and "c70d757a31297ea8436668a20a351ecdd062b6d1" have entirely different histories.
e0abf62c25
...
c70d757a31
@ -1,227 +1,255 @@
|
|||||||
<!-- 拼团活动列表 -->
|
<!-- 拼团活动列表 -->
|
||||||
<template>
|
<template>
|
||||||
<s-layout navbar="inner" :bgStyle="{ color: '#FE832A' }">
|
<s-layout title="拼团列表" navbar="normal" :bgStyle="{ color: '#FE832A',backgroundColor: 'rgba(233,51,35)' }">
|
||||||
<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
|
<view v-for="(item, index) in state.summaryData.avatars" :key="index" class="picture"
|
||||||
v-for="(item, index) in state.summaryData.avatars"
|
:style="index === 6 ? 'position: relative' : 'position: static'">
|
||||||
:key="index"
|
<span class="avatar" :style="`background-image: url(${item})`" />
|
||||||
class="picture"
|
<span v-if="index === 6 && state.summaryData.avatars.length > 3" class="mengceng">
|
||||||
:style="index === 6 ? 'position: relative' : 'position: static'"
|
<i>···</i>
|
||||||
>
|
</span>
|
||||||
<span class="avatar" :style="`background-image: url(${item})`" />
|
</view>
|
||||||
<span v-if="index === 6 && state.summaryData.avatars.length > 3" class="mengceng">
|
<text class="pic_count">{{ state.summaryData.userCount || 0 }}人参与</text>
|
||||||
<i>···</i>
|
</view>
|
||||||
</span>
|
</view>
|
||||||
</view>
|
<scroll-view class="scroll-box" :style="{ height: pageHeight + 'rpx' }" scroll-y="true"
|
||||||
<text class="pic_count">{{ state.summaryData.userCount || 0 }}人参与</text>
|
:scroll-with-animation="false" :enable-back-to-top="true">
|
||||||
</view>
|
<view class="goods-box ss-m-b-20" v-for="item in state.pagination.list" :key="item.id">
|
||||||
</view>
|
<s-goods-column class="" size="lg" :data="item" :grouponTag="true"
|
||||||
<scroll-view
|
@click="sheep.$router.go('/pages/goods/groupon', { id: item.id })">
|
||||||
class="scroll-box"
|
<template v-slot:cart>
|
||||||
:style="{ height: pageHeight + 'rpx' }"
|
<button class="ss-reset-button cart-btn">去拼团</button>
|
||||||
scroll-y="true"
|
</template>
|
||||||
:scroll-with-animation="false"
|
</s-goods-column>
|
||||||
:enable-back-to-top="true"
|
</view>
|
||||||
>
|
<uni-load-more color="white" v-if="state.pagination.total > 0" :status="state.loadStatus" :content-text="{
|
||||||
<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"
|
|
||||||
@click="sheep.$router.go('/pages/goods/groupon', { id: item.id })"
|
|
||||||
>
|
|
||||||
<template v-slot:cart>
|
|
||||||
<button class="ss-reset-button cart-btn">去拼团</button>
|
|
||||||
</template>
|
|
||||||
</s-goods-column>
|
|
||||||
</view>
|
|
||||||
<uni-load-more
|
|
||||||
v-if="state.pagination.total > 0"
|
|
||||||
:status="state.loadStatus"
|
|
||||||
:content-text="{
|
|
||||||
contentdown: '上拉加载更多',
|
contentdown: '上拉加载更多',
|
||||||
}"
|
}" @tap="loadMore" />
|
||||||
@tap="loadMore"
|
</scroll-view>
|
||||||
/>
|
</view>
|
||||||
</scroll-view>
|
</s-layout>
|
||||||
</view>
|
|
||||||
</s-layout>
|
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive } from 'vue';
|
import {
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
reactive
|
||||||
import sheep from '@/sheep';
|
} from 'vue';
|
||||||
import CombinationApi from '@/sheep/api/promotion/combination';
|
import {
|
||||||
|
onLoad,
|
||||||
|
onReachBottom
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
import sheep from '@/sheep';
|
||||||
|
import CombinationApi from '@/sheep/api/promotion/combination';
|
||||||
|
|
||||||
const { safeAreaInsets, safeArea } = sheep.$platform.device;
|
const {
|
||||||
const sysNavBar = sheep.$platform.navbar;
|
safeAreaInsets,
|
||||||
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
safeArea
|
||||||
const pageHeight =
|
} = sheep.$platform.device;
|
||||||
(safeArea.height + safeAreaInsets.bottom) * 2 + statusBarHeight - sysNavBar - 350;
|
const sysNavBar = sheep.$platform.navbar;
|
||||||
const headerBg = sheep.$url.css('/static/img/shop/goods/groupon-header.png');
|
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
||||||
|
const pageHeight =
|
||||||
|
(safeArea.height + safeAreaInsets.bottom) * 2 + statusBarHeight - sysNavBar - 350;
|
||||||
|
const headerBg = sheep.$url.css('/static/img/shop/goods/groupon-header.png');
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
pagination: {
|
pagination: {
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
},
|
},
|
||||||
loadStatus: '',
|
loadStatus: '',
|
||||||
summaryData: {},
|
summaryData: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
// 加载统计数据
|
// 加载统计数据
|
||||||
const getSummary = async () => {
|
const getSummary = async () => {
|
||||||
const { data } = await CombinationApi.getCombinationRecordSummary();
|
const {
|
||||||
state.summaryData = data;
|
data
|
||||||
};
|
} = await CombinationApi.getCombinationRecordSummary();
|
||||||
|
state.summaryData = data;
|
||||||
|
};
|
||||||
|
|
||||||
// 加载活动列表
|
// 加载活动列表
|
||||||
async function getList() {
|
async function getList() {
|
||||||
state.loadStatus = 'loading';
|
state.loadStatus = 'loading';
|
||||||
const { data } = await CombinationApi.getCombinationActivityPage({
|
const {
|
||||||
pageNo: state.pagination.pageNo,
|
data
|
||||||
pageSize: state.pagination.pageSize,
|
} = await CombinationApi.getCombinationActivityPage({
|
||||||
});
|
pageNo: state.pagination.pageNo,
|
||||||
data.list.forEach((activity) => {
|
pageSize: state.pagination.pageSize,
|
||||||
state.pagination.list.push({ ...activity, price: activity.combinationPrice });
|
});
|
||||||
});
|
data.list.forEach((activity) => {
|
||||||
state.pagination.total = data.total;
|
state.pagination.list.push({
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
...activity,
|
||||||
}
|
price: activity.combinationPrice
|
||||||
|
});
|
||||||
|
});
|
||||||
|
state.pagination.total = data.total;
|
||||||
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
|
}
|
||||||
|
|
||||||
// 加载更多
|
// 加载更多
|
||||||
function loadMore() {
|
function loadMore() {
|
||||||
if (state.loadStatus === 'noMore') {
|
if (state.loadStatus === 'noMore') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.pagination.pageNo++;
|
state.pagination.pageNo++;
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 上拉加载更多
|
// 上拉加载更多
|
||||||
onReachBottom(() => loadMore());
|
onReachBottom(() => loadMore());
|
||||||
|
|
||||||
// 页面初始化
|
// 页面初始化
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
getSummary();
|
getSummary();
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.page-bg {
|
.page-bg {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 458rpx;
|
height: 458rpx;
|
||||||
margin-top: -88rpx;
|
margin-top: -88rpx;
|
||||||
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 {
|
|
||||||
position: relative;
|
|
||||||
z-index: 3;
|
|
||||||
margin: -190rpx 20rpx 0 20rpx;
|
|
||||||
// background: #fff;
|
|
||||||
border-radius: 20rpx 20rpx 0 0;
|
|
||||||
.content-header {
|
|
||||||
width: 100%;
|
|
||||||
border-radius: 20rpx 20rpx 0 0;
|
|
||||||
height: 100rpx;
|
|
||||||
background: linear-gradient(180deg, #fff4f7, #ffe4d1);
|
|
||||||
.content-header-title {
|
|
||||||
width: 100%;
|
|
||||||
font-size: 30rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #ff2923;
|
|
||||||
line-height: 30rpx;
|
|
||||||
position: relative;
|
|
||||||
.more {
|
|
||||||
position: absolute;
|
|
||||||
right: 30rpx;
|
|
||||||
top: 0;
|
|
||||||
font-size: 24rpx;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #999999;
|
|
||||||
line-height: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.picture {
|
.list-content {
|
||||||
display: inline-table;
|
position: relative;
|
||||||
}
|
z-index: 3;
|
||||||
|
margin: 0 20rpx 0 20rpx;
|
||||||
|
// background: #fff;
|
||||||
|
border-radius: 20rpx 20rpx 0 0;
|
||||||
|
|
||||||
.avatar {
|
.content-header {
|
||||||
width: 38rpx;
|
width: 100%;
|
||||||
height: 38rpx;
|
border-radius: 20rpx 20rpx 0 0;
|
||||||
display: inline-table;
|
height: 50rpx;
|
||||||
vertical-align: middle;
|
margin: 10px 0;
|
||||||
-webkit-user-select: none;
|
position: relative;
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
border-radius: 50%;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: cover;
|
|
||||||
background-position: 0 0;
|
|
||||||
margin-right: -10rpx;
|
|
||||||
box-shadow: 0 0 0 1px #fe832a;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pic_count {
|
// background: linear-gradient(180deg, #fff4f7, #ffe4d1);
|
||||||
margin-left: 30rpx;
|
&::after {
|
||||||
font-size: 22rpx;
|
content: '';
|
||||||
font-weight: 500;
|
position: absolute;
|
||||||
width: auto;
|
right: 15%;
|
||||||
height: auto;
|
height: 1px;
|
||||||
background: linear-gradient(90deg, #ff6600 0%, #fe832a 100%);
|
width: 50px;
|
||||||
color: #ffffff;
|
background: white;
|
||||||
border-radius: 19rpx;
|
top: 50%;
|
||||||
padding: 4rpx 14rpx;
|
transform: translateY(-50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mengceng {
|
&::before {
|
||||||
width: 40rpx;
|
content: '';
|
||||||
height: 40rpx;
|
position: absolute;
|
||||||
line-height: 36rpx;
|
left: 15%;
|
||||||
background: rgba(51, 51, 51, 0.6);
|
height: 1px;
|
||||||
text-align: center;
|
width: 50px;
|
||||||
border-radius: 50%;
|
background: white;
|
||||||
opacity: 1;
|
top: 50%;
|
||||||
position: absolute;
|
transform: translateY(-50%);
|
||||||
left: -2rpx;
|
}
|
||||||
color: #fff;
|
|
||||||
top: 2rpx;
|
.content-header-title {
|
||||||
i {
|
width: 100%;
|
||||||
font-style: normal;
|
font-size: 30rpx;
|
||||||
font-size: 20rpx;
|
font-weight: 500;
|
||||||
}
|
color: #ff2923;
|
||||||
}
|
line-height: 30rpx;
|
||||||
}
|
position: relative;
|
||||||
}
|
|
||||||
.scroll-box {
|
.more {
|
||||||
margin-top: 13px;
|
position: absolute;
|
||||||
height: 900rpx;
|
right: 30rpx;
|
||||||
.goods-box {
|
top: 0;
|
||||||
position: relative;
|
font-size: 24rpx;
|
||||||
padding: 0 10px;
|
font-weight: 400;
|
||||||
.cart-btn {
|
color: #999999;
|
||||||
position: absolute;
|
line-height: 30rpx;
|
||||||
bottom: 10rpx;
|
}
|
||||||
right: 20rpx;
|
|
||||||
z-index: 11;
|
.picture {
|
||||||
height: 50rpx;
|
display: inline-table;
|
||||||
line-height: 50rpx;
|
}
|
||||||
padding: 0 20rpx;
|
|
||||||
border-radius: 25rpx;
|
.avatar {
|
||||||
font-size: 24rpx;
|
width: 38rpx;
|
||||||
color: #fff;
|
height: 38rpx;
|
||||||
background: linear-gradient(90deg, #ff6600 0%, #fe832a 100%);
|
display: inline-table;
|
||||||
}
|
vertical-align: middle;
|
||||||
}
|
-webkit-user-select: none;
|
||||||
}
|
-moz-user-select: none;
|
||||||
}
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: 0 0;
|
||||||
|
margin-right: -10rpx;
|
||||||
|
box-shadow: 0 0 0 1px #fe832a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pic_count {
|
||||||
|
margin-left: 30rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
background: linear-gradient(90deg, #ff6600 0%, #fe832a 100%);
|
||||||
|
color: #ffffff;
|
||||||
|
border-radius: 19rpx;
|
||||||
|
padding: 4rpx 14rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mengceng {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
line-height: 36rpx;
|
||||||
|
background: rgba(51, 51, 51, 0.6);
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
opacity: 1;
|
||||||
|
position: absolute;
|
||||||
|
left: -2rpx;
|
||||||
|
color: #fff;
|
||||||
|
top: 2rpx;
|
||||||
|
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-box {
|
||||||
|
// margin-top: 13px;
|
||||||
|
height: 900rpx;
|
||||||
|
|
||||||
|
.goods-box {
|
||||||
|
position: relative;
|
||||||
|
padding: 0 10px;
|
||||||
|
|
||||||
|
.cart-btn {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 10rpx;
|
||||||
|
right: 20rpx;
|
||||||
|
z-index: 11;
|
||||||
|
height: 50rpx;
|
||||||
|
line-height: 50rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
border-radius: 25rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #fff;
|
||||||
|
background: linear-gradient(90deg, #ff6600 0%, #fe832a 100%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -264,7 +264,7 @@
|
|||||||
|
|
||||||
// 时间段轮播图
|
// 时间段轮播图
|
||||||
.header {
|
.header {
|
||||||
width: 100%;
|
width: 710rpx;
|
||||||
height: 330rpx;
|
height: 330rpx;
|
||||||
margin: 0 auto 0 auto;
|
margin: 0 auto 0 auto;
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
|
@ -90,7 +90,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 规格与数量弹框 -->
|
<!-- 规格与数量弹框 -->
|
||||||
<s-select-groupon-sku :activity="state.activity" :show="state.showSelectSku" :goodsInfo="state.goodsInfo"
|
<s-select-groupon-sku :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 || state.activity.remainingPurchases == 0"">
|
" :disabled="state.goodsInfo.stock === 0 || state.activity.status !== 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,7 +263,6 @@
|
|||||||
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
|
||||||
|
@ -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 :activity="activity" v-model="state.goodsInfo" :show="state.showSelectSku"
|
<s-select-seckill-sku 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,16 +102,14 @@
|
|||||||
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 || activity.remainingPurchases == 0">
|
" :disabled="state.goodsInfo.stock === 0 || timeStatusEnum !== TimeStatusEnum.STARTED">
|
||||||
<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>
|
||||||
@ -225,7 +223,6 @@
|
|||||||
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);
|
||||||
|
|
||||||
// 查询商品
|
// 查询商品
|
||||||
|
@ -2,11 +2,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<image class="seckill" src="@/static/images/seckilbg.png"></image>
|
|
||||||
<s-block class="" v-for="(item, index) in template.components" :key="index" :styles="item.property.style">
|
<s-block class="" v-for="(item, index) in template.components" :key="index" :styles="item.property.style">
|
||||||
<s-block-item :type="item.id" :data="item.property" :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>
|
</s-block>
|
||||||
|
<view class="new-huiy" @click="
|
||||||
|
sheep.$router.go('/pages/user/user_vip/index')
|
||||||
|
">
|
||||||
|
<image class="seckill" src="@/static/images/seckilbg.png"></image>
|
||||||
|
<view class="new-button">立即开通</view>
|
||||||
|
<img class="seckill1" mode="aspectFit"
|
||||||
|
src="https://zysc.fjptzykj.com:3000/shangcheng/64776e2edc3c2f15295e7c3976ba301e08f9170f99a2e845d8f33bd65179b177.png" />
|
||||||
|
</view>
|
||||||
</s-layout>
|
</s-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -41,13 +51,40 @@
|
|||||||
onPageScroll(() => {});
|
onPageScroll(() => {});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="scss" scoped>
|
||||||
.new-main{
|
.new-huiy {
|
||||||
|
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%);
|
||||||
@ -62,4 +99,11 @@
|
|||||||
view {
|
view {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
::v-deep .ss{
|
||||||
|
z-index: 99999;
|
||||||
|
&>view{
|
||||||
|
margin-top: 94px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
@ -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.usedPoint }}
|
{{ state.orderInfo.usePoint }}
|
||||||
</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.usedPoint
|
? state.orderInfo.totalPoint - state.orderInfo.usePoint
|
||||||
: state.orderInfo.totalPoint || 0
|
: state.orderInfo.totalPoint || 0
|
||||||
}}
|
}}
|
||||||
</text>
|
</text>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
|
|
||||||
<!-- 基础组件:搜索框 -->
|
<!-- 基础组件:搜索框 -->
|
||||||
<s-search-block v-if="type === 'SearchBar'" :data="data" :styles="styles" :navbar="false" />
|
<s-search-block v-if="type === 'SearchBar'" :data="data" :styles="styles" :navbar="false" />
|
||||||
<!-- 基础组件:公告栏 -->
|
<!-- 基础组件:公告栏 -->
|
||||||
<s-notice-block v-if="type === 'NoticeBar'" :data="data" />
|
<s-notice-block v-if="type === 'NoticeBar'" :data="data" />
|
||||||
@ -41,8 +41,8 @@
|
|||||||
<!-- 营销组件:秒杀 -->
|
<!-- 营销组件:秒杀 -->
|
||||||
<s-seckill-block v-if="type === 'PromotionSeckill'" :data="data" :styles="styles" />
|
<s-seckill-block v-if="type === 'PromotionSeckill'" :data="data" :styles="styles" />
|
||||||
<!-- 营销组件:积分商城 -->
|
<!-- 营销组件:积分商城 -->
|
||||||
<s-point-block v-if="type === 'PromotionPoint'" :data="data" :styles="styles" />
|
<s-point-block v-if="type === 'PromotionPoint'" :data="data" :styles="styles" />
|
||||||
<!-- 营销组件:小程序直播(暂时没有这个功能) -->
|
<!-- 营销组件: 小程序直播(暂时没有这个功能) -->
|
||||||
<s-live-block v-if="type === 'MpLive'" :data="data" :styles="styles" />
|
<s-live-block v-if="type === 'MpLive'" :data="data" :styles="styles" />
|
||||||
<!-- 营销组件:优惠券 -->
|
<!-- 营销组件:优惠券 -->
|
||||||
<s-coupon-block v-if="type === 'CouponCard'" :data="data" :styles="styles" />
|
<s-coupon-block v-if="type === 'CouponCard'" :data="data" :styles="styles" />
|
||||||
@ -68,20 +68,11 @@
|
|||||||
|
|
||||||
<!-- 用户组件:用户卡片 -->
|
<!-- 用户组件:用户卡片 -->
|
||||||
<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 === 'UserCard'" />
|
<s-wallet-card v-if="type === 'UserWallet'" />
|
||||||
<!-- 用户组件:用户卡券 -->
|
<!-- 用户组件:用户卡券 -->
|
||||||
<s-coupon-card v-if="type === 'UserCoupon'" />
|
<s-coupon-card v-if="type === 'UserCoupon'" />
|
||||||
</view>
|
</view>
|
||||||
@ -133,30 +124,7 @@
|
|||||||
: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 {
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -72,7 +72,7 @@
|
|||||||
padding: data.space + 'rpx',
|
padding: data.space + 'rpx',
|
||||||
},
|
},
|
||||||
]">
|
]">
|
||||||
<s-goods-column btn='pt' class="goods-card" size="sm" :goodsFields="data.fields" :tagStyle="tagStyle"
|
<s-goods-column 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', {
|
||||||
|
@ -105,7 +105,7 @@
|
|||||||
padding: data.space + 'rpx',
|
padding: data.space + 'rpx',
|
||||||
},
|
},
|
||||||
]">
|
]">
|
||||||
<s-goods-column btn='ms' class="goods-card" size="sm" :goodsFields="data.fields" :tagStyle="tagStyle"
|
<s-goods-column 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', {
|
||||||
|
@ -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="min([skuList[0].stock,activity.singleLimitCount,activity.remainingPurchases])"
|
:max="state.selectedSku.stock"
|
||||||
:step="1"
|
:step="1"
|
||||||
v-model="state.selectedSku.count"
|
v-model="state.selectedSku.count"
|
||||||
@change="onNumberChange($event)"
|
@change="onNumberChange($event)"
|
||||||
@ -97,7 +97,6 @@
|
|||||||
<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');
|
||||||
@ -119,10 +118,6 @@
|
|||||||
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
|
||||||
@ -138,7 +133,6 @@
|
|||||||
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;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -158,8 +152,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) {
|
||||||
@ -172,6 +166,7 @@
|
|||||||
}
|
}
|
||||||
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 数组
|
||||||
|
@ -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([skuList[0].stock,activity.singleLimitCount,activity.remainingPurchases])"
|
:max="min([singleLimitCount, state.selectedSku.stock])"
|
||||||
:step="1"
|
:step="1"
|
||||||
v-model="state.selectedSku.count"
|
v-model="state.selectedSku.count"
|
||||||
@change="onBuyCountChange($event)"
|
@change="onBuyCountChange($event)"
|
||||||
@ -122,17 +122,12 @@
|
|||||||
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)) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<!-- 装修用户组件:用户卡片 -->
|
<!-- 装修用户组件:用户卡片 -->
|
||||||
<template>
|
<template>
|
||||||
<view class="ss-user-info-wrap ss-p-t-50" style="z-index: 9999;margin-top: 23px;">
|
<view class="ss-user-info-wrap ss-p-t-50" style="z-index: 9999;">
|
||||||
<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">
|
||||||
|
@ -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 - 30}px;display: flex;align-items: center;`"
|
:style="`width:${sheep.$platform.device.windowWidth - sheep.$platform.capsule.width - 37}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="请输入关键词"
|
||||||
|
Loading…
Reference in New Issue
Block a user