|
@@ -179,12 +179,12 @@ const sendCodeImpl = async () => {
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
if (!usernameOk || !passwordOk) return
|
|
if (!usernameOk || !passwordOk) return
|
|
|
-
|
|
|
|
|
|
|
+ uni.showLoading()
|
|
|
const res = await getAuthTokenApi({
|
|
const res = await getAuthTokenApi({
|
|
|
username: form.username,
|
|
username: form.username,
|
|
|
password: form.password,
|
|
password: form.password,
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
|
|
+ uni.hideLoading()
|
|
|
if (res.access_token) {
|
|
if (res.access_token) {
|
|
|
const codeRes = await getMobileCodeApi(form.username)
|
|
const codeRes = await getMobileCodeApi(form.username)
|
|
|
if (codeRes.code === 0) {
|
|
if (codeRes.code === 0) {
|
|
@@ -212,6 +212,8 @@ const submit = async () => {
|
|
|
const formOk = await validate()
|
|
const formOk = await validate()
|
|
|
if (!agreementOk || !formOk) return
|
|
if (!agreementOk || !formOk) return
|
|
|
|
|
|
|
|
|
|
+ uni.showLoading()
|
|
|
|
|
+
|
|
|
const res = await userStore.login({
|
|
const res = await userStore.login({
|
|
|
username: form.username,
|
|
username: form.username,
|
|
|
code: form.code,
|
|
code: form.code,
|
|
@@ -226,6 +228,8 @@ const submit = async () => {
|
|
|
})
|
|
})
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ uni.hideLoading()
|
|
|
uni.reLaunch({
|
|
uni.reLaunch({
|
|
|
url: '/pages/index/index',
|
|
url: '/pages/index/index',
|
|
|
})
|
|
})
|
|
@@ -243,5 +247,3 @@ const forgetPassword = () => {
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
@import '../../styles/modules/auth-page.scss';
|
|
@import '../../styles/modules/auth-page.scss';
|
|
|
</style>
|
|
</style>
|
|
|
-
|
|
|
|
|
-当前页面 重构 登录请求必须继续放在 agreePrivacyAuthorization 事件中触发
|
|
|