优化:去掉不必要的loading
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
v-model="code"
|
||||
:placeholder="$t('login.codePlaceholder')"
|
||||
placeholder-class="grey"
|
||||
maxlength="6"
|
||||
:maxlength="6"
|
||||
@confirm="onSubmit"
|
||||
/>
|
||||
<wd-button type="info" :class="['code-btn', { 'active': !readonly }]" @click="onSetCode">
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
<!-- 游客体验 -->
|
||||
<view class="youke-l" v-if="!isAndorid">
|
||||
<view @click="onPageJump('/pages/course/index')">
|
||||
<view @click="onPageSwitch('/pages/course/index')">
|
||||
{{ $t('login.noLogin') }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -147,6 +147,7 @@ import { loginWithCode, loginWithPassword } from '@/api/modules/auth'
|
||||
import { commonApi } from '@/api/modules/common'
|
||||
import { validateEmail } from '@/utils/validator'
|
||||
import { onPageJump } from '@/utils'
|
||||
import { ILoginResponse } from '@/types/user'
|
||||
|
||||
import { t } from '@/utils/i18n'
|
||||
|
||||
@@ -303,14 +304,14 @@ const passwordLogin = async () => {
|
||||
const onSubmit = async () => {
|
||||
if(!isAgree()) return false
|
||||
|
||||
let res = null
|
||||
let res: ILoginResponse | null = null
|
||||
|
||||
switch (loginType.value) {
|
||||
case 2000:
|
||||
res = await verifyCodeLogin()
|
||||
res = await verifyCodeLogin() as ILoginResponse
|
||||
break
|
||||
case 1000:
|
||||
res = await passwordLogin()
|
||||
res = await passwordLogin() as ILoginResponse
|
||||
break
|
||||
}
|
||||
|
||||
@@ -399,7 +400,7 @@ const yszc = () => {
|
||||
/**
|
||||
* 页面跳转
|
||||
*/
|
||||
const onPageJump = (url: string) => {
|
||||
const onPageSwitch = (url: string) => {
|
||||
uni.switchTab({
|
||||
url: url,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user