Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
NFT
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanfeng zhang
NFT
Commits
68117b7e
Commit
68117b7e
authored
Jul 09, 2021
by
hanfeng zhang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'main' of gitlab.33.cn:HF_web/NFT
parents
8e5fc6bc
9fb8188b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
16 deletions
+25
-16
Login.vue
src/view/Auth/Login/Login.vue
+23
-16
types.ts
src/view/Auth/Login/types.ts
+2
-0
No files found.
src/view/Auth/Login/Login.vue
View file @
68117b7e
...
...
@@ -68,8 +68,8 @@
<transition
name=
"fade"
mode=
"out-in"
>
<SlideValidator
v-if=
"
accountType !==
undefined
&&
loginWay !==
undefined
&&
accountType !==
eAccountType.NULL
&&
loginWay !==
eLoginWay.NULL
&&
accountType !== eAccountType.NO_REG
"
:key=
"randomNum"
...
...
@@ -78,7 +78,9 @@
/>
</transition>
<transition
name=
"fade"
mode=
"out-in"
>
<div
v-if=
"accountType !== undefined && loginWay !== undefined"
>
<div
v-if=
"accountType !== eAccountType.NULL && loginWay !== eLoginWay.NULL"
>
<div>
<div
v-if=
"accountType === eAccountType.NO_REG"
>
<LoginButton
...
...
@@ -124,7 +126,7 @@
<
script
lang=
'ts'
>
import
Input
from
"@/components/common/Input/index.vue"
;
import
CodeInput
from
"./components/CodeInput/index.vue"
;
import
{
RadioGroup
,
Radio
,
Overlay
,
Dialog
}
from
"vant"
;
import
{
Overlay
,
Dialog
}
from
"vant"
;
import
Vue
,
{
PropType
}
from
"vue"
;
import
{
eAccountType
,
...
...
@@ -144,11 +146,14 @@ import Check from "@/components/common/Check/index.vue";
import
PhoneInput
from
"./components/PhoneInput/index.vue"
;
import
SlideValidator
from
"@/components/common/SlideValidator/index.vue"
;
const
notCheckedIcon
=
require
(
"@/assets/icons/not_checked.png"
)
;
const
checkedIcon
=
require
(
"@/assets/icons/checked.png"
)
;
import
notCheckedIcon
from
"@/assets/icons/not_checked.png"
;
import
checkedIcon
from
"@/assets/icons/checked.png"
;
import
LoginSerivce
from
"./LoginService"
;
const
accountType
=
eAccountType
.
NULL
;
const
loginWay
=
eLoginWay
.
NULL
;
export
default
Vue
.
extend
({
props
:
{
title
:
{
...
...
@@ -181,8 +186,6 @@ export default Vue.extend({
},
components
:
{
Input
,
RadioGroup
,
Radio
,
CodeInput
,
LoginButton
,
Overlay
,
...
...
@@ -200,8 +203,8 @@ export default Vue.extend({
pwdConfig
,
eAccountType
,
eLoginWay
,
accountType
:
<
undefined
|
eAccountType
>
undefined
,
loginWay
:
<
undefined
|
eLoginWay
>
undefined
,
accountType
:
accountType
,
loginWay
:
loginWay
,
checkStatus
:
false
,
phone
:
""
,
code
:
""
,
...
...
@@ -238,14 +241,16 @@ export default Vue.extend({
handlePwdChange
(
v
:
string
)
{
this
.
pwd
=
v
;
},
async
handleClickRegister
(
e
:
MouseEvent
)
{
async
handleClickRegister
()
{
if
(
this
.
getRegisterDisableStatus
)
return
;
const
{
phone
,
code
}
=
this
;
// 调用注册接口
this
.
loading
=
true
;
try
{
const
regResult
=
await
this
.
registerFunc
(
phone
,
code
);
}
catch
(
err
)
{}
await
this
.
registerFunc
(
phone
,
code
);
}
catch
(
err
)
{
console
.
log
(
err
);
}
this
.
loading
=
false
;
},
async
handleClickLogin
()
{
...
...
@@ -266,7 +271,9 @@ export default Vue.extend({
// 调用登录接口
await
this
.
loginByCodeFunc
(
phone
,
code
);
}
}
catch
(
err
)
{}
}
catch
(
err
)
{
console
.
log
(
err
);
}
this
.
loading
=
false
;
this
.
randomNum
=
Math
.
random
();
this
.
slideConfirmed
=
false
;
...
...
@@ -346,7 +353,7 @@ export default Vue.extend({
},
},
watch
:
{
phone
(
newV
:
string
,
oldV
:
string
)
{
phone
(
newV
:
string
)
{
if
(
newV
.
length
===
phoneConfig
.
maxLen
)
{
// 调用方法,获取该手机号的账户信息
this
.
accountStatusCheckFunc
(
newV
).
then
((
result
)
=>
{
...
...
@@ -354,7 +361,7 @@ export default Vue.extend({
this
.
loginWay
=
eLoginWay
.
CODE
;
});
}
else
{
this
.
loginWay
=
undefined
;
this
.
loginWay
=
eLoginWay
.
NULL
;
}
},
},
...
...
src/view/Auth/Login/types.ts
View file @
68117b7e
export
enum
eAccountType
{
NULL
,
NO_REG
,
// 账号没注册
REG_NOPD
,
// 账号已注册 为设置密码
REG_PDSET
,
// 账号已注册 已设置密码
}
export
enum
eLoginWay
{
NULL
,
PWD
,
// 密码
CODE
// 验证码
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment