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
095dc532
Commit
095dc532
authored
Sep 14, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-1.5.0' into test
parents
01d7cc6c
249473cc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
11 deletions
+41
-11
appliedPartsCell.vue
src/components/parts/appliedPartsCell.vue
+10
-1
index.js
src/components/upload/index.js
+2
-2
partsDetail.vue
src/pages/mine/warehouse/partsDetail.vue
+16
-4
upload.js
src/plugins/uploader/request/upload/upload.js
+12
-3
utils.js
src/plugins/uploader/request/upload/utils.js
+1
-1
No files found.
src/components/parts/appliedPartsCell.vue
View file @
095dc532
...
@@ -192,7 +192,16 @@
...
@@ -192,7 +192,16 @@
this
.
$emit
(
'action'
,
this
.
info
)
this
.
$emit
(
'action'
,
this
.
info
)
},
},
handleOperate
()
{
handleOperate
()
{
this
.
$emit
(
'operate'
,
this
.
info
.
id
,
this
.
buttonOperateType
,
this
.
willStatus
)
uni
.
showModal
({
title
:
'提示'
,
content
:
'确定'
+
this
.
buttonText
+
'?'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
this
.
$emit
(
'operate'
,
this
.
info
.
id
,
this
.
buttonOperateType
,
this
.
willStatus
)
}
else
if
(
res
.
cancel
)
{
}
}
})
},
},
handleClickExpress
()
{
handleClickExpress
()
{
this
.
$emit
(
'express'
,
this
.
info
)
this
.
$emit
(
'express'
,
this
.
info
)
...
...
src/components/upload/index.js
View file @
095dc532
...
@@ -153,8 +153,8 @@ export default {
...
@@ -153,8 +153,8 @@ export default {
onEachUpdate
(
res
){
onEachUpdate
(
res
){
// 多文件上传每个文件上传成功触发
// 多文件上传每个文件上传成功触发
if
(
imgList
.
length
>
res
.
fileIndex
){
if
(
imgList
.
length
>
res
.
fileIndex
){
imgList
[
res
.
fileIndex
].
key
=
res
.
url
imgList
[
res
.
fileIndex
].
key
=
res
.
key
imgList
[
res
.
fileIndex
].
src
=
uploader
.
qiniuTokenObj
.
visitPrefix
+
res
.
url
imgList
[
res
.
fileIndex
].
src
=
res
.
key
// uploader.qiniuTokenObj.visitPrefix + res.key
}
}
self
.
imgList
=
imgList
self
.
imgList
=
imgList
},
},
...
...
src/pages/mine/warehouse/partsDetail.vue
View file @
095dc532
...
@@ -84,15 +84,15 @@
...
@@ -84,15 +84,15 @@
'20'
:
''
,
'20'
:
''
,
'-2'
:
''
,
'-2'
:
''
,
'-1'
:
''
,
'-1'
:
''
,
'100'
:
''
,
'100'
:
''
,
'91'
:
''
'91'
:
''
}
}
},
},
buttonText
()
{
buttonText
()
{
return
this
.
texts
[
this
.
info
.
status
]
return
this
.
texts
[
this
.
info
.
status
]
},
},
showButton
()
{
showButton
()
{
return
this
.
info
.
status
==
'1'
||
this
.
info
.
status
==
'15'
return
this
.
info
.
status
==
'1'
||
this
.
info
.
status
==
'15'
},
},
hasExpress
()
{
hasExpress
()
{
return
this
.
$u
.
test
.
isEmpty
(
this
.
info
.
express
)
?
false
:
true
return
this
.
$u
.
test
.
isEmpty
(
this
.
info
.
express
)
?
false
:
true
...
@@ -208,6 +208,18 @@
...
@@ -208,6 +208,18 @@
},
},
methods
:
{
methods
:
{
handleClick
()
{
handleClick
()
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'确定'
+
this
.
buttonText
+
'?'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
this
.
handleClickSure
()
}
else
if
(
res
.
cancel
)
{
}
}
})
},
handleClickSure
()
{
this
.
$u
.
api
[
this
.
buttonOperateType
](
this
.
info
.
id
).
then
(
res
=>
{
this
.
$u
.
api
[
this
.
buttonOperateType
](
this
.
info
.
id
).
then
(
res
=>
{
var
type
=
'error'
var
type
=
'error'
var
message
=
res
.
message
var
message
=
res
.
message
...
...
src/plugins/uploader/request/upload/upload.js
View file @
095dc532
...
@@ -3,7 +3,8 @@ const {
...
@@ -3,7 +3,8 @@ const {
chooseImage
,
chooseImage
,
chooseVideo
,
chooseVideo
,
qiniuUpload
,
qiniuUpload
,
urlUpload
urlUpload
,
randomChar
}
=
require
(
"./utils"
);
}
=
require
(
"./utils"
);
import
{
import
{
mergeConfig
mergeConfig
...
@@ -16,9 +17,17 @@ export default class fileUpload extends request {
...
@@ -16,9 +17,17 @@ export default class fileUpload extends request {
}
}
//七牛云上传图片
//七牛云上传图片
async
qnImgUpload
(
options
=
{})
{
async
qnImgUpload
(
options
=
{})
{
let
files
;
let
files
try
{
try
{
files
=
await
chooseImage
(
options
);
const
lists
=
await
chooseImage
(
options
);
files
=
lists
.
map
(
v
=>
{
const
key
=
randomChar
(
10
)
return
{
...
v
,
key
:
key
,
src
:
key
}
})
// 选择完成回调
// 选择完成回调
options
.
onSelectComplete
&&
options
.
onSelectComplete
(
files
);
options
.
onSelectComplete
&&
options
.
onSelectComplete
(
files
);
}
catch
(
err
)
{
}
catch
(
err
)
{
...
...
src/plugins/uploader/request/upload/utils.js
View file @
095dc532
...
@@ -9,7 +9,7 @@ export const randomChar = function(l, url = "") {
...
@@ -9,7 +9,7 @@ export const randomChar = function(l, url = "") {
tmp
+=
x
.
charAt
(
Math
.
ceil
(
Math
.
random
()
*
100000000
)
%
x
.
length
);
tmp
+=
x
.
charAt
(
Math
.
ceil
(
Math
.
random
()
*
100000000
)
%
x
.
length
);
}
}
return
(
return
(
"file/"
+
"
scn/
file/"
+
url
+
url
+
time
.
getTime
()
+
time
.
getTime
()
+
tmp
tmp
...
...
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