秒杀详情调整,禅道Bug解决

msb_beta
ch 2 years ago
parent fea35b72d1
commit 948f3993f5

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-17 19:15:10 * @Date: 2022-03-17 19:15:10
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-03-22 17:30:38 * @LastEditTime: 2022-04-24 18:15:27
* @Description: 一些无法归类的公共方法容器 * @Description: 一些无法归类的公共方法容器
*/ */
@ -73,7 +73,51 @@ const IsDouble = (str) => {
if (result == null) return false if (result == null) return false
return true return true
} }
/**
*
* 时间格式化
* @param {number|string|Date} d 时间参数能被new Date识别的数字字符串日期
* @param {string} fmt 时间格式参数 字符串类型 默认'yyyy/mm/dd'
*/
const formatDate = (date, fmt = 'yyyy/mm/dd' ) =>{
// 处理不识别的时间表示字符串如2020年01月01日00时00分00秒
const dateType = getVarType(date);
if(dateType === 'string'){
date = date.replace(/\D+/ig,'/');
let arr = date.split('/');
// 长度大于3说明带了时分秒信息 特殊时间处理格式
if(arr.length > 3){
let time = ` ${arr[3]}:${arr[4]}:${arr[5]}`
arr.length = 3;
date = arr.join('/') + time;
}
};
try{
date = date ? dateType === 'date' ? date : new Date(date) : new Date();
} catch(e){
throw new Error('不能识别的时间格式');
}
const o = {
'm+': date.getMonth() + 1, //月份
'd+': date.getDate(), //日
'h+': date.getHours(), //小时
'i+': date.getMinutes(), //分
's+': date.getSeconds(), //秒ji“
'q+': Math.floor((date.getMonth() + 3) / 3), //季度
'l+': date.getMilliseconds() //毫秒
};
if (/(y+)/i.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear().toString()).substr(4 - RegExp.$1.length));
}
for (let k in o) {
if (new RegExp(`(${k})`, 'i').test(fmt)) {
const str = o[k].toString();
fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : (`0${str}`).substr(str.length-1));
}
}
return fmt;
}
// 工具类的文件需要把文件提供的工具类统一放最下方做一个统一输出 // 工具类的文件需要把文件提供的工具类统一放最下方做一个统一输出
export { export {
// async await 标识结果处理 // async await 标识结果处理
@ -87,5 +131,7 @@ export {
// 判断是否为整数 // 判断是否为整数
IsInteger, IsInteger,
// 判断是否double或float // 判断是否double或float
IsDouble IsDouble,
// 时间格式化
formatDate
} }

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-25 10:11:37 * @Date: 2022-03-25 10:11:37
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-22 14:16:14 * @LastEditTime: 2022-04-24 15:36:57
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -44,7 +44,7 @@ export default {
&--back{ &--back{
width: 14rpx; width: 14rpx;
height: 28rpx; height: 28rpx;
margin-right: 20rpx; margin-right: 36rpx;
} }
&--title{ &--title{
flex: 1; flex: 1;

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>马士兵严选</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>马士兵严选</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.b5602bf5.js></script><script src=/static/js/index.6ab2a97e.js></script></body></html> document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.b5602bf5.js></script><script src=/static/js/index.05ec0e3f.js></script></body></html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-28 15:38:23 * @Date: 2022-03-28 15:38:23
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-22 19:16:20 * @LastEditTime: 2022-04-24 18:24:33
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -39,6 +39,7 @@ export default {
return false; return false;
} }
this.$store.commit('SET_USER_INFO', {...this.userInfo}); this.$store.commit('SET_USER_INFO', {...this.userInfo});
this.$Router.back();
} }
} }
} }

@ -2,30 +2,40 @@
* @Author: ch * @Author: ch
* @Date: 2022-04-12 17:33:42 * @Date: 2022-04-12 17:33:42
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-22 21:02:11 * @LastEditTime: 2022-04-24 18:20:42
* @Description: file content * @Description: file content
--> -->
<template> <template>
<view class="seckill" :class="activityStatus === 'startActivity' && 'seckill__start'"> <view>
<view class="seckill--price-box" v-if="activityStatus === 'noStartActivity'"> <view class="seckill" :class="activityStatus === 'startActivity' && 'seckill__start'">
<text class="seckill--price-icon"></text> <view class="seckill--price-box" v-if="activityStatus === 'noStartActivity'">
<text class="seckill--price">{{data.originalPrice}}</text> <text class="seckill--price-icon"></text>
</view> <text class="seckill--price">{{data.originalPrice}}</text>
<view class="seckill--price-box " v-else> </view>
<text class="seckill--price-icon"></text> <view class="seckill--price-box " v-else>
<text class="seckill--price">{{data.activityPrice}}</text> <text class="seckill--price-icon"></text>
<text class="seckill--price-org">{{data.originalPrice}}</text> <text class="seckill--price">{{data.activityPrice}}</text>
</view> <text class="seckill--price-org">{{data.originalPrice}}</text>
<view class="seckill--timer"> </view>
<view>{{hours}}</view> <view>
<text>:</text> <view class="seckill--timer-title">
<view>{{minute}}</view> {{activityStatus === 'startActivity' ? '距结束仅剩' : '即将开始秒杀' }}
<text>:</text> </view>
<view>{{second}}</view> <view v-if="isDay">{{startDate}}</view>
<view class="seckill--timer">
<view>{{hours}}</view>
<text>:</text>
<view>{{minute}}</view>
<text>:</text>
<view>{{second}}</view>
</view>
</view>
</view> </view>
<view class="title">{{title}}</view>
</view> </view>
</template> </template>
<script> <script>
import {formatDate} from '@/common/utils';
export default { export default {
props : { props : {
data : { data : {
@ -35,6 +45,10 @@ export default {
activityStatus : { activityStatus : {
type : String, type : String,
default : 'noStartActivity' default : 'noStartActivity'
},
title : {
type : String,
default : ''
} }
}, },
data(){ data(){
@ -63,6 +77,14 @@ export default {
second(){ second(){
let second = parseInt(this.secondNum % 60); let second = parseInt(this.secondNum % 60);
return second > 9 ? second : `0${second}`; return second > 9 ? second : `0${second}`;
},
isDay(){
const currentTime = new Date(this.data.currentTime);
const activityTime = new Date(this.data.activityStartTime);
return currentTime.getDate() === activityTime.getDate();
},
startDate(){
return formatDate(this.data.activityStartTime, 'm月d日hh:ii')
} }
}, },
methods:{ methods:{
@ -113,66 +135,70 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.seckill{ .seckill{
height: 100rpx; height: 110rpx;
width: 690rpx; width: 690rpx;
margin: 20rpx auto; margin: 20rpx auto 0;
background:linear-gradient(180deg, #FFF3EF 0%, #FFFFFF 100%);
border-radius: 16rpx;
position: relative; position: relative;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 0 20rpx 0 260rpx; padding: 0 20rpx 0 260rpx;
&::after{ background-image: url('@/static/goods/seckill.png');
position: absolute; background-repeat : no-repeat;
left: 0; background-size: 100%;
top: 0;
display: block;
content: '';
width: 367rpx;
height: 100rpx;
background: url('@/static/goods/seckill.png') no-repeat -8rpx -16rpx;
background-size: 327rpx;
}
&__start{ &__start{
padding: 0 20rpx 0 234rpx; padding: 0 20rpx 0 108rpx;
&::after{ background-image: url('@/static/goods/seckill_start.png');
width: 327rpx;
background: url('@/static/goods/seckill_start.png') no-repeat -8rpx -16rpx;
background-size: 290rpx;
}
} }
&--price-box{ &--price-box{
padding-top: 30rpx; padding-top: 30rpx;
} }
&--price-icon{ &--price-icon{
color: $color-yellow4; color: $color-grey0;
font-weight: bold;
font-size: 32rpx;
} }
&--price{ &--price{
color: $color-yellow4; color: $color-grey0;
font-size: 52rpx; font-weight: bold;
font-size: 50rpx;
} }
&--price-org{ &--price-org{
color: $color-grey4; color: $color-grey0;
text-decoration: line-through; text-decoration: line-through;
margin-left: 15rpx;
}
&--timer-title{
margin: 20rpx 0 10rpx 0;
color: $color-grey0;
text-align: right;
font-size: $font-size-sm;
} }
&--timer{ &--timer{
display: flex; display: flex;
align-items: center; align-items: center;
view{ view{
background: #000; background: #E83710;
width: 48rpx; width: 40rpx;
height: 48rpx; height: 40rpx;
line-height: 48rpx; line-height: 40rpx;
color: #fff; color: #fff;
text-align: center; text-align: center;
border-radius: 8rpx; border-radius: 8rpx;
font-size: 24rpx; font-size: $font-size-sm;
} }
text{ text{
margin: 0 5rpx; margin: 0 5rpx;
color: #fff;
} }
} }
} }
.title{
margin: 0 30rpx ;
background: $color-grey0;
border-radius: 16rpx;
padding: 30rpx;
font-size: $font-size-lg;
line-height: 48rpx;
}
</style> </style>

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-24 11:30:55 * @Date: 2022-03-24 11:30:55
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-22 20:21:28 * @LastEditTime: 2022-04-24 17:37:53
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -220,14 +220,21 @@ export default {
uni.$u.toast('请选择规格~'); uni.$u.toast('请选择规格~');
return false; return false;
} }
let query = {
mode : 'buyNow',
skuId : this.curSku.skuId,
num : this.curBuyNum,
activityType : 1
}
const {productActivityVO} = this.goodsInfo;
if(this.activityStatus === 'startActivity'){
query.activityType = 2;
query.activityId = productActivityVO.activityId;
query.activityTimeId = productActivityVO.activityTimeId;
}
this.$Router.push({ this.$Router.push({
path : '/orderSubmit', path : '/orderSubmit',
query: { query
mode : 'buyNow',
skuId : this.curSku.skuId,
num : this.curBuyNum,
activityType : this.activityStatus === 'startActivity' ? 2 : 1
}
}) })
}, },
confirm(){ confirm(){

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-23 17:27:21 * @Date: 2022-03-23 17:27:21
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-22 21:04:17 * @LastEditTime: 2022-04-24 17:51:34
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -12,9 +12,10 @@
</view> </view>
<SlideImage :images="goods.pictureList"></SlideImage> <SlideImage :images="goods.pictureList"></SlideImage>
<SeckillPrice :data.sync="productActivityVO" :activityStatus="activityStatus" <SeckillPrice :data.sync="productActivityVO" :activityStatus="activityStatus"
v-if="productActivityVO.isActivity" @change="getGoodsDetail"></SeckillPrice> v-if="productActivityVO.isActivity" @change="getGoodsDetail"
<view class="goods-info"> :title="goods.name"></SeckillPrice>
<view class="pirce" v-if="!productActivityVO.isActivity"> <view class="goods-info" v-if="!productActivityVO.isActivity">
<view class="pirce">
<text></text> <text></text>
<text class="pirce--max">{{goods.startingPrice}}</text> <text class="pirce--max">{{goods.startingPrice}}</text>
<text></text> <text></text>
@ -37,7 +38,7 @@
<view class="icon cart" @click="$Router.push('/cart')"></view> <view class="icon cart" @click="$Router.push('/cart')"></view>
</view> </view>
<view class="footer--btns"> <view class="footer--btns">
<UiButton class="btn" :disable="stock == 0 || activityStatus == startActivity" @click="onShowSkuPopup(2)"></UiButton> <UiButton class="btn" :disable="stock == 0 || activityStatus == 'startActivity'" @click="onShowSkuPopup(2)"></UiButton>
<UiButton class="btn btn--buy" :disable="stock == 0" @click="onShowSkuPopup(3)"> </UiButton> <UiButton class="btn btn--buy" :disable="stock == 0" @click="onShowSkuPopup(3)"> </UiButton>
</view> </view>
</view> </view>

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-23 16:37:30 * @Date: 2022-03-23 16:37:30
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-09 15:03:50 * @LastEditTime: 2022-04-24 15:47:06
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -73,8 +73,8 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
color: $color-grey5; color: $color-grey5;
&__active{ &__active text{
color: $color-grey6; color: $color-yellow4;
} }
} }
&--label{ &--label{

@ -2,15 +2,15 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-21 10:31:54 * @Date: 2022-03-21 10:31:54
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-19 18:09:02 * @LastEditTime: 2022-04-24 16:55:46
* @Description: file content * @Description: file content
--> -->
<template> <template>
<view> <view>
<view class="header"> <view class="header">
<UiPageHeader> <UiPageHeader>
<u--input slot="custom" class="search--input" prefixIconStyle="font-size:48rpx;color:#ccc" <u--input slot="custom" class="search--input" suffixIconStyle="font-size:48rpx;color:#ccc"
prefixIcon="search" placeholderClass="search--input__placeholder" clearable suffixIcon="search" placeholderClass="search--input__placeholder" clearable
placeholder="请输入您想要搜索的商品名称" :value="$Route.query.search" placeholder="请输入您想要搜索的商品名称" :value="$Route.query.search"
@focus="$Router.push('/search')"/> @focus="$Router.push('/search')"/>
</UiPageHeader> </UiPageHeader>
@ -28,7 +28,6 @@
<view class="title">为您精选</view> <view class="title">为您精选</view>
<BsChoiceGoods class="goods-group" ref="choiceGoods"></BsChoiceGoods> <BsChoiceGoods class="goods-group" ref="choiceGoods"></BsChoiceGoods>
</template> </template>
</view> </view>
</template> </template>
<script> <script>
@ -115,6 +114,7 @@ page {
position: sticky; position: sticky;
top: var(--window-top); top: var(--window-top);
z-index: 99; z-index: 99;
background: $color-grey0;
} }
.search--input{ .search--input{
display: block; display: block;

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-21 11:29:38 * @Date: 2022-03-21 11:29:38
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-22 14:14:25 * @LastEditTime: 2022-04-24 15:39:13
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -10,9 +10,9 @@
<UiPageHeader class="header"> <UiPageHeader class="header">
<view slot="custom" class="search"> <view slot="custom" class="search">
<u--input class="search--input" focus placeholder="请输入您想搜索的商品名称" <u--input class="search--input" focus placeholder="请输入您想搜索的商品名称"
prefixIcon="search" ref="search" clearable prefixIconStyle="font-size:48rpx;color:#ccc" suffixIcon="search" ref="search" clearable suffixIconStyle="font-size:48rpx;color:#ccc"
v-model="searchValue" placeholderClass="search--input__placeholder"></u--input> v-model="searchValue" placeholderClass="search--input__placeholder"
<text class="search--btn" @click="onSearch"></text> @confirm="onSearch" />
</view> </view>
</UiPageHeader> </UiPageHeader>
<view class="history" v-if="historyList.length"> <view class="history" v-if="historyList.length">
@ -60,7 +60,7 @@ export default {
const { searchValue } = this; const { searchValue } = this;
if (searchValue) { if (searchValue) {
this.setHistory(searchValue); this.setHistory(searchValue);
this.$Router.push({path:'/goodsList', query :{ this.$Router.replace({path:'/goodsList', query :{
search: searchValue search: searchValue
} }
}); });
@ -100,7 +100,7 @@ export default {
*/ */
handleQuick(searchValue) { handleQuick(searchValue) {
this.setHistory(searchValue); this.setHistory(searchValue);
this.$Router.push({path:'/goodsList', query :{ this.$Router.replace({path:'/goodsList', query :{
search: searchValue search: searchValue
} }
}); });
@ -124,7 +124,6 @@ page{
align-items: center; align-items: center;
&--input{ &--input{
display: block; display: block;
margin-right: 40rpx;
height: 70rpx; height: 70rpx;
border:none; border:none;
box-sizing: border-box; box-sizing: border-box;
@ -148,12 +147,14 @@ page{
.history { .history {
padding: 0 40rpx; padding: 0 40rpx;
&--head { &--head {
font-size: 26rpx; text{
color: $color-grey5; font-size: 26rpx;
color: $color-grey4;
}
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin: 40rpx 0; margin: 40rpx 0 20rpx;
} }
&--del{ &--del{
width: 27rpx; width: 27rpx;
@ -164,16 +165,17 @@ page{
flex-wrap: wrap; flex-wrap: wrap;
} }
&--item{ &--item{
max-width: 276rpx; max-width: 460rpx;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap;
height: 70rpx; height: 70rpx;
line-height: 70rpx; line-height: 70rpx;
padding: 0 20rpx; padding: 0 20rpx;
font-size: 26rpx; font-size: 26rpx;
color: $color-grey5; color: $color-grey5;
background: $color-grey1; background: $color-grey1;
margin: 10rpx 18rpx 10rpx 0; margin: 10rpx;
} }
} }

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-20 14:14:53 * @Date: 2022-03-20 14:14:53
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-22 19:51:14 * @LastEditTime: 2022-04-24 17:45:41
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -123,6 +123,8 @@ export default {
res = await ApiGetBeforeOrder({ res = await ApiGetBeforeOrder({
productSkuId : query.skuId, productSkuId : query.skuId,
quantity : query.num, quantity : query.num,
activityId : query.activityId,
activityTimeId : query.activityTimeId,
// 1 2 // 1 2
activityType : query.activityType, activityType : query.activityType,
recipientAddressId : addressId recipientAddressId : addressId
@ -155,6 +157,8 @@ export default {
recipientAddressId : this.address.id, recipientAddressId : this.address.id,
shoppingCartIds : query.ids ? query.ids.split(',') : [], shoppingCartIds : query.ids ? query.ids.split(',') : [],
products : this.orderInfo.products.map(i => ({ products : this.orderInfo.products.map(i => ({
activityId : query.activityId,
activityTimeId : query.activityTimeId,
productId : i.productId, productId : i.productId,
productSkuId : i.productSkuId, productSkuId : i.productSkuId,
quantity : i.quantity, quantity : i.quantity,

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-21 18:08:07 * @Date: 2022-03-21 18:08:07
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-24 11:46:48 * @LastEditTime: 2022-04-24 17:11:09
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -16,34 +16,32 @@
<text>{{item.isInProgress ? '抢购中' : '即将开抢'}}</text> <text>{{item.isInProgress ? '抢购中' : '即将开抢'}}</text>
</view> </view>
</view> </view>
<view class="goods"> <view class="goods-item" v-for="item in goodsList" :key="item.productId"
<view class="goods-item" v-for="item in goodsList" :key="item.productId" @click="$Router.push(`/goodsDetail?id=${item.productId}`)">
@click="$Router.push(`/goodsDetail?id=${item.productId}`)"> <image class="goods-item--image" :src="item.productMainPicture"/>
<image class="goods-item--image" :src="item.productMainPicture"/> <view class="goods-item--con">
<view class="goods-item--con"> <text class="goods-item--title">{{item.productName}}</text>
<text class="goods-item--title">{{item.productName}}</text> <view class="goods-item--prog-box">
<view class="goods-item--prog-box"> <u-line-progress class="goods-item--prog" :percentage="30" :showText="false" height="11rpx" activeColor="#FE0A16" inactiveColor="#FF8E8F" />
<u-line-progress class="goods-item--prog" :percentage="30" :showText="false" height="11rpx" activeColor="#FE0A16" inactiveColor="#FF8E8F" /> <text>仅剩{{item.stock}}</text>
<text>仅剩{{item.stock}}</text> </view>
<view class="goods-item--operation">
<view>
<view class="goods-item--price">{{item.activityPrice}}</view>
<text class="goods-item--orgPrice">{{item.originalPrice}}</text>
</view> </view>
<view class="goods-item--operation"> <template v-if="activityTime.isInProgress">
<view> <button v-if="item.stock > 0" class="goods-item--btn" >立即抢购
<view class="goods-item--price">{{item.activityPrice}}</view>
<text class="goods-item--orgPrice">{{item.originalPrice}}</text>
</view>
<template v-if="activityTime.isInProgress">
<button v-if="item.stock > 0" class="goods-item--btn" >立即抢购
</button>
<button v-else class="goods-item--btn goods-item--btn__disable">已售罄
</button>
</template>
<button v-else class="goods-item--btn">即将开抢
</button> </button>
</view> <button v-else class="goods-item--btn goods-item--btn__disable">已售罄
</button>
</template>
<button v-else class="goods-item--btn">即将开抢
</button>
</view> </view>
</view> </view>
<u-loadmore :status="loadingStatus" color="#fff" iconColor="#fff" nomoreText="我也是有底线的啦~"/>
</view> </view>
<u-loadmore :status="loadingStatus" color="#fff" iconColor="#fff" nomoreText="我也是有底线的啦~"/>
</view> </view>
</template> </template>
@ -110,6 +108,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
page{ page{
background: #F53739; background: #F53739;
padding-bottom: 30rpx;
} }
.back{ .back{
width: 14rpx; width: 14rpx;
@ -167,16 +166,8 @@ page{
font-size: $font-size-lg; font-size: $font-size-lg;
} }
} }
.goods{
min-height: calc(100vh - 826rpx);
overflow: hidden;
margin: 0 20rpx;
padding: 10rpx 30rpx 0;
background: #DF1F21;
box-shadow: 0 10rpx 20rpx rgba($color: #000000, $alpha: .1) inset;
}
.goods-item{ .goods-item{
width: 650rpx; width: 690rpx;
height: 258rpx; height: 258rpx;
margin: 30rpx auto; margin: 30rpx auto;
border-radius: 12rpx; border-radius: 12rpx;
@ -185,14 +176,14 @@ page{
box-sizing: border-box; box-sizing: border-box;
background: linear-gradient(181deg, #FFF1D5 0%, #FBE0BB 21%, #F7CFA1 88%, #F7CFA1 100%); background: linear-gradient(181deg, #FFF1D5 0%, #FBE0BB 21%, #F7CFA1 88%, #F7CFA1 100%);
&--image{ &--image{
width: 190rpx; width: 200rpx;
height: 190rpx; height: 200rpx;
background: #F0EEE6; background: #F0EEE6;
border-radius: 12rpx; border-radius: 12rpx;
margin-right: 30rpx; margin-right: 30rpx;
} }
&--con{ &--con{
width: 378rpx; width: 400rpx;
padding-top: 10rpx; padding-top: 10rpx;
} }
&--title{ &--title{
@ -200,12 +191,14 @@ page{
line-height: 32rpx; line-height: 32rpx;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
width: 378rpx; width: 378rpx;
display: block; color: #791704;
} }
&--prog-box{ &--prog-box{
margin-top: 24rpx; margin-top: 16rpx;
display: flex; display: flex;
justify-content: start; justify-content: start;
align-items: center; align-items: center;
@ -223,7 +216,7 @@ page{
&--operation{ &--operation{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 24rpx; margin-top: 16rpx;
align-items: flex-end; align-items: flex-end;
} }
&--price{ &--price{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Loading…
Cancel
Save