Initial commit: 积分兑换电商平台多商户版 MER-2.2
Made-with: Cursor
This commit is contained in:
13
mer_uniapp/pages/activity/components/DiyComponent.vue
Normal file
13
mer_uniapp/pages/activity/components/DiyComponent.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "DiyComponent"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
107
mer_uniapp/pages/activity/components/PointsGoods.vue
Normal file
107
mer_uniapp/pages/activity/components/PointsGoods.vue
Normal file
@@ -0,0 +1,107 @@
|
||||
<template>
|
||||
<view class="flex pointsGoods" :style="[pointsGoodsStyle.boxStyle]">
|
||||
<view class="product-item " :style="[pointsGoodsStyle.imageBoxStyle]" v-for="(item, index) in integralGood" :key="index" @click="goGoodsDetail(item)">
|
||||
<view class="relative">
|
||||
<easy-loadimage
|
||||
:image-src="item.image"
|
||||
:width="pointsGoodsStyle._imageWidth"
|
||||
:height="pointsGoodsStyle._imageHeight"
|
||||
:radius="pointsGoodsStyle.radius"></easy-loadimage>
|
||||
<view v-show="item.stock===0" class="sellOut">已售罄</view>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title line1" :style="[pointsGoodsStyle.nameStyle]">{{ item.name }}</view>
|
||||
<view class="sales text-999 mt-8 mb-20" :style="[pointsGoodsStyle.salesStyle]">已有{{item.sales}}人兑换</view>
|
||||
<PointsPrice :pointsPrice="item" :pointsGoodsStyle="pointsGoodsStyle" v-model="isShowSamll"></PointsPrice>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
goProductDetail
|
||||
} from "@/libs/order";
|
||||
import PointsPrice from '@/components/PointsPrice.vue';
|
||||
import easyLoadimage from '@/components/base/easy-loadimage.vue';
|
||||
export default {
|
||||
components: {
|
||||
easyLoadimage,
|
||||
PointsPrice
|
||||
},
|
||||
props: {
|
||||
//积分商品列表
|
||||
integralGood: {
|
||||
type: Array,
|
||||
default: function() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
//商品大小样式
|
||||
pointsGoodsStyle: {
|
||||
type: Object,
|
||||
default: function() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
//视图宽
|
||||
width: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
marginRight: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// 积分图标大小
|
||||
iconWidth: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
isShowSamll: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
boxStyle() {
|
||||
return {
|
||||
width: this.width,
|
||||
marginRight: this.marginRight
|
||||
}
|
||||
},
|
||||
iconStyle() {
|
||||
return {
|
||||
width: this.iconWidth,
|
||||
height: this.iconWidth
|
||||
}
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
urlDomain: this.$Cache.get("imgHost"),
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goGoodsDetail(item){
|
||||
goProductDetail(item.id, 0, '',1)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.fs-22{
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
.product-item {
|
||||
position: relative;
|
||||
background: #fff;
|
||||
border-radius: 10rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.info {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
276
mer_uniapp/pages/activity/components/SeckillList.vue
Normal file
276
mer_uniapp/pages/activity/components/SeckillList.vue
Normal file
@@ -0,0 +1,276 @@
|
||||
<template>
|
||||
<view class="seckill_list relative" :data-theme="theme">
|
||||
<view class="seckill_item acea-row" v-for="(item,index) in seckillList " :key="index"
|
||||
@click="goDetail(item.id)">
|
||||
<view class="picture">
|
||||
<easy-loadimage :image-src="item.image" :border-src="item.image" width="254rpx" height="254rpx"
|
||||
radius="16rpx">
|
||||
</easy-loadimage>
|
||||
</view>
|
||||
<view class="acea-row row-column row-between" :class="seckillStatus == 1?'':''">
|
||||
<view class="pro_name line1 f-w-700"><text v-if="item.isSelf"
|
||||
class="font-bg-red bt-color mr10 self_min merType bg-color">自营</text>{{item.name}}</view>
|
||||
<view v-if="seckillStatus == 1" class="seckill_zhekou acea-row row-between">
|
||||
<view class="zhekou_price futura f-s-22 frice_hua">¥{{item.price}}</view>
|
||||
<view class="acea-row row-column row-center row-middle pb-30">
|
||||
<text class="f-s-24 reduce_color title">直降</text>
|
||||
<text
|
||||
class="f-s-24 reduce_color">¥{{(Number(item.price)-Number(item.seckillPrice)).toFixed(2)}}</text>
|
||||
</view>
|
||||
<view class="zhekou_price f-s-20 futura text-right">即将恢复</view>
|
||||
</view>
|
||||
<view v-else class="acea-row row-between">
|
||||
<text
|
||||
class="f-s-24 reduce_color mts">商品直降¥{{(Number(item.price)-Number(item.seckillPrice)).toFixed(2)}}</text>
|
||||
</view>
|
||||
<!-- 抢购中按钮-->
|
||||
<view class="seckill_btn seckill_btn_bg1 acea-row row-middle" v-if="seckillStatus == 1">
|
||||
<view class="seckill_btn_left f-w-700">
|
||||
<text class="friceIcon">¥</text>{{item.seckillPrice}}
|
||||
</view>
|
||||
<view class="middle"></view>
|
||||
<view class="acea-row row-column seckill_btn_right">
|
||||
<text class="f-s-26 f-w-700 text-white text-center">立即抢购</text>
|
||||
<view class="acea-row row-middle mt12">
|
||||
<text class="f-s-17 text-white f-w-300">已抢{{item.payRange}}</text>
|
||||
<view class="w80 ml8">
|
||||
<view class="activityProgress skeleton-rect">
|
||||
<view class='bg-reds' :style="'width:'+item.payRange"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 未开始按钮-->
|
||||
<view class="seckill_btn seckill_btn_bg2 acea-row row-middle" v-if="seckillStatus == 2 || seckillStatus ==3">
|
||||
<view class="seckill_btn_left f-w-700">
|
||||
<text class="friceIcon">¥</text>{{item.seckillPrice}}
|
||||
</view>
|
||||
<view class="middle"></view>
|
||||
<view class="acea-row row-column">
|
||||
<text class="f-s-28 f-w-700 btn_text text-center">敬请期待</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="seckill_btn seckill_btn_bg3 acea-row row-middle" v-if="seckillStatus == 0">
|
||||
<view class="seckill_btn_left f-w-700">
|
||||
<text class="friceIcon">¥</text>{{item.seckillPrice}}
|
||||
</view>
|
||||
<view class="middle"></view>
|
||||
<view class="acea-row row-center row-middle">
|
||||
<text class="f-s-28 f-w-700 btn_text text-center">已结束</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='loadingicon acea-row row-center-wrapper'>
|
||||
<text class='loading iconfont icon-jiazai'
|
||||
:hidden='loading==false'></text>{{seckillList.length>0?loadTitle:''}}
|
||||
</view>
|
||||
<view class="empty-boxs" v-if="!seckillList.length && !loading">
|
||||
<emptyPage title="暂无秒杀商品~" mTop="31%" :imgSrc="urlDomain+'crmebimage/presets/noShopper.png'"></emptyPage>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import easyLoadimage from '@/components/base/easy-loadimage.vue'
|
||||
import {
|
||||
goProductDetail
|
||||
} from "@/libs/order";
|
||||
let app = getApp();
|
||||
export default {
|
||||
name: "SeckillList",
|
||||
components: {
|
||||
easyLoadimage,
|
||||
},
|
||||
props: {
|
||||
//秒杀商品列表
|
||||
seckillList: {
|
||||
type: Array,
|
||||
default: function() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
loadTitle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// 倒计时时间
|
||||
datatime: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
// 活动状态
|
||||
seckillStatus: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlDomain: this.$Cache.get("imgHost"),
|
||||
theme: app.globalData.theme,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/*
|
||||
*去商品详情页
|
||||
*/
|
||||
goDetail(id) {
|
||||
goProductDetail(id, 1, `&status=${this.seckillStatus}&datatime=${this.datatime}`)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.middle {
|
||||
width: 24rpx;
|
||||
height: 82rpx;
|
||||
background-image: url('../static/images/middle.png');
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.pl-6 {
|
||||
padding-left: 6rpx;
|
||||
}
|
||||
|
||||
.mt12 {
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
|
||||
.ml8 {
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
|
||||
.reduce_color {
|
||||
color: #AC6926;
|
||||
}
|
||||
|
||||
.f-w-300 {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.w80 {
|
||||
width: 60rpx;
|
||||
}
|
||||
|
||||
.seckill_list {
|
||||
background-color: #fff;
|
||||
padding: 117rpx 24rpx 24rpx 24rpx;
|
||||
overflow-y: scroll;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.seckill_item {
|
||||
height: 300rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
border: 1px solid #E6E6E6;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.picture,
|
||||
/deep/.easy-loadimage image {
|
||||
display: block;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.pro_name {
|
||||
width: 386rpx;
|
||||
// height: 72rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-中黑体, PingFang SC;
|
||||
color: #333333;
|
||||
// line-height: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.seckill_zhekou {
|
||||
width: 100%;
|
||||
height: 76rpx;
|
||||
background-image: url('../static/images/seckill_discount.png');
|
||||
background-position: bottom;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
|
||||
.title {
|
||||
margin-top: -20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.seckill_btn {
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
width: 388rpx;
|
||||
height: 82rpx;
|
||||
// padding: 0 16rpx 0;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.seckill_btn_left {
|
||||
width: 190rpx;
|
||||
height: 82rpx;
|
||||
line-height: 82rpx;
|
||||
text-align: center;
|
||||
color: #FFD39D;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFang SC-中黑体, PingFang SC;
|
||||
background: linear-gradient(300deg, #22170F 0%, #4B3A30 100%);
|
||||
opacity: 1;
|
||||
background-image: url('../static/images/seckill_btn_bg2.png');
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.seckill_btn_right {
|
||||
width: 174rpx;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.seckill_btn_bg1 {
|
||||
@include main_bg_color(theme);
|
||||
}
|
||||
|
||||
.seckill_btn_bg2,
|
||||
.seckill_btn_bg3 {
|
||||
background-color: #BBBBBB;
|
||||
}
|
||||
|
||||
.btn_text {
|
||||
width: 150rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.zhekou_price {
|
||||
color: #888888;
|
||||
width: 122rpx;
|
||||
|
||||
}
|
||||
|
||||
.frice_hua {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.other_btn {
|
||||
width: 200rpx;
|
||||
height: 60rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #000;
|
||||
border-radius: 30rpx;
|
||||
border: 1px solid #000;
|
||||
margin: 30rpx 0;
|
||||
}
|
||||
|
||||
.icon-shangpinye_gengduo {
|
||||
font-size: 24rpx;
|
||||
padding-left: 4rpx;
|
||||
}
|
||||
</style>
|
||||
337
mer_uniapp/pages/activity/components/listStyle.vue
Normal file
337
mer_uniapp/pages/activity/components/listStyle.vue
Normal file
@@ -0,0 +1,337 @@
|
||||
<template>
|
||||
<view :data-theme="theme">
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="w-full bg-top relative">
|
||||
<image src="../static/images/seckill_header.png" class="h-604 image w-full"></image>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef H5 -->
|
||||
<view class="w-full bg-top relative">
|
||||
<image src="../static/images/seckill_header.png" :style="{ height: (sysHeight + 262) * 2 + 'rpx' }" class="image w-full"></image>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="relative w-full content">
|
||||
<view class="_box h-106 flex-y-center" :class="pageScrollStatus ? '' : 'rd-t-24rpx'"
|
||||
:style="{'top': 50 + sysHeight + 'px'}">
|
||||
<scroll-view scroll-x="true" style="white-space: nowrap;" scroll-with-animation
|
||||
class="white-nowrap vertical-middle w-full relative z-10"
|
||||
:class="{'sel1':active == 0,'sel-last': timeLine.length > 4 && active == timeLine.length - 1}"
|
||||
show-scrollbar="false" :scroll-left="tabLeft">
|
||||
<view class="scroll-item" v-for="(item,index) in timeLine" :key='index'
|
||||
:class="active == index ? 'active-card' : ''"
|
||||
:style="{'background-image': active == index ? navActiveBg : ''}"
|
||||
@tap='checkSeckill(index,item)'>
|
||||
<view class="flex-col flex-center z-10 relative t-22">
|
||||
<text class="SemiBold fs-40 lh-40rpx semiBold"
|
||||
:class="active == index ? 'text--w111-333':'text--w111-fff'">{{item.startTime}}</text>
|
||||
<text class="inline-block h-36 lh-34rpx fs-24"
|
||||
:class="active == index ? 'red-tag':'text--w111-fff'">{{item.status | timeStatusFilter}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="abs-lb w-full"
|
||||
:style="{'background': pageScrollStatus ? '#e93323' : 'rgba(245,245,245,0.2)','height': pageScrollStatus ? '130rpx' : '96rpx'}">
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg--w111-f5f5f5 pt-32 pl-24 pr-24 relative">
|
||||
<view class="card w-full bg--w111-fff rd-24rpx p-20 flex" v-for="(item,index) in seckillList"
|
||||
:key="index" @tap='goDetail(item.id)'>
|
||||
<view class="w-240 h-240">
|
||||
<easy-loadimage mode="aspectFit" :image-src="item.image" :border-src="item.image"
|
||||
width="240rpx" height="240rpx" radius="16rpx"></easy-loadimage>
|
||||
</view>
|
||||
<view class="flex-1 pl-20 flex-col justify-between">
|
||||
<view class="w-full">
|
||||
<view class="w-402 fs-28 lh-40rpx line2">
|
||||
<text v-if="item.isSelf" class="font-bg-red bt-color mr10 self_min merType bg-red">自营</text>
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex items-baseline">
|
||||
<text class="fs-22 lh-30rpx text-primary pr-8">秒杀价:</text>
|
||||
<baseMoney :money="item.seckillPrice" symbolSize="24" integerSize="40" decimalSize="24"
|
||||
incolor="E93323" weight></baseMoney>
|
||||
<text class="fs-22 lh-30rpx text--w111-999 pl-16 text-line regular">¥{{item.price}}</text>
|
||||
</view>
|
||||
<view class="w-full progress-box flex-between-center" v-if="seckillStatus == 1">
|
||||
<view class="flex-y-center">
|
||||
<view class="progress ml-16">
|
||||
<view class="active" :style="'width:'+item.payRange"></view>
|
||||
</view>
|
||||
<text class="fs-22 text-primary pl-8">已抢{{item.payRange}}</text>
|
||||
</view>
|
||||
<view class="qiang"></view>
|
||||
</view>
|
||||
<view class="w-full yuyue-box flex-between-center" v-if="seckillStatus == 2 || seckillStatus ==3">
|
||||
<view class="flex-y-center fs-22 pl-16">活动即将开始</view>
|
||||
<view class="yuyue"></view>
|
||||
</view>
|
||||
<view class="w-full over-box flex-between-center" v-if="seckillStatus == 0">
|
||||
<view class="flex-y-center fs-22 pl-16">活动已结束</view>
|
||||
<view class="over"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="abs-lt cir" v-show="active > 0"></view>
|
||||
</view>
|
||||
<view class="bg--w111-f5f5f5 p-20" v-if="!seckillList.length && !loading">
|
||||
<emptyPage title="暂无秒杀商品,去看看其他商品吧~" :imgSrc="urlDomain+'crmebimage/presets/noShopper.png'">
|
||||
</emptyPage>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import emptyPage from '@/components/emptyPage.vue';
|
||||
import easyLoadimage from '@/components/base/easy-loadimage.vue'
|
||||
import {
|
||||
goProductDetail
|
||||
} from "@/libs/order";
|
||||
let sysHeight = uni.getWindowInfo() ? uni.getWindowInfo().statusBarHeight : '';
|
||||
let app = getApp();
|
||||
export default {
|
||||
name: 'ListStyle',
|
||||
components: {
|
||||
emptyPage,
|
||||
easyLoadimage
|
||||
},
|
||||
props: {
|
||||
//秒杀商品列表
|
||||
seckillList: {
|
||||
type: Array,
|
||||
default: function() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
timeLine: {
|
||||
type: Array,
|
||||
default: function() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
active: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
//控制页面滑动
|
||||
pageScrollStatus: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
tabLeft: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
// 倒计时时间
|
||||
datatime: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
// 活动状态
|
||||
seckillStatus: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
theme: app.globalData.theme,
|
||||
urlDomain: this.$Cache.get("imgHost"),
|
||||
sysHeight: sysHeight,
|
||||
scrollLeft: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
bgImage() {
|
||||
return 'url(' + require('@/pages/activity/static/images/seckill_header.png') + ')'
|
||||
},
|
||||
navActiveBg() {
|
||||
if (this.active == 0) {
|
||||
return 'url(' + this.urlDomain + 'crmebimage/presets/seckill_header_icon1.png' + ')'
|
||||
} else {
|
||||
return 'url(' + this.urlDomain + 'crmebimage/presets/seckill_header_icon2.png' + ')'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
checkSeckill(index, item) {
|
||||
this.$emit('getCheckSeckill', index, item);
|
||||
},
|
||||
/*
|
||||
*去商品详情页
|
||||
*/
|
||||
goDetail(id) {
|
||||
goProductDetail(id, 1, `&status=${this.seckillStatus}&datatime=${this.datatime}`)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.w-402{
|
||||
width: 402rpx;
|
||||
}
|
||||
.bg-top{
|
||||
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
}
|
||||
.sticky{
|
||||
&:after{
|
||||
content:'';
|
||||
width:100%;
|
||||
height: 20px;
|
||||
background-color: #E93323;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: -20rpx;
|
||||
}
|
||||
}
|
||||
.content{
|
||||
top: -114rpx;
|
||||
}
|
||||
._box{
|
||||
position: sticky;
|
||||
z-index: 99;
|
||||
}
|
||||
.card ~ .card{
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.w-21-p111-{
|
||||
width: 21%;
|
||||
}
|
||||
.max-w-96{
|
||||
max-width: 96rpx;
|
||||
}
|
||||
.fq{
|
||||
background-color: #E93323;
|
||||
color: #fff;
|
||||
}
|
||||
.text-primary{
|
||||
color: #E93323;;
|
||||
}
|
||||
.text-line{
|
||||
text-decoration: line-through;
|
||||
}
|
||||
.progress-box{
|
||||
height: 64rpx;
|
||||
background-color: rgba(233, 51, 35, 0.05);
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.progress{
|
||||
width:160rpx;
|
||||
height: 18rpx;
|
||||
border-radius: 10rpx;
|
||||
background-color: rgba(233, 51, 35, 0.2);
|
||||
.active{
|
||||
height: 18rpx;
|
||||
border-radius: 10rpx;
|
||||
background: linear-gradient(90deg, #FF7931 0%, #E93323 100%);
|
||||
}
|
||||
}
|
||||
.qiang{
|
||||
width:112rpx;
|
||||
height: 64rpx;
|
||||
background-image: url('../static/images/qiang.png');
|
||||
background-size: cover;
|
||||
}
|
||||
.yuyue-box{
|
||||
height: 64rpx;
|
||||
background-color: #FFF1E5;
|
||||
border-radius: 16rpx;
|
||||
color: #FF7D00;
|
||||
}
|
||||
.yuyue{
|
||||
width:140rpx;
|
||||
height: 64rpx;
|
||||
background-image: url('../static/images/yuyue.png');
|
||||
background-size: cover;
|
||||
}
|
||||
.over-box{
|
||||
height: 64rpx;
|
||||
background-color: rgba(233, 51, 35, 0.05);
|
||||
border-radius: 16rpx;
|
||||
color: rgba(233, 51, 35, 0.60);
|
||||
}
|
||||
.over{
|
||||
width:140rpx;
|
||||
height: 64rpx;
|
||||
background-image: url('../static/images/over.png');
|
||||
background-size: cover;
|
||||
}
|
||||
.sel1 .scroll-item{
|
||||
right: 30rpx;
|
||||
}
|
||||
|
||||
.sel-last {
|
||||
/deep/.uni-scroll-view {
|
||||
|
||||
margin-right: -10rpx;
|
||||
}
|
||||
|
||||
.scroll-item {
|
||||
// left: 40rpx;
|
||||
// left: 32rpx;
|
||||
}
|
||||
|
||||
.active-card {
|
||||
width: 180rpx;
|
||||
padding-left: 10px;
|
||||
|
||||
.relative {
|
||||
width: 160rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.scroll-item{
|
||||
display: inline-block;
|
||||
height: 96rpx;
|
||||
width: 21%;
|
||||
position: relative;
|
||||
bottom: 0;
|
||||
}
|
||||
.active-card{
|
||||
width:234rpx;
|
||||
height: 106rpx;
|
||||
background-size: cover;
|
||||
z-index: 99;
|
||||
}
|
||||
.t-22{
|
||||
top: 22rpx;
|
||||
}
|
||||
.red-tag{
|
||||
display: inline-block;
|
||||
padding: 0 12rpx;
|
||||
height: 36rpx;
|
||||
border-radius: 18rpx;
|
||||
text-align: center;
|
||||
line-height: 36rpx;
|
||||
background-color: #E93323;
|
||||
font-size: 22rpx;
|
||||
color: #fff;
|
||||
}
|
||||
.cir{
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
background-color: #ED593E;
|
||||
&:after{
|
||||
content: '';
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border-top-left-radius: 100%; /* 左上角为半径大小的弧形 */
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
}
|
||||
.brand-tag{
|
||||
background-color: #e93323 !important;
|
||||
}
|
||||
</style>
|
||||
335
mer_uniapp/pages/activity/components/pageStyle.vue
Normal file
335
mer_uniapp/pages/activity/components/pageStyle.vue
Normal file
@@ -0,0 +1,335 @@
|
||||
<template>
|
||||
<view :data-theme="theme">
|
||||
<view class="seckill_header w-full">
|
||||
<view :style="{ height: `${navH}rpx` }"></view>
|
||||
<view class="scroll_box" :style='{width: mainWidth+"px"}'>
|
||||
<scroll-view scroll-x="true" scroll-with-animation style="white-space: nowrap; vertical-align: middle;"
|
||||
show-scrollbar="false" :scroll-left="tabLeft">
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<!-- <view class="" :style="'width:100%;' + 'height:'+sysHeight"></view> -->
|
||||
<!-- #endif -->
|
||||
<view class="scroll_box_item">
|
||||
<view class="scroll_item" v-for="(item,index) in timeLine" :key="index"
|
||||
@click="checkSeckill(index,item)">
|
||||
<view class="acea-row row-column row-center row-middle" :style='"width:"+isWidth+"px;"'
|
||||
:id='"sort"+index'>
|
||||
<text class="header_time f-w-700"
|
||||
:class="active == index ? 'active' : ''">{{item.startTime}}</text>
|
||||
<text class="header_day f-w-700"
|
||||
:class="active == index ? 'active_day' : ''">{{item.status | timeStatusFilter}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="seckill_box" :style='{ marginTop: listMarTop + "rpx"}'>
|
||||
<view class="seckill_desc acea-row row-between row-middle">
|
||||
<view class="acea-row row-column">
|
||||
<text class="seckill_name"></text>
|
||||
</view>
|
||||
<view v-if="seckillStatus>0" class="acea-row datatimeBox">
|
||||
<text class="f-s-24 text-right mr10">{{desc}}</text>
|
||||
<view class="count_down">
|
||||
<countDown :is-day="true" :tip-text="' '" :day-text="' '" :hour-text="' : '"
|
||||
:minute-text="' : '" :second-text="' '" :datatime="datatime" :isCol="false"
|
||||
:bgColor="bgColor"></countDown>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 秒杀商品列表 -->
|
||||
<seckill-list :seckillList="seckillList" :loading="loading" :loadTitle="loadTitle" :seckillStatus="seckillStatus"
|
||||
:datatime="datatime"></seckill-list>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import SeckillList from "../components/SeckillList";
|
||||
import countDown from "@/components/countDown";
|
||||
import emptyPage from '@/components/emptyPage.vue'
|
||||
import {
|
||||
setThemeColor
|
||||
} from '@/utils/setTheme.js'
|
||||
let app = getApp();
|
||||
export default {
|
||||
name: 'PageStyle',
|
||||
components: {
|
||||
countDown,
|
||||
emptyPage,
|
||||
SeckillList,
|
||||
},
|
||||
props: {
|
||||
//秒杀商品列表
|
||||
seckillList: {
|
||||
type: Array,
|
||||
default: function() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
loadTitle: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
seckillStatus: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
// 倒计时时间
|
||||
datatime: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
active: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
mainWidth: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
tabLeft: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
timeLine: {
|
||||
type: Array,
|
||||
default: function() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
marTop: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
// 倒计时文字
|
||||
desc: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
isWidth: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
},
|
||||
computed: mapGetters(['globalData']),
|
||||
data() {
|
||||
return {
|
||||
theme: this.$Cache.get("theme"),
|
||||
bgColor: {
|
||||
'bgColor': '',
|
||||
'Color': '#fff',
|
||||
'width': '36rpx',
|
||||
'timeTxtwidth': '16rpx',
|
||||
'isDay': true
|
||||
},
|
||||
listMarTop: 0,
|
||||
navH: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.bgColor.bgColor = setThemeColor();
|
||||
// #ifdef MP || APP-PLUS
|
||||
// 获取导航高度;
|
||||
//this.navH = this.globalData.navHeight;
|
||||
// 获取页面高度
|
||||
uni.getSystemInfo({
|
||||
success:(res) => {
|
||||
// 获取导航高度;
|
||||
this.navH = res.statusBarHeight * (750 / res.windowWidth) + 91;
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
|
||||
this.$nextTick(function() {
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select('.scroll_box_item').boundingClientRect(data => {
|
||||
// #ifdef MP
|
||||
this.listMarTop = this.navH + data.height * 2 + 30 + 20
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
this.listMarTop = this.marTop + data.height * 2 + 30 + 20
|
||||
// #endif
|
||||
}).exec();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
checkSeckill(index, item) {
|
||||
this.$emit('getCheckSeckill', index, item)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/.dialog_nav {
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.mts {
|
||||
margin-top: -56rpx;
|
||||
}
|
||||
|
||||
.datatimeBox {
|
||||
height: 36rpx;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
|
||||
.friceIcon {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.futura {
|
||||
margin-top: -6rpx;
|
||||
}
|
||||
|
||||
.seckill_header {
|
||||
background-image: url('../static/images/seckill_bg.jpg');
|
||||
background-size: cover;
|
||||
top: 0;
|
||||
left: 0;
|
||||
/* #ifdef H5 */
|
||||
height: 210rpx;
|
||||
padding-top: 32rpx;
|
||||
/* #endif */
|
||||
/* #ifndef H5*/
|
||||
height: 380rpx;
|
||||
/* #endif */
|
||||
position: fixed;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.head-menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 54rpx;
|
||||
width: 140rpx;
|
||||
background: transparent;
|
||||
border: 1px solid rgba(151, 151, 151, 0.2);
|
||||
border-radius: 27rpx;
|
||||
position: relative;
|
||||
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 26rpx;
|
||||
background-color: #EAEAEA;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.scroll_box_item {
|
||||
width: 100%;
|
||||
height: 92rpx;
|
||||
}
|
||||
|
||||
.scroll_box {
|
||||
height: 104rpx;
|
||||
}
|
||||
|
||||
.scroll_item {
|
||||
display: inline-block;
|
||||
height: 92rpx;
|
||||
}
|
||||
|
||||
.header_time {
|
||||
font-size: 36rpx;
|
||||
color: rgba(255, 255, 255, .4);
|
||||
display: inline-block;
|
||||
margin-bottom: 10rpx;
|
||||
transition: all .3s ease;
|
||||
font-family: PingFang SC-中黑体, PingFang SC;
|
||||
}
|
||||
|
||||
.active {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.active_day {
|
||||
width: 108rpx;
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
text-align: center;
|
||||
font-size: 22rpx;
|
||||
color: #fff !important;
|
||||
@include linear-gradient(theme);
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.header_day {
|
||||
font-size: 24rpx;
|
||||
color: rgba(255, 255, 255, .4);
|
||||
font-family: PingFang SC-中黑体, PingFang SC;
|
||||
}
|
||||
|
||||
.seckill_box {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
left: 0;
|
||||
position: relative;
|
||||
/* #ifdef H5 */
|
||||
margin-top: 172rpx !important;
|
||||
/* #endif */
|
||||
/* #ifndef H5 */
|
||||
//margin-top: -120rpx;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.seckill_desc {
|
||||
background: linear-gradient(360deg, #FFFFFF 0%, #F4F4F4 100%);
|
||||
border-radius: 24rpx 24rpx 0px 0px;
|
||||
padding: 0 24rpx;
|
||||
width: 100%;
|
||||
height: 117rpx;
|
||||
position: fixed;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.seckill_name {
|
||||
width: 222rpx;
|
||||
height: 57rpx;
|
||||
background-image: url('../static/images/miaos.png');
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.seckill_discount {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #AC6926;
|
||||
}
|
||||
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.count_down {}
|
||||
|
||||
/deep/ .is_day {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #1B1B1B;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user