Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
40bd935c
Commit
40bd935c
authored
Mar 12, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传修改
parent
e9cdcaa7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
26 deletions
+13
-26
travelFeature3.vue
...lmanager/TravelGroupControl/TravelTemp/travelFeature3.vue
+2
-3
index.js
src/plug/index.js
+11
-23
No files found.
src/components/newTravelmanager/TravelGroupControl/TravelTemp/travelFeature3.vue
View file @
40bd935c
...
...
@@ -1539,7 +1539,6 @@
return uuid.join('');
},
uploadpic(e){
console.log(e)
let that=this;
if(e.target.files.length>0 && e.target.files[0].size>0){
// 压缩图片需要的一些元素和对象
...
...
@@ -1549,8 +1548,8 @@
let newArr = [];
newArr.push(blob);
var fileName = `${that.uuid(10,10)}.png`;
var path = `/newFeature
/${fileName}
`;
that.uploadBlob(path, newArr, x => {
var path = `/newFeature`;
that.upload
Self
Blob(path, newArr, x => {
let allPath=that.domainManager().ViittoFileUrl+x.name;
let i=e.target.id.split('_')[2];
that.imgUrlChange(allPath)
...
...
src/plug/index.js
View file @
40bd935c
...
...
@@ -144,9 +144,9 @@ export default {
//google地图图片地址
GoogleMapImageUrl
:
"http://super.oytour.com"
,
//上传站点
UploadUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==-
1
?
"http://upload.oytour.com"
:
"http://1
92.168.2.214
:8120"
,
UploadUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==-
1
?
"http://upload.oytour.com"
:
"http://1
27.0.0.1
:8120"
,
//文件站点
ViittoFileUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==-
1
?
"http://imgfile.oytour.com"
:
'http://1
92.168.2.214
:8130'
ViittoFileUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
||
locationName
.
indexOf
(
'viitto'
)
!==-
1
?
"http://imgfile.oytour.com"
:
'http://1
27.0.0.1
:8130'
};
return
obj
;
},
...
...
@@ -473,27 +473,15 @@ export default {
}
}
Vue
.
prototype
.
uploadBlob
=
function
(
path
,
files
,
successCall
)
{
if
(
files
&&
files
.
length
>
0
)
{
var
oss
=
new
OSS
({
region
:
'oss-cn-hangzhou'
,
accessKeyId
:
'LTAIwE7l9dImZSa3'
,
accessKeySecret
:
'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI'
,
bucket
:
'reborndev'
})
let
that
=
this
co
(
function
*
()
{
for
(
let
index
=
0
;
index
<
files
.
length
;
index
++
)
{
var
result
=
yield
oss
.
multipartUpload
(
path
,
files
[
index
],
{
progress
:
function
*
(
p
)
{},
mime
:
'application/octet-stream'
})
successCall
(
result
);
}
}).
catch
(
function
(
err
)
{
console
.
log
(
err
);
});
}
Vue
.
prototype
.
uploadSelfBlob
=
function
(
path
,
files
,
successCall
)
{
let
that
=
this
;
var
uploadUrl
=
that
.
domainManager
().
UploadUrl
+
"/Upload/UploadBlob?fileType=1&fileLimit=5&&filePath="
+
path
;
var
formData
=
new
FormData
();
formData
.
append
(
"myfile"
,
files
[
0
]);
that
.
$http
.
post
(
uploadUrl
,
formData
,{
'Content-Type'
:
'multipart/form-data'
})
.
then
(
res
=>
{
successCall
(
res
);
})
},
//验证只能输入2位小数【负数:isMinus传true】
...
...
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