Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
poolin_app
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
dfae3f9e
authored
Feb 07, 2018
by
liangqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改大小写命名规范
parent
320c6f8c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
1 deletions
+85
-1
src/components/common/captcha.vue
+29
-0
src/components/reg/index.vue
+9
-1
src/config/index.js
+47
-0
No files found.
src/components/common/captcha.vue
0 → 100644
View file @
dfae3f9e
<
template
>
<div>
<input
v-model=
"captcha_input"
/>
<img
:src=
"captchaUrl"
>
</div>
</
template
>
<
script
>
import
config
from
'@/config'
console
.
log
(
config
)
export
default
{
// beforeMount () {
// const captcha_img =;
// this.captchaUrl = captcha_img ;
// },
data
(){
return
{
captcha_input
:
''
,
captchaUrl
:
'http://ucdev1212.blockin.com/captcha?'
+
new
Date
().
getTime
()
}
},
methods
:{
newCaptcha
:
function
()
{
}
}
}
</
script
>
\ No newline at end of file
src/components/reg/index.vue
View file @
dfae3f9e
...
@@ -13,6 +13,9 @@
...
@@ -13,6 +13,9 @@
<el-form-item
prop=
"email"
label=
""
:rules=
"[
{ required: true, message: '请输入邮箱地址', trigger: 'blur' },{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur,change' }]">
<el-form-item
prop=
"email"
label=
""
:rules=
"[
{ required: true, message: '请输入邮箱地址', trigger: 'blur' },{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur,change' }]">
<el-input
v-model=
"regForm.email"
placeholder=
"输入邮箱"
><i
slot=
"prefix"
class=
"iconfont icon-email"
></i></el-input>
<el-input
v-model=
"regForm.email"
placeholder=
"输入邮箱"
><i
slot=
"prefix"
class=
"iconfont icon-email"
></i></el-input>
</el-form-item>
</el-form-item>
<captcha>
</captcha>
<el-form-item>
<el-form-item>
<div
class=
"btn-group full mt100"
>
<div
class=
"btn-group full mt100"
>
<el-button
type=
"primary"
round
@
click=
"submitForm('regForm')"
>
提交
</el-button>
<el-button
type=
"primary"
round
@
click=
"submitForm('regForm')"
>
提交
</el-button>
...
@@ -29,6 +32,7 @@
...
@@ -29,6 +32,7 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
captcha
from
'@/components/common/captcha'
export
default
{
export
default
{
name
:
'rega'
,
name
:
'rega'
,
data
()
{
data
()
{
...
@@ -39,6 +43,9 @@ export default {
...
@@ -39,6 +43,9 @@ export default {
step
:
1
step
:
1
}
}
},
},
components
:{
captcha
,
},
mounted
()
{
mounted
()
{
},
},
...
@@ -59,7 +66,8 @@ export default {
...
@@ -59,7 +66,8 @@ export default {
goLogin
()
{
goLogin
()
{
this
.
$router
.
replace
(
"/login"
)
this
.
$router
.
replace
(
"/login"
)
}
}
}
},
}
}
</
script
>
</
script
>
...
...
src/config/index.js
0 → 100644
View file @
dfae3f9e
const
api
=
{
api
:
{
// 邮箱注册api
'post-register-email-start'
:
'/register/email/start'
,
'post-register-email-verify-code'
:
'/register/email/verify-code'
,
'post-register-email-password'
:
'/register/email/password'
,
// 手机注册api
'post-register-mobile-start'
:
'/register/mobile/start'
,
'post-register-mobile-verify-code'
:
'/register/mobile/verify-code'
,
'post-register-mobile-password'
:
'/register/mobile/password'
,
// 登录
'post-login-start'
:
'/login/start'
,
'post-login-mobile'
:
'/login/start/mobile'
,
'post-login-password'
:
'/login/password'
,
'post-login-totp'
:
'/login/totp'
,
'post-login-code'
:
'/login/code'
,
// 重置密码
'post-reset-start'
:
'/reset/start'
,
'post-reset-send-code'
:
'/reset/send-code'
,
'post-reset-verify'
:
'/reset/verify'
,
'post-reset-password'
:
'/reset/password'
,
// 登出
'get-logout-do'
:
'/logout/do'
,
// 获取用户信息
'get-userinfo'
:
'/userinfo'
,
'get-captcha'
:
'/captcha'
}
}
const
config
=
{
base
:{
domain
:
'https://management.poolin.com'
,
},
get_api
:
function
(
key
)
{
// domain=window.config.baseUrl
var
apiPrefix
=
'/auth/api'
return
this
.
base
.
domain
+
apiPrefix
+
api
.
api
[
key
]
}
}
export
default
config
;
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