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
ee0d65c5
Commit
ee0d65c5
authored
Sep 07, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/confucius
parents
29cad22b
d5e17e1a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
126 additions
and
1 deletion
+126
-1
common.js
src/api/common/common.js
+3
-0
permission.js
src/boot/permission.js
+1
-1
koreaUpload.vue
src/pages/koreaUpload.vue
+116
-0
routes.js
src/router/routes.js
+6
-0
No files found.
src/api/common/common.js
View file @
ee0d65c5
...
...
@@ -89,6 +89,9 @@ export function UploadViittoFile(path, file, callback) {
}
else
if
(
locationName
.
indexOf
(
'oytour'
)
!==
-
1
)
{
vtUploadUrl
=
"http://upload.oytour.com"
;
viewFileUrl
=
"https://imgfile.oytour.com"
;
}
else
if
(
locationName
.
indexOf
(
'kookaku'
)
!==
-
1
)
{
vtUploadUrl
=
"https://upload.oytour.com"
;
viewFileUrl
=
"https://imgfile.oytour.com"
;
}
var
UploadConfig
=
{
Bucket
:
"系统"
,
...
...
src/boot/permission.js
View file @
ee0d65c5
...
...
@@ -8,7 +8,7 @@ LoadingBar.setDefaults({
position
:
"bottom"
});
let
loadAsyncRouter
=
false
;
const
whiteList
=
[
"/login"
,
"/"
,
"/contractConfirm"
,
"/contractPay"
,
"/contractView"
,
"/contractSign"
,
"/noticeView"
,
"/autologin"
,
"/courseRefundH5"
];
// 不重定向白名单
const
whiteList
=
[
"/login"
,
"/"
,
"/contractConfirm"
,
"/contractPay"
,
"/contractView"
,
"/contractSign"
,
"/noticeView"
,
"/autologin"
,
"/courseRefundH5"
,
"/koreaUpload"
];
// 不重定向白名单
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
localStorage
.
setItem
(
"routerBefore"
,
from
.
path
);
LoadingBar
.
start
();
...
...
src/pages/koreaUpload.vue
0 → 100644
View file @
ee0d65c5
<
style
>
.koreaUpload
{
width
:
100%
;
background-color
:
#fff
;
height
:
100%
;
-webkit-text-size-adjust
:
100%
;
-moz-text-size-adjust
:
100%
;
-ms-text-size-adjust
:
100%
;
text-size-adjust
:
100%
;
color
:
#000
;
}
.koreaUpload
.box
{
width
:
90%
;
height
:
200px
;
margin-top
:
40px
;
border-radius
:
8px
;
margin-left
:
5%
;
border
:
1px
dashed
#e2e2e2
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.koreaUpload
.avatar-uploader
{
}
</
style
>
<
template
>
<div
class=
"koreaUpload"
>
<div
class=
"box"
>
<el-upload
class=
"avatar-uploader "
action=
""
:before-upload=
"uploadFile"
:show-file-list=
"false"
>
<i
class=
"el-icon-upload"
style=
"font-size: 40px;color: #e2e2e2;"
></i>
<div
class=
"el-upload__text"
style=
"font-size: 18px;"
>
上传文件
</em></div>
</el-upload>
</div>
<div>
{{
fliename
}}
</div>
</div>
</
template
>
<
script
>
import
wx
from
'weixin-js-sdk'
import
{
UploadViittoFile
}
from
"../api/common/common"
;
export
default
{
meta
:
{
title
:
"文件上传"
},
data
()
{
return
{
data
:
''
,
fliename
:
''
,
};
},
created
()
{
if
(
this
.
$route
.
query
)
{
this
.
data
=
JSON
.
parse
(
this
.
$route
.
query
.
data
)
}
},
methods
:
{
uploadFile
(
files
)
{
console
.
log
(
files
)
let
ft
=
files
.
name
.
substring
(
files
.
name
.
lastIndexOf
(
'.'
)
+
1
,
files
.
name
.
length
)
let
stringArr
=
this
.
data
.
FileType
if
(
stringArr
.
indexOf
(
ft
)
==
'-1'
)
{
//判断文件格式
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
`请上传正确的文件格式!`
,
position
:
'top'
})
return
false
;
}
if
(
this
.
data
.
FileSizeLimit
>
0
)
{
//判断文件大小
const
size
=
files
.
size
/
1024
/
1024
this
.
FileName
=
size
if
(
size
>
this
.
data
.
FileSizeLimit
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
"文件大小不能超过"
+
this
.
data
.
FileSizeLimit
+
"MB哦!"
,
position
:
'top'
})
return
false
;
}
}
UploadViittoFile
(
'korea/Test/Upload'
,
files
,
res
=>
{
console
.
log
(
res
)
if
(
res
.
Code
==
1
)
{
res
.
data
=
this
.
data
;
wx
.
miniProgram
.
navigateBack
({
delta
:
1
})
wx
.
miniProgram
.
postMessage
({
data
:
res
})
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
"上传失败!"
,
position
:
'top'
})
return
false
;
}
}).
catch
(()
=>
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
"上传失败!"
,
position
:
'top'
})
return
false
;
})
},
},
mounted
()
{
}
};
</
script
>
\ No newline at end of file
src/router/routes.js
View file @
ee0d65c5
...
...
@@ -1294,6 +1294,12 @@ const routes = [{
component
:
()
=>
import
(
"pages/courseRefundH5.vue"
)
},
{
path
:
"/koreaUpload"
,
//韩国管 上传
component
:
()
=>
import
(
"pages/koreaUpload.vue"
)
},
{
path
:
"/financial/financalDocument/PrintPage"
,
//财务单据打印
...
...
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