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
3efbb8dc
Commit
3efbb8dc
authored
Jun 28, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
12dee782
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
4 deletions
+53
-4
App.vue
src/App.vue
+1
-1
routes.js
src/router/routes.js
+10
-0
erpindex.js
src/utils/erpindex.js
+42
-3
No files found.
src/App.vue
View file @
3efbb8dc
...
...
@@ -12,7 +12,7 @@ export default {
<
style
>
@import
url('~assets/css/font.css')
;
@import
url('//at.alicdn.com/t/font_2077629_
g32rddqy4c
.css')
;
@import
url('//at.alicdn.com/t/font_2077629_
6z9pzksqq3v
.css')
;
html
,
body
,
...
...
src/router/routes.js
View file @
3efbb8dc
...
...
@@ -685,6 +685,16 @@ const routes = [{
component
:
()
=>
import
(
"pages/activity/advmanager.vue"
)
},
{
path
:
"/activity/makeAd"
,
//活动 制作广告图
component
:
()
=>
import
(
"pages/activity/makeAd.vue"
)
},
{
path
:
"/activity/myadvert"
,
//活动 我的广告图
component
:
()
=>
import
(
"pages/activity/myadvert.vue"
)
},
{
path
:
"/sale/appointManagement"
,
//销售 约课管理
component
:
()
=>
...
...
src/utils/erpindex.js
View file @
3efbb8dc
...
...
@@ -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
4:8120"
;
//
let vtUploadUrl = "http://upload.oytour.com";
let
vtViewUrl
=
"http://192.168.20.24:8130"
;
// let vtUploadUrl = "http://192.168.20.21
4:8120";
let
vtUploadUrl
=
"http://upload.oytour.com"
;
let
vtViewUrl
=
"http://192.168.20.2
1
4:8130"
;
let
locationName
=
window
.
location
.
hostname
;
if
(
locationName
.
indexOf
(
'testerp.oytour'
)
!==
-
1
)
{
domainUrl
=
"http://testapi.oytour.com"
;
...
...
@@ -414,6 +414,7 @@ export default {
Vue
.
prototype
.
UploadFileToTencent
=
function
(
path
,
fileObj
,
callback
)
{
// debugger;
var
upInfo
=
JSON
.
parse
(
localStorage
.
uploadInfo
);
let
maxSize
=
500
*
1024
if
((
fileObj
.
type
==
"image/png"
||
fileObj
.
type
==
"image/jpeg"
)
&&
fileObj
.
size
>
maxSize
)
{
let
that
=
this
...
...
@@ -434,6 +435,7 @@ export default {
var
newFile
=
new
File
([
u8arr
],
fileObj
.
name
,
{
type
:
mime
});
if
(
upInfo
&&
upInfo
.
IsDefault
==
1
)
{
if
(
upInfo
.
StoreType
==
1
)
{
that
.
uploadStart
(
path
,
newFile
,
callback
)
...
...
@@ -566,6 +568,43 @@ export default {
//是否是线上环境【发布时修改为true】
Vue
.
prototype
.
isOnline
=
function
()
{
return
process
.
env
.
NODE_ENV
!==
'development'
;
},
//获取文件Blob
Vue
.
prototype
.
getFileBlob
=
function
(
objectKey
,
filename
)
{
var
co
=
require
(
'co'
);
var
OSS
=
require
(
'ali-oss'
);
var
oss
=
new
OSS
({
region
:
'oss-cn-hangzhou'
,
accessKeyId
:
'LTAIwE7l9dImZSa3'
,
accessKeySecret
:
'j47Ajn0d0WzUCIX8Biyj3P2r8QDltI'
,
bucket
:
'reborndev'
})
let
url
=
oss
.
signatureUrl
(
objectKey
);
let
getBlob
=
new
Promise
(
resolve
=>
{
const
xhr
=
new
XMLHttpRequest
();
xhr
.
open
(
'GET'
,
url
,
true
);
xhr
.
responseType
=
'blob'
;
xhr
.
onload
=
()
=>
{
if
(
xhr
.
status
===
200
)
{
resolve
(
xhr
.
response
);
}
};
xhr
.
send
();
});
return
getBlob
},
//Blob文件上传
Vue
.
prototype
.
uploadSelfBlob
=
function
(
path
,
files
,
successCall
)
{
let
that
=
this
;
var
uploadUrl
=
that
.
domainManager
().
VTUploadUrl
+
"/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
);
})
}
}
}
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