Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李俊赕
self-support
Commits
bb5c7fc0
Commit
bb5c7fc0
authored
May 17, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
缓存图片处理调整
parent
6ebba4ea
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
App.vue
src/App.vue
+14
-14
No files found.
src/App.vue
View file @
bb5c7fc0
...
@@ -83,10 +83,14 @@ export default {
...
@@ -83,10 +83,14 @@ export default {
// 系统自动登录
// 系统自动登录
await
this
.
autoLogin
();
await
this
.
autoLogin
();
this
.
deleteTempImg
()
},
},
onShow
:
async
function
()
{
onShow
:
async
function
()
{
// 应用启动,或从后台进入前台显示
// 应用启动,或从后台进入前台显示
this
.
handleImageTask
()
if
(
this
.
uploadTask
.
length
>
0
)
{
upload
.
uploadImageTask
(
this
)
}
},
},
onHide
:
function
()
{
onHide
:
function
()
{
// 应用从前台进入后台
// 应用从前台进入后台
...
@@ -97,11 +101,8 @@ export default {
...
@@ -97,11 +101,8 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
// 处理上传图片队列数据
// 处理已上传完成的图片
handleImageTask
()
{
deleteTempImg
()
{
if
(
this
.
uploadTask
.
length
>
0
)
{
upload
.
uploadImageTask
(
this
)
}
else
{
// 定时清理缓存在本地的文件
const
result
=
uni
.
getStorageSync
(
'delImg'
)
const
result
=
uni
.
getStorageSync
(
'delImg'
)
if
(
result
.
length
>
0
)
{
if
(
result
.
length
>
0
)
{
for
(
let
i
of
result
)
{
for
(
let
i
of
result
)
{
...
@@ -111,7 +112,6 @@ export default {
...
@@ -111,7 +112,6 @@ export default {
}
}
uni
.
setStorageSync
(
'delImg'
,
[])
uni
.
setStorageSync
(
'delImg'
,
[])
}
}
}
},
},
getSystemInfo
()
{
getSystemInfo
()
{
try
{
try
{
...
...
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