Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
H5_2.0
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
da6a2904
authored
May 24, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
8a4163a2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
94 additions
and
23 deletions
pages/mine/bindMail.vue
pages/mine/login.vue
pages/mine/setting.vue
pages/mine/bindMail.vue
View file @
da6a2904
<
template
>
<view
class=
"page-bind"
>
<navElement
title=
"绑定邮箱"
></navElement>
<template
v-if=
"type == 1"
>
<navElement
title=
"绑定邮箱"
></navElement>
</
template
>
<
template
v-else-if=
"type == 2"
>
<navElement
title=
"绑定QQ"
></navElement>
</
template
>
<
template
v-else-if=
"type == 3"
>
<navElement
title=
"绑定微信"
></navElement>
</
template
>
<view
class=
"form-box"
v-if=
"flag"
>
<view><input
type=
"text"
placeholder=
"请输入邮箱号码"
class=
"uni-input"
/></view>
<view
class=
"btn row rowCenter verCenter"
@
click=
"flag = false"
>
绑定
</view>
<
template
v-if=
"type == 1"
>
<view><input
type=
"text"
placeholder=
"请输入邮箱号码"
class=
"uni-input"
v-model=
"formParams.email"
/></view>
</
template
>
<
template
v-else-if=
"type == 2"
>
<view><input
type=
"text"
placeholder=
"请输入QQ号"
class=
"uni-input"
v-model=
"formParams.qq"
/></view>
</
template
>
<
template
v-else-if=
"type == 3"
>
<view><input
type=
"text"
placeholder=
"请输入微信号"
class=
"uni-input"
v-model=
"formParams.wx"
/></view>
</
template
>
<view
class=
"btn row rowCenter verCenter"
@
click=
"updateUserInfo()"
>
绑定
</view>
</view>
<view
class=
"success column rowCenter verCenter"
v-else
>
<image
src=
"../../static/success.png"
></image>
<text
class=
"tt"
>
我是一条文案文案文案
</text>
<text
class=
"tt"
>
修改邮箱成功
</text>
<navigator
class=
"btn row rowCenter verCenter"
url=
"/login"
hover-class=
"none"
>
去验证
</navigator>
</view>
</view>
...
...
@@ -15,7 +31,6 @@
<
script
>
import
{
Api_Url
}
from
'@/util/api.js'
;
import
{
setCookie
,
delCookie
,
getCookie
,
startCountdown
}
from
'@/util/util.js'
;
import
navElement
from
'@/components/nav.vue'
;
export
default
{
components
:
{
...
...
@@ -23,11 +38,70 @@ export default {
},
data
()
{
return
{
flag
:
true
type
:
''
,
flag
:
true
,
formParams
:
{
email
:
''
,
qq
:
''
,
wx
:
''
}
};
},
onShow
()
{},
methods
:
{}
onLoad
(
options
)
{
this
.
type
=
options
.
type
||
''
;
},
methods
:
{
updateUserInfo
()
{
if
(
this
.
type
==
1
)
{
if
(
!
this
.
formParams
.
email
)
{
uni
.
showToast
({
title
:
'请填写邮箱'
,
icon
:
'none'
});
return
false
;
}
}
else
if
(
this
.
type
==
2
)
{
if
(
!
this
.
formParams
.
qq
)
{
uni
.
showToast
({
title
:
'请填写QQ号'
,
icon
:
'none'
});
return
false
;
}
}
else
if
(
this
.
type
==
3
)
{
if
(
!
this
.
formParams
.
wx
)
{
uni
.
showToast
({
title
:
'请输入微信号'
,
icon
:
'none'
});
return
false
;
}
}
this
.
request
(
Api_Url
+
'/home/fix/updateUserInfo'
,
'POST'
,
this
.
formParams
,
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
uni
.
showToast
({
title
:
'更新成功'
,
icon
:
'success'
});
if
(
this
.
type
==
1
)
{
this
.
flag
=
false
;
}
else
{
setTimeout
(()
=>
{
uni
.
navigateBack
({
delta
:
1
});
},
2000
);
}
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
icon
:
'none'
});
}
});
}
}
};
</
script
>
...
...
pages/mine/login.vue
View file @
da6a2904
...
...
@@ -53,7 +53,7 @@
<!-- 普通登录 -->
<
template
v-else
>
<view
class=
"input-box code row bothSide verCenter mb40"
>
<input
type=
"
number
"
placeholder=
"请输入手机号码/邮箱"
placeholder-style=
"color:#919399;"
class=
"uni-input"
v-model=
"formParams.account"
/>
<input
type=
"
text
"
placeholder=
"请输入手机号码/邮箱"
placeholder-style=
"color:#919399;"
class=
"uni-input"
v-model=
"formParams.account"
/>
<text
class=
"code"
@
click=
"login_type = true"
>
国际手机
</text>
</view>
<view
class=
"input-box verification-code row bothSide verCenter"
style=
"margin-bottom: 24rpx;"
v-if=
"verify_flag"
>
...
...
@@ -195,7 +195,6 @@ export default {
});
},
submit
()
{
var
reg
=
/^1
(
3
[
0-9
]
|4
[
01456879
]
|5
[
0-35-9
]
|6
[
2567
]
|7
[
0-8
]
|8
[
0-9
]
|9
[
0-35-9
])\d{8}
$/
;
if
(
!
this
.
formParams
.
account
)
{
uni
.
showToast
({
title
:
'请输入手机号'
,
...
...
@@ -204,14 +203,6 @@ export default {
return
false
;
}
if
(
!
reg
.
test
(
this
.
formParams
.
account
))
{
uni
.
showToast
({
title
:
'手机格式错误'
,
icon
:
'none'
});
return
false
;
}
this
.
request
(
Api_Url
+
'/login/action'
,
'POST'
,
this
.
formParams
,
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
delCookie
(
'Yo4teW_csrf'
);
...
...
pages/mine/setting.vue
View file @
da6a2904
...
...
@@ -12,7 +12,7 @@
<text
class=
"iconfont icon-jt"
></text>
</view>
</navigator>
<navigator
class=
"box row bothSide verCenter"
url=
"/user/bindMail"
hover-class=
"none"
>
<navigator
class=
"box row bothSide verCenter"
url=
"/user/bindMail
?type=1
"
hover-class=
"none"
>
<view
class=
"text"
>
<text
class=
"t1"
>
邮箱
</text>
<text
class=
"t2"
>
{{
userInfo
.
user_info
.
email
}}
</text>
...
...
@@ -22,15 +22,21 @@
<text
class=
"iconfont icon-jt"
></text>
</view>
</navigator>
<navigator
class=
"box row bothSide verCenter curr"
url=
"/user/bindMail"
hover-class=
"none"
>
<view
class=
"text"
><text
class=
"t1"
>
QQ号
</text></view>
<navigator
class=
"box row bothSide verCenter curr"
url=
"/user/bindMail?type=2"
hover-class=
"none"
>
<view
class=
"text"
>
<text
class=
"t1"
>
QQ号
</text>
<text
class=
"t2"
>
{{
userInfo
.
user_info
.
qq
}}
</text>
</view>
<view
class=
"right"
>
<text
class=
"t1"
>
绑定
</text>
<text
class=
"iconfont icon-jt"
></text>
</view>
</navigator>
<navigator
class=
"box row bothSide verCenter curr"
url=
"/user/bindMail"
hover-class=
"none"
>
<view
class=
"text"
><text
class=
"t1"
>
微信号
</text></view>
<navigator
class=
"box row bothSide verCenter curr"
url=
"/user/bindMail?type=3"
hover-class=
"none"
>
<view
class=
"text"
>
<text
class=
"t1"
>
微信号
</text>
<text
class=
"t2"
>
{{
userInfo
.
user_info
.
wx
}}
</text>
</view>
<view
class=
"right"
>
<text
class=
"t1"
>
绑定
</text>
<text
class=
"iconfont icon-jt"
></text>
...
...
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