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