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
7c9cc916
Commit
7c9cc916
authored
May 17, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片队列使用临时路径
parent
cfe977aa
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
450 additions
and
446 deletions
+450
-446
.env.js
.env.js
+1
-1
App.vue
src/App.vue
+1
-1
XhFiles.vue
src/components/createCom/XhFiles.vue
+267
-267
preview.vue
src/components/photo/preview.vue
+0
-1
index.js
src/components/upload/index.js
+180
-175
task.js
src/components/upload/task.js
+1
-1
No files found.
.env.js
View file @
7c9cc916
src/App.vue
View file @
7c9cc916
...
...
@@ -77,7 +77,7 @@ export default {
// 系统自动登录::每次运行小程序重新获取用户信息
await
this
.
autoLogin
();
this
.
deleteTempImg
()
//
this.deleteTempImg()
},
onShow
:
async
function
()
{
// 应用启动,或从后台进入前台显示
...
...
src/components/createCom/XhFiles.vue
View file @
7c9cc916
src/components/photo/preview.vue
View file @
7c9cc916
...
...
@@ -87,7 +87,6 @@
if
(
photo
.
tempPath
.
mixWater
){
// 保存水印处理图片到本地
path
=
photo
.
tempPath
.
mixWater
console
.
log
(
"path"
,
path
)
let
result1
=
await
this
.
saveLocal
(
path
)
if
(
result1
){
uni
.
showToast
({
...
...
src/components/upload/index.js
View file @
7c9cc916
...
...
@@ -47,13 +47,18 @@ export default {
*/
async
saveToTask
(
files
)
{
// 生成key返回,然后把key放到异步上传的任务队列
let
lists
=
[]
for
(
let
i
=
0
;
i
<
files
.
length
;
i
++
)
{
const
path
=
files
[
i
]
const
row
=
await
this
.
saveFiles
(
path
)
lists
.
push
(
row
)
let
lists
=
files
.
map
(
v
=>
{
return
{
key
:
randomChar
(
10
),
path
:
v
,
src
:
''
}
})
// for (let i = 0; i < files.length; i++) {
// const path = files[i]
// const row = await this.saveFiles(path)
// lists.push(row)
// }
const
data
=
this
.
uploadTask
const
saveLists
=
data
.
concat
(
lists
)
this
.
$u
.
vuex
(
'uploadTask'
,
saveLists
)
...
...
src/components/upload/task.js
View file @
7c9cc916
...
...
@@ -32,7 +32,7 @@ export default {
}
})
uni
.
setStorageSync
(
'delImg'
,
delImg
)
// 已上传完的图片,会在启动系统的时候做一次清理
//
uni.setStorageSync('delImg', delImg) // 已上传完的图片,会在启动系统的时候做一次清理
that
.
$u
.
vuex
(
'uploadTask'
,
newTask
)
}
...
...
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