style: 购物车、我的页面ui

This commit is contained in:
2026-06-02 14:00:17 +08:00
parent 1fe0a6351c
commit f83068a3fc
12 changed files with 274 additions and 82 deletions
+94 -21
View File
@@ -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>
+3
View File
@@ -391,6 +391,7 @@
};
const fetchTrend = async () => {
return
const params = buildTrendParams();
const res: any = await api.goldSeedTrend(params);
if (res?.code !== 0) {
@@ -512,6 +513,7 @@
return has0 || has1;
});
const fetchPoolGrowth = async () => {
return
const res: any = await api.goldSeedPoolGrowth();
if (res?.code !== 0) {
poolGrowthData.value = null;
@@ -592,6 +594,7 @@
return n >= 0 ? '#e54035' : '#777777';
});
const fetchFluctuation = async () => {
return
const res: any = await api.goldSeedFluctuation();
if (res?.code !== 0) {
fluctuationData.value = null;
+70 -30
View File
@@ -1,7 +1,7 @@
<template>
<view class="pages theme-ai">
<view class="bc">
<image src="/static/home/bc.png" mode="scaleToFill" />
<!-- <image src="/static/home/bc.png" mode="scaleToFill" /> -->
</view>
<view class="con" :style="{ paddingTop: paddingTop + 'px' }">
<view class="con_top flex-center ju-flex-start">
@@ -13,7 +13,7 @@
</view>
<view class="con_info flex-between w100">
<view class="con_left">
<view class="con_name ju-flex-start">
<view class="con_name c_fff ju-flex-start">
{{ dataInfo?.nickname || '昵称' }}
<image
:src="`${$url}home/${dataInfo.type}.svg`"
@@ -35,26 +35,36 @@
</view>
</view>
</view>
<view class="card_money flex-center ju-between p-x-32" @click="go('/pages/home/wallet')">
<!-- <view
<view class="b_fff" style="border-radius: 20rpx;">
<view class="card_money flex-center ju-between p-x-32" @click="go('/pages/home/wallet')">
<!-- <view
class="card_money flex-center ju-between p-x-32"
@click="go('/pages/home/pointsDetail?type=5')"
> -->
<view>
<view class="flex-center ju-flex-start m-b-8">
<view class="line34 size28" style="margin-right: 18rpx">钱包</view>
<view class="moneyNum line36 size36">¥ {{ $fen2yuan(dataInfo.wallet || 0) }}</view>
<view>
<view class="flex-center ju-flex-start m-b-8">
<view class="line34 size28 m-r-18">钱包</view>
<view class="moneyNum line36 size36">¥ {{ $fen2yuan(dataInfo.wallet || 0) }}</view>
</view>
<!-- <view class="c_fff line34">邀请好友下单得奖励</view> -->
</view>
<!-- <view class="c_fff line34">邀请好友下单得奖励</view> -->
<!-- <view class="moneyBtn" @click="go('/pages/home/pointsDetail?type=5')">立即提现</view> -->
</view>
<!-- <view class="moneyBtn" @click="go('/pages/home/pointsDetail?type=5')">立即提现</view> -->
</view>
<view class="card3 flex-center ju-evenly color_5">
<view v-for="(v, i) in moneyArr" :key="i" class="center" @click="go(v.url)">
<view class="card3_num m-b-8"
>{{ dataInfo[v.value] }}<text>{{ v.unit }}</text></view
<view class="card3 flex-center ju-evenly color_5">
<view
v-for="(v, i) in moneyArr"
:key="i"
class="center card3_item"
:class="{ 'card3_item--split': i !== 0 }"
@click="go(v.url)"
>
<view>{{ v.name || 0 }}</view>
<view
class="card3_num m-b-8"
:style="{ color: v.color || '' }"
>{{ dataInfo[v.value] }}<text>{{ v.unit }}</text></view
>
<view class="size32">{{ v.name || 0 }}</view>
</view>
</view>
</view>
<view class="card card4 bg24">
@@ -101,7 +111,6 @@
</view>
</view>
</view>
</view>
</view>
<cardTabber path="/pages/index/user" placeholder />
@@ -143,6 +152,7 @@
name: '绿色积分',
value: 'point',
url: '/pages/home/pointsDetail?type=1',
color: '#0ED72C',
},
// {
// id: 2,
@@ -163,6 +173,7 @@
name: '消费金',
value: 'consumptionGold',
url: '/pages/home/pointsDetail?type=4',
color: '#FE5200',
},
]);
let orderList = ref([
@@ -313,7 +324,9 @@
top: 0;
left: 0;
width: 100%;
height: 484rpx;
height: 380rpx;
background: #00f;
border-radius: 0 0 30rpx 30rpx;
image {
width: 100%;
@@ -325,7 +338,7 @@
position: absolute;
top: 0;
left: 0;
padding: 0rpx 30rpx;
padding: 0rpx 40rpx;
box-sizing: border-box;
padding-bottom: 0;
width: 100%;
@@ -334,7 +347,7 @@
.con_top {
margin-bottom: 36rpx;
align-items: flex-end;
align-items: center;
.head {
width: 130rpx;
@@ -351,22 +364,32 @@
.con_info {
margin-left: 24rpx;
display: flex;
flex-direction: column;
align-items: flex-start;
flex: 1;
flex-direction: row;
align-items: center;
justify-content: space-between;
// .con_left {
// display: flex;
// justify-content: center;
// align-items: flex-start;
// }
.con_left {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
min-width: 0;
}
.con_id {
background: linear-gradient(90deg, #50504e 0%, #292b28 100%);
// background: linear-gradient(90deg, #50504e 0%, #292b28 100%);
border-radius: 40rpx;
font-size: 20rpx;
font-size: 26rpx;
color: #ffffff;
// line-height: 36rpx;
// text-align: center;
padding: 7rpx 16rpx;
// padding: 7rpx 16rpx;
display: flex;
align-items: center;
display: inline-flex;
@@ -394,11 +417,11 @@
.auth-btn-type1 {
background: #fff;
color: #fb4d32;
color: var(--brand-blue);
}
.auth-btn-type2 {
background: linear-gradient(130deg, #fa8735 0%, #fe3b48 100%);
background: linear-gradient(130deg, var(--auth-grad-start) 0%, var(--auth-grad-end) 100%);
color: #fff;
}
@@ -425,11 +448,12 @@
}
.card_money {
height: 120rpx;
height: 100rpx;
box-sizing: border-box;
color: #ffe3b1;
background: url('/static/home/img1.png');
color: #ffffff;
background: linear-gradient(150deg, var(--wallet-grad-start) 0%, var(--wallet-grad-end) 100%);
font-size: 24rpx;
border-radius: 20rpx;
.moneyNum {
font-size: 30rpx;
@@ -463,6 +487,22 @@
}
}
.card3_item {
position: relative;
flex: 1;
}
.card3_item--split::before {
content: '';
position: absolute;
left: 0;
top: 50%;
width: 2rpx;
height: 90rpx;
background: rgba(0, 0, 0, 0.22);
transform: translateY(-50%);
}
.card4 {
.card4_icon {
width: 68rpx;