| | |
| | | import { UserInfoBase } from '../../data/UserInfoBase' |
| | | import { promptAction } from '@kit.ArkUI' |
| | | import { promptAction, router } from '@kit.ArkUI' |
| | | import PreferencesUtils from '../../utils/PreferencesUtils' |
| | | import http from '@ohos.net.http'; |
| | | import { HttpResponseResult } from '../../data/HttpResponse'; |
| | |
| | | PreferencesUtils.putPreferences('UserInfo','user',JSON.stringify(this.userInfoData)) |
| | | AppStorage.SetOrCreate('x-jwt-token', resData.data?.token) |
| | | promptAction.showToast({ message: '登录成功' }) |
| | | router.push({ |
| | | url: 'pages/MainPage' |
| | | }) |
| | | } else { |
| | | promptAction.showToast({ message: resData.msg }) |
| | | } |