Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
Harvey
/
ydu-lottery-shop-app
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4591d09e
由
Harvey
编写于
2022-04-26 14:26:24 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
登录页面返回
1 个父辈
97476fb1
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
38 行增加
和
15 行删除
src/pages.json
src/pages/auth/login.vue
src/pages.json
查看文件 @
4591d09
...
@@ -57,8 +57,9 @@
...
@@ -57,8 +57,9 @@
"name"
:
"login"
,
"name"
:
"login"
,
"desc"
:
"登录页"
,
"desc"
:
"登录页"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"登录/注册"
,
//
"navigationBarTitleText"
:
"登录/注册"
,
"navigationStyle"
:
"default"
//
"navigationStyle"
:
"default"
,
"navigationStyle"
:
"custom"
}
}
},
},
{
{
...
...
src/pages/auth/login.vue
查看文件 @
4591d09
<
template
>
<
template
>
<view
class=
"body"
>
<view>
<text>
首次登录创建新帐号
</text>
<uni-nav-bar
fixed=
"true"
backgroundColor=
"#F8F8F8"
leftIcon=
"closeempty"
title=
"登录/注册"
@
clickLeft=
"back"
/>
<view
class=
"input"
>
<view
class=
"body"
>
<text>
手机号
</text>
<text>
首次登录创建新帐号
</text>
<input
type=
"text"
v-model=
"mobile"
placeholder=
"请填写手机号"
placeholder-style=
"color:#ACACAC;"
/>
<view
class=
"input"
>
<text>
手机号
</text>
<input
type=
"text"
v-model=
"mobile"
placeholder=
"请填写手机号"
placeholder-style=
"color:#ACACAC;"
/>
</view>
<view
class=
"input"
>
<text>
验证码
</text>
<input
type=
"text"
v-model=
"code"
placeholder-style=
"color:#ACACAC;"
placeholder=
"请填写手机验证码"
/>
<text
:class=
"'yzm '+yzm.class"
@
click=
"sendMobileCode"
>
获取验证码
{{
yzm
.
djs
}}
</text>
</view>
<button
type=
"default"
class=
"btn"
@
click=
"login"
>
下一步
</button>
</view>
</view>
<view
class=
"input"
>
<text>
验证码
</text>
<input
type=
"text"
v-model=
"code"
placeholder-style=
"color:#ACACAC;"
placeholder=
"请填写手机验证码"
/>
<text
:class=
"'yzm '+yzm.class"
@
click=
"sendMobileCode"
>
获取验证码
{{
yzm
.
djs
}}
</text>
</view>
<button
type=
"default"
class=
"btn"
@
click=
"login"
>
下一步
</button>
</view>
</view>
</
template
>
</
template
>
...
@@ -32,6 +35,20 @@
...
@@ -32,6 +35,20 @@
if
(
e
.
from
)
this
.
from
=
e
.
from
if
(
e
.
from
)
this
.
from
=
e
.
from
},
},
methods
:
{
methods
:
{
back
()
{
let
pages
=
getCurrentPages
()
if
(
pages
.
length
<
2
)
{
uni
.
navigateTo
({
url
:
'/'
})
return
}
uni
.
navigateBack
({
delta
:
1
});
},
async
login
()
{
async
login
()
{
if
(
this
.
mobile
.
length
!=
11
)
{
if
(
this
.
mobile
.
length
!=
11
)
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -55,8 +72,8 @@
...
@@ -55,8 +72,8 @@
name
:
'ydn_sms_login'
,
name
:
'ydn_sms_login'
,
type
:
'mutation'
,
type
:
'mutation'
,
args
:
`mobile:"
${
this
.
mobile
}
",code:"
${
this
.
code
}
",type:"web"`
args
:
`mobile:"
${
this
.
mobile
}
",code:"
${
this
.
code
}
",type:"web"`
})
})
if
(
res
.
Error
)
{
if
(
res
.
Error
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
Error
,
title
:
res
.
Error
,
...
@@ -123,6 +140,10 @@
...
@@ -123,6 +140,10 @@
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.uni-nav-bar-text
{
font-size
:
18px
;
}
.body
{
.body
{
font-family
:
Helvetica
;
font-family
:
Helvetica
;
font-weight
:
400
;
font-weight
:
400
;
...
@@ -130,6 +151,7 @@
...
@@ -130,6 +151,7 @@
color
:
#333333
;
color
:
#333333
;
padding
:
20px
;
padding
:
20px
;
margin-top
:
30px
;
margin-top
:
30px
;
}
}
.input
{
.input
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论