Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a234637c
authored
Oct 17, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改为7天免登录
1 parent
122b919d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
6 deletions
login/index/components/Box/Box.js
login/index/index.js
login/index/index.wxml
pages/tab/mine/mine.js
login/index/components/Box/Box.js
View file @
a234637
...
...
@@ -153,7 +153,7 @@ Component({
else
{
const
{
autoLogin
}
=
thisPage
.
data
,
{
sessionId
}
=
data
,
validTime
=
3600
*
24
*
30
*
1
e3
,
validTime
=
3600
*
24
*
7
*
1
e3
,
autoLoginFailureTime
=
Date
.
now
()
+
validTime
if
(
autoLogin
)
{
wx
.
$storage
.
set
(
'auto_login_object'
,
{
...
...
login/index/index.js
View file @
a234637
// pages/login/index/index.js
// import WxValidate from '~/utils/WxValidate'
import
WxValidate
from
'~/utils/wxValidate'
// console.log(WxValidate);
import
WxValidate
from
'../../utils/WxValidate'
Page
({
/**
* 页面的初始数据
...
...
login/index/index.wxml
View file @
a234637
...
...
@@ -3,5 +3,5 @@
<navigation-bar navStyle="background-color: rgba(0,0,0,0)">生意助手</navigation-bar>
<box loginType="{{loginType}}" disabled="{{disabled}}" id="box" />
<type-list loginType="{{loginType}}" />
<agree show="{{loginType == 2}}" text="
30
天内免登陆" value="{{autoLogin}}" bindchange="changeAgree" />
<agree show="{{loginType == 2}}" text="
7
天内免登陆" value="{{autoLogin}}" bindchange="changeAgree" />
</view>
\ No newline at end of file
pages/tab/mine/mine.js
View file @
a234637
...
...
@@ -25,6 +25,7 @@ Page({
wx
.
$api
.
showLoading
()
USERAPI
.
logout
().
then
(
_res_
=>
{
wx
.
$storage
.
rm
(
'sessionId'
)
wx
.
$storage
.
rm
(
'auto_login_object'
)
wx
.
$router
.
go
(
'login.index'
)
})
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment