refactor: remove local SCSS variables from 9 pages
Replace with global uni.scss tokens: $font → $font-family-body $primary → $uv-primary $text-* → $uv-main-color/$uv-content-color/$uv-tips-color/$uv-placeholder-color $divider → $uv-border-color $card-radius → $radius-lg $accent → $uv-primary Kept $bar-height: 120rpx as component-specific local var. Removed dead $primary-dark: #e89a2a from card-bind.vue (never used). Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -222,15 +222,6 @@ function goHome() {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$font: 'SourceHanSerifCN', '思源宋体', -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;
|
||||
$primary: #3c9cff;
|
||||
$text-main: #111111;
|
||||
$text-label: #222222;
|
||||
$text-body: #333333;
|
||||
$text-hint: #666666;
|
||||
$text-weak: #999999;
|
||||
$divider: #eeeeee;
|
||||
$card-radius: 24rpx;
|
||||
$bar-height: 120rpx;
|
||||
|
||||
.page {
|
||||
@@ -238,13 +229,13 @@ $bar-height: 120rpx;
|
||||
background: #f7f8fa;
|
||||
padding: 24rpx;
|
||||
padding-bottom: calc(#{$bar-height} + env(safe-area-inset-bottom) + 24rpx);
|
||||
font-family: $font;
|
||||
font-family: $font-family-body;
|
||||
}
|
||||
|
||||
/* ===== 模块1:状态卡片 ===== */
|
||||
.status-card {
|
||||
background: #ffffff;
|
||||
border-radius: $card-radius;
|
||||
border-radius: $radius-lg;
|
||||
padding: 48rpx 32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -345,24 +336,24 @@ $bar-height: 120rpx;
|
||||
}
|
||||
|
||||
.status-title {
|
||||
font-family: $font;
|
||||
font-family: $font-family-body;
|
||||
font-size: 38rpx;
|
||||
font-weight: 700;
|
||||
color: $text-main;
|
||||
color: $uv-main-color;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.status-desc {
|
||||
font-family: $font;
|
||||
font-family: $font-family-body;
|
||||
font-size: 26rpx;
|
||||
color: $text-hint;
|
||||
color: $uv-tips-color;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ===== 模块2:商品信息卡片 ===== */
|
||||
.info-card {
|
||||
background: #ffffff;
|
||||
border-radius: $card-radius;
|
||||
border-radius: $radius-lg;
|
||||
padding: 32rpx;
|
||||
margin-top: 24rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
|
||||
@@ -370,10 +361,10 @@ $bar-height: 120rpx;
|
||||
|
||||
.product-name {
|
||||
display: block;
|
||||
font-family: $font;
|
||||
font-family: $font-family-body;
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
color: $text-main;
|
||||
color: $uv-main-color;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
@@ -390,14 +381,14 @@ $bar-height: 120rpx;
|
||||
}
|
||||
|
||||
.price-symbol {
|
||||
font-family: $font;
|
||||
font-family: $font-family-body;
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
color: #e53935;
|
||||
}
|
||||
|
||||
.price-value {
|
||||
font-family: $font;
|
||||
font-family: $font-family-body;
|
||||
font-size: 38rpx;
|
||||
font-weight: 700;
|
||||
color: #e53935;
|
||||
@@ -405,9 +396,9 @@ $bar-height: 120rpx;
|
||||
}
|
||||
|
||||
.product-desc {
|
||||
font-family: $font;
|
||||
font-family: $font-family-body;
|
||||
font-size: 26rpx;
|
||||
color: $text-hint;
|
||||
color: $uv-tips-color;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
@@ -417,7 +408,7 @@ $bar-height: 120rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1rpx solid $divider;
|
||||
border-bottom: 1rpx solid $uv-border-color;
|
||||
|
||||
&--last {
|
||||
border-bottom: none;
|
||||
@@ -425,16 +416,16 @@ $bar-height: 120rpx;
|
||||
}
|
||||
|
||||
.detail-label {
|
||||
font-family: $font;
|
||||
font-family: $font-family-body;
|
||||
font-size: 26rpx;
|
||||
color: $text-label;
|
||||
color: $uv-main-color;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.detail-value {
|
||||
font-family: $font;
|
||||
font-family: $font-family-body;
|
||||
font-size: 26rpx;
|
||||
color: $text-body;
|
||||
color: $uv-content-color;
|
||||
text-align: right;
|
||||
|
||||
&--code {
|
||||
@@ -465,26 +456,26 @@ $bar-height: 120rpx;
|
||||
}
|
||||
|
||||
.copy-btn__text {
|
||||
font-family: $font;
|
||||
font-family: $font-family-body;
|
||||
font-size: 24rpx;
|
||||
color: $primary;
|
||||
color: $uv-primary;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* ===== 模块4:使用提示 ===== */
|
||||
.tips-card {
|
||||
background: rgba(60, 156, 255, 0.04);
|
||||
border-radius: $card-radius;
|
||||
border-radius: $radius-lg;
|
||||
padding: 32rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
.tips-title {
|
||||
display: block;
|
||||
font-family: $font;
|
||||
font-family: $font-family-body;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
color: $text-main;
|
||||
color: $uv-main-color;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
@@ -502,16 +493,16 @@ $bar-height: 120rpx;
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 50%;
|
||||
background: $primary;
|
||||
background: $uv-primary;
|
||||
flex-shrink: 0;
|
||||
margin-top: 14rpx;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.tips-text {
|
||||
font-family: $font;
|
||||
font-family: $font-family-body;
|
||||
font-size: 24rpx;
|
||||
color: $text-hint;
|
||||
color: $uv-tips-color;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
@@ -522,9 +513,9 @@ $bar-height: 120rpx;
|
||||
}
|
||||
|
||||
.tips-link__text {
|
||||
font-family: $font;
|
||||
font-family: $font-family-body;
|
||||
font-size: 24rpx;
|
||||
color: $primary;
|
||||
color: $uv-primary;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@@ -567,7 +558,7 @@ $bar-height: 120rpx;
|
||||
transition: all 0.15s ease;
|
||||
|
||||
&--primary {
|
||||
background: $primary;
|
||||
background: $uv-primary;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.97);
|
||||
@@ -575,7 +566,7 @@ $bar-height: 120rpx;
|
||||
}
|
||||
|
||||
&--outline {
|
||||
border: 2rpx solid $divider;
|
||||
border: 2rpx solid $uv-border-color;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.97);
|
||||
@@ -585,16 +576,16 @@ $bar-height: 120rpx;
|
||||
}
|
||||
|
||||
.btn-action__text {
|
||||
font-family: $font;
|
||||
font-family: $font-family-body;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-action__text--outline {
|
||||
font-family: $font;
|
||||
font-family: $font-family-body;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: $text-hint;
|
||||
color: $uv-tips-color;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user