| | |
| | | <button class="login-btn" :style="[inputStyle]" @tap="submit"> |
| | | 登录 |
| | | </button> |
| | | |
| | | |
| | | <image class="lowerRightCorner" :src="droneSvg" /> |
| | | </view> |
| | | </template> |
| | |
| | | } else { |
| | | uni.removeStorageSync('rememberedUser'); |
| | | } |
| | | |
| | | |
| | | try { |
| | | const res = await loginByUsername( |
| | | userInfo.tenantId, |
| | |
| | | ); |
| | | userStore.setUserInfo(res.data); |
| | | uni.reLaunch({ |
| | | url: "/pages/user/index", |
| | | url: "/pages/map/index", |
| | | }); |
| | | } catch (error) { |
| | | const errorMsg =error.data?.error_description !=="Bad credentials" ? error.data?.error_description: "登录失败,请重试"; |
| | |
| | | redirect = decodeURIComponent(options.redirect); |
| | | } |
| | | }); |
| | | |
| | | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | margin-left: 62rpx; |
| | | margin-right: 58rpx; |
| | | margin-top: 20rpx; |
| | | |
| | | |
| | | color: #666; |
| | | font-size: 28rpx; |
| | | |
| | | |
| | | label { |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | color: $u-warning; |
| | | } |
| | | } |
| | | </style> |
| | | </style> |