temp commit

master
学习很差啦 2022-09-14 10:43:40 +08:00
parent 132c64f438
commit a1a286dfb6
11 changed files with 691 additions and 603 deletions

View File

@ -0,0 +1,79 @@
<template>
</template>
<script>
export default {
methods: {
//
lightSearchStr(keyword, str) {
if (!keyword) {
return str
} else {
let unicodes = '';
for (let i of Array.from(keyword)) {
unicodes += this.unicode(i) + "|"
}
const rule = '(' + unicodes + ')'
const reg = new RegExp(rule, 'gi');
return str ? str.replace(reg, matchValue =>
`<span style="color:${this.lightColor}">${matchValue}</span>`
) : ''
}
},
// unicode
unicode(str) {
var value = '';
for (var i = 0; i < str.length; i++) {
value += '\\u' + this.left_zero_4(parseInt(str.charCodeAt(i)).toString(16));
}
return value;
},
left_zero_4(str) {
if (str != null && str != '' && str != 'undefined') {
if (str.length == 2) {
return '00' + str;
}
}
return str;
},
// 1999 --> [1999,00]
formatPrice(val) {
if (typeof val == "undefined") {
return val;
}
return val.toFixed(2).split(".");
},
//
getPromotion(item) {
if (item.promotionMap) {
let array = [];
Object.keys(item.promotionMap).forEach((child) => {
if (!array.includes(child.split("-")[0])) {
array.push(child.split("-")[0]);
}
});
return array;
}
},
//
navigateToDetailPage(item) {
uni.navigateTo({
url: `/pages/product/goods?id=${item.content.id}&goodsId=${item.content.goodsId}`,
});
},
//
navigateToStoreDetailPage(item) {
uni.navigateTo({
url: `/pages/product/shopPage?id=${item.content.storeId}`,
});
},
},
}
</script>
<style lang='scss' scoped>
</style>

View File

@ -101,12 +101,15 @@
</template>
<script>
import commonTpl from '@/components/m-goods-list/common'
export default {
data() {
return {
lightColor: this.$mainColor
}
},
mixins: [commonTpl],
props: {
//
res: {
@ -142,203 +145,137 @@
},
methods: {
//
lightSearchStr(keyword, str) {
if (!keyword) {
return str
} else {
let unicodes = '';
for (let i of Array.from(keyword)) {
unicodes += this.unicode(i) + "|"
}
const rule = '(' + unicodes + ')'
const reg = new RegExp(rule, 'gi');
return str ? str.replace(reg, matchValue =>
`<span style="color:${this.lightColor}">${matchValue}</span>`
) : ''
}
},
// unicode
unicode(str) {
var value = '';
for (var i = 0; i < str.length; i++) {
value += '\\u' + this.left_zero_4(parseInt(str.charCodeAt(i)).toString(16));
}
return value;
},
left_zero_4(str) {
if (str != null && str != '' && str != 'undefined') {
if (str.length == 2) {
return '00' + str;
}
}
return str;
},
// 1999 --> [1999,00]
formatPrice(val) {
if (typeof val == "undefined") {
return val;
}
return val.toFixed(2).split(".");
},
//
getPromotion(item) {
if (item.promotionMap) {
let array = [];
Object.keys(item.promotionMap).forEach((child) => {
if (!array.includes(child.split("-")[0])) {
array.push(child.split("-")[0]);
}
});
return array;
}
},
//
navigateToDetailPage(item) {
uni.navigateTo({
url: `/pages/product/goods?id=${item.content.id}&goodsId=${item.content.goodsId}`,
});
},
//
navigateToStoreDetailPage(item) {
uni.navigateTo({
url: `/pages/product/shopPage?id=${item.content.storeId}`,
});
},
}
}
</script>
<style lang='scss' scoped>
/* 商品列表 */
.goods-list {
display: flex;
flex-wrap: wrap;
margin: 10rpx 20rpx 284rpx;
width: 100%;
>.goods-item {
background-color: #ffffff;
/* 商品列表 */
.goods-list {
display: flex;
border-radius: 16rpx;
flex-direction: column;
width: calc(50% - 30rpx);
margin-bottom: 20rpx;
padding-bottom: 20rpx;
&:nth-child(2n + 1) {
margin-right: 20rpx;
flex-wrap: wrap;
margin: 10rpx 20rpx 284rpx;
width: 100%;
>.goods-item {
background-color: #ffffff;
display: flex;
border-radius: 16rpx;
flex-direction: column;
width: calc(50% - 30rpx);
margin-bottom: 20rpx;
padding-bottom: 20rpx;
&:nth-child(2n + 1) {
margin-right: 20rpx;
}
.image-wrapper {
width: 100%;
height: 330rpx;
border-radius: 16rpx 16rpx 0 0;
overflow: hidden;
padding: 0;
}
}
.image-wrapper {
width: 100%;
height: 330rpx;
border-radius: 16rpx 16rpx 0 0;
.count-config,
.store-seller-name {
font-size: $font-sm;
}
.text-hidden {
overflow: hidden;
padding: 0;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.count-config,
.store-seller-name {
font-size: $font-sm;
}
.text-hidden {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.goods-row {
background: #fff;
padding: 16rpx;
>.goods-col {
display: flex;
>.goods-img {
overflow: hidden;
flex: 4;
}
>.goods-detail {
flex: 7;
}
}
}
.goods-detail {
margin: 0 20rpx;
>.title {
font-size: $font-base;
color: $font-color-dark;
line-height: 1.5;
height: 84rpx;
padding: 10rpx 0 0;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.promotion {
margin-top: 4rpx;
display: flex;
div {
span {
font-size: 24rpx;
color: $light-color;
margin-right: 10rpx;
padding: 0 4rpx;
border-radius: 2rpx;
.goods-row {
background: #fff;
padding: 16rpx;
>.goods-col {
display: flex;
>.goods-img {
overflow: hidden;
flex: 4;
}
>.goods-detail {
flex: 7;
}
}
}
.store-seller-name {
color: #666;
overflow: hidden;
display: flex;
justify-content: space-between;
}
.count-config {
padding: 5rpx 0;
color: #666;
display: flex;
font-size: 24rpx;
justify-content: space-between;
}
>.price-box {
margin-top: 10rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 10rpx;
font-size: 24rpx;
color: $font-color-light;
>.price {
font-size: 26rpx;
line-height: 1;
color: $main-color;
font-weight: bold;
/deep/ span:nth-of-type(1) {
font-size: 38rpx;
.goods-detail {
margin: 0 20rpx;
>.title {
font-size: $font-base;
color: $font-color-dark;
line-height: 1.5;
height: 84rpx;
padding: 10rpx 0 0;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.promotion {
margin-top: 4rpx;
display: flex;
div {
span {
font-size: 24rpx;
color: $light-color;
margin-right: 10rpx;
padding: 0 4rpx;
border-radius: 2rpx;
}
}
}
.store-seller-name {
color: #666;
overflow: hidden;
display: flex;
justify-content: space-between;
}
.count-config {
padding: 5rpx 0;
color: #666;
display: flex;
font-size: 24rpx;
justify-content: space-between;
}
>.price-box {
margin-top: 10rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 10rpx;
font-size: 24rpx;
color: $font-color-light;
>.price {
font-size: 26rpx;
line-height: 1;
color: $main-color;
font-weight: bold;
/deep/ span:nth-of-type(1) {
font-size: 38rpx;
}
}
}
}
}
</style>
</style>

View File

@ -0,0 +1,190 @@
<template>
<div>
<div v-for="(item, index) in res" :key="index" class="goods-row">
<div class="flex goods-col">
<div class="goods-img" @click="navigateToDetailPage(item)">
<u-image width="230rpx" border-radius='16' height="230rpx" :src="item.goodsImage">
<u-loading slot="loading"></u-loading>
</u-image>
</div>
<div class="goods-detail">
<div class="title clamp3" @click="navigateToDetailPage(item)">{{ item.goodsName }}</div>
<view class="price-box" @click="navigateToDetailPage(item)">
<div class="price" v-if="item.price!=undefined">
¥<span>{{ formatPrice(item.price )[0] }} </span>.{{
formatPrice(item.price )[1]
}}
</div>
</view>
<div class="promotion" @click="navigateToDetailPage(item)">
<div v-if="item.salesModel == 'WHOLESALE'">
<span></span>
</div>
<div v-for="(promotionItem,promotionIndex) in getPromotion(item)" :key="promotionIndex">
<span v-if="promotionItem.indexOf('COUPON') != -1"></span>
<span v-if="promotionItem.indexOf('FULL_DISCOUNT') != -1"></span>
<span v-if="promotionItem.indexOf('SECKILL') != -1"></span>
</div>
</div>
<div style="overflow: hidden" @click="navigateToDetailPage(item)" class="count-config">
<span style="float: left; font-size: 22rpx">已售 {{ item.buyCount || '0' }}</span>
<span style="float: right; font-size: 22rpx">{{ item.commentNum || '0' }}条评论</span>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import commonTpl from '@/components/m-goods-list/common'
export default {
data() {
return {
lightColor: this.$mainColor
}
},
mixins: [commonTpl],
props: {
//
res: {
type: Array,
default: () => {
return []
}
},
}
}
</script>
<style lang='scss' scoped>
.goods-list {
display: flex;
flex-wrap: wrap;
margin: 10rpx 20rpx 284rpx;
width: 100%;
>.goods-item {
background-color: #ffffff;
display: flex;
border-radius: 16rpx;
flex-direction: column;
width: calc(50% - 30rpx);
margin-bottom: 20rpx;
padding-bottom: 20rpx;
&:nth-child(2n + 1) {
margin-right: 20rpx;
}
.image-wrapper {
width: 100%;
height: 330rpx;
border-radius: 16rpx 16rpx 0 0;
overflow: hidden;
padding: 0;
}
}
.count-config,
.store-seller-name {
font-size: $font-sm;
}
.text-hidden {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.goods-row {
background: #fff;
padding: 16rpx;
>.goods-col {
display: flex;
>.goods-img {
overflow: hidden;
flex: 4;
}
>.goods-detail {
flex: 7;
}
}
}
.goods-detail {
margin: 0 20rpx;
>.title {
font-size: $font-base;
color: $font-color-dark;
line-height: 1.5;
height: 84rpx;
padding: 10rpx 0 0;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.promotion {
margin-top: 4rpx;
display: flex;
div {
span {
font-size: 24rpx;
color: $light-color;
margin-right: 10rpx;
padding: 0 4rpx;
border-radius: 2rpx;
}
}
}
.store-seller-name {
color: #666;
overflow: hidden;
display: flex;
justify-content: space-between;
}
.count-config {
padding: 5rpx 0;
color: #666;
display: flex;
font-size: 24rpx;
justify-content: space-between;
}
>.price-box {
margin-top: 10rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 10rpx;
font-size: 24rpx;
color: $font-color-light;
>.price {
font-size: 26rpx;
line-height: 1;
color: $main-color;
font-weight: bold;
/deep/ span:nth-of-type(1) {
font-size: 38rpx;
}
}
}
}
</style>

View File

@ -4,8 +4,12 @@
*/
// 开发环境
const dev = {
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
// common: "https://common-api.pickmall.cn",
// buyer: "https://buyer-api.pickmall.cn",
common: "http://192.168.0.106:8890",
buyer: "http://192.168.0.106:8888",
};

View File

@ -2,8 +2,8 @@
"name" : "lili商城",
"appid" : "__UNI__EC9FD60",
"description" : "",
"versionName" : "4.2.6",
"versionCode" : 4000260,
"versionName" : "4.2.5",
"versionCode" : 4000250,
"transformPx" : false,
"app-plus" : {
"compatible" : {

View File

@ -24,7 +24,7 @@
<view>
<!-- 根据scopeType 判断是否是 平台品类或店铺 -->
<view class="coupon-title wes-3" v-if="item.scopeType">
<span v-if="item.scopeType == 'ALL' && item.storeId == 'platform'"></span>
<span v-if="item.scopeType == 'ALL' && item.storeId == '0'"></span>
<span v-if="item.scopeType == 'PORTION_CATEGORY'"></span>
<view v-else>{{ item.storeName == 'platform' ? '' :item.storeName+'' }}使
</view>

View File

@ -88,10 +88,10 @@ page {
</style>
<style lang="scss" scoped>
.wrapper {
background: url("https://lilishop-oss.oss-cn-beijing.aliyuncs.com/aac88f4e8eff452a8010af42c4560b04.png");
background: url("https://lili-system.oss-cn-beijing.aliyuncs.com/kanjia.png");
background-repeat: no-repeat;
background-size: 100% 100%;
height: 700rpx;
height: 600rpx;
width: 100%;
}
@ -99,7 +99,7 @@ page {
background: #fff;
border-radius: 20rpx;
position: relative;
top: 750rpx;
top: 650rpx;
width: 94%;
margin: 0 auto;
> .bargain {

View File

@ -1,387 +1,264 @@
<template>
<view class="sale">
<view class="sale-head">
<image src="@/pages/promotion/static/head-sample.png"></image>
</view>
<scroll-view scroll-x>
<view class="index-navs">
<view class="index-nav-v">
<view class="index-nav" :class="{ 'index-nav-active': nav == index }" @click="clickNavigateTime(index)"
v-for="(item, index) in timeLine" :key="index">
{{ item.timeLine }}:00
<view class="index-nav-desc">{{ index === 0 && item.distanceStartTime === 0 ? '抢购中' : '即将开始' }}
</view>
</view>
</view>
</view>
<view class="trailer" v-if="timeLine[nav] && times">
{{ timeLine[nav].distanceStartTime === 0 ? (onlyOne ? '距结束' : '距下一轮') : '距开始' }}
{{ times.hours == '00' ? '0' : times.hours }}小时{{ times.minutes }}{{ times.seconds }}
</view>
</scroll-view>
<view class="sale-items" v-if="goodsList.length > 0">
<view class="sale-item" v-for="(item,index) in goodsList" :key="index">
<view class="sale-item-img">
<image :src="item.goodsImage" mode="aspectFill"></image>
</view>
<view class="sale-item-content">
<view class="sale-item-title">
{{ item.goodsName }}
<view class="sale-item-title-desc"></view>
</view>
<view class="sale-item-price">
<text class="sale-item-price-now">¥{{ item.price | unitPrice}}</text>
<text class="sale-item-price-origin"> ¥{{ item.originalPrice | unitPrice }}</text>
</view>
<view class="sale-item-surplus">
仅剩{{ item.quantity - item.salesNum }}
<view class="sale-item-surplus-text"
:style="{ width: (item.quantity / (item.quantity - item.salesNum)) * 100 + '%' }">
</view>
</view>
<view class="sale-item-btn" @click="navigateToGoodsDetail(item)">
{{ timeLine[nav].distanceStartTime === 0 ? (item.salesNum === item.quantity ? '已售空' : '购买') : '即将开始' }}
</view>
</view>
</view>
</view>
<view v-else>
<view class="nodata">
<image style="height: 240rpx;width: 320rpx;" src="/static/nodata.png" alt="" />
<div>暂无商品</div>
</view>
</view>
<view class="sale">
<view class="sale-head">
<image src="@/pages/promotion/static/head-sample.png"></image>
</view>
<scroll-view scroll-x>
<view class="index-navs">
<view class="index-nav-v">
<view class="index-nav" :class="{ 'index-nav-active': nav == index }"
@click="clickNavigateTime(index)" v-for="(item, index) in timeLine" :key="index">
{{ item.timeLine }}:00
<view class="index-nav-desc">{{ index === 0 && item.distanceStartTime === 0 ? '抢购中' : '即将开始' }}
</view>
</view>
</view>
</view>
<view class="trailer" v-if="timeLine[nav] && times">
{{ timeLine[nav].distanceStartTime === 0 ? (onlyOne ? '距结束' : '距下一轮') : '距开始' }}
{{ times.hours == '00' ? '0' : times.hours }}小时{{ times.minutes }}{{ times.seconds }}
</view>
</scroll-view>
<view class="sale-items" v-if="goodsList.length > 0">
<goodsTemplate :res="goodsList" />
</view>
</view>
<view v-else>
<view class="nodata">
<image style="height: 240rpx;width: 320rpx;" src="/static/nodata.png" alt="" />
<div>暂无商品</div>
</view>
</view>
</view>
</template>
<script>
import { getSeckillTimeLine, getSeckillTimeGoods } from "@/api/promotions.js";
import Foundation from "@/utils/Foundation.js";
export default {
data() {
return {
nav: 0, //
timeLine: "", //
resTime: 0, //
time: 0, //
times: {}, //
onlyOne: "", //
goodsList: [], //
params: {
pageNumber: 1,
pageSize: 10,
},
};
},
import {
getSeckillTimeLine,
getSeckillTimeGoods
} from "@/api/promotions.js";
import Foundation from "@/utils/Foundation.js";
import goodsTemplate from '@/components/m-goods-list/seckill.vue'
export default {
components: {
goodsTemplate
},
data() {
return {
nav: 0, //
timeLine: "", //
resTime: 0, //
time: 0, //
times: {}, //
onlyOne: "", //
goodsList: [], //
params: {
pageNumber: 1,
pageSize: 10,
},
};
},
/**
* 显示时间活动
*/
async onShow() {
await this.getTimeLine();
if (!this.timeLine) {
await uni.showToast({
icon: "none",
duration: 2000,
title: "今天没有活动,明天再来吧",
});
}
this._setTimeInterval = setInterval(() => {
if (this.time <= 0) {
clearInterval(this._setTimeInterval);
this.getGoodsList();
this.getTimeLine();
} else {
this.times = Foundation.countTimeDown(this.time);
this.time--;
}
}, 1000);
},
/**
* 显示时间活动
*/
async onShow() {
await this.getTimeLine();
if (!this.timeLine) {
await uni.showToast({
icon: "none",
duration: 2000,
title: "今天没有活动,明天再来吧",
});
}
this._setTimeInterval = setInterval(() => {
if (this.time <= 0) {
clearInterval(this._setTimeInterval);
this.getGoodsList();
this.getTimeLine();
} else {
this.times = Foundation.countTimeDown(this.time);
this.time--;
}
}, 1000);
},
onUnload() {
this._setTimeInterval && clearInterval(this._setTimeInterval);
},
methods: {
/**
* 获取时间线商品
*/
async getTimeLine() {
let res = await getSeckillTimeLine();
if (res.data.success && res.data.result.length > 0) {
let timeLine = res.data.result.sort(
(x, y) => Number(x.timeLine) - Number(y.timeLine)
);
this.timeLine = timeLine.slice(0, 5);
this.resTime = parseInt(new Date().getTime() / 1000);
this.onlyOne = res.data.result.length === 1;
this.diffTime = parseInt(new Date().getTime() / 1000) - this.resTime;
onUnload() {
this._setTimeInterval && clearInterval(this._setTimeInterval);
},
methods: {
/**
* 获取时间线商品
*/
async getTimeLine() {
let res = await getSeckillTimeLine();
if (res.data.success && res.data.result.length > 0) {
let timeLine = res.data.result.sort(
(x, y) => Number(x.timeLine) - Number(y.timeLine)
);
this.timeLine = timeLine.slice(0, 5);
this.resTime = parseInt(new Date().getTime() / 1000);
this.onlyOne = res.data.result.length === 1;
this.diffTime = parseInt(new Date().getTime() / 1000) - this.resTime;
this.time =
this.timeLine[this.nav].distanceStartTime ||
(this.timeLine[this.nav + 1] &&
this.timeLine[this.nav + 1].distanceStartTime) ||
Foundation.theNextDayTime() - this.diffTime;
this.times = Foundation.countTimeDown(this.time);
this.time =
this.timeLine[this.nav].distanceStartTime ||
(this.timeLine[this.nav + 1] &&
this.timeLine[this.nav + 1].distanceStartTime) ||
Foundation.theNextDayTime() - this.diffTime;
this.times = Foundation.countTimeDown(this.time);
this.getGoodsList();
}
},
this.getGoodsList();
}
},
/**
* 获取商品集合
*/
async getGoodsList() {
this.params.timeLine = this.timeLine[this.nav].timeLine;
let res = await getSeckillTimeGoods(this.params.timeLine);
if (res.data.success && res.data.result.length != 0) {
this.goodsList = res.data.result;
} else {
this.goodsList = [];
}
},
/**
* 获取商品集合
*/
async getGoodsList() {
this.params.timeLine = this.timeLine[this.nav].timeLine;
let res = await getSeckillTimeGoods(this.params.timeLine);
if (res.data.success && res.data.result.length != 0) {
this.goodsList = res.data.result;
} else {
this.goodsList = [];
}
},
/**
* 跳转到商品详情
*/
navigateToGoodsDetail(item) {
if (
item.sold_num === item.quantity ||
this.timeLine[this.nav].distanceStartTime !== 0
) {
return;
} else {
uni.navigateTo({
url: `/pages/product/goods?id=${item.skuId}&goodsId=${item.goodsId}`,
});
}
},
/**
* 跳转到商品详情
*/
navigateToGoodsDetail(item) {
if (
item.sold_num === item.quantity ||
this.timeLine[this.nav].distanceStartTime !== 0
) {
return;
} else {
uni.navigateTo({
url: `/pages/product/goods?id=${item.skuId}&goodsId=${item.goodsId}`,
});
}
},
/**
* 单击导航时间
*/
clickNavigateTime(type) {
this.nav = type;
this.goodsList = [];
this.diffTime = parseInt(new Date().getTime() / 1000) - this.resTime;
this.time =
this.timeLine[this.nav].distanceStartTime ||
(this.timeLine[this.nav + 1] &&
this.timeLine[this.nav + 1].distanceStartTime) ||
Foundation.theNextDayTime() - this.diffTime;
/**
* 单击导航时间
*/
clickNavigateTime(type) {
this.nav = type;
this.goodsList = [];
this.diffTime = parseInt(new Date().getTime() / 1000) - this.resTime;
this.time =
this.timeLine[this.nav].distanceStartTime ||
(this.timeLine[this.nav + 1] &&
this.timeLine[this.nav + 1].distanceStartTime) ||
Foundation.theNextDayTime() - this.diffTime;
this.times = Foundation.countTimeDown(this.time);
this.getGoodsList();
},
},
};
this.times = Foundation.countTimeDown(this.time);
this.getGoodsList();
},
},
};
</script>
<style lang="scss" scoped>
.sale {
width: 100%;
min-height: 100vh;
background-color: #f7f7f7;
}
.sale {
width: 100%;
min-height: 100vh;
background-color: #f7f7f7;
}
.nodata {
flex-direction: column;
display: flex;
width: 100%;
justify-content: center;
align-items: center;
margin-top: 40rpx;
.nodata {
flex-direction: column;
display: flex;
width: 100%;
justify-content: center;
align-items: center;
margin-top: 40rpx;
> div {
font-size: 24rpx;
margin-top: 20rpx;
color: #666;
}
}
>div {
font-size: 24rpx;
margin-top: 20rpx;
color: #666;
}
}
.sale-head {
image {
width: 100%;
height: 280rpx;
}
}
.sale-head {
image {
width: 100%;
height: 280rpx;
}
}
.sale-items {
padding-top: 20rpx;
display: -webkit-box;
display: -webkit-flex;
display: flex;
align-items: center;
flex-direction: column;
}
.sale-items {
padding-top: 20rpx;
}
.sale-item {
width: 710rpx;
height: 226rpx;
padding-left: 20rpx;
margin-bottom: 10rpx;
border-radius: 12rpx;
background-color: #fff;
position: relative;
display: -webkit-box;
display: -webkit-flex;
display: flex;
align-items: center;
}
.trailer {
height: 100rpx;
background: #ffffff;
display: -webkit-box;
display: -webkit-flex;
display: flex;
justify-content: center;
align-items: center;
font-size: 22rpx;
color: #666666;
box-sizing: border-box;
position: relative;
z-index: 0;
}
.sale-item-img {
margin-right: 20rpx;
image {
width: 186rpx;
height: 186rpx;
border-radius: 8rpx;
}
}
.index-navs {
background-color: #f7f7f7;
display: -webkit-box;
display: -webkit-flex;
display: flex;
align-items: center;
justify-content: space-between;
}
.sale-item-content {
line-height: 2em;
}
.index-nav-v {
display: -webkit-box;
display: -webkit-flex;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.sale-item-title {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
line-height: 1.5;
font-size: 28rpx;
color: #333;
}
.index-nav {
font-size: 28rpx;
display: -webkit-box;
display: -webkit-flex;
display: flex;
justify-content: center;
align-items: center;
width: 150rpx;
flex-direction: column;
color: #bababa;
height: 115rpx;
line-height: 1em;
position: relative;
.sale-item-title-desc {
font-size: 22rpx;
color: #999;
}
&-active {
background-image: url(/static/seckill/active.png);
background-size: 100% 115rpx;
background-repeat: no-repeat;
color: #ffffff;
position: relative;
z-index: 30;
.sale-item-price {
font-size: 22rpx;
color: 999;
}
.index-nav-desc {
color: #ffffff;
}
}
}
.sale-item-price-now {
font-size: 40rpx;
color: #ff5a10;
margin: 0 10rpx;
}
.sale-item-price-origin {
font-size: 20rpx;
color: #999;
-webkit-text-decoration-line: line-through;
text-decoration-line: line-through;
text-decoration: line-through;
}
.sale-item-surplus {
border: 2rpx solid rgb(34, 178, 140);
border-radius: 12px;
width: 166rpx;
color: rgb(31, 177, 138);
font-size: 20rpx;
position: relative;
text-align: center;
z-index: 2;
height: 32rpx;
line-height: 28rpx;
overflow: hidden;
}
.sale-item-surplus-text {
width: 166rpx;
background: rgb(234, 247, 245);
position: absolute;
top: 0;
left: 0;
z-index: -1;
height: 100%;
}
.sale-item-btn {
position: absolute;
right: 20rpx;
bottom: 20rpx;
padding: 0 20rpx;
height: 60rpx;
background-color: #1abc9c;
border-radius: 10rpx;
font-size: 25rpx;
color: #fff;
display: -webkit-box;
display: -webkit-flex;
display: flex;
justify-content: center;
align-items: center;
}
.trailer {
height: 100rpx;
background: #ffffff;
display: -webkit-box;
display: -webkit-flex;
display: flex;
justify-content: center;
align-items: center;
font-size: 22rpx;
color: #666666;
box-sizing: border-box;
position: relative;
z-index: 0;
}
.index-navs {
background-color: #f7f7f7;
display: -webkit-box;
display: -webkit-flex;
display: flex;
align-items: center;
justify-content: space-between;
}
.index-nav-v {
display: -webkit-box;
display: -webkit-flex;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.index-nav {
font-size: 28rpx;
display: -webkit-box;
display: -webkit-flex;
display: flex;
justify-content: center;
align-items: center;
width: 150rpx;
flex-direction: column;
color: #bababa;
height: 115rpx;
line-height: 1em;
position: relative;
&-active {
background-image: url(/static/seckill/active.png);
background-size: 100% 115rpx;
background-repeat: no-repeat;
color: #ffffff;
position: relative;
z-index: 30;
.index-nav-desc {
color: #ffffff;
}
}
}
.index-nav-desc {
margin-top: 8rpx;
font-size: 22rpx;
color: #bababa;
}
.index-nav-desc {
margin-top: 8rpx;
font-size: 22rpx;
color: #bababa;
}
</style>

View File

@ -854,7 +854,8 @@ function downloadPopup(data, callback, cancelCallback, rebootCallback) {
export default function (isPrompt = false) {
getCurrentNo((version) => {
getServerNo((res) => {
if (res.versionCode.replace(/\./g, "") <= version.version.replace(/\./g, "") ) {
if (res.versionCode.replace(/\./g, "") <= version.version.replace(/\./g, "")) {
return false;
}

BIN
static/buy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -109,63 +109,63 @@ text {
}
// flex
@for $i from 0 through 12 {
.u-flex-#{$i} {
flex: $i;
}
}
// @for $i from 0 through 12 {
// .u-flex-#{$i} {
// flex: $i;
// }
// }
// (px)20px
@for $i from 9 to 20 {
.u-font-#{$i} {
font-size: $i + px;
}
}
// // (px)20px
// @for $i from 9 to 20 {
// .u-font-#{$i} {
// font-size: $i + px;
// }
// }
// (rpx)20rpx
@for $i from 20 through 40 {
.u-font-#{$i} {
font-size: $i + rpx;
}
}
// // (rpx)20rpx
// @for $i from 20 through 40 {
// .u-font-#{$i} {
// font-size: $i + rpx;
// }
// }
// 1-80
@for $i from 0 through 80 {
// 5
@if $i % 2 == 0 or $i % 5 == 0 {
// u-margin-30u-m-30
.u-margin-#{$i}, .u-m-#{$i} {
margin: $i + rpx!important;
}
// // 1-80
// @for $i from 0 through 80 {
// // 5
// @if $i % 2 == 0 or $i % 5 == 0 {
// // u-margin-30u-m-30
// .u-margin-#{$i}, .u-m-#{$i} {
// margin: $i + rpx!important;
// }
// u-padding-30u-p-30
.u-padding-#{$i}, .u-p-#{$i} {
padding: $i + rpx!important;
}
// // u-padding-30u-p-30
// .u-padding-#{$i}, .u-p-#{$i} {
// padding: $i + rpx!important;
// }
@each $short, $long in l left, t top, r right, b bottom {
// u-m-l-30
//
.u-m-#{$short}-#{$i} {
margin-#{$long}: $i + rpx!important;
}
// @each $short, $long in l left, t top, r right, b bottom {
// // u-m-l-30
// //
// .u-m-#{$short}-#{$i} {
// margin-#{$long}: $i + rpx!important;
// }
//
.u-p-#{$short}-#{$i} {
padding-#{$long}: $i + rpx!important;
}
// //
// .u-p-#{$short}-#{$i} {
// padding-#{$long}: $i + rpx!important;
// }
// u-margin-left-30
//
.u-margin-#{$long}-#{$i} {
margin-#{$long}: $i + rpx!important;
}
// // u-margin-left-30
// //
// .u-margin-#{$long}-#{$i} {
// margin-#{$long}: $i + rpx!important;
// }
//
.u-padding-#{$long}-#{$i} {
padding-#{$long}: $i + rpx!important;
}
}
}
}
// //
// .u-padding-#{$long}-#{$i} {
// padding-#{$long}: $i + rpx!important;
// }
// }
// }
// }