Commit a234637c by 李伟康

修改为7天免登录

1 parent 122b919d
......@@ -153,7 +153,7 @@ Component({
else {
const { autoLogin } = thisPage.data,
{ sessionId } = data,
validTime = 3600 * 24 * 30 * 1e3,
validTime = 3600 * 24 * 7 * 1e3,
autoLoginFailureTime = Date.now() + validTime
if (autoLogin) {
wx.$storage.set('auto_login_object', {
......
// pages/login/index/index.js
// import WxValidate from '~/utils/WxValidate'
import WxValidate from '~/utils/wxValidate'
// console.log(WxValidate);
import WxValidate from '../../utils/WxValidate'
Page({
/**
* 页面的初始数据
......
......@@ -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
......@@ -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')
})
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!