This commit is contained in:
pengxiaolong
2025-06-24 13:23:49 +08:00
parent 36a240f854
commit 60a14aca83
9 changed files with 51 additions and 7 deletions

View File

@@ -5,6 +5,7 @@
<button class="login-btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
使用微信登录
</button>
<view class="return" @click="Return">返回首页</view>
</view>
</template>
@@ -45,8 +46,21 @@ export default {
},
methods: {
// 返回首页
Return() {
uni.reLaunch({
url: "/pages/Home/Home",
});
},
// 获取手机号
async getPhoneNumber(e) {
if (e.detail.code == undefined) {
uni.showToast({
title: "登录失败",
icon: "none",
});
return;
}
uni.showLoading({
title: "登录中...",
mask: true,
@@ -141,4 +155,12 @@ export default {
font-size: 24rpx;
margin-top: 40rpx;
}
.return{
margin-top: 30rpx;
width: 300rpx;
height: 100rpx;
color: rgb(255, 255, 255);
text-align: center;
line-height: 100rpx;
}
</style>