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 17cfcddc
authored
Nov 07, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
退出账号清空文件缓存
1 parent
5129117a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
7 deletions
pages/tab/mine/mine.js
pages/tab/mine/mine.js
View file @
17cfcdd
// pages/tab/mine/mine.js
import
{
IMG_URL
}
from
'~/utils/constantData'
import
{
IMG_URL
}
from
'~/utils/constantData'
import
USERAPI
from
'~/api/usersApi/index'
import
mineApi
from
'~/api/mineApi/index'
const
IMAGES
=
Object
.
freeze
({
...
...
@@ -17,7 +19,9 @@ Page({
isRead
:
false
},
navGO
(
e
)
{
let
{
path
}
=
e
.
currentTarget
.
dataset
let
{
path
}
=
e
.
currentTarget
.
dataset
wx
.
$router
.
go
(
path
)
},
logout
()
{
...
...
@@ -31,6 +35,20 @@ Page({
// _this.showLoading()
wx
.
$api
.
showLoading
()
USERAPI
.
logout
().
then
(
_res_
=>
{
const
fn
=
wx
.
getFileSystemManager
()
fn
.
readdir
({
dirPath
:
wx
.
env
.
USER_DATA_PATH
,
success
({
files
})
{
files
.
length
&&
files
.
map
(
e
=>
{
fn
.
unlink
({
filePath
:
`
${
wx
.
env
.
USER_DATA_PATH
}
/
${
e
}
`
})
})
}
})
wx
.
$storage
.
rm
(
'fileList'
)
wx
.
$storage
.
rm
(
'sessionId'
)
wx
.
$storage
.
rm
(
'auto_login_object'
)
wx
.
$storage
.
rm
(
'userInfo'
)
...
...
@@ -41,7 +59,10 @@ Page({
})
},
navbarReady
(
e
)
{
let
{
height
,
statusBarHeight
}
=
e
.
detail
let
{
height
,
statusBarHeight
}
=
e
.
detail
this
.
setData
({
tabBarStyle
:
height
/
2
+
statusBarHeight
})
...
...
@@ -49,9 +70,13 @@ Page({
},
messageBoxPageIsRead
()
{
console
.
log
(
111
)
let
{
serviceMerchantId
}
=
this
.
data
let
{
serviceMerchantId
}
=
this
.
data
mineApi
.
messageBoxPageIsRead
({
serviceMerchantId
})
.
messageBoxPageIsRead
({
serviceMerchantId
})
.
then
(
result
=>
{
console
.
log
(
result
)
this
.
setData
({
...
...
@@ -66,7 +91,9 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
let
{
userInfo
}
=
wx
.
$storage
.
get
()
let
{
userInfo
}
=
wx
.
$storage
.
get
()
let
serviceMerchantId
=
userInfo
.
subLoginUser
.
merchantId
this
.
setData
({
serviceMerchantId
,
...
...
@@ -110,4 +137,4 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{}
})
})
\ No newline at end of file
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