style: 购物车、我的页面ui
This commit is contained in:
+94
-21
@@ -1,5 +1,19 @@
|
||||
<template>
|
||||
<s-pages tabbar="/pages/cart/cart" title="购物车" :showLeftButton="false" color="#ffffff">
|
||||
<s-pages
|
||||
:pink_bg="false"
|
||||
tabbar="/pages/cart/cart"
|
||||
title="购物车"
|
||||
:showLeftButton="false"
|
||||
color="#EEF1FE"
|
||||
>
|
||||
<template #navRight>
|
||||
<view v-if="state.list.length" class="cart-nav-right">
|
||||
<view v-if="state.editMode" class="cart-nav-right__btn" @tap="onChangeEditMode(false)">
|
||||
取消
|
||||
</view>
|
||||
<view v-else class="cart-nav-right__btn f500" @tap="onChangeEditMode(true)">管理</view>
|
||||
</view>
|
||||
</template>
|
||||
<s-empty
|
||||
v-if="state.list.length === 0"
|
||||
icon="/static/cart-empty.png"
|
||||
@@ -8,13 +22,6 @@
|
||||
|
||||
<!-- 头部 -->
|
||||
<view v-if="state.list.length" class="cart-box ss-flex ss-flex-col ss-row-between">
|
||||
<view class="cart-header ss-flex ss-col-center ss-row-between ss-p-x-30">
|
||||
<view></view>
|
||||
<view class="header-right">
|
||||
<view v-if="state.editMode" class="" @tap="onChangeEditMode(false)"> 取消 </view>
|
||||
<view v-else class="f500" @tap="onChangeEditMode(true)"> 管理 </view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 内容 -->
|
||||
<view class="cart-content ss-flex-1 ss-p-x-30 ss-m-b-40 m-b-100">
|
||||
<view
|
||||
@@ -73,8 +80,8 @@
|
||||
:min="0"
|
||||
:step="1"
|
||||
@change="onNumberChange($event, item)"
|
||||
background="var(--color18)"
|
||||
color="var(--color34)"
|
||||
background="#ffffff"
|
||||
color="#333333"
|
||||
/>
|
||||
</template>
|
||||
</s-goods-item>
|
||||
@@ -82,7 +89,14 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 底部 -->
|
||||
<su-fixed v-if="state.list.length > 0" :isInset="false" :val="valNum" bottom placeholder>
|
||||
<su-fixed
|
||||
v-if="state.list.length > 0"
|
||||
:isInset="false"
|
||||
:val="valNum"
|
||||
:zIndex="70"
|
||||
bottom
|
||||
placeholder
|
||||
>
|
||||
<view class="cart-footer ss-flex ss-col-center ss-row-between ss-p-x-30 border-bottom">
|
||||
<view class="ss-flex ss-col-center flex1">
|
||||
<label class="check-box ss-flex ss-col-center ss-p-r-30 flex1" @tap="onSelectAll">
|
||||
@@ -117,7 +131,11 @@
|
||||
>
|
||||
删除
|
||||
</button>
|
||||
<button v-else class="ss-reset-button pay-btn ui-Shadow-Main" @tap="onConfirm">
|
||||
<button
|
||||
v-else
|
||||
class="ss-reset-button pay-btn ui-Shadow-Main checkout-btn"
|
||||
@tap="onConfirm"
|
||||
>
|
||||
去结算
|
||||
{{ state.selectedIds?.length ? `(${state.selectedIds.length})` : '' }}
|
||||
</button>
|
||||
@@ -284,14 +302,7 @@
|
||||
url: '/pages/goods/info?id=' + id,
|
||||
});
|
||||
};
|
||||
let valNum = ref(0);
|
||||
// #ifdef APP-PLUS
|
||||
valNum.value = 0;
|
||||
// #endif
|
||||
|
||||
// #ifndef APP-PLUS
|
||||
valNum.value = 50;
|
||||
// #endif
|
||||
const valNum = ref(uni.upx2px(100));
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -299,6 +310,19 @@
|
||||
height: 72rpx;
|
||||
}
|
||||
|
||||
.cart-nav-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cart-nav-right__btn {
|
||||
font-size: 28rpx;
|
||||
line-height: 1;
|
||||
padding: 10rpx 8rpx;
|
||||
}
|
||||
|
||||
.cart-box {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
@@ -345,7 +369,56 @@
|
||||
}
|
||||
}
|
||||
.ss-reset-button {
|
||||
background: linear-gradient(270deg, #f7772e 0%, #ee0a24 99%);
|
||||
color: #ffffff;
|
||||
}
|
||||
.ss-reset-button,
|
||||
.ss-reset-button.checkout-btn {
|
||||
background: linear-gradient(
|
||||
to bottom right,
|
||||
var(--accent-grad-start) 0%,
|
||||
var(--accent-grad-end) 100%
|
||||
);
|
||||
}
|
||||
|
||||
:deep(.uni-numbox) {
|
||||
height: 48rpx;
|
||||
border-radius: 999rpx;
|
||||
border: 2rpx solid rgba(0, 0, 0, 0.12);
|
||||
background: #ffffff;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:deep(.uni-numbox__value) {
|
||||
height: 44rpx;
|
||||
line-height: 44rpx;
|
||||
margin: 0;
|
||||
width: 60rpx;
|
||||
background: transparent !important;
|
||||
font-size: 26rpx;
|
||||
color: #333333 !important;
|
||||
}
|
||||
|
||||
:deep(.uni-numbox .move-round),
|
||||
:deep(.uni-numbox .add-round) {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
line-height: 44rpx;
|
||||
background: transparent !important;
|
||||
font-size: 30rpx;
|
||||
color: #333333 !important;
|
||||
border-radius: 50%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:deep(.uni-numbox .move-round) {
|
||||
border-right: 2rpx solid rgba(0, 0, 0, 0.12);
|
||||
border-radius: 999rpx 0 0 999rpx;
|
||||
}
|
||||
|
||||
:deep(.uni-numbox .add-round) {
|
||||
border-left: 2rpx solid rgba(0, 0, 0, 0.12);
|
||||
border-radius: 0 999rpx 999rpx 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user