密码登录

This commit is contained in:
zhouyanli
2026-04-18 17:34:16 +08:00
parent be154fcc1b
commit 88ecf15f9e

View File

@@ -77,7 +77,7 @@
<!-- 底部链接 --> <!-- 底部链接 -->
<view class="bottom-link"> <view class="bottom-link">
<navigator class="link-item" url="/pages/login/pwd-login">账号密码登录</navigator> <navigator class="link-item" url="/pages/loginSub/pwd-login">账号密码登录</navigator>
<navigator class="link-item" url="/pages/loginSub/register-new-user">注册新用户</navigator> <navigator class="link-item" url="/pages/loginSub/register-new-user">注册新用户</navigator>
</view> </view>
</view> </view>
@@ -166,16 +166,16 @@ const handleLogin = () => {
smsCode:'123456', smsCode:'123456',
scene:'login', scene:'login',
} }
getLoginBySms(params).then(res =>{ // getLoginBySms(params).then(res =>{
if(res.code === 200){ // if(res.code === 200){
//uni.setStorageSync('token', res.token); // 假设后端返回token字段 // //uni.setStorageSync('token', res.token); // 假设后端返回token字段
uni.showToast({ title: '登录成功', icon: 'success' }); // uni.showToast({ title: '登录成功', icon: 'success' });
}else{ // }else{
uni.showToast({ title:'登录失败', icon: 'error' }); // uni.showToast({ title:'登录失败', icon: 'error' });
} // }
}) // })
uni.switchTab({ url: '/pages/index/index' }); uni.switchTab({ url: '/pages/index/index' });
// 模拟登录请求 // 模拟登录请求
// uni.showLoading({ // uni.showLoading({
@@ -198,7 +198,7 @@ onUnmounted(() => {
padding: 80rpx 40rpx 40rpx; padding: 80rpx 40rpx 40rpx;
/* background-color: #f8f9fa; */ /* background-color: #f8f9fa; */
min-height: 100vh; min-height: 100vh;
background: repeating-linear-gradient(180deg, #E2F0FF, #F6FAFF ); background: repeating-linear-gradient(to bottom, #E2F0FF, #F6FAFF );
} }
.status_bar { .status_bar {
height: 160px; height: 160px;