chore: 切回测试环境,弹窗样式微调,文案精简

- 域名切回测试环境,超时提示统一
- 删除弹窗样式调整(宽度/圆角/按钮颜色)
- 删除确认文案精简,同步 loading 文案统一为"加载中"
- 移除 connectedWifi 调试背景色

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
17792275749
2026-06-10 16:59:25 +08:00
co-authored by Claude Opus 4.7
parent 099b7613fe
commit 0fab5259c9
7 changed files with 36 additions and 39 deletions
+5 -5
View File
@@ -20,10 +20,10 @@ const plugin = requirePlugin('ppScale-plugin') as LeFuPlugin
const LEFU_CONFIG: LeFuConfig = { const LEFU_CONFIG: LeFuConfig = {
key: 'lefudc91611833e18d94', key: 'lefudc91611833e18d94',
secret: 'eQ50JYimMp0X7uhNLj6D3lTEk4TUUvEG7dvaqKM9t1U=', secret: 'eQ50JYimMp0X7uhNLj6D3lTEk4TUUvEG7dvaqKM9t1U=',
// domain1: 'http://10.10.10.10:8889', domain1: 'http://10.10.10.10:8889',
// domain2: 'http://10.10.10.10:8889/weight', domain2: 'http://10.10.10.10:8889/weight',
domain1: 'http://device.shuziweidao.com:80/gateway', // domain1: 'http://device.shuziweidao.com:80/gateway',
domain2: 'http://device.shuziweidao.com:80/weight', // domain2: 'http://device.shuziweidao.com:80/weight',
} }
/** 支持的设备型号配置列表(5款) */ /** 支持的设备型号配置列表(5款) */
@@ -427,7 +427,7 @@ class LeFuService {
let syncTimer: number | null = null let syncTimer: number | null = null
const resetTimer = () => { const resetTimer = () => {
if (syncTimer !== null) clearTimeout(syncTimer) if (syncTimer !== null) clearTimeout(syncTimer)
syncTimer = setTimeout(() => reject(new Error(`${index + 1} 个用户下发超时`)), 15000) syncTimer = setTimeout(() => reject(new Error(`请求超时`)), 15000)
} }
const syncNext = () => { const syncNext = () => {
if (index >= members.length) { if (index >= members.length) {
@@ -141,7 +141,6 @@
overflow: hidden; overflow: hidden;
margin-right: 24rpx; margin-right: 24rpx;
border-radius: 24rpx; border-radius: 24rpx;
background-color: red;
flex-shrink: 0; flex-shrink: 0;
} }
@@ -120,10 +120,6 @@
overflow: hidden; overflow: hidden;
margin-bottom: 20rpx; margin-bottom: 20rpx;
&:first-of-type {
}
/* 容量小标题 */ /* 容量小标题 */
.member-card-header { .member-card-header {
width: 100%; width: 100%;
@@ -342,10 +338,11 @@
/* 删除确认弹窗 — 仿原生 wx.showModal 风格 */ /* 删除确认弹窗 — 仿原生 wx.showModal 风格 */
.delete-modal-mask { .delete-modal-mask {
position: fixed; position: fixed;
top: 0; top: -10vh;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
margin: auto;
z-index: 999; z-index: 999;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -354,23 +351,24 @@
} }
.delete-modal { .delete-modal {
width: 540rpx; width: 650rpx;
border-radius: 16rpx; padding-top: 50rpx;
border-radius: 24rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
overflow: hidden;
} }
.delete-modal-title { .delete-modal-title {
width: 100%; width: 100%;
padding-top: 40rpx; height: 40rpx;
text-align: center; line-height: 40rpx;
font-size: 34rpx;
font-weight: 500;
color: #000000; color: #000000;
text-align: center;
font-size: 36rpx;
font-weight: bolder;
} }
.delete-modal-content { .delete-modal-content {
padding: 32rpx 32rpx 40rpx; padding: 40rpx 0 60rpx;
font-size: 28rpx; font-size: 28rpx;
color: #353535; color: #353535;
line-height: 44rpx; line-height: 44rpx;
@@ -378,32 +376,30 @@
} }
.delete-modal-warning { .delete-modal-warning {
color: #FF4D4F; color: #F24439;
font-weight: bold;
} }
.delete-modal-footer { .delete-modal-footer {
width: 100%; width: 100%;
height: 88rpx; height: 110rpx;
display: flex; display: flex;
border-top: 1rpx solid rgba(0, 0, 0, 0.1); border-top: 2rpx solid #EAECF1;
} }
.delete-modal-btn { .delete-modal-btn {
flex: 1; flex: 1;
height: 88rpx; height: 110rpx;
line-height: 88rpx; line-height: 110rpx;
text-align: center; text-align: center;
font-size: 32rpx; font-size: 36rpx;
} }
.delete-modal-btn-cancel { .delete-modal-btn-cancel {
color: #000000; color: #77849E;
border-right: 1rpx solid rgba(0, 0, 0, 0.1); border-right: 2rpx solid #EAECF1;
} }
.delete-modal-btn-confirm { .delete-modal-btn-confirm {
color: #000000; color: #1385FA;
font-weight: bold;
} }
} }
@@ -289,15 +289,17 @@ Page({
showDeleteModal: false, showDeleteModal: false,
deleteTarget: null, deleteTarget: null,
}) })
wx.showLoading({ title: '正在同步设备数据...', mask: true }) wx.showLoading({ title: '加载中...', mask: true })
console.log('正在同步设备数据...')
let devicePromise: Promise<void> let devicePromise: Promise<void>
if (merged.length) { if (merged.length) {
devicePromise = lefuService.syncMembersToDevice( devicePromise = lefuService.syncMembersToDevice(
merged.map(toDeviceMember), merged.map(toDeviceMember),
(current, total) => { (current, total) => {
wx.showLoading({ title: `正在同步设备数据 ${current}/${total}...`, mask: true }) wx.showLoading({ title: `加载中...`, mask: true })
console.log(`正在同步设备数据 ${current}/${total}...`)
}, },
) )
} else { } else {
@@ -133,15 +133,15 @@
<view class="delete-modal-title">确认删除</view> <view class="delete-modal-title">确认删除</view>
<view class="delete-modal-content"> <view class="delete-modal-content">
<block wx:if="{{ deleteTarget.relationType == 3 }}"> <block wx:if="{{ deleteTarget.relationType == 3 }}">
<text class="delete-modal-warning">'{{ deleteTarget.realname }}'用户为他人添加,请确认是否删除</text> <text class="delete-modal-warning">"{{ deleteTarget.realname }}"用户为他人添加,请确认是否删除</text>
</block> </block>
<block wx:else> <block wx:else>
确定删除用户「{{ deleteTarget.realname }}吗?删除后将同步更新设备数据。 确定删除"{{ deleteTarget.realname }}"吗?删除后将不再显示
</block> </block>
</view> </view>
<view class="delete-modal-footer"> <view class="delete-modal-footer">
<view class="delete-modal-btn delete-modal-btn-cancel" bind:tap="onHideDeleteModal">取消</view> <view class="delete-modal-btn delete-modal-btn-cancel" bind:tap="onHideDeleteModal">取消</view>
<view class="delete-modal-btn delete-modal-btn-confirm" bind:tap="onConfirmDelete">确定删除</view> <view class="delete-modal-btn delete-modal-btn-confirm" bind:tap="onConfirmDelete">删除</view>
</view> </view>
</view> </view>
</view> </view>
@@ -317,7 +317,7 @@ Page({
isSelf: true, isSelf: true,
} }
wx.showLoading({ title: '正在下发主用户...', mask: true }) wx.showLoading({ title: '加载中...', mask: true })
lefuService.syncMembersToDevice([mainUser]) lefuService.syncMembersToDevice([mainUser])
.then(() => { .then(() => {
wx.hideLoading() wx.hideLoading()
+2 -2
View File
@@ -2,8 +2,8 @@ import type { ApiResponse, HttpMethod, RequestOptions } from './types'
export type { ApiResponse, RequestOptions } export type { ApiResponse, RequestOptions }
// const BASE_URL = 'http://10.10.10.10:8889/' // 测试环境 const BASE_URL = 'http://10.10.10.10:8889/' // 测试环境
const BASE_URL = 'https://device.shuziweidao.com/gateway/' // 正式环境 // const BASE_URL = 'https://device.shuziweidao.com/gateway/' // 正式环境
let _loadingCount = 0 let _loadingCount = 0