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
91063030
authored
May 19, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bug
parent
749b4a8e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
4 deletions
assets/css/mine/user.scss
pages/mine/login.vue
pages/mine/user.vue
util/util.js
assets/css/mine/user.scss
View file @
91063030
.page-user
{
height
:
100vh
;
padding
:
22rpx
24rpx
0
24rpx
;
padding
:
22rpx
24rpx
200rpx
24rpx
;
background
:
linear-gradient
(
200deg
,
#d6e8ff
0%
,
#f5f5f7
277px
);
overflow-y
:
auto
;
.user-head
{
...
...
pages/mine/login.vue
View file @
91063030
...
...
@@ -83,7 +83,7 @@
<
script
>
import
{
Ichunt_Api
,
Api_Url
,
Code_Url
}
from
'@/util/api.js'
;
import
{
setCookie
,
startCountdown
}
from
'@/util/util.js'
;
import
{
setCookie
,
delCookie
,
startCountdown
}
from
'@/util/util.js'
;
export
default
{
data
()
{
return
{
...
...
@@ -206,6 +206,9 @@ export default {
this
.
request
(
Api_Url
+
'/login/action'
,
'POST'
,
this
.
formParams
,
true
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
delCookie
(
'Yo4teW_csrf'
);
delCookie
(
'Yo4teW_gid'
);
delCookie
(
'Yo4teW_uid'
);
this
.
verify_flag
=
false
;
uni
.
showToast
({
title
:
'登录成功'
,
...
...
pages/mine/user.vue
View file @
91063030
...
...
@@ -118,8 +118,18 @@ export default {
data
()
{
return
{};
},
onLoad
()
{},
methods
:
{}
onShow
()
{
this
.
getData
();
},
methods
:
{
getData
()
{
this
.
request
(
Api_Url
+
'/user/getUserType'
,
'POST'
,
{},
true
,
true
).
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
err_code
===
0
)
{
}
});
}
}
};
</
script
>
...
...
util/util.js
View file @
91063030
...
...
@@ -113,6 +113,17 @@ const getCookie = (name) => {
}
/**
*删除cookie
*/
const
delCookie
=
(
name
)
=>
{
var
exp
=
new
Date
();
exp
.
setTime
(
exp
.
getTime
()
-
1
);
var
cval
=
getCookie
(
name
);
if
(
cval
!=
null
)
document
.
cookie
=
name
+
"="
+
cval
+
";expires="
+
exp
.
toGMTString
();
}
/**
* 手机验证码倒计时函数
* @param {Object} options - 配置项
* @param {number} options.duration - 倒计时时间,单位为秒,默认为60s
...
...
@@ -161,5 +172,6 @@ module.exports = {
getPlatform
,
setCookie
,
getCookie
,
delCookie
,
startCountdown
}
\ No newline at end of file
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