颜色,字号设置

msb_beta
ch 3 years ago
parent f1fc41bb62
commit 43addf3541

@ -2,32 +2,33 @@
* @Author: ch
* @Date: 2019-04-01 01:47:12
* @LastEditors: ch
* @LastEditTime: 2022-03-29 10:29:13
* @LastEditTime: 2022-04-09 14:59:18
* @Description: file content
-->
<script>
export default {
onLaunch: function() {
console.log('App Launch')
// console.log('App Launch')
},
onShow: function() {
console.log('App Show')
// console.log('App Show')
// console.log(this.$route);
},
onHide: function() {
console.log('App Hide')
// console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
</style>
<style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "uview-ui/index.scss";
// *{
// font-family: 'PingFang SC-, PingFang SC';
// }
view,text{
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-size: $font-size-base;
color: $color-grey6;
}
</style>

@ -49,11 +49,11 @@ export default {
width: 100%;
padding: 50rpx;
text-align: center;
background: #fff;
background: $color-grey0;
&--tips {
font-size: 26rpx;
color: #999;
color: $color-grey4;
margin: 30rpx 0 50rpx;
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-29 16:05:06
* @LastEditors: ch
* @LastEditTime: 2022-04-06 21:34:20
* @LastEditTime: 2022-04-09 15:01:37
* @Description: file content
-->
<template>
@ -98,7 +98,7 @@ export default {
<style lang="scss" scoped>
.cityInput{
flex: 1;
font-size: 28rpx;
font-size: $font-size-base;
padding-left: 40rpx;
}
</style>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-26 10:06:38
* @LastEditors: ch
* @LastEditTime: 2022-04-08 14:55:44
* @LastEditTime: 2022-04-09 15:01:39
* @Description: file content
-->
<template>
@ -39,31 +39,31 @@ export default {
&__normal{
height: 70rpx;
line-height: 70rpx;
font-size: 28rpx;
font-size: $font-size-base;
}
&__max{
width: 690rpx;
height: 80rpx;
line-height: 80rpx;
font-size: 32rpx;
font-size: $font-size-lg;
}
&__gradual{
background: linear-gradient(270deg, #FF7F39 0%, #FFA35B 100%);
color: #fff;
background: linear-gradient(270deg, $color-yellow2 0%, $color-yellow1 100%);
color: $color-grey0;
}
&__solid{
background: #FF875B;
color: #fff;
background: $color-yellow3;
color: $color-grey0;
}
&__line{
background: none;
color: #333;
color: $color-grey6;
border: 1px solid rgb(192, 185, 185);
}
&__primaryLine{
background: none;
color: #FF875B;
border: 1px solid #FF875B;
color: $color-yellow3;
border: 1px solid $color-yellow3;
}
&__disabed{
opacity: .8;

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-26 18:29:19
* @LastEditors: ch
* @LastEditTime: 2022-03-28 15:57:22
* @LastEditTime: 2022-04-09 15:01:40
* @Description: file content
-->
<template>
@ -45,19 +45,19 @@ export default {
<style lang="scss" scoped>
.uiCell{
min-height: 100rpx;
border-bottom: 1px solid #eee;
border-bottom: 1px solid $color-grey2;
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
background: $color-grey0;
&--title{
color: #333;
font-size: 28rpx;
color: $color-grey6;
font-size: $font-size-base;
display: block;
}
&--label{
color: #999;
font-size: 24rpx;
color: $color-grey4;
font-size: $font-size-sm;
display: block;
margin-top: 10rpx;
}
@ -65,7 +65,7 @@ export default {
flex: 1;
padding: 0 10rpx;
text-align: right;
font-size: 28rpx;
font-size: $font-size-base;
}
&--rightIcon{
width: 10rpx;

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-07 17:22:44
* @LastEditors: ch
* @LastEditTime: 2022-04-07 19:33:22
* @LastEditTime: 2022-04-09 15:02:28
* @Description: file content
-->
@ -121,7 +121,7 @@ export default {
width: 335rpx;
border-radius: 8rpx;
background: #fff;
background: $color-grey0;
margin-bottom: 30rpx;
overflow: hidden;
padding-bottom: 20rpx;
@ -129,7 +129,7 @@ export default {
width: 100%;
}
&--title{
font-size: 28rpx;
font-size: $font-size-base;
padding: 20rpx 20rpx;
line-height: 36rpx;
}
@ -139,11 +139,11 @@ export default {
justify-content: space-between;
}
&--pirce{
font-size: 32rpx;
color: #FF512B;
font-size: $font-size-lg;
color: $color-yellow4;
}
&--original-pirce{
color: #ccc;
color: $color-grey3;
font-size: 20rpx;
text-decoration: line-through;
margin-left: 15rpx;
@ -156,18 +156,18 @@ export default {
height: 40rpx;
line-height: 40rpx;
margin:20rpx 20rpx 0;
background: #FFEDE9;
background: $color-yellow0;
border-radius: 20rpx;
font-size: 22rpx;
color: #FF512B;
color: $color-yellow4;
display: flex;
&-title{
height: 40rpx;
display: block;
border-radius: 20rpx;
padding: 0 14rpx;
background: #FF512B;
color: #fff;
background: $color-yellow4;
color: $color-grey0;
}
&-desc{
flex: 1 1 auto;

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-31 14:49:33
* @LastEditors: ch
* @LastEditTime: 2022-03-31 20:26:25
* @LastEditTime: 2022-04-09 15:01:43
* @Description: file content
-->
<template>
@ -35,7 +35,7 @@ export default {
display: flex;
justify-content: space-between;
padding: 30rpx;
border-bottom: 1px solid #eee;
border-bottom: 1px solid $color-grey2;
&--image{
width: 180rpx;
height: 180rpx;
@ -45,8 +45,8 @@ export default {
width: 510rpx;
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #333;
font-size: $font-size-base;
color: $color-grey6;
line-height: 39rpx;
}
&--title{
@ -62,15 +62,15 @@ export default {
}
&--desc{
width: 510rpx;
font-size: 24rpx;
color: #999;
font-size: $font-size-sm;
color: $color-grey4;
margin-top: 20rpx;
line-height: 39rpx;
display: flex;
justify-content: space-between;
}
&--num{
font-size: 28rpx;
font-size: $font-size-base;
margin-left: 60rpx;
}
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-25 10:11:37
* @LastEditors: ch
* @LastEditTime: 2022-04-07 15:17:28
* @LastEditTime: 2022-04-09 15:02:30
* @Description: file content
-->
<template>
@ -37,7 +37,7 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
background: $color-grey0;
position: sticky;
top: var(--window-top);
z-index: 999;
@ -49,7 +49,7 @@ export default {
&--title{
flex: 1;
text-align: center;
font-size: 32rpx;
font-size: $font-size-lg;
}
&--operation{
position: absolute;

@ -13,7 +13,7 @@
<style lang="scss" scoped>
.uiWhiteBox{
margin: 20rpx 30rpx;
background: #fff;
background: $color-grey0;
border-radius: 20rpx;
}
</style>

@ -1,5 +1,5 @@
{
"name" : "demo",
"name" : "马士兵严选",
"appid" : "",
"description" : "",
"versionName" : "1.0.0",
@ -8,7 +8,7 @@
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"nvueStyleCompiler" : "马士兵严选",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
@ -76,19 +76,19 @@
"devServer" : {
"proxy" : {
"/uc/" : {
"target": "http://192.168.31.97:8090/"
"target": "http://192.168.10.52:8090/"
},
"/mall/trade/" : {
"target": "http://192.168.31.97:8090/"
"target": "http://192.168.10.52:8090/"
},
"/mall/base/" : {
"target": "http://192.168.31.97:8090/"
"target": "http://192.168.10.52:8090/"
},
"/pay/" : {
"target": "http://192.168.31.97:8090/"
"target": "http://192.168.10.52:8090/"
},
"/mall/product/" : {
"target" : "http://192.168.31.97:8090/"
"target" : "http://192.168.10.52:8090/"
}
}
}

@ -183,7 +183,7 @@
"selectedColor": "#FF875B",
"backgroundColor": "#FFF",
"borderStyle" : "white",
"fontSize" : "22rpx",
"fontSize" : "24rpx",
"height" : "120rpx",
"list": [
{

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 14:12:18
* @LastEditors: ch
* @LastEditTime: 2022-04-08 17:04:51
* @LastEditTime: 2022-04-09 15:03:36
* @Description: file content
-->
<template>
@ -27,7 +27,7 @@
</view>
<UiCell class="form--item form--item__last" title="设为默认地址" >
<template slot="right-icon">
<u-switch space="2" v-model="address.isDefault" activeColor="#FF875B" inactiveColor="#F3F3F3" />
<u-switch space="2" v-model="address.isDefault" activeColor="$color-yellow3" inactiveColor="#F3F3F3" />
</template>
</UiCell>
<UiButton class="saveBtn" type="solid" size="max" @click="save"></UiButton>
@ -95,10 +95,10 @@ export default {
<style lang="scss" scoped>
page {
background: #f8f8f8;
background: $color-grey1;
}
.form{
background: #fff;
background: $color-grey0;
margin-bottom: 20rpx;
&--item{
padding: 0 40rpx;
@ -111,7 +111,7 @@ page {
}
&--itemInput{
flex: 1;
font-size: 28rpx;
font-size: $font-size-base;
padding-left: 40rpx;
}
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 14:12:18
* @LastEditors: ch
* @LastEditTime: 2022-04-07 09:30:07
* @LastEditTime: 2022-04-09 15:03:37
* @Description: file content
-->
<template>
@ -27,7 +27,7 @@
</view>
<UiCell class="form--item form--item__last" title="设为默认地址" >
<template slot="right-icon">
<u-switch space="2" v-model="address.isDefault" activeColor="#FF875B" inactiveColor="#F3F3F3" />
<u-switch space="2" v-model="address.isDefault" activeColor="$color-yellow3" inactiveColor="#F3F3F3" />
</template>
</UiCell>
<UiCell class="form--item form--item__last del-address" @click="delAddress" title="删除收货地址" :rightIcon="false"></UiCell>
@ -117,10 +117,10 @@ export default {
<style lang="scss" scoped>
page {
background: #f8f8f8;
background: $color-grey1;
}
.form{
background: #fff;
background: $color-grey0;
margin-bottom: 20rpx;
&--item{
padding: 0 40rpx;
@ -133,7 +133,7 @@ page {
}
&--itemInput{
flex: 1;
font-size: 28rpx;
font-size: $font-size-base;
padding-left: 40rpx;
}
}
@ -144,7 +144,7 @@ page {
}
/deep/ {
.del-address .uiCell--title{
color: #FF875B;
color: $color-yellow3;
}
.form--city .uiCell{
padding: 0 40rpx;

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 13:54:15
* @LastEditors: ch
* @LastEditTime: 2022-04-08 17:21:04
* @LastEditTime: 2022-04-09 15:03:39
* @Description: file content
-->
<template>
@ -90,24 +90,24 @@ export default {
<style lang="scss" scoped>
page{
background: #f8f8f8;
background: $color-grey1;
}
.address{
background: #fff;
background: $color-grey0;
}
.addressItem{
height: 188rpx;
margin-left: 40rpx;
padding-right: 40rpx;
border-bottom: 1px solid #eee;
border-bottom: 1px solid $color-grey2;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 24rpx;
color: #999;
font-size: $font-size-sm;
color: $color-grey4;
&--detail{
font-size: 28rpx;
color: #333;
font-size: $font-size-base;
color: $color-grey6;
margin: 20rpx 0;
}
&--name{
@ -123,8 +123,8 @@ page{
&::after{
display: block;
content: '默认';
background: #FF512B;
color: #fff;
background: $color-yellow4;
color: $color-grey0;
border-radius: 4rpx;
padding: 4rpx 6rpx;
margin-left: 20rpx;

@ -3,7 +3,7 @@
components: { UiCell },: ch
* @Date: 2019-08-22 19:41:20
* @LastEditors: ch
* @LastEditTime: 2022-04-07 11:43:37
* @LastEditTime: 2022-04-09 15:03:35
* @Description: file content
-->
<template>
@ -89,7 +89,7 @@ export default {
<style lang="scss" scoped>
page{
background: url('@/static/account/bg.png') no-repeat top left #F8F8F8;
background: url('@/static/account/bg.png') no-repeat top left $color-grey1;
background-size: 100%;
}
.header{
@ -124,7 +124,7 @@ page{
.order{
width: 630rpx;
height: 200rpx;
background: #fff;
background: $color-grey0;
border-radius: 16rpx;
margin: 40rpx auto;
padding: 30rpx;
@ -135,22 +135,22 @@ page{
align-items: center;
background: url('@/static/common/arrow.png') no-repeat center right;
background-size: 10rpx;
font-size: 28rpx;
color: #333;
font-size: $font-size-base;
color: $color-grey6;
margin: 10rpx 0 46rpx;
}
&--title-more{
padding-right: 20rpx;
font-size: 24rpx;
color: #999;
font-size: $font-size-sm;
color: $color-grey4;
}
&-tabs{
display: flex;
justify-content: space-around;
&--item{
text-align: center;
font-size: 24rpx;
color: #666;
font-size: $font-size-sm;
color: $color-grey5;
position: relative;
.item-icon{
width: 60rpx;
@ -168,7 +168,7 @@ page{
.cell{
margin: 30rpx;
border-radius: 16rpx;
background: #fff;
background: $color-grey0;
padding: 0 40rpx;
&--icon{
width: 40rpx;

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 16:13:00
* @LastEditors: ch
* @LastEditTime: 2022-03-26 14:25:15
* @LastEditTime: 2022-04-09 15:09:26
* @Description: file content
-->
<template>
@ -42,13 +42,13 @@ export default {
flex: 1;
display: flex;
justify-content: space-between;
border-bottom: 1px solid #eee;
border-bottom: 1px solid $color-grey2;
padding: 0 40rpx 40rpx 0;
}
&--title{
width: 350rpx;
display: block;
font-size: 32rpx;
font-size: $font-size-lg;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
@ -56,9 +56,9 @@ export default {
}
&--text{
width: 350rpx;
font-size: 28rpx;
font-size: $font-size-base;
line-height: 36rpx;
color: #999;
color: $color-grey4;
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
@ -69,8 +69,8 @@ export default {
text-align: right;
}
&--time{
font-size: 24rpx;
color: #999;
font-size: $font-size-sm;
color: $color-grey4;
display: block;
height: 36rpx;
line-height: 36rpx;

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-26 14:32:03
* @LastEditors: ch
* @LastEditTime: 2022-03-26 15:03:18
* @LastEditTime: 2022-04-09 15:08:38
* @Description: file content
-->
<template>
@ -32,16 +32,16 @@ export default {
justify-content: space-between;
align-items: center;
padding-right: 40rpx;
font-size: 32rpx;
color: #333;
font-size: $font-size-lg;
color: $color-grey6;
}
&--time{
font-size: 24rpx;
color: #999;
font-size: $font-size-sm;
color: $color-grey4;
}
&--con{
display: flex;
border-bottom: 1px solid #eee;
border-bottom: 1px solid $color-grey2;
padding: 40rpx 0;
}
&--img{
@ -52,9 +52,9 @@ export default {
}
&--desc{
width: 455rpx;
font-size: 28rpx;
font-size: $font-size-base;
line-height: 39rpx;
color: #666;
color: $color-grey5;
}
}
</style>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 15:09:06
* @LastEditors: ch
* @LastEditTime: 2022-04-06 17:38:07
* @LastEditTime: 2022-04-09 15:03:40
* @Description: file content
-->
<template>
@ -37,7 +37,7 @@ export default {
</script>
<style lang="scss" scoped>
page{
background: #f8f8f8;
background: $color-grey1;
}
.userInfo{
margin: 20rpx 0;
@ -60,18 +60,18 @@ page{
height: 100rpx;
line-height: 100rpx;
text-align: center;
color: #999;
background: #fff;
color: $color-grey4;
background: $color-grey0;
margin: 20rpx 0;
font-size: 32rpx;
font-size: $font-size-lg;
}
/deep/{
.userInfo .uiCell--title{
font-size: 32rpx;
font-size: $font-size-lg;
}
.uiCell--value{
color: #999;
color: $color-grey4;
}
}
</style>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-28 15:38:23
* @LastEditors: ch
* @LastEditTime: 2022-03-30 18:04:37
* @LastEditTime: 2022-04-09 15:03:41
* @Description: file content
-->
<template>
@ -45,26 +45,26 @@ export default {
</script>
<style lang="scss" scoped>
page{
background: #f8f8f8;
background: $color-grey1;
}
.headerBtn{
height: 88rpx;
line-height: 88rpx;
font-size: 28rpx;
color: #FF875B;
font-size: $font-size-base;
color: $color-yellow3;
}
.input{
padding: 20rpx 40rpx !important;
height: 60rpx;
background: #fff;
background: $color-grey0;
border: 0;
font-size: 28rpx;
color: #333;
font-size: $font-size-base;
color: $color-grey6;
}
.tips{
padding: 20rpx 40rpx;
font-size: 24rpx;
color: #999;
font-size: $font-size-sm;
color: $color-grey4;
display: flex;
justify-content: space-between;
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-28 15:38:23
* @LastEditors: ch
* @LastEditTime: 2022-03-30 21:23:22
* @LastEditTime: 2022-04-09 15:01:53
* @Description: file content
-->
<template>
@ -92,13 +92,13 @@ export default {
</script>
<style lang="scss" scoped>
page{
background: #f8f8f8;
background: $color-grey1;
}
.userInfo{
padding: 77rpx 0 60rpx;
text-align: center;
font-size: 28rpx;
color: #333;
font-size: $font-size-base;
color: $color-grey6;
&--head,&--upload{
width: 120rpx;
height: 120rpx;
@ -114,10 +114,10 @@ page{
}
/deep/{
.userInfo .uiCell--title{
font-size: 32rpx;
font-size: $font-size-lg;
}
.uiCell--value{
color: #999;
color: $color-grey4;
}
}
</style>

@ -1,540 +0,0 @@
<template>
<view class="container">
<!-- 页面顶部 -->
<UiPageHeader>
<template slot="custom">
<view class="head--title">
<text>购物车</text>
<text v-if="list.length">({{list.length}})</text>
</view>
<view v-if="mode == 'normal'" class="head--edit" @click="handleToggleMode"></view>
<view v-else class="head--finsh" @click="handleToggleMode"></view>
</template>
</UiPageHeader>
<u-loadmore v-if="isLoading" status="loading" />
<!-- 购物车数据为空 -->
<BsEmpty v-if="!list.length && !isLoading" class="empty"
tips="去挑点喜欢的好货吧~">
<image slot="icon" class="empty--icon" src="@/static/goods/cart.png"></image>
<view slot="btn" class="empty--btn" @click="$Router.push('/')"></view>
</BsEmpty>
<!-- 购物车商品列表 -->
<view v-else class="cart-list">
<view class="cart-item" v-for="(item, index) in list" :key="index"
@click="$Router.push(`goodsDetail?id=${item.id}`)">
<label class="cart-item--radio" @click.stop="handleCheckItem(item.id)">
<radio class="radio" color="#FF875B"
:checked="checkedIds.length ? checkedIds.includes(item.id) : false" />
</label>
<image class="cart-item--image" :src="item.product.mainPicture" mode="scaleToFill"></image>
<view class="cart-item--content">
<view class="cart-item--title"><text>{{ item.product.name }}</text></view>
<view class="cart-item--props">
<view class="cart-item--props-item" >
<text>{{ item.productSku.name }}</text>
</view>
</view>
<view class="cart-item--footer">
<view class="cart-item--price">
<text class="unit"></text>
<text class="value">{{ item.productSku.sellPrice }}</text>
</view>
<view class="cart-item--stepper">
<u-number-box :min="1" button-size="40rpx" bgColor="#F5F6FA"
:value="item.number" :max="item.maxBuyNum" @change="onChangeStepper($event, item)" >
<text slot="minus" class="cart-item--stepper-icon">-</text>
<text slot="plus" class="cart-item--stepper-icon">+</text>
</u-number-box>
</view>
</view>
</view>
</view>
</view>
<template v-if="!isLoading">
<view class="title">为您推荐</view>
<BsChoiceGoods></BsChoiceGoods>
</template>
<!-- 底部操作栏 -->
<view v-if="list.length" class="footer">
<label class="all-radio" @click="handleCheckAll">
<radio class="radio" color="#fa2209"
:checked="checkedIds.length > 0 && checkedIds.length === list.length" />
<text>全选</text>
</label>
<view class="total-info">
<text>合计</text>
<view class="goods-price">
<text class="unit"></text>
<text class="value">{{ totalPrice }}</text>
</view>
</view>
<view class="cart-action">
<view class="btn-wrapper">
<!-- dev:下面的disabled条件使用checkedIds.join方式判断 -->
<!-- dev:通常情况下vue项目使用checkedIds.length更合理, 但是length属性在微信小程序中不起作用 -->
<view v-if="mode == 'normal'" class="btn-item btn-main" :class="{ disabled: checkedIds.length === 0 }"
@click="handleOrder()">
<text>去结算 {{ checkedIds.length > 0 ? `(${checkedIds.length})` : '' }}</text>
</view>
<view v-if="mode == 'edit'" class="btn-item btn-main" :class="{ disabled: !checkedIds.length }"
@click="handleDelete()">
<text>删除</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { Debounce } from '@/common/utils';
import BsEmpty from '@/components/BsEmpty.vue';
import BsChoiceGoods from '@/components/BsChoiceGoods.vue';
import UiPageHeader from '@/components/UiPageHeader.vue';
import {ApiGetCartList, ApiPutCartNum, ApiDeleteCartGoods} from '@/common/api/cart';
const CartIdsIndex = 'CartIds';
export default {
components: {
BsEmpty,
BsChoiceGoods,
UiPageHeader
},
data() {
return {
//
isLoading: true,
// : normal edit
mode: 'normal',
//
list: [],
//
total: null,
// ID
checkedIds: [],
}
},
watch: {
//
checkedIds: {
handler(val) {
//
uni.setStorageSync(CartIdsIndex, val)
},
immediate: false
}
},
computed : {
totalPrice(){
const checkedList = this.list.filter(item => this.checkedIds.includes(item.id));
let tempPrice = 0;
checkedList.forEach(item => {
// , 便 ()
const unitPrice = item.productSku.sellPrice * 100
tempPrice += unitPrice * item.number
});
return (tempPrice / 100).toFixed(2)
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow(options) {
//
this.getCartList();
this.isLoading = false;
//
this.checkedIds = uni.getStorageSync(CartIdsIndex);
},
methods: {
/**
* 获取购物车商品列表
*/
async getCartList() {
this.isLoading = true;
const {error, result} = await ApiGetCartList();
if(error){
uni.$u.toast(error.message);
return false;
}
this.list = result.map(item => {
const singleBuyLimit = item.product.singleBuyLimit;
const stock = item.productSku.stock;
const maxBuyNum = singleBuyLimit ? Math.min(singleBuyLimit, stock || 1) : stock
return {
...item,
maxBuyNum
}
});
this.onClearInvalidId();
this.isLoading = false;
},
/**
* 清除checkedIds中无效的ID
*/
onClearInvalidId() {
this.checkedIds = this.checkedIds.filter(i => this.list.findIndex(item => item.id === i) > -1);
},
/**
* 切换当前模式
*/
handleToggleMode() {
this.mode = this.mode == 'normal' ? 'edit' : 'normal'
},
/**
* 监听步进器更改事件
*/
onChangeStepper({ value }, item) {
//
if (item.number == value) {
uni.$u.toast('数量不能再少了');
return false
}
//
if (!item.debounceHandle) {
item.oldValue = item.number
item.debounceHandle = Debounce(this.updateCartNum, 500)
}
//
item.number = value
// ()
item.debounceHandle(item, item.oldValue, value);
},
/**
* 提交更新购物车数量
*/
async updateCartNum(item, oldValue, newValue) {
const {error, result} = await ApiPutCartNum({
id : item.id,
number : item.number
});
if(error){
this.$toast(error.message);
item.number = item.sku;
return false;
}
if(result.isBeyondMaxLimit){
uni.$u.toast('数量超出范围');
item.number = result.canSetShoppingCartNumber;
return false;
}
},
/**
* 选中商品
*/
handleCheckItem(cartId) {
const { checkedIds } = this
const index = checkedIds.findIndex(id => id === cartId)
index < 0 ? checkedIds.push(cartId) : checkedIds.splice(index, 1)
},
/**
* 全选事件
*/
handleCheckAll() {
const { checkedIds, list } = this
this.checkedIds = checkedIds.length === list.length ? [] : list.map(item => item.id)
},
/**
* 结算选中的商品
*/
handleOrder() {
const ids = this.checkedIds;
if (ids.length) {
this.$Router.push({
path : '/orderSubmit',
query : {
mode: 'cart',
ids:ids.join(',')
}
})
}
},
/**
* 删除选中的商品
*/
handleDelete() {
const ids = this.checkedIds;
if (!ids.length) {
return false
}
uni.showModal({
title: '友情提示',
content: '您确定要删除该商品吗?',
showCancel: true,
success:async ()=> {
const {error} = await ApiDeleteCartGoods({idList : ids.join(',')});
if(error){
uni.$u.toast(error.message);
return false;
}
this.list = this.list.filter(item => !ids.includes(item.id));
// this.checkedIds = [];
this.onClearInvalidId();
}
})
}
}
}
</script>
<style>
page {
background: #f5f5f5;
padding-bottom: 120rpx;
}
</style>
<style lang="scss" scoped>
//
.head {
height: 88rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 30rpx;
background-color: #fff;
position: sticky;
top: var(--window-top);
z-index: 999;
&--totla{
font-size: 36rpx;
color: #333;
}
&--edit,&--finsh{
font-size: 28rpx;
color: #999;
}
&--finsh{
color: #FF512B;
}
}
//
.cart-list {
background: #fff;
}
.cart-item {
width: 690rpx;
display: flex;
align-items: center;
padding: 30rpx 0;
margin: 0 auto 24rpx auto;
border-bottom: 1px solid #eee;
&--radio {
width: 56rpx;
height: 80rpx;
line-height: 80rpx;
margin-right: 10rpx;
text-align: center;
.radio {
transform: scale(0.76)
}
}
&--image {
width: 170rpx;
height: 170rpx;
display: block;
border-radius: 12rpx;
}
&--content {
flex: 1;
padding-left: 24rpx;
}
&--title {
font-size: 28rpx;
line-height: 39rpx;
max-height: 76rpx;
overflow: hidden;
text-overflow: ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
}
&--props {
margin-top: 14rpx;
height: 40rpx;
color: #ababab;
font-size: 24rpx;
overflow: hidden;
&-item {
display: inline-block;
margin-right: 14rpx;
}
}
&--footer {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20rpx;
}
&--price {
vertical-align: bottom;
color: #FF512B;
.unit {
font-size: 20rpx;
}
.value {
font-size: 22rpx;
font-weight: bold;
}
}
&--stepper-icon{
font-size: 38rpx;
color: #ccc;
margin:0 14rpx;
}
&--stepper-input{
height:40rpx;
margin: 0 14rpx;
}
}
//
.empty{
background: #fff;
&--btn {
width: 220rpx;
margin: 0 auto 10rpx auto;
font-size: 28rpx;
height: 64rpx;
line-height: 64rpx;
text-align: center;
color: #333;
border-radius: 50rpx;
border: 1px solid rgb(192, 185, 185);
}
&--icon{
width: 304rpx;
height: 192rpx;
}
}
.title{
font-size: 32rpx;
text-align: center;
margin: 51rpx auto 30rpx auto;
display: flex;
align-items: center;
justify-content: space-between;
width: 500rpx;
&::after,&::before{
display: inline-block;
content: '';
width: 160rpx;
height: 2rpx;
background: linear-gradient(90deg, #CCCCCC 0%, rgba(204, 204, 204, 0) 100%);
}
&::before{
background: linear-gradient(270deg, #CCCCCC 0%, rgba(204, 204, 204, 0) 100%);
}
}
//
.footer {
display: flex;
align-items: center;
height: 96rpx;
background: #fff;
padding: 0 30rpx;
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 11;
.all-radio {
width: 140rpx;
display: flex;
align-items: center;
color: #666;
font-size: 24rpx;
.radio {
margin-bottom: -4rpx;
transform: scale(0.76)
}
}
.total-info {
flex: 1;
display: flex;
align-items: center;
justify-content: flex-end;
padding-right: 30rpx;
font-size: 24rpx;
color: #666;
.goods-price {
vertical-align: bottom;
color: #FF512B;
.unit {
font-size: 24rpx;
}
.value {
font-size: 32rpx;
}
}
}
.cart-action {
width: 200rpx;
.btn-wrapper {
height: 100%;
display: flex;
align-items: center;
}
.btn-item {
flex: 1;
font-size: 28rpx;
height: 72rpx;
line-height: 72rpx;
text-align: center;
color: #fff;
border-radius: 50rpx;
}
//
.btn-main {
background: #FF512B;//linear-gradient(to right, #f9211c, #ff6335);
//
&.disabled {
background: #ff9779;
}
}
}
}
</style>

@ -1,545 +0,0 @@
<template>
<view class="container">
<!-- 页面顶部 -->
<UiPageHeader :back="false">
<template slot="custom">
<view class="head--title">
<text>购物车</text>
<text v-if="list.length">({{list.length}})</text>
</view>
<view v-if="mode == 'normal'" class="head--edit" @click="handleToggleMode"></view>
<view v-else class="head--finsh" @click="handleToggleMode"></view>
</template>
</UiPageHeader>
<u-loadmore v-if="isLoading" status="loading" />
<!-- 购物车数据为空 -->
<BsEmpty v-if="!list.length && !isLoading" class="empty"
tips="去挑点喜欢的好货吧~">
<image slot="icon" class="empty--icon" src="@/static/goods/cart.png"></image>
<view slot="btn" class="empty--btn" @click="$Router.push('/')"></view>
</BsEmpty>
<!-- 购物车商品列表 -->
<view v-else class="cart-list">
<view class="cart-item" v-for="(item, index) in list" :key="index"
@click="$Router.push(`goodsDetail?id=${item.id}`)">
<label class="cart-item--radio" @click.stop="handleCheckItem(item.id)">
<radio class="radio" color="#FF875B"
:checked="checkedIds.length ? checkedIds.includes(item.id) : false" />
</label>
<image class="cart-item--image" :src="item.product.mainPicture" mode="scaleToFill"></image>
<view class="cart-item--content">
<view class="cart-item--title"><text>{{ item.product.name }}</text></view>
<view class="cart-item--props">
<view class="cart-item--props-item" >
<text>{{ item.productSku.name }}</text>
</view>
</view>
<view class="cart-item--footer">
<view class="cart-item--price">
<text class="unit"></text>
<text class="value">{{ item.productSku.sellPrice }}</text>
</view>
<view class="cart-item--stepper">
<u-number-box :min="1" button-size="40rpx" bgColor="#F5F6FA"
:value="item.number" :max="item.maxBuyNum" @change="onChangeStepper($event, item)" >
<text slot="minus" class="cart-item--stepper-icon">-</text>
<text slot="plus" class="cart-item--stepper-icon">+</text>
</u-number-box>
</view>
</view>
</view>
</view>
</view>
<template v-if="!isLoading">
<view class="title">为您推荐</view>
<BsChoiceGoods></BsChoiceGoods>
</template>
<!-- 底部操作栏 -->
<view v-if="list.length" class="footer">
<label class="all-radio" @click="handleCheckAll">
<radio class="radio" color="#fa2209"
:checked="checkedIds.length > 0 && checkedIds.length === list.length" />
<text>全选</text>
</label>
<view class="total-info">
<text>合计</text>
<view class="goods-price">
<text class="unit"></text>
<text class="value">{{ totalPrice }}</text>
</view>
</view>
<view class="cart-action">
<view class="btn-wrapper">
<!-- dev:下面的disabled条件使用checkedIds.join方式判断 -->
<!-- dev:通常情况下vue项目使用checkedIds.length更合理, 但是length属性在微信小程序中不起作用 -->
<view v-if="mode == 'normal'" class="btn-item btn-main" :class="{ disabled: checkedIds.length === 0 }"
@click="handleOrder()">
<text>去结算 {{ checkedIds.length > 0 ? `(${checkedIds.length})` : '' }}</text>
</view>
<view v-if="mode == 'edit'" class="btn-item btn-main" :class="{ disabled: !checkedIds.length }"
@click="handleDelete()">
<text>删除</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { Debounce } from '@/common/utils';
import BsEmpty from '@/components/BsEmpty.vue';
import BsChoiceGoods from '@/components/BsChoiceGoods.vue';
import UiPageHeader from '@/components/UiPageHeader.vue';
import {ApiGetCartList, ApiPutCartNum, ApiDeleteCartGoods} from '@/common/api/cart';
const CartIdsIndex = 'CartIds';
export default {
components: {
BsEmpty,
BsChoiceGoods,
UiPageHeader
},
data() {
return {
//
isLoading: true,
// : normal edit
mode: 'normal',
//
list: [],
//
total: null,
// ID
checkedIds: [],
}
},
watch: {
//
checkedIds: {
handler(val) {
//
uni.setStorageSync(CartIdsIndex, val)
},
immediate: false
}
},
computed : {
totalPrice(){
const checkedList = this.list.filter(item => this.checkedIds.includes(item.id));
let tempPrice = 0;
checkedList.forEach(item => {
// , 便 ()
const unitPrice = item.productSku.sellPrice * 100
tempPrice += unitPrice * item.number
});
return (tempPrice / 100).toFixed(2)
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow(options) {
//
this.getCartList();
this.isLoading = false;
//
this.checkedIds = uni.getStorageSync(CartIdsIndex);
},
methods: {
/**
* 获取购物车商品列表
*/
async getCartList() {
this.isLoading = true;
const {error, result} = await ApiGetCartList();
if(error){
uni.$u.toast(error.message);
return false;
}
this.list = result.map(item => {
const singleBuyLimit = item.product.singleBuyLimit;
const stock = item.productSku.stock;
const maxBuyNum = singleBuyLimit ? Math.min(singleBuyLimit, stock || 1) : stock
return {
...item,
maxBuyNum
}
});
this.onClearInvalidId();
this.isLoading = false;
},
/**
* 清除checkedIds中无效的ID
*/
onClearInvalidId() {
this.checkedIds = this.checkedIds.filter(i => this.list.findIndex(item => item.id === i) > -1);
},
/**
* 切换当前模式
*/
handleToggleMode() {
this.mode = this.mode == 'normal' ? 'edit' : 'normal'
},
/**
* 监听步进器更改事件
*/
onChangeStepper({ value }, item) {
//
if (item.number == value) {
uni.$u.toast('数量不能再少了');
return false
}
//
if (!item.debounceHandle) {
item.oldValue = item.number
item.debounceHandle = Debounce(this.updateCartNum, 500)
}
//
item.number = value
// ()
item.debounceHandle(item, item.oldValue, value);
},
/**
* 提交更新购物车数量
*/
async updateCartNum(item, oldValue, newValue) {
const {error, result} = await ApiPutCartNum({
id : item.id,
number : item.number
});
if(error){
this.$toast(error.message);
item.number = item.sku;
return false;
}
if(result.isBeyondMaxLimit){
uni.$u.toast('数量超出范围');
item.number = result.canSetShoppingCartNumber;
return false;
}
},
/**
* 选中商品
*/
handleCheckItem(cartId) {
const { checkedIds } = this
const index = checkedIds.findIndex(id => id === cartId)
index < 0 ? checkedIds.push(cartId) : checkedIds.splice(index, 1)
},
/**
* 全选事件
*/
handleCheckAll() {
const { checkedIds, list } = this
this.checkedIds = checkedIds.length === list.length ? [] : list.map(item => item.id)
},
/**
* 结算选中的商品
*/
handleOrder() {
const ids = this.checkedIds;
if (ids.length) {
this.$Router.push({
path : '/orderSubmit',
query : {
mode: 'cart',
ids:ids.join(',')
}
})
}
},
/**
* 删除选中的商品
*/
handleDelete() {
const ids = this.checkedIds;
if (!ids.length) {
return false
}
uni.showModal({
title: '友情提示',
content: '您确定要删除该商品吗?',
showCancel: true,
success:async ()=> {
const {error} = await ApiDeleteCartGoods({idList : ids.join(',')});
if(error){
uni.$u.toast(error.message);
return false;
}
this.list = this.list.filter(item => !ids.includes(item.id));
// this.checkedIds = [];
this.onClearInvalidId();
}
})
}
}
}
</script>
<style>
page {
background: #f5f5f5;
padding-bottom: 240rpx;
}
</style>
<style lang="scss" scoped>
//
.head {
height: 88rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 30rpx;
background-color: #fff;
position: sticky;
top: var(--window-top);
z-index: 999;
&--title{
width: 600rpx;
text-align: center;
}
&--totla{
font-size: 36rpx;
color: #333;
}
&--edit,&--finsh{
font-size: 28rpx;
color: #999;
}
&--finsh{
color: #FF512B;
}
}
//
.cart-list {
background: #fff;
}
.cart-item {
width: 690rpx;
display: flex;
align-items: center;
padding: 30rpx 0;
margin: 0 auto 24rpx auto;
border-bottom: 1px solid #eee;
&--radio {
width: 56rpx;
height: 80rpx;
line-height: 80rpx;
margin-right: 10rpx;
text-align: center;
.radio {
transform: scale(0.76)
}
}
&--image {
width: 170rpx;
height: 170rpx;
display: block;
border-radius: 12rpx;
}
&--content {
flex: 1;
padding-left: 24rpx;
}
&--title {
font-size: 28rpx;
line-height: 39rpx;
max-height: 76rpx;
overflow: hidden;
text-overflow: ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
}
&--props {
margin-top: 14rpx;
height: 40rpx;
color: #ababab;
font-size: 24rpx;
overflow: hidden;
&-item {
display: inline-block;
margin-right: 14rpx;
}
}
&--footer {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20rpx;
}
&--price {
vertical-align: bottom;
color: #FF512B;
.unit {
font-size: 20rpx;
}
.value {
font-size: 22rpx;
font-weight: bold;
}
}
&--stepper-icon{
font-size: 38rpx;
color: #ccc;
margin:0 14rpx;
}
&--stepper-input{
height:40rpx;
margin: 0 14rpx;
}
}
//
.empty{
background: #fff;
&--btn {
width: 220rpx;
margin: 0 auto 10rpx auto;
font-size: 28rpx;
height: 64rpx;
line-height: 64rpx;
text-align: center;
color: #333;
border-radius: 50rpx;
border: 1px solid rgb(192, 185, 185);
}
&--icon{
width: 304rpx;
height: 192rpx;
}
}
.title{
font-size: 32rpx;
text-align: center;
margin: 51rpx auto 30rpx auto;
display: flex;
align-items: center;
justify-content: space-between;
width: 500rpx;
&::after,&::before{
display: inline-block;
content: '';
width: 160rpx;
height: 2rpx;
background: linear-gradient(90deg, #CCCCCC 0%, rgba(204, 204, 204, 0) 100%);
}
&::before{
background: linear-gradient(270deg, #CCCCCC 0%, rgba(204, 204, 204, 0) 100%);
}
}
//
.footer {
display: flex;
align-items: center;
height: 96rpx;
background: #fff;
padding: 0 30rpx;
position: fixed;
bottom: 120rpx;
left: 0;
right: 0;
z-index: 11;
.all-radio {
width: 140rpx;
display: flex;
align-items: center;
color: #666;
font-size: 24rpx;
.radio {
margin-bottom: -4rpx;
transform: scale(0.76)
}
}
.total-info {
flex: 1;
display: flex;
align-items: center;
justify-content: flex-end;
padding-right: 30rpx;
font-size: 24rpx;
color: #666;
.goods-price {
vertical-align: bottom;
color: #FF512B;
.unit {
font-size: 24rpx;
}
.value {
font-size: 32rpx;
}
}
}
.cart-action {
width: 200rpx;
.btn-wrapper {
height: 100%;
display: flex;
align-items: center;
}
.btn-item {
flex: 1;
font-size: 28rpx;
height: 72rpx;
line-height: 72rpx;
text-align: center;
color: #fff;
border-radius: 50rpx;
}
//
.btn-main {
background: #FF512B;//linear-gradient(to right, #f9211c, #ff6335);
//
&.disabled {
background: #ff9779;
}
}
}
}
</style>

@ -25,7 +25,7 @@
<view class="cart-item" v-for="(item, index) in list" :key="index"
@click="$Router.push(`goodsDetail?id=${item.id}`)">
<label class="cart-item--radio" @click.stop="handleCheckItem(item.id)">
<radio class="radio" color="#FF875B"
<radio class="radio" color="$color-yellow3"
:checked="checkedIds.length ? checkedIds.includes(item.id) : false" />
</label>
<image class="cart-item--image" :src="item.product.mainPicture" mode="scaleToFill"></image>
@ -61,7 +61,7 @@
<!-- 底部操作栏 -->
<view v-if="list.length" :class="`footer footer__${type}`">
<label class="all-radio" @click="handleCheckAll">
<radio class="radio" color="#FF875B"
<radio class="radio" color="$color-yellow3"
:checked="checkedIds.length > 0 && checkedIds.length === list.length" />
<text>全选</text>
</label>
@ -317,20 +317,20 @@ export default {
justify-content: space-between;
align-items: center;
padding: 0 30rpx;
background-color: #fff;
background-color: $color-grey0;
position: sticky;
top: var(--window-top);
z-index: 999;
&--totla{
font-size: 36rpx;
color: #333;
color: $color-grey6;
}
&--edit,&--finish{
font-size: 28rpx;
color: #999;
font-size: $font-size-base;
color: $color-grey4;
}
&--finish{
color: #FF512B;
color: $color-yellow4;
}
&__tabBar{
justify-content: center;
@ -344,7 +344,7 @@ export default {
//
.cart-list {
background: #fff;
background: $color-grey0;
}
.cart-item {
width: 690rpx;
@ -352,7 +352,7 @@ export default {
align-items: center;
padding: 30rpx 0;
margin: 0 auto 24rpx auto;
border-bottom: 1px solid #eee;
border-bottom: 1px solid $color-grey2;
&--radio {
width: 56rpx;
height: 80rpx;
@ -376,7 +376,7 @@ export default {
}
&--title {
font-size: 28rpx;
font-size: $font-size-base;
line-height: 39rpx;
max-height: 76rpx;
overflow: hidden;
@ -391,7 +391,7 @@ export default {
margin-top: 14rpx;
height: 40rpx;
color: #ababab;
font-size: 24rpx;
font-size: $font-size-sm;
overflow: hidden;
&-item {
@ -407,7 +407,7 @@ export default {
}
&--price {
vertical-align: bottom;
color: #FF512B;
color: $color-yellow4;
.unit {
font-size: 20rpx;
@ -419,7 +419,7 @@ export default {
}
&--stepper-icon{
font-size: 38rpx;
color: #ccc;
color: $color-grey3;
margin:0 14rpx;
}
&--stepper-input{
@ -430,15 +430,15 @@ export default {
//
.empty{
background: #fff;
background: $color-grey0;
&--btn {
width: 220rpx;
margin: 0 auto 10rpx auto;
font-size: 28rpx;
font-size: $font-size-base;
height: 64rpx;
line-height: 64rpx;
text-align: center;
color: #333;
color: $color-grey6;
border-radius: 50rpx;
border: 1px solid rgb(192, 185, 185);
}
@ -449,7 +449,7 @@ export default {
}
.title{
font-size: 32rpx;
font-size: $font-size-lg;
text-align: center;
margin: 51rpx auto 30rpx auto;
display: flex;
@ -461,12 +461,12 @@ export default {
content: '';
width: 160rpx;
height: 2rpx;
background: linear-gradient(90deg, #CCCCCC 0%, rgba(204, 204, 204, 0) 100%);
background: linear-gradient(90deg, $color-grey3 0%, rgba(204, 204, 204, 0) 100%);
}
&::before{
background: linear-gradient(270deg, #CCCCCC 0%, rgba(204, 204, 204, 0) 100%);
background: linear-gradient(270deg, $color-grey3 0%, rgba(204, 204, 204, 0) 100%);
}
}
@ -475,7 +475,7 @@ export default {
display: flex;
align-items: center;
height: 96rpx;
background: #fff;
background: $color-grey0;
padding: 0 30rpx;
position: fixed;
bottom: 120rpx;
@ -490,8 +490,8 @@ export default {
width: 140rpx;
display: flex;
align-items: center;
color: #666;
font-size: 24rpx;
color: $color-grey5;
font-size: $font-size-sm;
.radio {
margin-bottom: -4rpx;
@ -505,19 +505,19 @@ export default {
align-items: center;
justify-content: flex-end;
padding-right: 30rpx;
font-size: 24rpx;
color: #666;
font-size: $font-size-sm;
color: $color-grey5;
.goods-price {
vertical-align: bottom;
color: #FF875B;
color: $color-yellow3;
.unit {
font-size: 24rpx;
font-size: $font-size-sm;
}
.value {
font-size: 32rpx;
font-size: $font-size-lg;
}
}
}
@ -533,21 +533,21 @@ export default {
.btn-item {
flex: 1;
font-size: 28rpx;
font-size: $font-size-base;
height: 72rpx;
line-height: 72rpx;
text-align: center;
color: #fff;
color: $color-grey0;
border-radius: 50rpx;
}
//
.btn-main {
background: #FF875B;//linear-gradient(to right, #f9211c, #ff6335);
background: $color-yellow3;//linear-gradient(to right, #f9211c, #ff6335);
//
&.disabled {
background: rgba($color: #FF875B, $alpha: .7);
background: rgba($color: $color-yellow3, $alpha: .7);
}
}

@ -2,7 +2,7 @@
<view class="container">
<!-- 搜索框 -->
<UiPageHeader :back="false" class="search">
<u--input slot="custom" class="search--input" prefixIconStyle="font-size:48rpx;color:#ccc"
<u--input slot="custom" class="search--input" prefixIconStyle="font-size:48rpx;color:$color-grey3"
prefixIcon="search" placeholderClass="search--input__placeholder" clearable
placeholder="请输入您想要搜索的商品名称"
@focus="$Router.push('/search')"/>
@ -113,7 +113,7 @@ export default {
</script>
<style>
page {
background: #fff;
background: $color-grey0;
}
</style>
<style lang="scss" scoped>
@ -125,15 +125,15 @@ page {
height: 70rpx;
border:none;
box-sizing: border-box;
background: #F8F8F8;
background: $color-grey1;
&__placeholder{
font-size: 26rpx;
color: #666;
color: $color-grey5;
}
}
.cate-content {
background: #fff;
background: $color-grey0;
height: calc(100vh - 220rpx);
display: flex;
}
@ -142,7 +142,7 @@ page {
width: 190rpx;
color: #444;
height: 100%;
background: #f8f8f8;
background: $color-grey1;
}
.cate-right {
@ -156,22 +156,22 @@ page {
width: 190rpx;
height: 100rpx;
line-height: 100rpx;
font-size: 28rpx;
font-size: $font-size-base;
text-align: center;
color: #999;
color: $color-grey4;
}
.type-nav.selected {
background: #fff;
color: #FF875B;
font-size: 28rpx;
background: $color-grey0;
color: $color-yellow3;
font-size: $font-size-base;
}
.cate-tow-img{
width:480rpx;
margin: 0 40rpx 40rpx;
height: 164rpx;
background: #ccc;
background: $color-grey3;
border-radius: 16rpx;
}
.cate-tow-group{
@ -183,7 +183,7 @@ page {
display: block;
width: 100%;
font-size: 30rpx;
color: #333;
color: $color-grey6;
}
&--item{
margin-left: 40rpx;
@ -197,10 +197,10 @@ page {
display: block;
width: 130rpx;
text-align: center;
font-size: 24rpx;
font-size: $font-size-sm;
line-height: 36rpx;
margin: 10rpx 0 40rpx;
color: #333;
color: $color-grey6;
display: -webkit-box;
/*! autoprefixer: off */
-webkit-box-orient: vertical;

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-24 10:32:58
* @LastEditors: ch
* @LastEditTime: 2022-03-24 11:13:48
* @LastEditTime: 2022-04-09 15:03:47
* @Description: file content
-->
<template>
@ -43,32 +43,32 @@ export default {
<style lang="scss" scoped>
.content{
padding: 50rpx;
color: #333;
color: $color-grey6;
}
.title{
margin: 50rpx 0 20rpx 0;
display: block;
font-size: 32rpx;
font-size: $font-size-lg;
::before{
display: inline-block;
content: '';
width: 10rpx;
height: 10rpx;
border-radius: 8rpx;
background: #FF7F39;
background: $color-yellow2;
margin-right: 20rpx;
}
}
.desc{
font-size: 28rpx;
font-size: $font-size-base;
}
.btn{
height: 80rpx;
width: 690rpx;
font-size: 30rpx;
color: #fff;
color: $color-grey0;
margin: 100rpx auto 30rpx auto;
border-radius: 100rpx;
background: linear-gradient(270deg, #FF7F39 0%, #FFA35B 100%);
background: linear-gradient(270deg, $color-yellow2 0%, $color-yellow1 100%);
}
</style>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-24 11:30:55
* @LastEditors: ch
* @LastEditTime: 2022-04-08 15:34:00
* @LastEditTime: 2022-04-09 15:10:11
* @Description: file content
-->
<template>
@ -227,8 +227,8 @@ export default {
}
.product-info{
display: flex;
font-size: 28rpx;
color: #999;
font-size: $font-size-base;
color: $color-grey4;
line-height: 42rpx;
&--img{
width: 200rpx;
@ -237,7 +237,7 @@ export default {
}
&--price{
font-size: 40rpx;
color: #FF512B;
color: $color-yellow4;
line-height: 48rpx;
margin-bottom: 20rpx;
}
@ -252,11 +252,11 @@ export default {
padding: 10rpx 0;
}
.attr-item{
background: #F8F8F8;
background: $color-grey1;
line-height: 70rpx;
border-radius: 100rpx;
border: 1px solid #F8F8F8;
color: #666;
border: 1px solid $color-grey1;
color: $color-grey5;
display: block;
min-width: 158rpx;
max-width: 630rpx;
@ -268,11 +268,11 @@ export default {
white-space: nowrap;
&__active{
background: #FFF3EE;
border-color: #FF512B;
color: #FF875B;
border-color: $color-yellow4;
color: $color-yellow3;
}
&__disabled{
color: #ccc;
color: $color-grey3;
}
}
.sku-num{
@ -285,9 +285,9 @@ export default {
align-items: center;
}
&--single{
color: #999;
color: $color-grey4;
margin-left: 10rpx;
font-size: 28rpx;
font-size: $font-size-base;
display: block;
height: 30rpx;
}
@ -305,8 +305,8 @@ export default {
padding: 0;
border-radius: 0;
width: 340rpx;
font-size: 28rpx;
color: #FF875B;
font-size: $font-size-base;
color: $color-yellow3;
&::after{
border: 0;
}
@ -314,7 +314,7 @@ export default {
width: 350rpx;
background: url('@/static/goods/buy_max.png');
background-size: 350rpx;
color: #fff;
color: $color-grey0;
}
}

@ -101,7 +101,7 @@ export default {
padding: 2rpx 18rpx;
background: rgba(0, 0, 0, 0.363);
border-radius: 50rpx;
color: #fff;
color: $color-grey0;
font-size: 26rpx;
}
</style>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-23 17:27:21
* @LastEditors: ch
* @LastEditTime: 2022-04-08 15:24:39
* @LastEditTime: 2022-04-09 15:09:59
* @Description: file content
-->
<template>
@ -106,7 +106,7 @@ export default {
</script>
<style lang="scss" scoped>
page{
background: #f8f8f8;
background: $color-grey1;
padding-bottom: 138rpx;
}
.back{
@ -127,17 +127,17 @@ page{
}
.goods-info{
margin: 20rpx 30rpx 0;
background: #fff;
background: $color-grey0;
border-radius: 16rpx;
padding: 30rpx;
&--title{
font-size: 32rpx;
font-size: $font-size-lg;
line-height: 48rpx;
}
}
.pirce{
color: #FF875B;
font-size: 28rpx;
color: $color-yellow3;
font-size: $font-size-base;
&--max{
font-size: 52rpx;
margin: 0 10rpx 24rpx 0;
@ -145,12 +145,12 @@ page{
}
.select{
margin: 20rpx 30rpx;
background: #fff;
background: $color-grey0;
border-radius: 16rpx;
}
.goods-desc{
margin: 20rpx 30rpx;
background: #fff;
background: $color-grey0;
border-radius: 16rpx;
padding: 20rpx;
}
@ -166,7 +166,7 @@ page{
right: 0;
border-top-left-radius: 24rpx;
border-top-right-radius: 24rpx;
background: #fff;
background: $color-grey0;
box-shadow: 0 8rpx 80rpx 1px rgba(0, 0, 0, 0.1);
&--left{
display: flex;
@ -182,7 +182,7 @@ page{
padding-top: 60rpx;
background: url('@/static/goods/service_icon.png') no-repeat center top;
background-size: 48rpx;
color: #333;
color: $color-grey6;
&.cart{
margin-left: 40rpx;
background-image: url('@/static/goods/cart_icon.png');
@ -195,8 +195,8 @@ page{
display: inline-block;
background: none;
border: none;
font-size: 28rpx;
color: #FF875B;
font-size: $font-size-base;
color: $color-yellow3;
border-bottom-left-radius: 0;
border-top-left-radius: 0;
padding: 0;
@ -206,7 +206,7 @@ page{
&--buy{
background: url('@/static/goods/buy.png');
background-size: 250rpx;
color: #fff;
color: $color-grey0;
}
}
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-23 16:37:30
* @LastEditors: ch
* @LastEditTime: 2022-04-07 18:50:29
* @LastEditTime: 2022-04-09 15:03:50
* @Description: file content
-->
<template>
@ -68,21 +68,21 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
background: $color-grey0;
&--item{
display: flex;
align-items: center;
color: #666;
color: $color-grey5;
&__active{
color: #333;
color: $color-grey6;
}
}
&--label{
font-size: 28rpx;
font-size: $font-size-base;
margin-right: 16rpx;
}
&--icon{
border: 8rpx solid #999;
border: 8rpx solid $color-grey4;
border-left-color: transparent;
border-right-color: transparent;
&__up{
@ -90,13 +90,13 @@ export default {
margin-bottom: 6rpx;
&.sort--icon__active{
border-bottom-color: #FF7F39;
border-bottom-color: $color-yellow2;
}
}
&__down{
border-bottom-color: transparent;
&.sort--icon__active{
border-top-color: #FF7F39;
border-top-color: $color-yellow2;
}
}
}

@ -2,14 +2,14 @@
* @Author: ch
* @Date: 2022-03-21 10:31:54
* @LastEditors: ch
* @LastEditTime: 2022-04-08 09:59:44
* @LastEditTime: 2022-04-09 15:02:38
* @Description: file content
-->
<template>
<view>
<view class="header">
<UiPageHeader>
<u--input slot="custom" class="search--input" prefixIconStyle="font-size:48rpx;color:#ccc"
<u--input slot="custom" class="search--input" prefixIconStyle="font-size:48rpx;color:$color-grey3"
prefixIcon="search" placeholderClass="search--input__placeholder" clearable
placeholder="请输入您想要搜索的商品名称" :value="$Route.query.search"
@focus="$Router.push('/search')"/>
@ -109,7 +109,7 @@ export default {
</script>
<style lang="scss" scoped>
page {
background: #f8f8f8;
background: $color-grey1;
}
.header {
position: sticky;
@ -122,10 +122,10 @@ page {
height: 70rpx;
border:none;
box-sizing: border-box;
background: #F8F8F8;
background: $color-grey1;
&__placeholder{
font-size: 26rpx;
color: #666;
color: $color-grey5;
}
}
@ -134,7 +134,7 @@ page {
}
.title{
font-size: 32rpx;
font-size: $font-size-lg;
text-align: center;
margin: 51rpx auto 30rpx auto;
display: flex;
@ -146,12 +146,12 @@ page {
content: '';
width: 160rpx;
height: 2rpx;
background: linear-gradient(90deg, #CCCCCC 0%, rgba(204, 204, 204, 0) 100%);
background: linear-gradient(90deg, $color-grey3 0%, rgba(204, 204, 204, 0) 100%);
}
&::before{
background: linear-gradient(270deg, #CCCCCC 0%, rgba(204, 204, 204, 0) 100%);
background: linear-gradient(270deg, $color-grey3 0%, rgba(204, 204, 204, 0) 100%);
}
}
</style>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-21 11:29:38
* @LastEditors: ch
* @LastEditTime: 2022-04-07 16:17:35
* @LastEditTime: 2022-04-09 15:03:44
* @Description: file content
-->
<template>
@ -11,7 +11,7 @@
<UiPageHeader>
<view slot="custom" class="search">
<u--input class="search--input" focus placeholder="请输入您想搜索的商品名称"
prefixIcon="search" ref="search" clearable prefixIconStyle="font-size:48rpx;color:#ccc"
prefixIcon="search" ref="search" clearable prefixIconStyle="font-size:48rpx;color:$color-grey3"
v-model="searchValue" placeholderClass="search--input__placeholder"></u--input>
<text class="search--btn" @click="onSearch"></text>
</view>
@ -112,7 +112,7 @@ export default {
<style lang="scss" scoped>
page{
background: #fff;
background: $color-grey0;
}
.search{
@ -127,16 +127,16 @@ page{
height: 70rpx;
border:none;
box-sizing: border-box;
background: #F8F8F8;
background: $color-grey1;
&__placeholder{
font-size: 26rpx;
color: #666;
color: $color-grey5;
}
}
&--btn{
font-size: 26rpx;
color: #666;
color: $color-grey5;
}
}
@ -148,7 +148,7 @@ page{
padding: 0 40rpx;
&--head {
font-size: 26rpx;
color: #666;
color: $color-grey5;
display: flex;
justify-content: space-between;
align-items: center;
@ -170,8 +170,8 @@ page{
line-height: 70rpx;
padding: 0 20rpx;
font-size: 26rpx;
color: #666;
background: #F8F8F8;
color: $color-grey5;
background: $color-grey1;
margin: 10rpx 18rpx 10rpx 0;
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-23 10:31:12
* @LastEditors: ch
* @LastEditTime: 2022-04-07 10:52:51
* @LastEditTime: 2022-04-09 14:22:44
* @Description: file content
-->
<template>
@ -60,7 +60,7 @@ export default {
top:0;
height: 231rpx;
width: 110vw;
background: #69ADE5;
background: $color-blue5;
border-bottom-left-radius: 100%;
border-bottom-right-radius: 100%;
}
@ -95,7 +95,7 @@ export default {
}
&--txt{
font-size: 22rpx;
color: #666;
color: $color-grey5;
}
}
</style>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-23 10:29:07
* @LastEditors: ch
* @LastEditTime: 2022-03-23 10:29:10
* @LastEditTime: 2022-04-09 15:03:51
* @Description: file content
-->
<template>
@ -26,13 +26,13 @@
&-max{
width: 335rpx;
height: 450rpx;
background: #fff;
background: $color-grey0;
border-radius: 8rpx;
}
&-min{
width: 335rpx;
height: 215rpx;
background: #fff;
background: $color-grey0;
border-radius: 8rpx;
}
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-23 10:07:48
* @LastEditors: ch
* @LastEditTime: 2022-04-07 11:24:38
* @LastEditTime: 2022-04-09 15:03:52
* @Description: file content
-->
<template>
@ -31,10 +31,10 @@ export default {
<style lang="scss" scoped>
.sekill{
height: 384rpx;
width: 630rpx;
width: 690rpx;
margin: 0 auto;
padding: 30rpx;
background: #fff;
background: $color-grey0;
border-radius: 20rpx;
&-title{
height: 38rpx;
@ -53,23 +53,23 @@ export default {
line-height: 36rpx;
border-radius: 18rpx;
margin-left: 36rpx;
background: #FFEDE9;
background: $color-yellow0;
overflow: hidden;
align-items: center;
}
&--time-name{
height: 100%;
padding: 0 22rpx 0 15rpx;
background: #FF512B;
background: $color-yellow4;
font-size: 22rpx;
color: #fff;
color: $color-grey0;
position: relative;
&::after{
display: block;
content: '';
width: 16rpx;
height: 36rpx;
background: #FF512B;
background: $color-yellow4;
transform: rotate(40deg);
position: absolute;
right: -10rpx;
@ -80,14 +80,14 @@ export default {
&--time-time{
margin-right: 15rpx;
font-size: 22rpx;
color: #FF512B;
color: $color-yellow4;
position: relative;
&::before{
display: block;
content: '';
width: 14rpx;
height: 36rpx;
background: #FFEDE9;
background: $color-yellow0;
transform: rotate(40deg);
position: absolute;
left: -52rpx;
@ -103,8 +103,8 @@ export default {
}
&--more{
display: inline-block;
font-size: 24rpx;
color: #999;
font-size: $font-size-sm;
color: $color-grey4;
}
&--more-icon{
width: 10rpx;
@ -122,27 +122,27 @@ export default {
width: 200rpx;
height: 200rpx;
border-radius: 8rpx;
background: #F8F8F8;
background: color-grey0-grey;
}
&-pirce-box{
width: 140rpx;
height: 44rpx;
line-height: 44rpx;
background: linear-gradient(90deg, #FFE7DE 0%, #FFFFFF 100%);
background: linear-gradient(90deg, #FFE7DE 0%, $color-grey0 100%);
border-radius: 20rpx;
font-size: 22rpx;
color: #666;
color: $color-grey5;
padding: 0 20rpx;
margin: 20rpx 0;
}
&-pirce{
color: #FF512B;
font-size: 32rpx;
color: $color-yellow4;
font-size: $font-size-lg;
}
&-original-pirce{
display: block;
font-size: 22rpx;
color: #999;
color: $color-grey4;
text-decoration: line-through;
text-align: center;

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2019-08-22 19:41:20
* @LastEditors: ch
* @LastEditTime: 2022-04-07 16:47:31
* @LastEditTime: 2022-04-09 14:46:42
* @Description: file content
-->
<template>
@ -88,11 +88,6 @@ export default {
},
methods : {
async getBannerList(){
// const {error, result} = await ApiGetBannerData({pageIndex:1, length:999});
// console.log(result)
// this.bannerList = result.concat(result).map(i => i.imgUrl);
},
async getCategoryList(){
const {error, result} = await ApiGetCategoryNav();
this.categoryList = result;
@ -101,10 +96,10 @@ export default {
}
</script>
<style lang="scss">
<style lang="scss" scoped>
page{
background: #f8f8f8;
padding-bottom: 120rpx;
background: $color-grey1;
}
.header{
position: sticky;
@ -114,7 +109,7 @@ page{
display: flex;
align-items: center;
justify-content: space-between;
background: #69ADE5;
background: $color-blue5;
padding: 0 30rpx;
}
.logo{
@ -134,7 +129,7 @@ page{
}
.search{
padding: 0 30rpx;
background: #69ADE5;
background: $color-blue5;
&__min{
width: 548rpx;
}
@ -144,10 +139,10 @@ page{
align-items: center;
justify-content: space-between;
background: rgba(255, 255, 255, .3);
color: #fff;
color: $color-grey0;
border-radius: 8rpx;
padding: 0 30rpx;
font-size: 24rpx;
font-size: $font-size-sm;
&::after{
display: block;
content: "";
@ -181,8 +176,8 @@ page{
height: 120rpx;
}
&--title{
font-size: 24rpx;
color: #666;
font-size: $font-size-sm;
color: $color-grey5;
text-align: center;
display: block;
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 15:36:46
* @LastEditors: ch
* @LastEditTime: 2022-04-07 19:46:48
* @LastEditTime: 2022-04-09 14:52:24
* @Description: file content
-->
<template>
@ -25,7 +25,7 @@
</u--form>
<UiButton class="login--btn" type="gradual" @click="login"></UiButton>
<label class="login--agreement">
<radio class="radio" :checked="checked" @click="checked = !checked" color="#FF875B"/>
<radio class="radio" :checked="checked" @click="checked = !checked" color="$color-yellow3"/>
同意<text class="link">用户协议</text><text class="link">隐私协议</text>,首次登陆将自动注册
</label>
</view>
@ -143,10 +143,10 @@ export default {
width: 650rpx;
margin: 0 auto;
&--input{
border-bottom: 2rpx solid #eee;
border-bottom: 2rpx solid $color-grey2;
width: 650rpx;
height: 100rpx;
font-size: 32rpx;
font-size: $font-size-lg;
}
&--code{
position: relative;
@ -154,7 +154,7 @@ export default {
&--send-btn{
position: absolute;
right: 0;
color: #FF875B;
color: $color-yellow3;
&__disabled{
opacity: .8;
}
@ -163,19 +163,19 @@ export default {
width: 650rpx;
height: 88rpx;
line-height: 88rpx;
font-size: 32rpx;
font-size: $font-size-lg;
margin: 60rpx 50rpx 40rpx;
}
&--agreement{
width: 650rpx;
padding: 0 50rpx;
color: #999;
font-size: 24rpx;
color: $color-grey4;
font-size: $font-size-sm;
.radio{
transform: scale(60%);
}
.link{
color: #333;
color: $color-grey6;
}
}
}

@ -95,8 +95,8 @@ export default {
margin-bottom: 20rpx;
}
&--desc{
font-size: 28rpx;
color: #999;
font-size: $font-size-base;
color: $color-grey4;
margin-bottom: 48rpx;
}
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-31 14:26:09
* @LastEditors: ch
* @LastEditTime: 2022-04-09 09:27:05
* @LastEditTime: 2022-04-09 15:02:01
* @Description: file content
-->
<template>
@ -58,19 +58,19 @@
<view class="cancel--title">取消订单原因</view>
<radio-group class="cancel--cell" @change="cancelChange">
<UiCell title="我不想买了">
<radio slot="right-icon" value="1" class="cancel--radio" color="#FF875B"/>
<radio slot="right-icon" value="1" class="cancel--radio" color="$color-yellow3"/>
</UiCell>
<UiCell title="地址信息填写错误">
<radio slot="right-icon" value="2" class="cancel--radio" color="#FF875B"/>
<radio slot="right-icon" value="2" class="cancel--radio" color="$color-yellow3"/>
</UiCell>
<UiCell title="商品降价">
<radio slot="right-icon" value="3" class="cancel--radio" color="#FF875B"/>
<radio slot="right-icon" value="3" class="cancel--radio" color="$color-yellow3"/>
</UiCell>
<UiCell title="商品无货">
<radio slot="right-icon" value="4" class="cancel--radio" color="#FF875B"/>
<radio slot="right-icon" value="4" class="cancel--radio" color="$color-yellow3"/>
</UiCell>
<UiCell title="其他">
<radio slot="right-icon" value="5" class="cancel--radio" color="#FF875B"/>
<radio slot="right-icon" value="5" class="cancel--radio" color="$color-yellow3"/>
</UiCell>
</radio-group>
<view class="cancel--footer">
@ -148,8 +148,8 @@ export default {
<style lang="scss" scoped>
page{
// background: linear-gradient(180deg, #FDF9F5 0%, rgba(254, 253, 252, 0) 50%) #f8f8f8;
background: #f8f8f8;
// background: linear-gradient(180deg, #FDF9F5 0%, rgba(254, 253, 252, 0) 50%) $color-grey1;
background: $color-grey1;
padding-bottom: 138rpx;
}
.header{
@ -157,7 +157,7 @@ page{
}
.address{
// background: #fff;
// background: $color-grey0;
&--icon{
width: 28rpx;
height: 34rpx;
@ -179,8 +179,8 @@ page{
margin-bottom: 20rpx;
}
&--desc{
font-size: 28rpx;
color: #999;
font-size: $font-size-base;
color: $color-grey4;
margin-bottom: 48rpx;
}
}
@ -193,17 +193,17 @@ page{
display: flex;
justify-content: space-between;
&--value{
font-size: 24rpx;
font-size: $font-size-sm;
}
&--title{
color: #999;
font-size: 24rpx;
color: $color-grey4;
font-size: $font-size-sm;
}
}
.footer{
height: 138rpx;
padding: 0 30rpx;
background: #fff;
background: $color-grey0;
position: fixed;
bottom: 0;
left: 0;

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 10:58:24
* @LastEditors: ch
* @LastEditTime: 2022-03-31 15:59:03
* @LastEditTime: 2022-04-09 15:03:53
* @Description: file content
-->
<template>
@ -123,26 +123,26 @@ export default {
</script>
<style lang="scss" scoped>
page{
background: #f8f8f8;
background: $color-grey1;
overflow: hidden;
}
.tabs{
height: 100rpx;
background: #fff;
background: $color-grey0;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 40rpx;
font-size: 28rpx;
color: #666;
font-size: $font-size-base;
color: $color-grey5;
&__active{
color: #FF875B;
color: $color-yellow3;
position: relative;
&::after{
display: block;
content: '';
height: 4rpx;
background: #FF875B;
background: $color-yellow3;
border-radius: 4rpx;
position: absolute;
bottom: -20rpx;
@ -154,7 +154,7 @@ page{
}
.orders{
background: #fff;
background: $color-grey0;
padding: 30rpx;
margin: 20rpx 0;
&--title{
@ -163,14 +163,14 @@ page{
align-items: center;
}
&--name{
font-size: 32rpx;
color: #333;
font-size: $font-size-lg;
color: $color-grey6;
}
&--status{
font-size: 24rpx;
color: #999;
font-size: $font-size-sm;
color: $color-grey4;
&__warn{
color: #FF875B;
color: $color-yellow3;
}
}
&--item{
@ -188,8 +188,8 @@ page{
width: 510rpx;
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #333;
font-size: $font-size-base;
color: $color-grey6;
line-height: 39rpx;
}
&--item-title{
@ -205,31 +205,31 @@ page{
}
&--item-desc{
width: 510rpx;
font-size: 24rpx;
color: #999;
font-size: $font-size-sm;
color: $color-grey4;
margin-top: 20rpx;
line-height: 39rpx;
display: flex;
justify-content: space-between;
}
&--item-num{
font-size: 28rpx;
font-size: $font-size-base;
margin-left: 60rpx;
}
&--total{
font-size: 24rpx;
color: #999;
font-size: $font-size-sm;
color: $color-grey4;
display: flex;
align-items: center;
justify-content: end;
margin-top: 30rpx;
&__amount{
font-size: 28rpx;
font-size: $font-size-base;
margin-right: 20rpx;
}
&__pay{
color: #333;
color: $color-grey6;
}
}
&--footer{
@ -242,13 +242,13 @@ page{
line-height: 58rpx;
border-radius: 30rpx;
margin: 0 0 0 30rpx;
border: 1px solid #333;
color: #333;
border: 1px solid $color-grey6;
color: $color-grey6;
background: none;
font-size: 26rpx;
&__red{
background: linear-gradient(270deg, #FF7F39 0%, #FFA35B 100%);
color: #fff;
background: linear-gradient(270deg, $color-yellow2 0%, $color-yellow1 100%);
color: $color-grey0;
border: 0;
height: 60rpx;
line-height: 60rpx;

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-28 17:16:44
* @LastEditors: ch
* @LastEditTime: 2022-03-28 17:35:10
* @LastEditTime: 2022-04-09 15:02:41
* @Description: file content
-->
<template>
@ -30,14 +30,14 @@ page{
margin: 169rpx auto 42rpx;
}
.title{
font-size: 32rpx;
font-size: $font-size-lg;
line-height: 44rpx;
color: #333;
color: $color-grey6;
}
.desc{
font-size: 24rpx;
font-size: $font-size-sm;
line-height: 34rpx;
color: #999;
color: $color-grey4;
}
.btn{
margin-top: 74rpx;

@ -33,14 +33,14 @@ page{
margin: 169rpx auto 42rpx;
}
.title{
font-size: 32rpx;
font-size: $font-size-lg;
line-height: 44rpx;
color: #333;
color: $color-grey6;
}
.desc{
font-size: 24rpx;
font-size: $font-size-sm;
line-height: 34rpx;
color: #999;
color: $color-grey4;
}
.btns{
margin: 74rpx 105rpx 0;

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-20 14:14:53
* @LastEditors: ch
* @LastEditTime: 2022-04-08 17:33:27
* @LastEditTime: 2022-04-09 15:03:54
* @Description: file content
-->
<template>
@ -40,11 +40,11 @@
<radio-group>
<u-cell title="微信支付" :border="false">
<image class="play--icon" slot="icon" src="@/static/order/wx.png"/>
<radio class="play--radio" slot="right-icon" color="#FF875B"></radio>
<radio class="play--radio" slot="right-icon" color="$color-yellow3"></radio>
</u-cell>
<u-cell title="支付宝支付" :border="false">
<image class="play--icon" slot="icon" src="@/static/order/zfb.png"/>
<radio class="play--radio" slot="right-icon" color="#FF875B"></radio>
<radio class="play--radio" slot="right-icon" color="$color-yellow3"></radio>
</u-cell>
</radio-group>
</view>
@ -148,11 +148,11 @@ export default {
</script>
<style lang="scss" scoped>
page{
background: #f8f8f8;
background: $color-grey1;
padding-bottom: 140rpx;
}
.address{
background: #fff;
background: $color-grey0;
&--icon{
width: 34rpx;
height: 34rpx;
@ -161,13 +161,13 @@ page{
}
.goods-group{
background: #fff;
background: $color-grey0;
margin: 20rpx 0;
&--item{
display: flex;
justify-content: space-between;
padding: 30rpx;
border-bottom: 1px solid #eee;
border-bottom: 1px solid $color-grey2;
&-image{
width: 180rpx;
height: 180rpx;
@ -177,8 +177,8 @@ page{
width: 510rpx;
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #333;
font-size: $font-size-base;
color: $color-grey6;
line-height: 39rpx;
}
&-title{
@ -194,22 +194,22 @@ page{
}
&-desc{
width: 510rpx;
font-size: 24rpx;
color: #999;
font-size: $font-size-sm;
color: $color-grey4;
margin-top: 20rpx;
line-height: 39rpx;
display: flex;
justify-content: space-between;
}
&-num{
font-size: 28rpx;
font-size: $font-size-base;
margin-left: 60rpx;
}
}
}
.service{
background: #fff;
background: $color-grey0;
margin: 20rpx 0;
&--cell{
padding: 0 30rpx;
@ -218,17 +218,17 @@ page{
}
}
&--remark{
font-size: 28rpx;
font-size: $font-size-base;
width: 500rpx;
text-align: right;
}
}
.play{
background: #fff;
background: $color-grey0;
margin: 20rpx 0;
&--title{
font-size: 28rpx;
font-size: $font-size-base;
padding: 30rpx;
display: block;
}
@ -242,7 +242,7 @@ page{
}
}
.amount{
background: #fff;
background: $color-grey0;
}
.footer{
@ -250,21 +250,21 @@ page{
align-items: center;
justify-content: space-between;
height: 120rpx;
background: #fff;
background: $color-grey0;
padding: 0 30rpx;
position: fixed;
bottom: 0;
right: 0;
left: 0;
&--total{
color: #666;
font-size: 24rpx;
color: $color-grey5;
font-size: $font-size-sm;
display: flex;
align-items: center;
}
&--amount{
font-size: 32rpx;
color: #FF512B;
font-size: $font-size-lg;
color: $color-yellow4;
margin-left: 10rpx;
}
&--btn{

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-21 18:08:07
* @LastEditors: ch
* @LastEditTime: 2022-03-26 18:01:12
* @LastEditTime: 2022-04-09 15:10:41
* @Description: file content
-->
<template>
@ -87,7 +87,7 @@ page{
transform: rotate(0deg);
}
&--item{
font-size: 24rpx;
font-size: $font-size-sm;
line-height: 45rpx;
color: #EF6817;
&__active{
@ -96,7 +96,7 @@ page{
}
&--time{
display: block;
font-size: 32rpx;
font-size: $font-size-lg;
}
}
.goods{
@ -148,7 +148,7 @@ page{
}
&--price{
display: flex;
font-size: 28rpx;
font-size: $font-size-base;
color: #F31F07;
font-weight: bold;
align-items: center;
@ -161,14 +161,14 @@ page{
line-height: 36rpx;
border-radius: 6rpx;
background: #FE0A16;
color: #fff;
font-size: 24rpx;
color: $color-grey0;
font-size: $font-size-sm;
text-align: center;
margin-right: 10rpx;
}
}
&--orgPrice{
font-size: 24rpx;
font-size: $font-size-sm;
color: #BE4903;
text-decoration: line-through;
}
@ -178,7 +178,7 @@ page{
line-height: 62rpx;
background: url('@/static/sekill/btn.png');
background-size: 166rpx;
font-size: 28rpx;
font-size: $font-size-base;
font-weight: bold;
padding: 0;
border: none;

@ -15,35 +15,61 @@
@import 'uview-ui/theme.scss';
/* 颜色变量 */
//
$color-yellow0: #FFEDE9;
$color-yellow1: #FFA35B;
$color-yellow2: #FF7F39;
$color-yellow3: #FF875B;
$color-yellow4: #FF512B;
$color-grey0: #FFF;
$color-grey1: #f8f8f8;
$color-grey2: #eee;
$color-grey3: #ccc;
$color-grey4: #999;
$color-grey5: #666;
$color-grey6: #333;
$color-blue5: #69ADE5;
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
// $uni-color-primary: #007aff;
// $uni-color-success: #4cd964;
// $uni-color-warning: #f0ad4e;
// $uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color:#333;//
$uni-text-color-inverse:#fff;//
$uni-text-color-grey:#999;//
$uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0;
// $text-color-theme: $color-yellow4; //
// $text-color:$color-grey6;//
// $text-color-inverse: $color-grey0; //
// $text-color-auxiliary: $color-grey5; //
// $text-color-placeholder: $color-grey4; //
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//
// $bg-color: $color-grey0;
// $bg-color-grey: $color-grey1;
// $bg-color-hover:#f1f1f1;//
// $bg-color-mask:rgba(0, 0, 0, 0.4);//
/* 边框颜色 */
$uni-border-color:#c8c7cc;
// $uni-border-color: $color-grey2;
/* 透明度 */
$opacity-disabled: 0.3; //
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:12px;
$uni-font-size-base:14px;
$uni-font-size-lg:16;
$font-size-sm:24rpx;
$font-size-base:28rpx;
$font-size-lg:32rpx;
/* 间距 */
$sp-col-sm: 30rpx;
$sp-col-lg : 40rpx;
/* 图片尺寸 */
$uni-img-size-sm:20px;
@ -66,13 +92,5 @@ $uni-spacing-col-sm: 4px;
$uni-spacing-col-base: 8px;
$uni-spacing-col-lg: 12px;
/* 透明度 */
$uni-opacity-disabled: 0.3; //
/* 文章场景相关 */
$uni-color-title: #2C405A; //
$uni-font-size-title:20px;
$uni-color-subtitle: #555555; //
$uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; //
$uni-font-size-paragraph:15px;

Loading…
Cancel
Save