update:修复切换服务端地址无法生效,登陆界面右上角添加可跳转至设置页的按钮

This commit is contained in:
rainv123
2025-08-18 14:54:54 +08:00
parent 984a84edc1
commit 5260b62287
3 changed files with 69 additions and 0 deletions
@@ -115,6 +115,15 @@ function generateUUID() {
})
}
let skipReLaunch = false // 全局或组件作用域
//跳转至服务端设置页面
function goToServerSetting() {
uni.switchTab({
url: '/pages/settings/index',
})
}
// 获取验证码
async function refreshCaptcha() {
const uuid = generateUUID()
@@ -217,6 +226,15 @@ onMounted(async () => {
</text>
</view>
</view>
<!-- 右上角服务端设置按钮 -->
<view
class="server-btn"
:style="{ top: `${safeAreaInsets?.top + 10}px` }"
@click="goToServerSetting"
>
<wd-icon name="setting" custom-class="server-icon" />
</view>
<view class="form-container">
<view class="form">
@@ -775,4 +793,32 @@ onMounted(async () => {
}
}
}
.server-btn {
position: absolute;
right: 20rpx; // 距离右边距
top: 40rpx; // 顶部稍微下移,不贴状态栏
width: 48rpx;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
z-index: 999;
cursor: pointer;
background: rgba(255, 255, 255, 0.15); // 半透明背景,更好看
border-radius: 24rpx; // 圆形按钮
box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.2); // 阴影
&:active {
transform: scale(0.95);
}
.server-icon {
font-size: 28rpx;
color: #FFFFFF; // 白色图标
}
&:hover {
background: rgba(255, 255, 255, 0.25); // 悬停效果
}
}
</style>