feat: 重构移动端 H5 页面视觉设计
基于移动优先原则优化布局、排版、颜色和间距,提升设计感和专业度。 - 重构全局设计系统:颜色、阴影、间距、圆角、排版 - 优化 UserInfoCard:更大的头像和状态徽章设计 - 优化 DeviceStatusCard:信息层级和指标网格 - 优化 TrafficCard:进度条和数字排版 - 优化 FunctionCard:4列布局和触摸反馈 - 优化 WifiCard:列表设计和信息层次 - 优化 FloatingButton:去除渐变,纯色设计 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(git add:*)"
|
||||
"Bash(git add:*)",
|
||||
"Read(//Users/break/.agents/skills/impeccable/**)",
|
||||
"Bash(node .agents/skills/impeccable/scripts/cleanup-deprecated.mjs)",
|
||||
"Bash(node *)",
|
||||
"Bash(npm run *)",
|
||||
"Bash(curl -s http://localhost:5173)",
|
||||
"Bash(git checkout *)",
|
||||
"Bash(git commit -m ' *)"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
|
||||
30
.impeccable.md
Normal file
30
.impeccable.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Impeccable Design Context
|
||||
|
||||
## Design Context
|
||||
|
||||
### Users
|
||||
- **Who**: Regular consumers on mobile who purchased a portable WiFi/MiFi device
|
||||
- **Context**: Using the app on their phone to check data usage, manage their device settings, top up balance, and ensure connectivity while traveling
|
||||
- **Job to be done**: Quick access to device status, data usage, and account management with minimal friction
|
||||
|
||||
### Brand Personality
|
||||
- **Voice**: Clean, confident, trustworthy
|
||||
- **Tone**: Fast and efficient, modern and sleek, friendly and helpful, reliable and secure
|
||||
- **3-word personality**: Modern · Trustworthy · Effortless
|
||||
- **Emotional goals**: Users should feel in control of their connectivity, confident their device is working, and that managing it is simple
|
||||
|
||||
### Aesthetic Direction
|
||||
- **Visual tone**: Minimal and refined — clean layouts with purposeful use of space
|
||||
- **References**: Consumer electronics (Apple, Tile, Anker) + Minimalist app interfaces
|
||||
- **Anti-references**: Cluttered admin dashboards, AI slop aesthetics, legacy carrier apps, overly playful designs
|
||||
- **Theme**: Light mode only — bright, clean, accessible
|
||||
- **Colors**: Blue-based palette (iOS-like primary blue #0A84FF) with the existing color system as a base
|
||||
|
||||
### Design Principles
|
||||
1. **Clarity first**: Every element earns its place. No decorative clutter.
|
||||
2. **Confidence through space**: Generous whitespace creates premium feel. Tight grouping shows related content.
|
||||
3. **Light and bright**: Light theme only. White surfaces, not gray. Blue accent for primary actions.
|
||||
4. **Progressive disclosure**: Simple by default, reveal complexity on demand (e.g., WiFi settings behind a tap).
|
||||
5. **Fast interactions**: Optimistic UI. Updates feel instant. Loading states are minimal.
|
||||
6. **Typography hierarchy**: Bold headings, readable body. Clear contrast between levels.
|
||||
7. **Trust signals**: Online/offline status, battery level, data usage — at a glance, always visible.
|
||||
569
App.vue
569
App.vue
@@ -8,85 +8,86 @@
|
||||
@import "uview-plus/index.scss";
|
||||
|
||||
:root {
|
||||
/* 主色 */
|
||||
--primary: #0A84FF;
|
||||
/* 主色 - iOS Blue 家族 */
|
||||
--primary: #007AFF;
|
||||
--primary-light: #5AC8FA;
|
||||
--primary-dark: #0066CC;
|
||||
--primary-dark: #0056CC;
|
||||
--primary-tint: rgba(0, 122, 255, 0.08);
|
||||
|
||||
/* 辅助色 */
|
||||
--success: #30D158;
|
||||
--success-light: rgba(48, 209, 88, 0.12);
|
||||
--warning: #FF9F0A;
|
||||
--warning-light: rgba(255, 159, 10, 0.12);
|
||||
--danger: #FF453A;
|
||||
--danger-light: rgba(255, 69, 58, 0.12);
|
||||
--info: #5E5CE6;
|
||||
/* 语义色 */
|
||||
--success: #34C759;
|
||||
--success-light: rgba(52, 199, 89, 0.1);
|
||||
--warning: #FF9500;
|
||||
--warning-light: rgba(255, 149, 0, 0.1);
|
||||
--danger: #FF3B30;
|
||||
--danger-light: rgba(255, 59, 48, 0.1);
|
||||
--info: #5856D6;
|
||||
|
||||
/* 扩展色 */
|
||||
--purple: #BF5AF2;
|
||||
--pink: #FF375F;
|
||||
--teal: #64D2FF;
|
||||
--indigo: #5E5CE6;
|
||||
|
||||
/* 中性色 - 灰阶 */
|
||||
--gray-100: #F2F2F7;
|
||||
--gray-200: #E5E5EA;
|
||||
--gray-300: #D1D1D6;
|
||||
--gray-400: #C7C7CC;
|
||||
--gray-500: #AEAEB2;
|
||||
--gray-600: #8E8E93;
|
||||
--gray-700: #636366;
|
||||
--gray-800: #3C3C43;
|
||||
--gray-900: #000000;
|
||||
|
||||
/* 背景色 */
|
||||
--bg-primary: #FFFFFF;
|
||||
--bg-secondary: #F2F2F7;
|
||||
--bg-tertiary: #FFFFFF;
|
||||
--bg-grouped: #F2F2F7;
|
||||
/* 中性色 - 微妙的蓝色底色 */
|
||||
--gray-50: #F8F9FC;
|
||||
--gray-100: #EEF1F5;
|
||||
--gray-200: #D9DDE6;
|
||||
--gray-300: #B8C0D0;
|
||||
--gray-400: #8E95A8;
|
||||
--gray-500: #6B7280;
|
||||
--gray-600: #4B5563;
|
||||
--gray-700: #374151;
|
||||
--gray-800: #1F2937;
|
||||
--gray-900: #111827;
|
||||
|
||||
/* 文字色 */
|
||||
--text-primary: #000000;
|
||||
--text-secondary: #3C3C43;
|
||||
--text-tertiary: rgba(60, 60, 67, 0.6);
|
||||
--text-quaternary: rgba(60, 60, 67, 0.3);
|
||||
--text-primary: var(--gray-900);
|
||||
--text-secondary: var(--gray-600);
|
||||
--text-tertiary: var(--gray-400);
|
||||
--text-inverse: #FFFFFF;
|
||||
|
||||
/* 阴影 */
|
||||
--shadow-small: 0 2rpx 4rpx rgba(0, 0, 0, 0.06);
|
||||
--shadow-medium: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
--shadow-large: 0 8rpx 24rpx rgba(0, 0, 0, 0.12);
|
||||
--shadow-extra-large: 0 16rpx 48rpx rgba(0, 0, 0, 0.16);
|
||||
/* 背景色 */
|
||||
--bg-base: #F5F7FA;
|
||||
--bg-surface: #FFFFFF;
|
||||
--bg-elevated: #FFFFFF;
|
||||
|
||||
/* 阴影 - 更细腻 */
|
||||
--shadow-xs: 0 1rpx 2rpx rgba(0, 0, 0, 0.04);
|
||||
--shadow-sm: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
|
||||
--shadow-md: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
|
||||
--shadow-lg: 0 8rpx 32rpx rgba(0, 0, 0, 0.10);
|
||||
--shadow-xl: 0 16rpx 48rpx rgba(0, 0, 0, 0.12);
|
||||
|
||||
/* 圆角 */
|
||||
--radius-small: 8rpx;
|
||||
--radius-medium: 16rpx;
|
||||
--radius-large: 24rpx;
|
||||
--radius-extra-large: 32rpx;
|
||||
--radius-xs: 6rpx;
|
||||
--radius-sm: 10rpx;
|
||||
--radius-md: 16rpx;
|
||||
--radius-lg: 24rpx;
|
||||
--radius-xl: 32rpx;
|
||||
--radius-full: 9999rpx;
|
||||
|
||||
/* 间距 */
|
||||
--space-xs: 8rpx;
|
||||
--space-sm: 16rpx;
|
||||
--space-md: 24rpx;
|
||||
--space-lg: 32rpx;
|
||||
--space-xl: 40rpx;
|
||||
--space-2xl: 48rpx;
|
||||
/* 间距 - 4pt 基准 */
|
||||
--space-1: 4rpx;
|
||||
--space-2: 8rpx;
|
||||
--space-3: 12rpx;
|
||||
--space-4: 16rpx;
|
||||
--space-5: 20rpx;
|
||||
--space-6: 24rpx;
|
||||
--space-8: 32rpx;
|
||||
--space-10: 40rpx;
|
||||
--space-12: 48rpx;
|
||||
--space-16: 64rpx;
|
||||
|
||||
/* 过渡 */
|
||||
--transition-fast: 0.2s ease-out;
|
||||
--transition-normal: 0.3s ease-out;
|
||||
--transition-slow: 0.5s ease-out;
|
||||
|
||||
/* 边框色 */
|
||||
--border-color: var(--gray-200);
|
||||
--border-light: var(--gray-100);
|
||||
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
||||
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
--duration-fast: 0.15s;
|
||||
--duration-normal: 0.25s;
|
||||
--duration-slow: 0.4s;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "MiSans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
box-sizing: border-box;
|
||||
font-family: "MiSans", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
ul, li {
|
||||
@@ -95,29 +96,31 @@
|
||||
|
||||
page {
|
||||
color: var(--text-primary);
|
||||
background-color: var(--bg-secondary);
|
||||
background-color: var(--bg-base);
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20rpx;
|
||||
padding: 30rpx 20rpx;
|
||||
gap: var(--space-4);
|
||||
padding: var(--space-5) var(--space-4);
|
||||
max-width: 750rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--bg-primary);
|
||||
border-radius: var(--radius-medium);
|
||||
padding: var(--space-md);
|
||||
border: 1rpx solid var(--border-color);
|
||||
transition: all var(--transition-fast);
|
||||
background: var(--bg-surface);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--space-5);
|
||||
box-shadow: var(--shadow-sm);
|
||||
transition: box-shadow var(--duration-normal) var(--ease-out),
|
||||
transform var(--duration-normal) var(--ease-out);
|
||||
}
|
||||
|
||||
.card-elevated {
|
||||
box-shadow: var(--shadow-large);
|
||||
transform: translateY(-4rpx);
|
||||
box-shadow: var(--shadow-lg);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.card-interactive {
|
||||
@@ -126,103 +129,120 @@
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.title {
|
||||
/* 排版系统 */
|
||||
.text-display {
|
||||
font-size: 48rpx;
|
||||
font-weight: 700;
|
||||
font-size: 34rpx;
|
||||
line-height: 1.2;
|
||||
line-height: 1.1;
|
||||
letter-spacing: -0.03em;
|
||||
color: var(--text-primary);
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
.text-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
line-height: 1.3;
|
||||
color: var(--text-secondary);
|
||||
line-height: 1.2;
|
||||
letter-spacing: -0.02em;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.body {
|
||||
.text-heading {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
line-height: 1.25;
|
||||
letter-spacing: -0.01em;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.text-body {
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
line-height: 1.4;
|
||||
line-height: 1.5;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.caption {
|
||||
font-weight: 500;
|
||||
.text-caption {
|
||||
font-size: 24rpx;
|
||||
line-height: 1.3;
|
||||
font-weight: 500;
|
||||
line-height: 1.4;
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
|
||||
.mt-xs { margin-top: var(--space-xs); }
|
||||
.mt-sm { margin-top: var(--space-sm); }
|
||||
.mt-md { margin-top: var(--space-md); }
|
||||
.mt-lg { margin-top: var(--space-lg); }
|
||||
.mt-xl { margin-top: var(--space-xl); }
|
||||
.mt-30 { margin-top: 30rpx; }
|
||||
.mt-20 { margin-top: 20rpx; }
|
||||
|
||||
.mb-xs { margin-bottom: var(--space-xs); }
|
||||
.mb-sm { margin-bottom: var(--space-sm); }
|
||||
.mb-md { margin-bottom: var(--space-md); }
|
||||
.mb-lg { margin-bottom: var(--space-lg); }
|
||||
.mb-xl { margin-bottom: var(--space-xl); }
|
||||
|
||||
.p-xs { padding: var(--space-xs); }
|
||||
.p-sm { padding: var(--space-sm); }
|
||||
.p-md { padding: var(--space-md); }
|
||||
.p-lg { padding: var(--space-lg); }
|
||||
.p-xl { padding: var(--space-xl); }
|
||||
|
||||
.flex-row { display: flex; align-items: center; }
|
||||
.flex-row-g8 { display: flex; align-items: center; gap: var(--space-xs); }
|
||||
.flex-row-g16 { display: flex; align-items: center; gap: var(--space-sm); }
|
||||
.flex-row-g20 { display: flex; align-items: center; gap: 20rpx; }
|
||||
.flex-row-g24 { display: flex; align-items: center; gap: var(--space-md); }
|
||||
.flex-row-sb { display: flex; align-items: center; justify-content: space-between; }
|
||||
.flex-row-center { display: flex; align-items: center; justify-content: center; }
|
||||
|
||||
.flex-col { display: flex; flex-direction: column; }
|
||||
.flex-col-g8 { display: flex; flex-direction: column; gap: var(--space-xs); }
|
||||
.flex-col-g16 { display: flex; flex-direction: column; gap: var(--space-sm); }
|
||||
.flex-col-g20 { display: flex; flex-direction: column; gap: 20rpx; }
|
||||
.flex-col-g24 { display: flex; flex-direction: column; gap: var(--space-md); }
|
||||
.flex-col-center-g20 { display: flex; flex-direction: column; gap: 20rpx; align-items: center; justify-content: center; }
|
||||
.flex-col-center { display: flex; flex-direction: column; align-items: center; justify-content: center; }
|
||||
|
||||
.w-100 { width: 100%; }
|
||||
.h-100 { height: 100%; }
|
||||
|
||||
.interactive {
|
||||
transition: all var(--transition-normal);
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.button-apple {
|
||||
background: var(--primary);
|
||||
color: var(--text-inverse);
|
||||
border: none;
|
||||
border-radius: var(--radius-medium);
|
||||
padding: var(--space-sm) var(--space-md);
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
transition: all var(--transition-normal);
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.tag-apple {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: var(--space-xs) var(--space-sm);
|
||||
background: var(--gray-100);
|
||||
color: var(--text-secondary);
|
||||
border-radius: var(--radius-small);
|
||||
.text-label {
|
||||
font-size: 22rpx;
|
||||
font-weight: 600;
|
||||
line-height: 1.3;
|
||||
letter-spacing: 0.02em;
|
||||
color: var(--text-tertiary);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/* 间距 */
|
||||
.mt-1 { margin-top: var(--space-1); }
|
||||
.mt-2 { margin-top: var(--space-2); }
|
||||
.mt-3 { margin-top: var(--space-3); }
|
||||
.mt-4 { margin-top: var(--space-4); }
|
||||
.mt-5 { margin-top: var(--space-5); }
|
||||
.mt-6 { margin-top: var(--space-6); }
|
||||
.mt-8 { margin-top: var(--space-8); }
|
||||
.mt-10 { margin-top: var(--space-10); }
|
||||
|
||||
.mb-1 { margin-bottom: var(--space-1); }
|
||||
.mb-2 { margin-bottom: var(--space-2); }
|
||||
.mb-3 { margin-bottom: var(--space-3); }
|
||||
.mb-4 { margin-bottom: var(--space-4); }
|
||||
.mb-5 { margin-bottom: var(--space-5); }
|
||||
.mb-6 { margin-bottom: var(--space-6); }
|
||||
.mb-8 { margin-bottom: var(--space-8); }
|
||||
|
||||
.p-4 { padding: var(--space-4); }
|
||||
.p-5 { padding: var(--space-5); }
|
||||
.p-6 { padding: var(--space-6); }
|
||||
|
||||
/* Flex */
|
||||
.flex-row { display: flex; align-items: center; }
|
||||
.flex-row-g2 { display: flex; align-items: center; gap: var(--space-2); }
|
||||
.flex-row-g3 { display: flex; align-items: center; gap: var(--space-3); }
|
||||
.flex-row-g4 { display: flex; align-items: center; gap: var(--space-4); }
|
||||
.flex-row-g5 { display: flex; align-items: center; gap: var(--space-5); }
|
||||
.flex-row-g6 { display: flex; align-items: center; gap: var(--space-6); }
|
||||
.flex-row-sb { display: flex; align-items: center; justify-content: space-between; }
|
||||
.flex-row-center { display: flex; align-items: center; justify-content: center; }
|
||||
.flex-row-end { display: flex; align-items: center; justify-content: flex-end; }
|
||||
|
||||
.flex-col { display: flex; flex-direction: column; }
|
||||
.flex-col-g2 { display: flex; flex-direction: column; gap: var(--space-2); }
|
||||
.flex-col-g3 { display: flex; flex-direction: column; gap: var(--space-3); }
|
||||
.flex-col-g4 { display: flex; flex-direction: column; gap: var(--space-4); }
|
||||
.flex-col-g5 { display: flex; flex-direction: column; gap: var(--space-5); }
|
||||
.flex-col-g6 { display: flex; flex-direction: column; gap: var(--space-6); }
|
||||
.flex-col-center { display: flex; flex-direction: column; align-items: center; justify-content: center; }
|
||||
|
||||
.w-full { width: 100%; }
|
||||
.h-full { height: 100%; }
|
||||
|
||||
/* 交互状态 */
|
||||
.interactive {
|
||||
transition: all var(--duration-normal) var(--ease-out);
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
/* 标签 */
|
||||
.tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: var(--space-1) var(--space-3);
|
||||
border-radius: var(--radius-full);
|
||||
font-size: 22rpx;
|
||||
font-weight: 600;
|
||||
line-height: 1.4;
|
||||
letter-spacing: 0.01em;
|
||||
|
||||
&.tag-default {
|
||||
background: var(--gray-100);
|
||||
color: var(--gray-600);
|
||||
}
|
||||
|
||||
&.tag-success {
|
||||
background: var(--success-light);
|
||||
@@ -230,7 +250,7 @@
|
||||
}
|
||||
|
||||
&.tag-primary {
|
||||
background: rgba(10, 132, 255, 0.12);
|
||||
background: var(--primary-tint);
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
@@ -245,36 +265,207 @@
|
||||
}
|
||||
}
|
||||
|
||||
.progress-apple {
|
||||
/* 进度条 */
|
||||
.progress {
|
||||
width: 100%;
|
||||
height: 8rpx;
|
||||
background: var(--gray-200);
|
||||
border-radius: var(--radius-small);
|
||||
height: 10rpx;
|
||||
background: var(--gray-100);
|
||||
border-radius: var(--radius-full);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
.progress-fill {
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, var(--primary), var(--primary-light));
|
||||
border-radius: var(--radius-small);
|
||||
transition: width var(--transition-normal);
|
||||
background: var(--primary);
|
||||
border-radius: var(--radius-full);
|
||||
transition: width var(--duration-slow) var(--ease-out);
|
||||
}
|
||||
}
|
||||
|
||||
/* 按钮 */
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: none;
|
||||
border-radius: var(--radius-md);
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
transition: all var(--duration-fast) var(--ease-out);
|
||||
user-select: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
padding: var(--space-4) var(--space-5);
|
||||
font-size: 28rpx;
|
||||
background: var(--gray-100);
|
||||
color: var(--text-primary);
|
||||
|
||||
&.btn-primary {
|
||||
background: var(--primary);
|
||||
color: var(--text-inverse);
|
||||
}
|
||||
|
||||
&.btn-success {
|
||||
background: var(--success);
|
||||
color: var(--text-inverse);
|
||||
}
|
||||
|
||||
&.btn-warning {
|
||||
background: var(--warning);
|
||||
color: var(--text-inverse);
|
||||
}
|
||||
|
||||
&.btn-danger {
|
||||
background: var(--danger);
|
||||
color: var(--text-inverse);
|
||||
}
|
||||
|
||||
&.btn-ghost {
|
||||
background: transparent;
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
&.btn-mini {
|
||||
min-height: 52rpx;
|
||||
padding: 0 var(--space-4);
|
||||
font-size: 24rpx;
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
&.btn-large {
|
||||
min-height: 88rpx;
|
||||
padding: 0 var(--space-8);
|
||||
font-size: 32rpx;
|
||||
border-radius: var(--radius-lg);
|
||||
}
|
||||
|
||||
&.btn-disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
display: flex;
|
||||
gap: var(--space-3);
|
||||
|
||||
.btn {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
&.btn-group-vertical {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
/* 兼容旧类名 */
|
||||
.mt-xs { margin-top: var(--space-2); }
|
||||
.mt-sm { margin-top: var(--space-4); }
|
||||
.mt-md { margin-top: var(--space-6); }
|
||||
.mt-lg { margin-top: var(--space-8); }
|
||||
.mt-xl { margin-top: var(--space-10); }
|
||||
.mt-30 { margin-top: 30rpx; }
|
||||
.mt-20 { margin-top: 20rpx; }
|
||||
|
||||
.mb-xs { margin-bottom: var(--space-2); }
|
||||
.mb-sm { margin-bottom: var(--space-4); }
|
||||
.mb-md { margin-bottom: var(--space-6); }
|
||||
.mb-lg { margin-bottom: var(--space-8); }
|
||||
.mb-xl { margin-bottom: var(--space-10); }
|
||||
|
||||
.p-xs { padding: var(--space-2); }
|
||||
.p-sm { padding: var(--space-4); }
|
||||
.p-md { padding: var(--space-6); }
|
||||
.p-lg { padding: var(--space-8); }
|
||||
.p-xl { padding: var(--space-10); }
|
||||
|
||||
.flex-row-g8 { display: flex; align-items: center; gap: var(--space-2); }
|
||||
.flex-row-g16 { display: flex; align-items: center; gap: var(--space-4); }
|
||||
.flex-row-g20 { display: flex; align-items: center; gap: 20rpx; }
|
||||
.flex-row-g24 { display: flex; align-items: center; gap: var(--space-6); }
|
||||
|
||||
.flex-col-g8 { display: flex; flex-direction: column; gap: var(--space-2); }
|
||||
.flex-col-g16 { display: flex; flex-direction: column; gap: var(--space-4); }
|
||||
.flex-col-g20 { display: flex; flex-direction: column; gap: 20rpx; }
|
||||
.flex-col-g24 { display: flex; flex-direction: column; gap: var(--space-6); }
|
||||
|
||||
/* 背景色 */
|
||||
.bg-primary { background-color: var(--bg-surface); }
|
||||
.bg-secondary { background-color: var(--bg-base); }
|
||||
.bg-success { background-color: var(--success); }
|
||||
.bg-warning { background-color: var(--warning); }
|
||||
.bg-danger { background-color: var(--danger); }
|
||||
|
||||
/* 文字色 */
|
||||
.text-primary { color: var(--text-primary); }
|
||||
.text-secondary { color: var(--text-secondary); }
|
||||
.text-tertiary { color: var(--text-tertiary); }
|
||||
.text-inverse { color: var(--text-inverse); }
|
||||
.text-success { color: var(--success); }
|
||||
.text-warning { color: var(--warning); }
|
||||
.text-danger { color: var(--danger); }
|
||||
|
||||
/* 旧标签兼容 */
|
||||
.tag-apple {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: var(--space-1) var(--space-3);
|
||||
background: var(--gray-100);
|
||||
color: var(--gray-600);
|
||||
border-radius: var(--radius-full);
|
||||
font-size: 22rpx;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.01em;
|
||||
|
||||
&.tag-success {
|
||||
background: var(--success-light);
|
||||
color: var(--success);
|
||||
}
|
||||
|
||||
&.tag-primary {
|
||||
background: var(--primary-tint);
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
&.tag-warning {
|
||||
background: var(--warning-light);
|
||||
color: var(--warning);
|
||||
}
|
||||
|
||||
&.tag-danger {
|
||||
background: var(--danger-light);
|
||||
color: var(--danger);
|
||||
}
|
||||
}
|
||||
|
||||
/* 旧按钮兼容 */
|
||||
.button-apple {
|
||||
background: var(--primary);
|
||||
color: var(--text-inverse);
|
||||
border: none;
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-4) var(--space-5);
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
transition: all var(--duration-normal) var(--ease-out);
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.btn-apple {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: none;
|
||||
border-radius: var(--radius-small);
|
||||
border-radius: var(--radius-sm);
|
||||
font-weight: 500;
|
||||
font-size: 26rpx;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
transition: all var(--duration-fast) var(--ease-out);
|
||||
user-select: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
padding: 20rpx;
|
||||
padding: var(--space-5);
|
||||
background: var(--gray-100);
|
||||
color: var(--text-primary);
|
||||
|
||||
@@ -299,56 +490,44 @@
|
||||
}
|
||||
|
||||
&.btn-secondary {
|
||||
background: var(--gray-300);
|
||||
color: var(--text-secondary);
|
||||
background: var(--gray-200);
|
||||
color: var(--gray-700);
|
||||
}
|
||||
|
||||
&.btn-mini {
|
||||
min-height: 40rpx;
|
||||
padding: 0 16rpx;
|
||||
min-height: 52rpx;
|
||||
padding: 0 var(--space-4);
|
||||
font-size: 24rpx;
|
||||
border-radius: 6rpx;
|
||||
border-radius: var(--radius-xs);
|
||||
}
|
||||
|
||||
&.btn-large {
|
||||
min-height: 64rpx;
|
||||
padding: 0 32rpx;
|
||||
min-height: 88rpx;
|
||||
padding: 0 var(--space-8);
|
||||
font-size: 32rpx;
|
||||
border-radius: var(--radius-medium);
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
&.btn-disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
display: flex;
|
||||
gap: 12rpx;
|
||||
/* 旧进度条兼容 */
|
||||
.progress-apple {
|
||||
width: 100%;
|
||||
height: 10rpx;
|
||||
background: var(--gray-100);
|
||||
border-radius: var(--radius-full);
|
||||
overflow: hidden;
|
||||
|
||||
.btn-apple {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
&.btn-group-vertical {
|
||||
flex-direction: column;
|
||||
.progress-fill {
|
||||
height: 100%;
|
||||
background: var(--primary);
|
||||
border-radius: var(--radius-full);
|
||||
transition: width var(--duration-slow) var(--ease-out);
|
||||
}
|
||||
}
|
||||
|
||||
/* 通用背景色 */
|
||||
.bg-primary { background-color: var(--bg-primary); }
|
||||
.bg-secondary { background-color: var(--bg-secondary); }
|
||||
.bg-success { background-color: var(--success); }
|
||||
.bg-warning { background-color: var(--warning); }
|
||||
.bg-danger { background-color: var(--danger); }
|
||||
|
||||
/* 通用文字色 */
|
||||
.text-primary { color: var(--text-primary); }
|
||||
.text-secondary { color: var(--text-secondary); }
|
||||
.text-tertiary { color: var(--text-tertiary); }
|
||||
.text-inverse { color: var(--text-inverse); }
|
||||
.text-success { color: var(--success); }
|
||||
.text-warning { color: var(--warning); }
|
||||
.text-danger { color: var(--danger); }
|
||||
</style>
|
||||
|
||||
@@ -1,41 +1,55 @@
|
||||
<template>
|
||||
<view class="card device-status-card">
|
||||
<view class="card-header mb-md flex-row-sb">
|
||||
<view class="title">设备信息</view>
|
||||
<view class="tag-apple tag-success">{{ getOperator(deviceInfo.currentIccid) }}</view>
|
||||
</view>
|
||||
<view class="device-info flex-col-g16">
|
||||
<view class="info-row flex-row-sb">
|
||||
<view class="info-label">
|
||||
<view class="subtitle">当前卡: {{ deviceInfo.currentIccid }}</view>
|
||||
</view>
|
||||
<view class="info-values flex-row-g20" @tap="$emit('authentication')">
|
||||
<view class="tag-apple" :class="isRealName ? 'tag-success' : 'tag-warning'">
|
||||
{{ isRealName ? "已实名" : "未实名" }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="device-status-card">
|
||||
<view class="card-header">
|
||||
<text class="text-heading">设备信息</text>
|
||||
<view class="operator-badge">
|
||||
<text class="operator-name">中国电信</text>
|
||||
</view>
|
||||
<view class="info-row flex-row-sb">
|
||||
<view class="info-label">
|
||||
<view class="subtitle">到期时间:{{ deviceInfo.expireDate }}</view>
|
||||
</view>
|
||||
<view class="info-values flex-row-g20">
|
||||
<view class="tag-apple tag-primary">{{ statusText }}</view>
|
||||
</view>
|
||||
|
||||
<view class="status-row">
|
||||
<view class="status-item">
|
||||
<text class="status-label">当前卡</text>
|
||||
<text class="status-value iccid">{{ deviceInfo.currentIccid }}</text>
|
||||
</view>
|
||||
<view class="status-item">
|
||||
<text class="status-label">实名状态</text>
|
||||
<view class="auth-badge" :class="isRealName ? 'auth-done' : 'auth-pending'" @tap="$emit('authentication')">
|
||||
<text>{{ isRealName ? '已实名' : '未实名' }}</text>
|
||||
<text class="arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="device-metrics flex-row-sb mt-md">
|
||||
<view class="metric-item flex-col-center">
|
||||
<view class="caption mb-xs">信号强度</view>
|
||||
<view class="metric-value">{{ getSignalText(deviceInfo.rssi) }}</view>
|
||||
|
||||
<view class="status-row">
|
||||
<view class="status-item full-width">
|
||||
<text class="status-label">到期时间</text>
|
||||
<text class="status-value expire">{{ deviceInfo.expireDate }}</text>
|
||||
</view>
|
||||
<view class="metric-item flex-col-center">
|
||||
<view class="caption mb-xs">设备电量</view>
|
||||
<view class="metric-value">{{ deviceInfo.battery }} %</view>
|
||||
</view>
|
||||
|
||||
<view class="metrics-grid">
|
||||
<view class="metric-card">
|
||||
<view class="metric-icon signal">
|
||||
<image src="/static/signal.png" mode="aspectFit" v-if="false"></image>
|
||||
<text class="metric-icon-text">📶</text>
|
||||
</view>
|
||||
<text class="metric-label">信号强度</text>
|
||||
<text class="metric-value">{{ getSignalText(deviceInfo.rssi) }}</text>
|
||||
</view>
|
||||
<view class="metric-item flex-col-center">
|
||||
<view class="caption mb-xs">连接数量</view>
|
||||
<view class="metric-value">{{ deviceInfo.connCnt }}/{{ deviceInfo.max_clients }}</view>
|
||||
<view class="metric-card">
|
||||
<view class="metric-icon battery">
|
||||
<text class="metric-icon-text">🔋</text>
|
||||
</view>
|
||||
<text class="metric-label">设备电量</text>
|
||||
<text class="metric-value">{{ deviceInfo.battery }}%</text>
|
||||
</view>
|
||||
<view class="metric-card">
|
||||
<view class="metric-icon connections">
|
||||
<text class="metric-icon-text">📱</text>
|
||||
</view>
|
||||
<text class="metric-label">连接数量</text>
|
||||
<text class="metric-value">{{ deviceInfo.connCnt }}/{{ deviceInfo.max_clients }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -52,37 +66,152 @@
|
||||
|
||||
defineEmits(['authentication']);
|
||||
|
||||
const getOperator = (iccid) => {
|
||||
return '中国电信';
|
||||
};
|
||||
|
||||
const getSignalText = (rssi) => rssi || '强';
|
||||
|
||||
const statusText = computed(() => {
|
||||
const statusMap = {
|
||||
1: '在库',
|
||||
2: '已分销',
|
||||
3: '已激活',
|
||||
4: '已停用'
|
||||
};
|
||||
return statusMap[props.deviceInfo.status] || '-';
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.device-status-card {
|
||||
.info-row {
|
||||
padding: var(--space-sm) 0;
|
||||
border-bottom: 1rpx solid var(--gray-200);
|
||||
&:last-child { border-bottom: none; }
|
||||
.info-label { min-width: 200rpx; }
|
||||
.info-values { flex: 1; justify-content: flex-end; }
|
||||
}
|
||||
.device-metrics {
|
||||
background: var(--gray-100);
|
||||
border-radius: var(--radius-small);
|
||||
padding: 20rpx;
|
||||
.metric-item { flex: 1; }
|
||||
background: var(--bg-surface);
|
||||
border-radius: var(--radius-xl);
|
||||
padding: var(--space-5);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-bottom: var(--space-4);
|
||||
border-bottom: 1rpx solid var(--gray-100);
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
|
||||
.operator-badge {
|
||||
padding: var(--space-1) var(--space-3);
|
||||
background: var(--primary-tint);
|
||||
border-radius: var(--radius-full);
|
||||
}
|
||||
|
||||
.operator-name {
|
||||
font-size: 22rpx;
|
||||
font-weight: 600;
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.status-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: var(--space-3) 0;
|
||||
|
||||
& + .status-row {
|
||||
border-top: 1rpx solid var(--gray-50);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
.status-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-1);
|
||||
|
||||
&.full-width {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.status-label {
|
||||
font-size: 24rpx;
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
|
||||
.status-value {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
|
||||
&.iccid {
|
||||
font-family: "SF Mono", "Menlo", monospace;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
&.expire {
|
||||
color: var(--primary);
|
||||
}
|
||||
}
|
||||
|
||||
.auth-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4rpx;
|
||||
padding: var(--space-1) var(--space-3);
|
||||
border-radius: var(--radius-full);
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: transform var(--duration-fast) var(--ease-out);
|
||||
|
||||
&:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
|
||||
&.auth-done {
|
||||
background: var(--success-light);
|
||||
color: var(--success);
|
||||
}
|
||||
|
||||
&.auth-pending {
|
||||
background: var(--warning-light);
|
||||
color: var(--warning);
|
||||
}
|
||||
|
||||
.arrow {
|
||||
font-size: 28rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.metrics-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: var(--space-3);
|
||||
margin-top: var(--space-5);
|
||||
padding-top: var(--space-5);
|
||||
border-top: 1rpx solid var(--gray-100);
|
||||
}
|
||||
|
||||
.metric-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
padding: var(--space-4);
|
||||
background: var(--gray-50);
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
.metric-icon {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: var(--radius-sm);
|
||||
|
||||
.metric-icon-text {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.metric-label {
|
||||
font-size: 22rpx;
|
||||
color: var(--text-tertiary);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.metric-value {
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -1,13 +1,17 @@
|
||||
<template>
|
||||
<view class="floating-service-card" @click="handleClick">
|
||||
<view class="service-left">
|
||||
<image class="service-icon" src="/static/link.png" mode="aspectFit"></image>
|
||||
<view class="service-content">
|
||||
<text class="service-title">需要帮助?</text>
|
||||
<text class="service-desc">专属客服在线解答</text>
|
||||
<view class="service-card" @click="handleClick">
|
||||
<view class="service-inner">
|
||||
<view class="service-left">
|
||||
<view class="service-icon-wrap">
|
||||
<image class="service-icon" src="/static/link.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="service-content">
|
||||
<text class="service-title">需要帮助?</text>
|
||||
<text class="service-desc">专属客服在线解答</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="service-btn">立即联系</view>
|
||||
</view>
|
||||
<view class="service-btn">立即联系</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -20,56 +24,71 @@
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.floating-service-card {
|
||||
.service-card {
|
||||
position: fixed;
|
||||
bottom: 20rpx;
|
||||
left: 20rpx;
|
||||
right: 20rpx;
|
||||
height: 120rpx;
|
||||
background: #fff;
|
||||
border-radius: 60rpx;
|
||||
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.12);
|
||||
bottom: calc(var(--space-5) + env(safe-area-inset-bottom));
|
||||
left: var(--space-4);
|
||||
right: var(--space-4);
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.service-inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 24rpx 0 24rpx;
|
||||
z-index: 1000;
|
||||
padding: var(--space-4) var(--space-5);
|
||||
background: var(--bg-surface);
|
||||
border-radius: var(--radius-xl);
|
||||
box-shadow: var(--shadow-lg);
|
||||
}
|
||||
|
||||
.service-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20rpx;
|
||||
gap: var(--space-4);
|
||||
}
|
||||
|
||||
.service-icon {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
.service-icon-wrap {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--primary-tint);
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
.service-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4rpx;
|
||||
.service-icon {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
}
|
||||
|
||||
.service-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
.service-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2rpx;
|
||||
}
|
||||
|
||||
.service-desc {
|
||||
font-size: 22rpx;
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
}
|
||||
.service-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.service-desc {
|
||||
font-size: 24rpx;
|
||||
color: var(--text-tertiary);
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.service-btn {
|
||||
padding: 16rpx 32rpx;
|
||||
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
|
||||
color: #fff;
|
||||
padding: var(--space-3) var(--space-5);
|
||||
background: var(--primary);
|
||||
color: var(--text-inverse);
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
border-radius: 40rpx;
|
||||
border-radius: var(--radius-full);
|
||||
line-height: 1;
|
||||
}
|
||||
</style>
|
||||
@@ -1,111 +1,22 @@
|
||||
<template>
|
||||
<view class="card function-card">
|
||||
<view class="card-header">
|
||||
<view class="title">功能菜单</view>
|
||||
<!-- <view class="header-actions">
|
||||
<button class="btn-apple btn-primary" @tap="$emit('sync')">运营商数据同步</button>
|
||||
</view> -->
|
||||
<view class="card-header mb-5">
|
||||
<text class="text-heading">功能服务</text>
|
||||
</view>
|
||||
<view class="function-grid">
|
||||
<view class="function-item interactive card-interactive" @tap="$emit('enter', 'authentication')"
|
||||
role="button" tabindex="0">
|
||||
<view class="function-icon">
|
||||
<image src="/static/authentication.png" mode="aspectFit" alt="实名认证"></image>
|
||||
<view
|
||||
v-for="item in displayFunctions"
|
||||
:key="item.key"
|
||||
class="function-item interactive"
|
||||
:class="{ 'is-disabled': item.disabled }"
|
||||
@click="handleItemClick(item)"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<view class="function-icon-wrap">
|
||||
<image class="function-icon" :src="item.icon" mode="aspectFit" :alt="item.name"></image>
|
||||
</view>
|
||||
<view :class="['function-name', realNameStatus === '已实名' ? 'text-primary' : '']">
|
||||
{{ realNameStatus || '实名认证' }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="function-item interactive card-interactive" @tap="$emit('sync')" role="button" tabindex="0">
|
||||
<view class="function-icon">
|
||||
<image src="/static/data.png" mode="aspectFit" alt="运营数据同步"></image>
|
||||
</view>
|
||||
<view class="function-name">运营数据同步</view>
|
||||
</view>
|
||||
<view class="function-item interactive card-interactive" @tap="$emit('enter', 'package-order')"
|
||||
role="button" tabindex="0">
|
||||
<view class="function-icon">
|
||||
<image src="/static/shop.png" mode="aspectFit" alt="套餐订购"></image>
|
||||
</view>
|
||||
<view class="function-name">套餐订购</view>
|
||||
</view>
|
||||
<view class="function-item interactive card-interactive" @tap="$emit('enter', 'order-list')" role="button"
|
||||
tabindex="0">
|
||||
<view class="function-icon">
|
||||
<image src="/static/order.png" mode="aspectFit" alt="我的订单"></image>
|
||||
</view>
|
||||
<view class="function-name">我的订单</view>
|
||||
</view>
|
||||
<view class="function-item interactive card-interactive" v-if="isDevice" @tap="$emit('enter', 'back')"
|
||||
role="button" tabindex="0">
|
||||
<view class="function-icon">
|
||||
<image src="/static/back.png" mode="aspectFit" alt="后台管理"></image>
|
||||
</view>
|
||||
<view class="function-name">后台管理</view>
|
||||
</view>
|
||||
<view class="function-item interactive card-interactive" v-if="isDevice" @tap="$emit('enter', 'switch')"
|
||||
role="button" tabindex="0">
|
||||
<view class="function-icon">
|
||||
<image src="/static/change.png" mode="aspectFit" alt="切换运营商"></image>
|
||||
</view>
|
||||
<view class="function-name">切换运营商</view>
|
||||
</view>
|
||||
<view class="function-item interactive card-interactive" @tap="$emit('enter', 'asset-package')"
|
||||
role="button" tabindex="0">
|
||||
<view class="function-icon">
|
||||
<image src="/static/shop.png" mode="aspectFit" alt="资产套餐历史"></image>
|
||||
</view>
|
||||
<view class="function-name">资产套餐历史</view>
|
||||
</view>
|
||||
<view class="function-item interactive card-interactive" @tap="handleBindPhone" role="button" tabindex="0">
|
||||
<view class="function-icon">
|
||||
<image src="/static/bind-phone.png" mode="aspectFit" alt="绑定手机号"></image>
|
||||
</view>
|
||||
<view :class="['function-name', alreadyBindPhone ? 'text-primary' : '']">
|
||||
{{ alreadyBindPhone ? '已绑定' : '绑定手机号' }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="function-item interactive card-interactive" @tap="$emit('enter', 'change-phone')" role="button"
|
||||
tabindex="0">
|
||||
<view class="function-icon">
|
||||
<image src="/static/change-phone.png" mode="aspectFit" alt="更换手机号"></image>
|
||||
</view>
|
||||
<view class="function-name">更换手机号</view>
|
||||
</view>
|
||||
<view class="function-item interactive card-interactive" v-if="isDevice"
|
||||
@tap="$emit('enter', 'device-exchange')" role="button" tabindex="0">
|
||||
<view class="function-icon">
|
||||
<image src="/static/change.png" mode="aspectFit" alt="设备换货"></image>
|
||||
</view>
|
||||
<view class="function-name">设备换货</view>
|
||||
</view>
|
||||
<view class="function-item interactive card-interactive" @tap="$emit('enter', 'wallet')" role="button"
|
||||
tabindex="0">
|
||||
<view class="function-icon">
|
||||
<image src="/static/wallet.png" mode="aspectFit" alt="我的钱包"></image>
|
||||
</view>
|
||||
<view class="function-name">我的钱包</view>
|
||||
</view>
|
||||
<view class="function-item interactive card-interactive" v-if="isDevice" @tap="$emit('enter', 'recover')"
|
||||
role="button" tabindex="0">
|
||||
<view class="function-icon">
|
||||
<image src="/static/recover.png" mode="aspectFit" alt="重启设备"></image>
|
||||
</view>
|
||||
<view class="function-name">重启设备</view>
|
||||
</view>
|
||||
<view class="function-item interactive card-interactive" v-if="isDevice" @tap="$emit('enter', 'restart')"
|
||||
role="button" tabindex="0">
|
||||
<view class="function-icon">
|
||||
<image src="/static/restart.png" mode="aspectFit" alt="恢复出厂"></image>
|
||||
</view>
|
||||
<view class="function-name">恢复出厂</view>
|
||||
</view>
|
||||
<view class="function-item interactive card-interactive" @tap="$emit('enter', 'out')" role="button"
|
||||
tabindex="0">
|
||||
<view class="function-icon">
|
||||
<image src="/static/out.png" mode="aspectFit" alt="退出登录"></image>
|
||||
</view>
|
||||
<view class="function-name">退出登录</view>
|
||||
<text class="function-name" :class="{ 'text-primary-color': item.highlight }">{{ item.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -114,6 +25,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
realNameStatus: {
|
||||
type: String,
|
||||
@@ -131,62 +44,95 @@
|
||||
|
||||
const emit = defineEmits(['enter', 'sync']);
|
||||
|
||||
const handleBindPhone = () => {
|
||||
if (props.alreadyBindPhone) {
|
||||
// 已绑定,不可点击
|
||||
return;
|
||||
const functions = computed(() => {
|
||||
const list = [
|
||||
{ key: 'authentication', name: props.realNameStatus || '实名认证', icon: '/static/authentication.png', action: 'authentication', highlight: props.realNameStatus === '已实名' },
|
||||
{ key: 'sync', name: '运营数据同步', icon: '/static/data.png', action: 'sync' },
|
||||
{ key: 'package-order', name: '套餐订购', icon: '/static/shop.png', action: 'package-order' },
|
||||
{ key: 'order-list', name: '我的订单', icon: '/static/order.png', action: 'order-list' },
|
||||
{ key: 'back', name: '后台管理', icon: '/static/back.png', action: 'back', deviceOnly: true },
|
||||
{ key: 'switch', name: '切换运营商', icon: '/static/change.png', action: 'switch', deviceOnly: true },
|
||||
{ key: 'asset-package', name: '资产套餐历史', icon: '/static/shop.png', action: 'asset-package' },
|
||||
{ key: 'bind', name: props.alreadyBindPhone ? '已绑定' : '绑定手机号', icon: '/static/bind-phone.png', action: 'bind', highlight: props.alreadyBindPhone, disabled: props.alreadyBindPhone },
|
||||
{ key: 'change-phone', name: '更换手机号', icon: '/static/change-phone.png', action: 'change-phone' },
|
||||
{ key: 'device-exchange', name: '设备换货', icon: '/static/change.png', action: 'device-exchange', deviceOnly: true },
|
||||
{ key: 'wallet', name: '我的钱包', icon: '/static/wallet.png', action: 'wallet' },
|
||||
{ key: 'recover', name: '重启设备', icon: '/static/recover.png', action: 'recover', deviceOnly: true },
|
||||
{ key: 'restart', name: '恢复出厂', icon: '/static/restart.png', action: 'restart', deviceOnly: true },
|
||||
{ key: 'out', name: '退出登录', icon: '/static/out.png', action: 'out' }
|
||||
];
|
||||
|
||||
return list.filter(item => !item.deviceOnly || props.isDevice);
|
||||
});
|
||||
|
||||
const displayFunctions = computed(() => functions.value);
|
||||
|
||||
const handleItemClick = (item) => {
|
||||
if (item.disabled) return;
|
||||
if (item.action === 'bind' && props.alreadyBindPhone) return;
|
||||
if (item.action === 'sync') {
|
||||
emit('sync');
|
||||
} else {
|
||||
emit('enter', item.action);
|
||||
}
|
||||
// 未绑定,可以点击进入绑定页面
|
||||
emit('enter', 'bind');
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.function-card {
|
||||
.card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.function-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 16rpx;
|
||||
width: 100%;
|
||||
|
||||
.function-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20rpx;
|
||||
|
||||
.function-icon {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.function-name {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: var(--text-primary);
|
||||
text-align: center;
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
}
|
||||
padding-bottom: var(--space-4);
|
||||
border-bottom: 1rpx solid var(--gray-100);
|
||||
}
|
||||
}
|
||||
|
||||
.text-primary {
|
||||
color: var(--primary) !important;
|
||||
.function-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: var(--space-4);
|
||||
padding-top: var(--space-5);
|
||||
}
|
||||
|
||||
.function-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
padding: var(--space-3);
|
||||
border-radius: var(--radius-md);
|
||||
transition: background var(--duration-fast) var(--ease-out);
|
||||
|
||||
&:active {
|
||||
background: var(--gray-50);
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.function-icon-wrap {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--gray-50);
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
.function-icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
|
||||
.function-name {
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: var(--text-secondary);
|
||||
text-align: center;
|
||||
line-height: 1.3;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
@@ -1,36 +1,40 @@
|
||||
<template>
|
||||
<view class="card traffic-card">
|
||||
<view class="card-header flex-row-sb mb-lg">
|
||||
<view class="title">本月流量</view>
|
||||
<view class="usage-percent">
|
||||
<text class="title">{{ usedFlowPercent }}</text>
|
||||
<text class="caption">%</text>
|
||||
<view class="traffic-card">
|
||||
<view class="card-header">
|
||||
<text class="text-heading">本月流量</text>
|
||||
<view class="usage-indicator">
|
||||
<text class="usage-value">{{ usedFlowPercent }}</text>
|
||||
<text class="usage-unit">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="progress-section mb-lg">
|
||||
<view class="progress-apple">
|
||||
<view class="progress-fill" :style="{width: usedFlowPercent + '%'}"></view>
|
||||
|
||||
<view class="progress-section">
|
||||
<view class="progress-track">
|
||||
<view class="progress-fill" :style="{ width: usedFlowPercent + '%' }"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="traffic-stats flex-row-sb">
|
||||
<view class="stat-item flex-col-center">
|
||||
<view class="caption mb-xs">已使用</view>
|
||||
<view class="stat-value-container">
|
||||
|
||||
<view class="traffic-stats">
|
||||
<view class="stat-item">
|
||||
<text class="stat-label">已使用</text>
|
||||
<view class="stat-value-wrap">
|
||||
<text class="stat-value">{{ usedValue }}</text>
|
||||
<text class="stat-unit">{{ usedUnit }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="stat-item flex-col-center">
|
||||
<view class="caption mb-xs">总流量</view>
|
||||
<view class="stat-value-container">
|
||||
<view class="stat-divider"></view>
|
||||
<view class="stat-item">
|
||||
<text class="stat-label">总流量</text>
|
||||
<view class="stat-value-wrap">
|
||||
<text class="stat-value">{{ totalValue }}</text>
|
||||
<text class="stat-unit">{{ totalUnit }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="stat-item flex-col-center">
|
||||
<view class="caption mb-xs">剩余</view>
|
||||
<view class="stat-value-container">
|
||||
<text class="stat-value">{{ remainValue }}</text>
|
||||
<view class="stat-divider"></view>
|
||||
<view class="stat-item">
|
||||
<text class="stat-label">剩余</text>
|
||||
<view class="stat-value-wrap">
|
||||
<text class="stat-value remain">{{ remainValue }}</text>
|
||||
<text class="stat-unit">{{ remainUnit }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -91,9 +95,9 @@
|
||||
const usedFlowPercent = computed(() => {
|
||||
if (totalMB.value && usedMB.value) {
|
||||
const percent = (usedMB.value / totalMB.value * 100);
|
||||
return Math.min(percent, 100).toFixed(2);
|
||||
return Math.min(percent, 100).toFixed(1);
|
||||
}
|
||||
return '0.00';
|
||||
return '0.0';
|
||||
});
|
||||
|
||||
// 加载套餐流量数据
|
||||
@@ -144,18 +148,105 @@
|
||||
|
||||
<style scoped lang="scss">
|
||||
.traffic-card {
|
||||
.usage-percent {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 4rpx;
|
||||
.title { font-size: 35rpx; font-weight: 700; margin-right: 5rpx; }
|
||||
}
|
||||
.traffic-stats {
|
||||
background: var(--gray-100);
|
||||
border-radius: var(--radius-small);
|
||||
padding: 20rpx;
|
||||
margin-top: 16rpx;
|
||||
.stat-item { flex: 1; }
|
||||
background: var(--bg-surface);
|
||||
border-radius: var(--radius-xl);
|
||||
padding: var(--space-5);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
|
||||
.usage-indicator {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 2rpx;
|
||||
}
|
||||
|
||||
.usage-value {
|
||||
font-size: 48rpx;
|
||||
font-weight: 700;
|
||||
color: var(--primary);
|
||||
letter-spacing: -0.02em;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.usage-unit {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
|
||||
.progress-section {
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
|
||||
.progress-track {
|
||||
height: 14rpx;
|
||||
background: var(--gray-100);
|
||||
border-radius: var(--radius-full);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.progress-fill {
|
||||
height: 100%;
|
||||
background: var(--primary);
|
||||
border-radius: var(--radius-full);
|
||||
transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.traffic-stats {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: var(--space-4);
|
||||
background: var(--gray-50);
|
||||
border-radius: var(--radius-lg);
|
||||
}
|
||||
|
||||
.stat-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--space-1);
|
||||
}
|
||||
|
||||
.stat-divider {
|
||||
width: 1rpx;
|
||||
height: 60rpx;
|
||||
background: var(--gray-200);
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 24rpx;
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
|
||||
.stat-value-wrap {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 4rpx;
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
line-height: 1.1;
|
||||
|
||||
&.remain {
|
||||
color: var(--success);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
.stat-unit {
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
</style>
|
||||
@@ -1,20 +1,25 @@
|
||||
<template>
|
||||
<view class="card user-info-card interactive">
|
||||
<view class="flex-row-g20">
|
||||
<view class="user-info-card">
|
||||
<view class="card-main">
|
||||
<view class="user-avatar">
|
||||
<image :src="avatarUrl" mode="aspectFill" alt="用户头像" />
|
||||
</view>
|
||||
<view class="user-details flex-col-g8">
|
||||
<view class="flex-row-g20">
|
||||
<view class="title">{{ currentCardNo || '-' }}</view>
|
||||
<view class="user-details">
|
||||
<view class="user-id">
|
||||
<text class="device-id">{{ currentCardNo || '-' }}</text>
|
||||
<view class="status-badge" :class="isOnline ? 'status-online' : 'status-offline'">
|
||||
<text class="status-dot"></text>
|
||||
<text class="status-text">{{ isOnline ? '在线' : '离线' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="user-meta">
|
||||
<text class="meta-text" v-if="isDevice">IMEI:{{ deviceInfo.imei || '-' }}</text>
|
||||
<text class="meta-text" v-else>手机号:{{ deviceInfo.bound_phone || '-' }}</text>
|
||||
</view>
|
||||
<view class="caption" v-if="isDevice">IMEI:{{ deviceInfo.imei || '-' }}</view>
|
||||
<view class="caption" v-else>手机号:{{ deviceInfo.bound_phone || '-' }}</view>
|
||||
</view>
|
||||
<view v-if="isDevice" class="tag-apple" :class="onlineStatus === '在线' ? 'tag-success' : 'tag-warning'">
|
||||
{{ onlineStatus }}
|
||||
</view>
|
||||
<view v-else class="tag-apple" :class="networkStatus == 1 ? 'tag-success' : 'tag-warning'">
|
||||
</view>
|
||||
<view class="card-footer" v-if="!isDevice">
|
||||
<view class="network-badge" :class="networkStatus == 1 ? 'network-ok' : 'network-stop'">
|
||||
{{ networkStatus == 1 ? '正常' : '停机' }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -25,36 +30,137 @@
|
||||
import { computed } from 'vue';
|
||||
import { useUserStore } from '@/store/index.js';
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
defineProps({
|
||||
const props = defineProps({
|
||||
currentCardNo: { type: String, default: '' },
|
||||
deviceInfo: { type: Object, default: () => ({}) },
|
||||
onlineStatus: { type: String, default: '离线' },
|
||||
networkStatus: { type: String, default: '离线' },
|
||||
networkStatus: { type: [String, Number], default: '离线' },
|
||||
isDevice: { type: Boolean, default: true }
|
||||
});
|
||||
|
||||
// 默认头像
|
||||
const userStore = useUserStore();
|
||||
|
||||
const defaultAvatar = 'https://img1.baidu.com/it/u=2462918877,1866131262&fm=253&fmt=auto&app=138&f=JPEG?w=506&h=500';
|
||||
|
||||
// 用户头像,优先使用 store 中的头像,否则使用默认头像
|
||||
const avatarUrl = computed(() => {
|
||||
return userStore.state.userInfo.avatar || defaultAvatar;
|
||||
});
|
||||
|
||||
const isOnline = computed(() => {
|
||||
return props.onlineStatus === '在线';
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.user-info-card {
|
||||
color: var(--text-primary);
|
||||
.user-avatar {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: var(--radius-medium);
|
||||
overflow: hidden;
|
||||
border: 2rpx solid var(--border-light);
|
||||
image { width: 100%; height: 100%; object-fit: cover; }
|
||||
}
|
||||
.user-details { flex: 1; }
|
||||
background: var(--bg-surface);
|
||||
border-radius: var(--radius-xl);
|
||||
padding: var(--space-5);
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
</style>
|
||||
|
||||
.card-main {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-4);
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
border-radius: var(--radius-lg);
|
||||
overflow: hidden;
|
||||
border: 4rpx solid var(--gray-100);
|
||||
flex-shrink: 0;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.user-details {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.user-id {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.device-id {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.status-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: var(--radius-full);
|
||||
font-size: 20rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.status-online {
|
||||
background: var(--success-light);
|
||||
color: var(--success);
|
||||
}
|
||||
|
||||
.status-offline {
|
||||
background: var(--warning-light);
|
||||
color: var(--warning);
|
||||
}
|
||||
|
||||
.status-dot {
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 50%;
|
||||
background: currentColor;
|
||||
}
|
||||
|
||||
.status-text {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.user-meta {
|
||||
margin-top: var(--space-2);
|
||||
}
|
||||
|
||||
.meta-text {
|
||||
font-size: 24rpx;
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
margin-top: var(--space-4);
|
||||
padding-top: var(--space-4);
|
||||
border-top: 1rpx solid var(--gray-100);
|
||||
}
|
||||
|
||||
.network-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: var(--space-2) var(--space-4);
|
||||
border-radius: var(--radius-full);
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.network-ok {
|
||||
background: var(--success-light);
|
||||
color: var(--success);
|
||||
}
|
||||
|
||||
.network-stop {
|
||||
background: var(--danger-light);
|
||||
color: var(--danger);
|
||||
}
|
||||
</style>
|
||||
@@ -1,25 +1,29 @@
|
||||
<template>
|
||||
<view class="card wifi-card">
|
||||
<view class="card-header flex-row-sb">
|
||||
<view class="title">WiFi配置</view>
|
||||
<view class="btn-group">
|
||||
<button class="btn-apple btn-primary btn-mini" @tap="$emit('modify')">修改</button>
|
||||
</view>
|
||||
<view class="wifi-card">
|
||||
<view class="card-header">
|
||||
<text class="text-heading">WiFi配置</text>
|
||||
<button class="btn btn-mini btn-primary" @tap="$emit('modify')">修改</button>
|
||||
</view>
|
||||
<view class="wifi-info flex-col-g16 mt-30">
|
||||
<view class="wifi-item flex-row-sb">
|
||||
<view class="wifi-details flex-col-g8">
|
||||
<view class="caption">网络名称</view>
|
||||
<view class="subtitle">{{ deviceInfo.ssidName }}</view>
|
||||
<view class="wifi-list">
|
||||
<view class="wifi-item">
|
||||
<view class="wifi-icon-wrap">
|
||||
<text class="wifi-icon-text">📶</text>
|
||||
</view>
|
||||
<button class="btn-apple btn-primary btn-mini" @tap="$emit('copy', deviceInfo.ssidName)">复制</button>
|
||||
<view class="wifi-content">
|
||||
<text class="wifi-label">网络名称</text>
|
||||
<text class="wifi-value">{{ deviceInfo.ssidName }}</text>
|
||||
</view>
|
||||
<button class="btn-copy" @tap="$emit('copy', deviceInfo.ssidName)">复制</button>
|
||||
</view>
|
||||
<view class="wifi-item flex-row-sb">
|
||||
<view class="wifi-details flex-col-g8">
|
||||
<view class="caption">连接密码</view>
|
||||
<view class="subtitle">{{ deviceInfo.ssidPwd }}</view>
|
||||
<view class="wifi-item">
|
||||
<view class="wifi-icon-wrap">
|
||||
<text class="wifi-icon-text">🔑</text>
|
||||
</view>
|
||||
<button class="btn-apple btn-primary btn-mini" @tap="$emit('copy', deviceInfo.ssidPwd)">复制</button>
|
||||
<view class="wifi-content">
|
||||
<text class="wifi-label">连接密码</text>
|
||||
<text class="wifi-value">{{ deviceInfo.ssidPwd }}</text>
|
||||
</view>
|
||||
<button class="btn-copy" @tap="$emit('copy', deviceInfo.ssidPwd)">复制</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -35,13 +39,86 @@
|
||||
|
||||
<style scoped lang="scss">
|
||||
.wifi-card {
|
||||
.wifi-item {
|
||||
padding: var(--space-md);
|
||||
background: var(--gray-100);
|
||||
border-radius: var(--radius-medium);
|
||||
margin-bottom: var(--space-sm);
|
||||
&:last-child { margin-bottom: 0; }
|
||||
.wifi-details { flex: 1; }
|
||||
background: var(--bg-surface);
|
||||
border-radius: var(--radius-xl);
|
||||
padding: var(--space-5);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-bottom: var(--space-4);
|
||||
border-bottom: 1rpx solid var(--gray-100);
|
||||
margin-bottom: var(--space-4);
|
||||
}
|
||||
|
||||
.wifi-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-3);
|
||||
}
|
||||
|
||||
.wifi-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-4);
|
||||
padding: var(--space-4);
|
||||
background: var(--gray-50);
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
.wifi-icon-wrap {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--bg-surface);
|
||||
border-radius: var(--radius-sm);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.wifi-icon-text {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.wifi-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2rpx;
|
||||
}
|
||||
|
||||
.wifi-label {
|
||||
font-size: 22rpx;
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
|
||||
.wifi-value {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.btn-copy {
|
||||
padding: var(--space-2) var(--space-4);
|
||||
background: var(--bg-surface);
|
||||
color: var(--primary);
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
border-radius: var(--radius-full);
|
||||
line-height: 1.5;
|
||||
flex-shrink: 0;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
6970
package-lock.json
generated
6970
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -720,16 +720,19 @@
|
||||
<style scoped lang="scss">
|
||||
.wifi-popup {
|
||||
width: 600rpx;
|
||||
padding: 30rpx;
|
||||
padding: var(--space-6);
|
||||
border-radius: var(--radius-xl);
|
||||
background: var(--bg-surface);
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
font-size: 34rpx;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: var(--space-5);
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-spacer {
|
||||
height: 120rpx;
|
||||
height: 140rpx;
|
||||
}
|
||||
</style>
|
||||
4757
pnpm-lock.yaml
generated
Normal file
4757
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user