Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks-h5
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
quantum-blocks-h5
Commits
9ef35f48
Commit
9ef35f48
authored
Mar 30, 2021
by
郝聪敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature: 测试upload
parent
ef5fd069
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
338 additions
and
2 deletions
+338
-2
layout.html
app/web/view/layout.html
+287
-2
webpack.config.js
webpack.config.js
+51
-0
No files found.
app/web/view/layout.html
View file @
9ef35f48
...
@@ -7,8 +7,293 @@
...
@@ -7,8 +7,293 @@
<meta
http-equiv=
"content-type"
content=
"text/html;charset=utf-8"
>
<meta
http-equiv=
"content-type"
content=
"text/html;charset=utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0,user-scalable=no,viewport-fit=cover"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0,user-scalable=no,viewport-fit=cover"
>
<link
rel=
"shortcut icon"
href=
"/favicon.ico"
type=
"image/x-icon"
/>
<link
rel=
"shortcut icon"
href=
"/favicon.ico"
type=
"image/x-icon"
/>
<link
rel=
"stylesheet"
href=
"/public/asset/css/index.css"
>
<!-- <link rel="stylesheet" type="text/css" href="https://activitystatic.lkbang.net/swiper/4.5.1/css/swiper.min.css"> -->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://activitystatic.lkbang.net/swiper/4.5.1/css/swiper.min.css"
>
<style>
/**
* Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)
* http://cssreset.com
*/
html
,
body
,
div
,
span
,
applet
,
object
,
iframe
,
h1
,
h2
,
h3
,
h4
,
h5
,
h6
,
p
,
blockquote
,
pre
,
a
,
abbr
,
acronym
,
address
,
big
,
cite
,
code
,
del
,
dfn
,
em
,
img
,
ins
,
kbd
,
q
,
s
,
samp
,
small
,
strike
,
strong
,
sub
,
sup
,
tt
,
var
,
b
,
u
,
i
,
center
,
dl
,
dt
,
dd
,
ol
,
ul
,
li
,
fieldset
,
form
,
label
,
legend
,
table
,
caption
,
tbody
,
tfoot
,
thead
,
tr
,
th
,
td
,
article
,
aside
,
canvas
,
details
,
embed
,
figure
,
figcaption
,
footer
,
header
,
menu
,
nav
,
output
,
ruby
,
section
,
summary
,
time
,
mark
,
audio
,
video
,
input
{
margin
:
0
;
padding
:
0
;
border
:
0
;
font-size
:
100%
;
font-weight
:
normal
;
vertical-align
:
baseline
;
}
/* HTML5 display-role reset for older browsers */
article
,
aside
,
details
,
figcaption
,
figure
,
footer
,
header
,
menu
,
nav
,
section
{
display
:
block
;
}
body
{
line-height
:
1
;
-webkit-text-size-adjust
:
100%
!important
;
text-size-adjust
:
100%
!important
;
-moz-text-size-adjust
:
100%
!important
;
-webkit-tap-highlight-color
:
rgba
(
0
,
0
,
0
,
0
);
}
blockquote
,
q
{
quotes
:
none
;
}
blockquote
::before
,
blockquote
::after
,
q
::before
,
q
::after
{
content
:
none
;
}
table
{
border-collapse
:
collapse
;
border-spacing
:
0
;
}
/* custom */
a
{
color
:
#7e8c8d
;
text-decoration
:
none
;
}
li
{
list-style
:
none
;
}
*,
*
:before
,
*
:after
{
box-sizing
:
border-box
;
}
html
{
font-size
:
10vw
!important
;
font-family
:
-apple-system
,
BlinkMacSystemFont
,
'Helvetica Neue'
,
Helvetica
,
Segoe
UI
,
Arial
,
Roboto
,
'PingFang SC'
,
'Hiragino Sans GB'
,
'Microsoft Yahei'
,
sans-serif
;
}
html
,
body
,
#app
{
height
:
100%
;
}
.cr-popup
.cr-notify
{
font-size
:
14px
;
}
.cr-toast
.cr-toast--inner
{
box-sizing
:
content-box
;
}
@media
screen
and
(
min-width
:
769
Px
)
{
html
{
font-size
:
37.5
Px
!important
;
}
body
{
max-width
:
375
Px
;
/*max-height: 667Px;*/
margin
:
0
auto
!important
;
}
}
.mainload
{
position
:
fixed
;
top
:
0
;
bottom
:
0
;
left
:
0
;
right
:
0
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
z-index
:
999
;
background-color
:
#fff
;
}
.mainload
.container
{
text-align
:
center
;
}
.mainload
p
{
font-size
:
16px
;
color
:
#666
;
margin-top
:
10px
;
}
.mainload
.circular
{
height
:
36px
;
width
:
36px
;
animation
:
loading-rotate
2s
linear
infinite
;
}
.mainload
.path
{
animation
:
loading-dash
1.5s
ease-in-out
infinite
;
stroke-dasharray
:
90
,
150
;
stroke-dashoffset
:
0
;
stroke-width
:
3
;
stroke
:
#ec3333
;
stroke-linecap
:
round
;
}
@keyframes
loading-rotate
{
to
{
transform
:
rotate
(
1turn
)
}
}
@keyframes
loading-dash
{
0
%
{
stroke-dasharray
:
1
,
200
;
stroke-dashoffset
:
0
}
50
%
{
stroke-dasharray
:
90
,
150
;
stroke-dashoffset
:
-40px
}
to
{
stroke-dasharray
:
90
,
150
;
stroke-dashoffset
:
-120px
}
}
.swiper-container
{
margin-left
:
auto
;
margin-right
:
auto
;
position
:
relative
;
overflow
:
hidden
;
list-style
:
none
;
padding
:
0
;
/* Fix of Webkit flickering */
z-index
:
1
;
}
.swiper-wrapper
{
position
:
relative
;
width
:
100%
;
height
:
100%
;
z-index
:
1
;
display
:
-webkit-box
;
display
:
-webkit-flex
;
display
:
-ms-flexbox
;
display
:
flex
;
-webkit-transition-property
:
-webkit-transform
;
transition-property
:
-webkit-transform
;
-o-transition-property
:
transform
;
transition-property
:
transform
;
transition-property
:
transform
,
-webkit-transform
;
-webkit-box-sizing
:
content-box
;
box-sizing
:
content-box
;
}
.swiper-container-android
.swiper-slide
,
.swiper-wrapper
{
-webkit-transform
:
translate3d
(
0px
,
0
,
0
);
transform
:
translate3d
(
0px
,
0
,
0
);
}
.swiper-container-multirow
>
.swiper-wrapper
{
-webkit-flex-wrap
:
wrap
;
-ms-flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
}
.swiper-slide
{
-webkit-flex-shrink
:
0
;
-ms-flex-negative
:
0
;
flex-shrink
:
0
;
width
:
100%
;
height
:
100%
;
position
:
relative
;
-webkit-transition-property
:
-webkit-transform
;
transition-property
:
-webkit-transform
;
-o-transition-property
:
transform
;
transition-property
:
transform
;
transition-property
:
transform
,
-webkit-transform
;
}
.swiper-slide-invisible-blank
{
visibility
:
hidden
;
}
</style>
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
...
...
webpack.config.js
View file @
9ef35f48
'
use strict
'
;
'
use strict
'
;
const
path
=
require
(
'
path
'
);
const
path
=
require
(
'
path
'
);
const
fs
=
require
(
'
fs
'
);
const
SentryPlugin
=
require
(
"
webpack-sentry-plugin
"
);
const
SentryPlugin
=
require
(
"
webpack-sentry-plugin
"
);
const
resolve
=
filepath
=>
path
.
resolve
(
__dirname
,
filepath
);
const
resolve
=
filepath
=>
path
.
resolve
(
__dirname
,
filepath
);
const
SentryConfig
=
require
(
"
./app/web/.sentryclirc.ts
"
);
const
SentryConfig
=
require
(
"
./app/web/.sentryclirc.ts
"
);
module
.
exports
=
{
module
.
exports
=
{
entry
:
{
entry
:
{
// 'login': 'app/web/page/login/index.vue',
// 'login': 'app/web/page/login/index.vue',
...
@@ -168,6 +171,54 @@ module.exports = {
...
@@ -168,6 +171,54 @@ module.exports = {
},
},
// mode: 'development',
// mode: 'development',
devtool
:
'
source-map
'
,
devtool
:
'
source-map
'
,
cdn
:
'
https://misc.lkbang.net/
'
,
done
(){
const
COS
=
require
(
'
cos-nodejs-sdk-v5
'
);
const
cos
=
new
COS
({
SecretId
:
'
AKIDVlxtVqOK9i0wc0m0e7C5saATZnl2xvUx
'
,
SecretKey
:
'
NWQ3VlmWeFtIQHrDI6F9oCheMq41lGVV
'
});
const
filesList
=
[];
function
isValid
(
path
)
{
const
format
=
[
'
.ico
'
,
'
.html
'
,
'
.ttf
'
,
'
.woff
'
,
'
.woff2
'
];
return
!
format
.
some
(
v
=>
path
.
endsWith
(
v
))
}
function
readFileList
(
dir
,
filesList
=
[])
{
const
files
=
fs
.
readdirSync
(
dir
);
files
.
forEach
((
item
,
index
)
=>
{
var
fullPath
=
path
.
join
(
dir
,
item
);
const
stat
=
fs
.
statSync
(
fullPath
);
if
(
stat
.
isDirectory
())
{
readFileList
(
path
.
join
(
dir
,
item
),
filesList
);
//递归读取文件
}
else
if
(
isValid
(
fullPath
))
{
filesList
.
push
(
fullPath
);
}
});
return
filesList
;
}
readFileList
(
path
.
resolve
(
__dirname
,
'
./public
'
),
filesList
);
// console.log('filepath', filesList);
const
files
=
[{
Bucket
:
'
misc-1258270469
'
,
Region
:
'
ap-beijing
'
,
Key
:
'
qb/fixIosTitle.html
'
,
FilePath
:
filepath
,
}];
cos
.
uploadFiles
({
files
:
files
,
SliceSize
:
1024
*
1024
,
onProgress
:
function
(
info
)
{
var
percent
=
parseInt
(
info
.
percent
*
10000
)
/
100
;
var
speed
=
parseInt
(
info
.
speed
/
1024
/
1024
*
100
)
/
100
;
console
.
log
(
'
进度:
'
+
percent
+
'
%; 速度:
'
+
speed
+
'
Mb/s;
'
);
},
onFileFinish
:
function
(
err
,
data
,
options
)
{
console
.
log
(
options
.
Key
+
'
上传
'
+
(
err
?
'
失败
'
:
'
完成
'
));
},
},
function
(
err
,
data
)
{
console
.
log
(
err
||
data
);
});
},
customize
(
webpackConfig
){
customize
(
webpackConfig
){
// 此外 webpackConfig 为原生生成的 webpack config,可以进行自定义处理
// 此外 webpackConfig 为原生生成的 webpack config,可以进行自定义处理
return
webpackConfig
;
return
webpackConfig
;
...
...
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