fix: ui
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m2s

This commit is contained in:
luo
2026-07-30 12:30:50 +08:00
parent 8027916e7a
commit dfa68a6a79
20 changed files with 69 additions and 64 deletions

19
App.vue
View File

@@ -7,13 +7,18 @@
<style lang="scss"> <style lang="scss">
:root { :root {
/* 主色 */ /* 主色 */
--primary: #0A84FF; --primary: #55ab5c;
--primary-light: #5AC8FA; --primary-light: #8bc98f;
--primary-dark: #0066CC; --primary-dark: #3f8f47;
--up-primary: #55ab5c;
--up-primary-light: #eaf6ec;
--up-primary-dark: #3f8f47;
/* 辅助色 */ /* 辅助色 */
--success: #30D158; --success: #55ab5c;
--success-light: rgba(48, 209, 88, 0.12); --success-light: rgba(85, 171, 92, 0.12);
--up-success: #55ab5c;
--up-success-light: #eaf6ec;
--warning: #FF9F0A; --warning: #FF9F0A;
--warning-light: rgba(255, 159, 10, 0.12); --warning-light: rgba(255, 159, 10, 0.12);
--danger: #FF453A; --danger: #FF453A;
@@ -235,7 +240,7 @@
} }
&.tag-primary { &.tag-primary {
background: rgba(10, 132, 255, 0.12); background: rgba(85, 171, 92, 0.12);
color: var(--primary); color: var(--primary);
} }
@@ -289,7 +294,7 @@
} }
&.btn-success { &.btn-success {
background: var(--success); background: var(--primary);
color: var(--text-inverse); color: var(--text-inverse);
} }

View File

@@ -66,7 +66,7 @@
.service-btn { .service-btn {
padding: 16rpx 32rpx; padding: 16rpx 32rpx;
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); background: #55ab5c;
color: #fff; color: #fff;
font-size: 26rpx; font-size: 26rpx;
font-weight: 600; font-weight: 600;

View File

@@ -1,11 +1,5 @@
<template> <template>
<view class="card function-card"> <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>
<view class="function-grid"> <view class="function-grid">
<view class="function-item interactive card-interactive" @tap="$emit('enter', 'authentication')" <view class="function-item interactive card-interactive" @tap="$emit('enter', 'authentication')"
role="button" tabindex="0"> role="button" tabindex="0">
@@ -176,8 +170,8 @@
.function-grid { .function-grid {
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(4, 1fr);
gap: 16rpx; gap: 12rpx;
width: 100%; width: 100%;
.function-item { .function-item {
@@ -185,11 +179,11 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 20rpx; padding: 16rpx 8rpx;
.function-icon { .function-icon {
width: 120rpx; width: 104rpx;
height: 120rpx; height: 104rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@@ -217,11 +211,11 @@
} }
.function-name { .function-name {
font-size: 28rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
color: var(--text-primary); color: var(--text-primary);
text-align: center; text-align: center;
margin-top: 15rpx; margin-top: 12rpx;
} }
} }
} }

View File

@@ -378,7 +378,7 @@
.package-summary { .package-summary {
padding: 40rpx 30rpx 30rpx; padding: 40rpx 30rpx 30rpx;
background: linear-gradient(135deg, rgba(0, 122, 255, 0.05) 0%, rgba(0, 122, 255, 0.02) 100%); background: linear-gradient(135deg, rgba(85, 171, 92, 0.05) 0%, rgba(85, 171, 92, 0.02) 100%);
border-bottom: 1rpx solid var(--border-light); border-bottom: 1rpx solid var(--border-light);
text-align: center; text-align: center;
} }
@@ -414,7 +414,7 @@
&.active { &.active {
border-color: var(--primary); border-color: var(--primary);
background: rgba(0, 122, 255, 0.05); background: rgba(85, 171, 92, 0.05);
} }
} }

View File

@@ -3,7 +3,8 @@
<view class="card-header flex-row-sb"> <view class="card-header flex-row-sb">
<view class="title">WiFi配置</view> <view class="title">WiFi配置</view>
<view class="btn-group"> <view class="btn-group">
<button class="btn-apple btn-primary btn-mini" @tap="$emit('modify')">修改</button> <button class="btn-apple btn-primary btn-mini" @tap="copyConfig">复制配置</button>
<button class="btn-apple btn-primary btn-mini" @tap="$emit('modify')">修改配置</button>
</view> </view>
</view> </view>
<view class="wifi-info flex-col-g16 mt-30"> <view class="wifi-info flex-col-g16 mt-30">
@@ -12,25 +13,27 @@
<view class="caption">网络名称</view> <view class="caption">网络名称</view>
<view class="subtitle">{{ deviceInfo.ssidName }}</view> <view class="subtitle">{{ deviceInfo.ssidName }}</view>
</view> </view>
<button class="btn-apple btn-primary btn-mini" @tap="$emit('copy', deviceInfo.ssidName)">复制</button>
</view> </view>
<view class="wifi-item flex-row-sb"> <view class="wifi-item flex-row-sb">
<view class="wifi-details flex-col-g8"> <view class="wifi-details flex-col-g8">
<view class="caption">连接密码</view> <view class="caption">连接密码</view>
<view class="subtitle">{{ deviceInfo.ssidPwd }}</view> <view class="subtitle">{{ deviceInfo.ssidPwd }}</view>
</view> </view>
<button class="btn-apple btn-primary btn-mini" @tap="$emit('copy', deviceInfo.ssidPwd)">复制</button>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
defineProps({ const props = defineProps({
deviceInfo: { type: Object, default: () => ({}) } deviceInfo: { type: Object, default: () => ({}) }
}); });
defineEmits(['modify', 'copy']); const emit = defineEmits(['modify', 'copy-config']);
const copyConfig = () => {
emit('copy-config', `网络名称: ${props.deviceInfo.ssidName || ''} 连接密码: ${props.deviceInfo.ssidPwd || ''}`);
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@@ -95,7 +95,7 @@
min-height: 100vh; min-height: 100vh;
box-sizing: border-box; box-sizing: border-box;
padding: 28rpx 24rpx 48rpx; padding: 28rpx 24rpx 48rpx;
background: linear-gradient(180deg, #eaf4ff 0%, var(--bg-secondary) 42%); background: linear-gradient(180deg, #eaf6ec 0%, var(--bg-secondary) 42%);
} }
.pay-content { .pay-content {
@@ -108,8 +108,8 @@
background: var(--bg-primary); background: var(--bg-primary);
border-radius: 28rpx; border-radius: 28rpx;
padding: 32rpx; padding: 32rpx;
box-shadow: 0 16rpx 40rpx rgba(10, 132, 255, 0.08); box-shadow: 0 16rpx 40rpx rgba(85, 171, 92, 0.08);
border: 1rpx solid rgba(10, 132, 255, 0.08); border: 1rpx solid rgba(85, 171, 92, 0.08);
} }
.qr-desc { .qr-desc {
@@ -144,7 +144,7 @@
.browser-tip { .browser-tip {
padding: 22rpx 24rpx; padding: 22rpx 24rpx;
border-radius: 18rpx; border-radius: 18rpx;
background: rgba(10, 132, 255, 0.08); background: rgba(85, 171, 92, 0.08);
color: var(--primary); color: var(--primary);
font-size: 28rpx; font-size: 28rpx;
font-weight: 600; font-weight: 600;
@@ -167,7 +167,7 @@
padding: 28rpx; padding: 28rpx;
border-radius: 24rpx; border-radius: 24rpx;
background: #fff; background: #fff;
border: 1rpx dashed rgba(10, 132, 255, 0.24); border: 1rpx dashed rgba(85, 171, 92, 0.24);
} }
</style> </style>

View File

@@ -15,15 +15,16 @@
<!-- <WhitelistCard v-if="!userInfo.isDevice" :whitelistData="whitelistData" @refresh="refreshWhitelist" <!-- <WhitelistCard v-if="!userInfo.isDevice" :whitelistData="whitelistData" @refresh="refreshWhitelist"
@add="showAddWhitelistDialog" @showSms="showSmsCodeDialog" /> --> @add="showAddWhitelistDialog" @showSms="showSmsCodeDialog" /> -->
<WifiCard v-if="userInfo.isDevice" :deviceInfo="deviceInfo" @modify="modifyWifi" @copy="copy" /> <WifiCard v-if="userInfo.isDevice" :deviceInfo="deviceInfo" @modify="modifyWifi"
@copy-config="copyWifiConfig" />
<FunctionCard :realNameStatus="realNameStatus" :alreadyBindPhone="alreadyBindPhone" <FunctionCard :realNameStatus="realNameStatus" :alreadyBindPhone="alreadyBindPhone"
:isDevice="userInfo.isDevice" :walletBalance="deviceInfo.walletBalance" :unreadCount="notificationUnreadCount" :isDevice="userInfo.isDevice" :walletBalance="deviceInfo.walletBalance" :unreadCount="notificationUnreadCount"
@enter="enterDetail" @sync="onSync"> @enter="enterDetail" @sync="onSync">
<!-- 修改WIFI弹窗 --> <!-- 修改配置弹窗 -->
<up-popup :show="showModifyWifi" mode="center" @close="showModifyWifi=false"> <up-popup :show="showModifyWifi" mode="center" @close="showModifyWifi=false">
<view class="wifi-popup"> <view class="wifi-popup">
<view class="title mb-md">修改WIFI</view> <view class="title mb-md">修改配置</view>
<view class="flex-col-g20"> <view class="flex-col-g20">
<view class="flex-col-g8"> <view class="flex-col-g8">
<label class="caption">名称:</label> <label class="caption">名称:</label>
@@ -509,16 +510,6 @@
restartShow.value = false; restartShow.value = false;
}; };
const copy = (content) => {
uni.setClipboardData({
data: content,
success: () => uni.showToast({
title: '复制成功',
icon: 'none'
})
});
};
const YesRecover = async () => { const YesRecover = async () => {
try { try {
await deviceApi.factoryReset(userStore.state.identifier); await deviceApi.factoryReset(userStore.state.identifier);
@@ -840,6 +831,13 @@
} }
}; };
const copyWifiConfig = (content) => {
uni.setClipboardData({
data: content,
success: () => uni.showToast({ title: '配置已复制', icon: 'none' })
});
};
const getNotificationPriority = (item) => { const getNotificationPriority = (item) => {
const severityRank = { info: 10, warning: 20, error: 30, critical: 40 }; const severityRank = { info: 10, warning: 20, error: 30, critical: 40 };
const remainingDays = Number(item?.days_until_expiry ?? item?.days_remaining ?? item?.remaining_days); const remainingDays = Number(item?.days_until_expiry ?? item?.days_remaining ?? item?.remaining_days);

View File

@@ -368,7 +368,7 @@
.input-wrap.focus { .input-wrap.focus {
background: var(--bg-primary); background: var(--bg-primary);
border-color: var(--primary); border-color: var(--primary);
box-shadow: 0 0 0 4rpx rgba(10, 132, 255, 0.1); box-shadow: 0 0 0 4rpx rgba(85, 171, 92, 0.1);
} }
.input { .input {
@@ -419,7 +419,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
transition: all 0.3s ease; transition: all 0.3s ease;
box-shadow: 0 4rpx 12rpx rgba(10, 132, 255, 0.2); box-shadow: 0 4rpx 12rpx rgba(85, 171, 92, 0.2);
} }
.btn-login.disabled { .btn-login.disabled {
@@ -430,7 +430,7 @@
.btn-login:active:not(.disabled) { .btn-login:active:not(.disabled) {
transform: translateY(2rpx); transform: translateY(2rpx);
box-shadow: 0 2rpx 8rpx rgba(10, 132, 255, 0.2); box-shadow: 0 2rpx 8rpx rgba(85, 171, 92, 0.2);
} }
.btn-scan { .btn-scan {
@@ -451,7 +451,7 @@
} }
.btn-scan:active { .btn-scan:active {
background: rgba(10, 132, 255, 0.05); background: rgba(85, 171, 92, 0.05);
} }
.scan-icon { .scan-icon {

View File

@@ -1009,7 +1009,7 @@
&.active { &.active {
border-color: var(--primary); border-color: var(--primary);
background: rgba(0, 122, 255, 0.05); background: rgba(85, 171, 92, 0.05);
.amount-value { .amount-value {
color: var(--primary); color: var(--primary);
@@ -1054,7 +1054,7 @@
&.active { &.active {
border-color: var(--primary); border-color: var(--primary);
background: rgba(0, 122, 255, 0.05); background: rgba(85, 171, 92, 0.05);
} }
.method-left { .method-left {

View File

@@ -446,7 +446,7 @@
&.tag-success { &.tag-success {
background: #e6f7ff; background: #e6f7ff;
color: #1890ff; color: var(--primary);
} }
&.tag-secondary { &.tag-secondary {

View File

@@ -607,7 +607,7 @@
.package-validity { .package-validity {
padding: 8rpx 12rpx; padding: 8rpx 12rpx;
border-radius: var(--radius-small); border-radius: var(--radius-small);
background: rgba(10, 132, 255, 0.1); background: rgba(85, 171, 92, 0.1);
color: var(--primary-dark); color: var(--primary-dark);
font-size: 22rpx; font-size: 22rpx;
font-weight: 600; font-weight: 600;
@@ -622,8 +622,8 @@
gap: 24rpx; gap: 24rpx;
padding: 24rpx; padding: 24rpx;
margin-bottom: 24rpx; margin-bottom: 24rpx;
background: linear-gradient(135deg, rgba(10, 132, 255, 0.08), rgba(10, 132, 255, 0.02)); background: linear-gradient(135deg, rgba(85, 171, 92, 0.08), rgba(85, 171, 92, 0.02));
border: 1rpx solid rgba(10, 132, 255, 0.1); border: 1rpx solid rgba(85, 171, 92, 0.1);
border-radius: 18rpx; border-radius: 18rpx;
.data-block { .data-block {
@@ -651,7 +651,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding-left: 24rpx; padding-left: 24rpx;
border-left: 1rpx solid rgba(10, 132, 255, 0.18); border-left: 1rpx solid rgba(85, 171, 92, 0.18);
color: var(--primary-dark); color: var(--primary-dark);
white-space: nowrap; white-space: nowrap;
@@ -765,7 +765,7 @@
min-width: 0; min-width: 0;
padding: 10rpx 16rpx; padding: 10rpx 16rpx;
border-radius: 28rpx; border-radius: 28rpx;
background: rgba(10, 132, 255, 0.08); background: rgba(85, 171, 92, 0.08);
color: var(--primary-dark); color: var(--primary-dark);
font-size: 24rpx; font-size: 24rpx;
line-height: 1.2; line-height: 1.2;
@@ -858,7 +858,7 @@
.package-summary { .package-summary {
padding: 40rpx 30rpx 30rpx; padding: 40rpx 30rpx 30rpx;
background: linear-gradient(135deg, rgba(0, 122, 255, 0.05) 0%, rgba(0, 122, 255, 0.02) 100%); background: linear-gradient(135deg, rgba(85, 171, 92, 0.05) 0%, rgba(85, 171, 92, 0.02) 100%);
border-bottom: 1rpx solid var(--border-light); border-bottom: 1rpx solid var(--border-light);
text-align: center; text-align: center;
@@ -884,7 +884,7 @@
justify-content: center; justify-content: center;
gap: 24rpx; gap: 24rpx;
padding-top: 20rpx; padding-top: 20rpx;
border-top: 1rpx solid rgba(0, 122, 255, 0.1); border-top: 1rpx solid rgba(85, 171, 92, 0.1);
.detail-item { .detail-item {
display: flex; display: flex;
@@ -932,7 +932,7 @@
&.active { &.active {
border-color: var(--primary); border-color: var(--primary);
background: rgba(0, 122, 255, 0.05); background: rgba(85, 171, 92, 0.05);
} }
.method-left { .method-left {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
static/中国广电.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
static/中国电信.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
static/中国移动.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
static/中国联通.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
static/卡槽1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

BIN
static/卡槽2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
static/卡槽3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

@@ -13,10 +13,15 @@
*/ */
/* 颜色变量 */ /* 颜色变量 */
$u-primary: #55ab5c;
$u-primary-light: #eaf6ec;
$u-primary-dark: #3f8f47;
$u-success: #55ab5c;
$u-success-light: #eaf6ec;
@import 'uview-plus/theme.scss'; @import 'uview-plus/theme.scss';
/* 行为相关颜色 */ /* 行为相关颜色 */
$uni-color-primary: #007aff; $uni-color-primary: #55ab5c;
$uni-color-success: #4cd964; $uni-color-success: #55ab5c;
$uni-color-warning: #f0ad4e; $uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d; $uni-color-error: #dd524d;