Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
bc9fb94e
Commit
bc9fb94e
authored
Jun 24, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
a13da573
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
144 additions
and
129 deletions
+144
-129
common.js
src/api/common/common.js
+34
-0
materialMan.vue
src/pages/activity/materialMan.vue
+108
-102
erpindex.js
src/utils/erpindex.js
+2
-27
No files found.
src/api/common/common.js
View file @
bc9fb94e
...
...
@@ -60,6 +60,37 @@ export function UploadSelfFile(path, file, callback, configObj) {
}
}
//上传视频文件到本地服务器
export
function
UploadViittoFile
(
path
,
file
,
callback
)
{
var
uploadLoadding
=
Loading
;
uploadLoadding
.
show
({
message
:
'正在上传文件,请稍后...'
})
let
viewFileUrl
=
'http://192.168.20.214:8130'
;
let
vtUploadUrl
=
"http://192.168.20.214:8120"
;
let
locationName
=
window
.
location
.
hostname
;
if
(
locationName
.
indexOf
(
'testerp.oytour'
)
!==
-
1
)
{
vtUploadUrl
=
"http://upload.oytour.com"
;
viewFileUrl
=
"https://imgfile.oytour.com"
;
}
else
if
(
locationName
.
indexOf
(
'oytour'
)
!==
-
1
)
{
vtUploadUrl
=
"http://upload.oytour.com"
;
viewFileUrl
=
"https://imgfile.oytour.com"
;
}
var
UploadConfig
=
{
Bucket
:
"系统"
,
CustomDomain
:
viewFileUrl
,
Region
:
"成都"
,
SecretId
:
"SecreId"
,
SecretKey
:
"SecreKey"
,
StoreType
:
3
,
UploadDomain
:
vtUploadUrl
,
};
var
configObj
=
{
isCreateCover
:
1
}
UploadFileToSystem
(
UploadConfig
,
path
,
file
,
uploadLoadding
,
callback
,
configObj
)
}
/**
* 上传到当前站点
*/
...
...
@@ -115,6 +146,9 @@ export function UploadFileToSystem(uploadConfig, fileFullPath, fileObj, uploadLo
if
(
configObj
.
isTrans
&&
configObj
.
isTrans
==
1
)
{
url
+=
"&isTrans=1"
}
if
(
configObj
.
isCreateCover
&&
configObj
.
isCreateCover
==
1
)
{
url
+=
"&isCreateCover=1"
}
}
let
formData
=
new
FormData
()
formData
.
append
(
'myfile'
,
fileObj
)
...
...
src/pages/activity/materialMan.vue
View file @
bc9fb94e
This diff is collapsed.
Click to expand it.
src/utils/erpindex.js
View file @
bc9fb94e
...
...
@@ -83,9 +83,9 @@ export default {
let
domainUrl
=
'http://192.168.20.24'
;
let
viewFileUrl
=
'http://192.168.20.214:8120'
;
let
mallUrl
=
"http://192.168.20.17:8014"
;
let
vtUploadUrl
=
"http://192.168.20.2
1
4:8120"
;
let
vtUploadUrl
=
"http://192.168.20.24:8120"
;
// let vtUploadUrl = "http://upload.oytour.com";
let
vtViewUrl
=
"http://192.168.20.2
1
4:8130"
;
let
vtViewUrl
=
"http://192.168.20.24:8130"
;
let
locationName
=
window
.
location
.
hostname
;
if
(
locationName
.
indexOf
(
'testerp.oytour'
)
!==
-
1
)
{
domainUrl
=
"http://testapi.oytour.com"
;
...
...
@@ -533,31 +533,6 @@ export default {
//是否是线上环境【发布时修改为true】
Vue
.
prototype
.
isOnline
=
function
()
{
return
process
.
env
.
NODE_ENV
!==
'development'
;
},
//上传文件到本地服务器
Vue
.
prototype
.
UploadSelfFile
=
function
(
path
,
file
,
callback
)
{
var
that
=
this
;
that
.
Info
(
'上传中...'
)
var
newPath
=
'/Upload/'
+
path
+
"/"
;
var
formData
=
new
FormData
();
var
uploadUrl
=
that
.
domainManager
().
VTUploadUrl
+
"/Upload?filePath="
+
newPath
+
"&isCreateCover=1"
;
formData
.
append
(
"myfile"
,
file
);
that
.
$http
.
post
(
uploadUrl
,
formData
,
{})
.
then
(
res
=>
{
if
(
res
&&
res
.
status
==
200
&&
res
.
data
&&
res
.
data
.
FilePath
)
{
var
uploadResult
=
{
resultCode
:
1
,
FileName
:
file
.
name
,
FileUrl
:
that
.
domainManager
().
VTViewUrl
+
res
.
data
.
FilePath
,
VideoCoverImg
:
that
.
domainManager
().
VTViewUrl
+
res
.
data
.
VideoCoverImg
}
if
(
callback
)
{
callback
(
uploadResult
);
}
}
}).
catch
(
function
(
reason
)
{
console
.
log
(
reason
)
});
}
}
}
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