style
This commit is contained in:
+171
-120
@@ -5,31 +5,26 @@
|
||||
<view class="temp-banner">
|
||||
<text class="banner-text">共享风扇</text>
|
||||
<text class="banner-subtitle">让清凉随身携带</text>
|
||||
<view class="banner-bg"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 功能按钮区域 -->
|
||||
<view class="function-area">
|
||||
<view class="function-btn rent" @click="goToRent">
|
||||
<view class="btn-content">
|
||||
<image class="btn-icon" src="../../static/scan-icon.png" mode="aspectFit" />
|
||||
<text class="btn-text">扫码租借</text>
|
||||
</view>
|
||||
<text class="btn-desc">快速租借风扇</text>
|
||||
</view>
|
||||
|
||||
<view class="function-btn return" @click="goToReturn">
|
||||
<view class="btn-content">
|
||||
<image class="btn-icon" src="../../static/scan-icon.png" mode="aspectFit" />
|
||||
<text class="btn-text">扫码归还</text>
|
||||
</view>
|
||||
<text class="btn-desc">轻松完成归还</text>
|
||||
<!-- 扫码按钮区域 -->
|
||||
<view class="scan-area">
|
||||
<view class="scan-btn" @click="handleScan">
|
||||
<view class="btn-content">
|
||||
<image class="btn-icon" src="../../static/scan-icon.png" mode="aspectFit" />
|
||||
<text class="btn-text">扫一扫</text>
|
||||
</view>
|
||||
<text class="btn-desc">扫描设备二维码使用或归还</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 使用提示区域 -->
|
||||
<view class="tips-section">
|
||||
<view class="tips-title">使用小贴士</view>
|
||||
<view class="tips-header">
|
||||
<view class="tips-title">使用小贴士</view>
|
||||
</view>
|
||||
<view class="tips-list">
|
||||
<view class="tip-item">
|
||||
<view class="tip-dot"></view>
|
||||
@@ -55,14 +50,19 @@
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
goToRent() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/rent/index'
|
||||
})
|
||||
},
|
||||
goToReturn() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/return/index'
|
||||
handleScan() {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/device/detail?deviceId=${res.result}`
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: '扫码失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -76,117 +76,167 @@
|
||||
padding-bottom: 40rpx;
|
||||
|
||||
.banner {
|
||||
padding: 20rpx;
|
||||
padding: 30rpx;
|
||||
|
||||
.temp-banner {
|
||||
height: 320rpx;
|
||||
background: linear-gradient(135deg, rgba(25, 118, 210, 0.8), rgba(100, 181, 246, 0.8));
|
||||
border-radius: 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
box-shadow: 0 4rpx 20rpx rgba(25, 118, 210, 0.2);
|
||||
|
||||
.banner-text {
|
||||
font-size: 48rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.banner-subtitle {
|
||||
font-size: 28rpx;
|
||||
opacity: 0.9;
|
||||
}
|
||||
height: 300rpx;
|
||||
background: linear-gradient(135deg, #1976D2, #42A5F5);
|
||||
border-radius: 30rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
box-shadow: 0 8rpx 32rpx rgba(25, 118, 210, 0.2);
|
||||
|
||||
.banner-text {
|
||||
font-size: 56rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
text-shadow: 0 2rpx 4rpx rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.banner-subtitle {
|
||||
font-size: 32rpx;
|
||||
opacity: 0.95;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
text-shadow: 0 2rpx 4rpx rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.banner-bg {
|
||||
position: absolute;
|
||||
right: -60rpx;
|
||||
bottom: -60rpx;
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
background: rgba(255,255,255,0.1);
|
||||
border-radius: 50%;
|
||||
transform: rotate(-15deg);
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: -80rpx;
|
||||
top: -80rpx;
|
||||
width: 240rpx;
|
||||
height: 240rpx;
|
||||
background: rgba(255,255,255,0.08);
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.function-area {
|
||||
padding: 30rpx;
|
||||
.scan-area {
|
||||
padding: 20rpx 30rpx 40rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
justify-content: center;
|
||||
|
||||
.function-btn {
|
||||
width: 320rpx;
|
||||
height: 180rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
|
||||
transition: all 0.3s;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.btn-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 8rpx;
|
||||
|
||||
.btn-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.btn-text {
|
||||
font-size: 36rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-desc {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
&.rent {
|
||||
background: linear-gradient(135deg, #4CAF50, #81C784);
|
||||
|
||||
.btn-text,
|
||||
.btn-desc {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
&.return {
|
||||
background: linear-gradient(135deg, #FF9800, #FFB74D);
|
||||
|
||||
.btn-text,
|
||||
.btn-desc {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.scan-btn {
|
||||
width: 460rpx;
|
||||
height: 200rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: linear-gradient(135deg, #00C853, #69F0AE);
|
||||
border-radius: 30rpx;
|
||||
box-shadow: 0 8rpx 32rpx rgba(0, 200, 83, 0.2);
|
||||
transition: all 0.3s ease;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.98);
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 200, 83, 0.15);
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: linear-gradient(rgba(255,255,255,0.1), transparent);
|
||||
}
|
||||
|
||||
.btn-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 12rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
|
||||
.btn-icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.btn-text {
|
||||
font-size: 42rpx;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
text-shadow: 0 2rpx 4rpx rgba(0,0,0,0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.btn-desc {
|
||||
font-size: 26rpx;
|
||||
color: rgba(255, 255, 255, 0.95);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tips-section {
|
||||
margin: 30rpx;
|
||||
padding: 30rpx;
|
||||
margin: 0 30rpx;
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.04);
|
||||
border-radius: 24rpx;
|
||||
box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.05);
|
||||
overflow: hidden;
|
||||
|
||||
.tips-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 24rpx;
|
||||
color: #333;
|
||||
padding-left: 20rpx;
|
||||
border-left: 8rpx solid #1976D2;
|
||||
.tips-header {
|
||||
padding: 30rpx;
|
||||
background: linear-gradient(to right, #F5F9FF, #fff);
|
||||
border-bottom: 2rpx solid #f0f0f0;
|
||||
|
||||
.tips-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
position: relative;
|
||||
padding-left: 24rpx;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 8rpx;
|
||||
height: 32rpx;
|
||||
background: #1976D2;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tips-list {
|
||||
padding: 20rpx 30rpx;
|
||||
|
||||
.tip-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
margin-bottom: 24rpx;
|
||||
padding: 0 10rpx;
|
||||
|
||||
&:last-child {
|
||||
@@ -196,16 +246,17 @@
|
||||
.tip-dot {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 50%;
|
||||
background: #1976D2;
|
||||
border-radius: 50%;
|
||||
margin-right: 16rpx;
|
||||
flex-shrink: 0;
|
||||
box-shadow: 0 2rpx 6rpx rgba(25,118,210,0.2);
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
line-height: 1.5;
|
||||
line-height: 1.6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user