优化
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user