diff --git a/common/utils/requset.js b/common/utils/requset.js
index 2ff0941..c8d2857 100644
--- a/common/utils/requset.js
+++ b/common/utils/requset.js
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-17 17:42:32
* @LastEditors: ch
- * @LastEditTime: 2022-04-21 11:38:48
+ * @LastEditTime: 2022-04-21 16:02:45
* @Description: 项目接口请求统一处理器,返回一个需要token和不需要token的请求封装方法
*/
diff --git a/components/BsChoiceGoods.vue b/components/BsChoiceGoods.vue
index 7904c83..93f8849 100644
--- a/components/BsChoiceGoods.vue
+++ b/components/BsChoiceGoods.vue
@@ -2,13 +2,13 @@
* @Author: ch
* @Date: 2022-03-20 16:45:27
* @LastEditors: ch
- * @LastEditTime: 2022-04-19 18:08:43
+ * @LastEditTime: 2022-04-21 16:48:27
* @Description: file content
-->
-
+
\ No newline at end of file
diff --git a/components/UiPageHeader.vue b/components/UiPageHeader.vue
index c104eac..9b194ca 100644
--- a/components/UiPageHeader.vue
+++ b/components/UiPageHeader.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-25 10:11:37
* @LastEditors: ch
- * @LastEditTime: 2022-04-09 15:02:30
+ * @LastEditTime: 2022-04-21 15:27:05
* @Description: file content
-->
@@ -37,7 +37,7 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
- background: $color-grey0;
+ background: $color-grey1;
position: sticky;
top: var(--window-top);
z-index: 999;
@@ -49,7 +49,8 @@ export default {
&--title{
flex: 1;
text-align: center;
- font-size: $font-size-lg;
+ font-size: 36rpx;
+ font-weight: bold;
}
&--operation{
position: absolute;
diff --git a/pages/account/address/list.vue b/pages/account/address/list.vue
index dc6edbd..ba031bc 100644
--- a/pages/account/address/list.vue
+++ b/pages/account/address/list.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 13:54:15
* @LastEditors: ch
- * @LastEditTime: 2022-04-20 15:32:04
+ * @LastEditTime: 2022-04-21 14:18:12
* @Description: file content
-->
@@ -72,16 +72,6 @@ export default {
}
this.addresList = result;
this.$store.commit('SET_ADDRESS', result);
-
- // 如果是提交订单且是创建地址则直接选中默认或第一个地址,并返回
- if(this.query.source=== 'submitOrder' && this.query.status === 'created'){
- if(result.length){
- uni.$emit('changeAddress',result.find(i => i.isDefault) || result[0], this.query.source);
- }else{
- uni.$emit('changeAddress',{}, this.query.source);
- }
- }
-
},
/**
* 选择地址
diff --git a/pages/cart/components/PageCtx.vue b/pages/cart/components/PageCtx.vue
index dce5044..b8ff6d3 100644
--- a/pages/cart/components/PageCtx.vue
+++ b/pages/cart/components/PageCtx.vue
@@ -3,12 +3,14 @@
-
+
购物车
({{list.length}})
- 编辑
- 完成
+
+ 编辑
+ 完成
+
@@ -21,26 +23,19 @@
-
-
+
+
-
-
- {{ item.product.name }}
-
-
- {{ item.productSku.name }}
-
-
+
+
+ {{ item.product.name }}
+ {{ item.productSku.name }}
-
-
+
+
为您推荐
@@ -61,30 +56,17 @@
合计:
-
- ¥
- {{ totalPrice }}
-
+
-
-
-
-
- 去结算 {{ checkedIds.length > 0 ? `(${checkedIds.length})` : '' }}
-
-
- 删除
-
-
+ 删除
+ 去结算({{list.length}})
@@ -96,6 +78,9 @@ 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';
+import UiMoney from '../../../components/UiMoney.vue';
+import UiButton from '../../../components/UiButton.vue';
+import UiWhiteBox from '../../../components/UiWhiteBox.vue';
const CartIdsIndex = 'CartIds';
@@ -103,7 +88,10 @@ export default {
components: {
BsEmpty,
BsChoiceGoods,
- UiPageHeader
+ UiPageHeader,
+ UiMoney,
+ UiButton,
+ UiWhiteBox
},
props : {
type : {
@@ -280,32 +268,30 @@ export default {
const ids = this.checkedIds;
if (!ids.length) {
return false
- }
- uni.showModal({
- title: '友情提示',
- content: '您确定要删除该商品吗?',
- showCancel: true,
- success:async ()=> {
+ }
+
+ this.$msb.confirm({
+ content : '您确定要删除该商品吗?',
+ confirm : 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.checkedIds = [];
this.onClearInvalidId();
-
- }
- })
+ }
+ })
}
}
}
-
@@ -321,6 +307,9 @@ export default {
position: sticky;
top: var(--window-top);
z-index: 999;
+ &--title text{
+ font-size: 36rpx;
+ }
&--totla{
font-size: 36rpx;
color: $color-grey6;
@@ -342,17 +331,13 @@ export default {
}
-// 购物车列表
-.cart-list {
- background: $color-grey0;
-}
+// 购物车列
.cart-item {
width: 690rpx;
display: flex;
align-items: center;
- padding: 30rpx 0;
- margin: 0 auto 24rpx auto;
- border-bottom: 1px solid $color-grey2;
+ padding: 50rpx 40rpx 40rpx 24rpx;
+ margin: 20rpx auto;
&--radio {
width: 56rpx;
height: 80rpx;
@@ -390,7 +375,7 @@ export default {
&--props {
margin-top: 14rpx;
height: 40rpx;
- color: #ababab;
+ color: $color-grey4;
font-size: $font-size-sm;
overflow: hidden;
@@ -405,18 +390,6 @@ export default {
align-items: center;
margin-top: 20rpx;
}
- &--price {
- vertical-align: bottom;
- color: $color-yellow4;
-
- .unit {
- font-size: 20rpx;
- }
- .value {
- font-size: 22rpx;
- font-weight: bold;
- }
- }
&--stepper-icon{
font-size: 38rpx;
color: $color-grey3;
@@ -507,53 +480,28 @@ export default {
padding-right: 30rpx;
font-size: $font-size-sm;
color: $color-grey5;
-
- .goods-price {
- vertical-align: bottom;
- color: $color-yellow3;
-
- .unit {
- font-size: $font-size-sm;
- }
-
- .value {
- font-size: $font-size-lg;
- }
- }
}
- .cart-action {
- width: 200rpx;
- .btn-wrapper {
- height: 100%;
- display: flex;
- align-items: center;
- }
-
- .btn-item {
- flex: 1;
- font-size: $font-size-base;
- height: 72rpx;
- line-height: 72rpx;
- text-align: center;
- border-radius: 50rpx;
+}
+/deep/{
+ .cart-item--price{
text{
- color: $color-grey0;
+ font-size: $font-size-base;
+ color: $color-yellow4;
}
- }
-
- // 立即购买按钮
- .btn-main {
- background: $color-yellow3;//linear-gradient(to right, #f9211c, #ff6335);
-
- // 禁用按钮
- &.disabled {
- background: rgba($color: $color-yellow3, $alpha: .7);
- }
- }
-
- }
-
+ .ui-money--prefix{
+ font-size: $font-size-sm;
+ }
+ }
+ .goods-price{
+ text{
+ font-size: 40rpx;
+ color: $color-yellow4;
+ }
+ .ui-money--prefix{
+ font-size: $font-size-lg;
+ }
+ }
}
diff --git a/pages/cart/tabBarCart.vue b/pages/cart/tabBarCart.vue
index 2094d7e..058db54 100644
--- a/pages/cart/tabBarCart.vue
+++ b/pages/cart/tabBarCart.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-08 18:36:14
* @LastEditors: ch
- * @LastEditTime: 2022-04-09 10:38:37
+ * @LastEditTime: 2022-04-21 15:46:55
* @Description: file content
-->
@@ -25,7 +25,7 @@ export default {
\ No newline at end of file
diff --git a/pages/goods/detail/components/SkuPopup.vue b/pages/goods/detail/components/SkuPopup.vue
index c3c29f1..db3fa3c 100644
--- a/pages/goods/detail/components/SkuPopup.vue
+++ b/pages/goods/detail/components/SkuPopup.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-24 11:30:55
* @LastEditors: ch
- * @LastEditTime: 2022-04-19 10:51:46
+ * @LastEditTime: 2022-04-21 14:42:04
* @Description: file content
-->
@@ -200,7 +200,9 @@ export default {
uni.$u.toast(error.message);
return false;
}
- this.$Router.push('/cart');
+ uni.$u.toast('加入购物车成功~');
+ this.close();
+ // this.$Router.push('/cart');
},
/**
* 立即购买
@@ -225,7 +227,7 @@ export default {
}
},
close(){
- this.$emit('update:visible', false)
+ this.$emit('update:visible', false);
}
}
};
diff --git a/pages/goods/detail/index.vue b/pages/goods/detail/index.vue
index 42f01dd..6fc6018 100644
--- a/pages/goods/detail/index.vue
+++ b/pages/goods/detail/index.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-23 17:27:21
* @LastEditors: ch
- * @LastEditTime: 2022-04-19 10:48:00
+ * @LastEditTime: 2022-04-21 14:49:48
* @Description: file content
-->
@@ -112,7 +112,7 @@ export default {
const {query} = this.$Route;
const {error, result} = await ApiGetGoodsSkus({productId : query.id});
if(error) {
- uni.$u.totast(error.message);
+ uni.$u.toast(error.message);
return false;
}
this.skuInfoData = result;
diff --git a/pages/index/components/Pick.vue b/pages/index/components/Pick.vue
index 1b56a6d..b9530e9 100644
--- a/pages/index/components/Pick.vue
+++ b/pages/index/components/Pick.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-23 10:29:07
* @LastEditors: ch
- * @LastEditTime: 2022-04-21 11:04:56
+ * @LastEditTime: 2022-04-21 16:23:22
* @Description: file content
-->
@@ -140,6 +140,7 @@ export default {
text{
color: $color-yellow4;
font-size: $font-size-lg;
+ font-weight: bold;
}
.ui-money--prefix{
font-size: $font-size-sm;
diff --git a/pages/index/components/Seckill.vue b/pages/index/components/Seckill.vue
index c862cef..a5bf0b3 100644
--- a/pages/index/components/Seckill.vue
+++ b/pages/index/components/Seckill.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-23 10:07:48
* @LastEditors: ch
- * @LastEditTime: 2022-04-21 11:13:03
+ * @LastEditTime: 2022-04-21 16:45:14
* @Description: file content
-->
@@ -23,12 +23,10 @@
-
-
-
-
-
+
+
+
¥{{item.originalPrice}}
@@ -121,6 +119,7 @@ export default {
}
&--left{
display: flex;
+ align-items: center;
}
&--time{
display: flex;
@@ -134,46 +133,25 @@ export default {
}
&--time-name{
height: 100%;
- padding: 0 22rpx 0 15rpx;
- background: #FF512B;
+ padding: 0 32rpx 0 15rpx;
+ background: url('@/static/index/time_bg.png') right top no-repeat #FF512B;
+ background-size: 32rpx;
font-size: 22rpx;
color: #fff;
position: relative;
- &::after{
- display: block;
- content: '';
- width: 16rpx;
- height: 36rpx;
- background: #FF512B;
- transform: rotate(40deg);
- position: absolute;
- right: -10rpx;
- top: -12rpx;
- }
+
}
&--time-time{
- margin-right: 15rpx;
+ margin-right: 5rpx;
+ padding-right: 10rpx;
font-size: 22rpx;
color: #FF512B;
position: relative;
- &::before{
- display: block;
- content: '';
- width: 14rpx;
- height: 36rpx;
- background: #FFEDE9;
- transform: rotate(40deg);
- position: absolute;
- left: -52rpx;
- top: 8rpx;
- z-index: 0;
- }
}
&--time-icon{
width: 22rpx;
height: 22rpx;
- padding-left: 20rpx;
margin-right: 8rpx;
}
&--more{
@@ -197,28 +175,20 @@ export default {
margin-top: 30rpx;
}
&--item{
- &-img{
+ &-img-box{
+
width: 200rpx;
height: 200rpx;
border-radius: 8rpx;
background: #F8F8F8;
}
- &-pirce-box{
- width: 180rpx;
- height: 44rpx;
- line-height: 44rpx;
- background: linear-gradient(90deg, #FFE7DE 0%, #FFFFFF 100%);
- border-radius: 20rpx;
- text-align: center;
- margin: 20rpx 0 10rpx 0;
- }
- &-pirce-title{
- font-size: 22rpx;
- color: $color-grey5;
+ &-img{
+ width: 100%;
+ height: 100%;
}
&-pirce{
- color: #FF512B;
- font-size: 32rpx;
+ text-align: center;
+ margin-top: 24rpx;
}
&-original-pirce{
display: block;
@@ -226,6 +196,7 @@ export default {
color: #999;
text-decoration: line-through;
text-align: center;
+ margin-top: 6rpx;
}
}
@@ -238,6 +209,7 @@ export default {
text{
color: $color-yellow4;
font-size: $font-size-lg;
+ font-weight: bold;
}
.ui-money--prefix{
font-size: $font-size-base;
diff --git a/pages/index/index.vue b/pages/index/index.vue
index f7b0eb2..2e9b41a 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2019-08-22 19:41:20
* @LastEditors: ch
- * @LastEditTime: 2022-04-20 19:02:05
+ * @LastEditTime: 2022-04-21 17:00:00
* @Description: file content
-->
@@ -175,15 +175,11 @@ page{
display: block;
content: "";
width: 34rpx;
- height: 38rpx;
- background: url("@/static/index/search.png") no-repeat;
+ height: 42rpx;
+ background: url("@/static/index/search.png") 0 6rpx no-repeat;
background-size: 100%;
}
}
- &--icon{
- width: 34rpx;
- height: 36rpx;
- }
}
diff --git a/pages/order/detail/components/Operation.vue b/pages/order/detail/components/Operation.vue
index 011e46d..6bcd701 100644
--- a/pages/order/detail/components/Operation.vue
+++ b/pages/order/detail/components/Operation.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-15 17:46:10
* @LastEditors: ch
- * @LastEditTime: 2022-04-19 17:36:45
+ * @LastEditTime: 2022-04-21 14:49:57
* @Description: file content
-->
@@ -82,7 +82,7 @@ export default {
orderId : this.$Route.query.id
});
if(error){
- uni.$u.totast(error.message);
+ uni.$u.toast(error.message);
return false;
}
// 取消成功,跳到订单关闭页
diff --git a/pages/order/detail/index.vue b/pages/order/detail/index.vue
index f4f3b85..a8fc169 100644
--- a/pages/order/detail/index.vue
+++ b/pages/order/detail/index.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-31 14:26:09
* @LastEditors: ch
- * @LastEditTime: 2022-04-18 16:16:44
+ * @LastEditTime: 2022-04-21 14:49:52
* @Description: file content
-->
@@ -59,7 +59,7 @@ export default {
async getOrderInfo(){
const {error, result} = await ApiGetOrderDetail(this.$Route.query.id);
if(error){
- uni.$u.totast(error.message);
+ uni.$u.toast(error.message);
return false;
}
this.orderInfo = {...result};
diff --git a/static/index/logo1.png b/static/index/logo1.png
deleted file mode 100644
index 14a271c..0000000
Binary files a/static/index/logo1.png and /dev/null differ
diff --git a/static/index/search.png b/static/index/search.png
index 47364bf..e3aec68 100644
Binary files a/static/index/search.png and b/static/index/search.png differ
diff --git a/static/index/search1.png b/static/index/search1.png
new file mode 100644
index 0000000..47364bf
Binary files /dev/null and b/static/index/search1.png differ
diff --git a/static/index/time_bg.png b/static/index/time_bg.png
new file mode 100644
index 0000000..44c1504
Binary files /dev/null and b/static/index/time_bg.png differ