Commit e9d4b722 by xinla

loading公用提取

1 parent 4575644a
...@@ -15,119 +15,7 @@ ...@@ -15,119 +15,7 @@
<title> <title>
<%= VUE_APP_TITLE %> <%= VUE_APP_TITLE %>
</title> </title>
<style> <link rel="stylesheet" href="./static/loading.css">
#loader-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999999;
}
#loader {
display: block;
position: relative;
top: calc(50% - 75px);
left: calc(50% - 75px);
width: 150px;
height: 150px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
animation: spin 2s linear infinite;
z-index: 1001;
}
#loader:before {
content: "";
position: absolute;
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
animation: spin 3s linear infinite;
}
#loader:after {
content: "";
position: absolute;
top: 15px;
left: 15px;
right: 15px;
bottom: 15px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
animation: spin 1.5s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
#loader-wrapper .loader-section {
position: fixed;
top: 0;
width: 51%;
height: 100%;
background: #07c160;
z-index: 1000;
transform: translateX(0);
}
#loader-wrapper .loader-section.section-left {
left: 0;
}
#loader-wrapper .loader-section.section-right {
right: 0;
}
.loaded#loader-wrapper .loader-section.section-left {
transform: translateX(-100%);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}
.loaded#loader-wrapper .loader-section.section-right {
transform: translateX(100%);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}
.loaded#loader-wrapper #loader,
.loaded#loader-wrapper .load-title {
opacity: 0;
transition: all 0.3s ease-out;
}
.loaded#loader-wrapper {
visibility: hidden;
transform: translateY(-100%);
transition: all 0.3s 1s ease-out;
}
#loader-wrapper .load-title {
color: #FFF;
font-size: 19px;
width: 100%;
text-align: center;
z-index: 9999999999999;
position: absolute;
top: calc(50% + 75px);
line-height: 30px;
}
</style>
<script src="https://hm.baidu.com/hm.js?8f5214f3a0f80a33eb32a0f890167cc1"></script> <script src="https://hm.baidu.com/hm.js?8f5214f3a0f80a33eb32a0f890167cc1"></script>
<script src="./static/config.js"></script> <script src="./static/config.js"></script>
......
#loader-wrapper {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 2001;
}
#loader {
position: absolute;
top: calc(50% - 75px);
left: calc(50% - 75px);
width: 150px;
height: 150px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #fff;
animation: spin 2s linear infinite;
z-index: 1001;
}
#loader:before {
content: '';
position: absolute;
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #fff;
animation: spin 3s linear infinite;
}
#loader:after {
content: '';
position: absolute;
top: 15px;
left: 15px;
right: 15px;
bottom: 15px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #fff;
animation: spin 1.5s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
#loader-wrapper .loader-section {
position: absolute;
top: 0;
width: 51%;
height: 100%;
background: #07c160;
z-index: 1000;
transform: translateX(0);
}
#loader-wrapper .loader-section.section-left {
left: 0;
}
#loader-wrapper .loader-section.section-right {
right: 0;
}
.loaded#loader-wrapper .loader-section.section-left {
transform: translateX(-100%);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.loaded#loader-wrapper .loader-section.section-right {
transform: translateX(100%);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.loaded#loader-wrapper #loader,
.loaded#loader-wrapper .load-title {
opacity: 0;
transition: all 0.3s ease-out;
}
.loaded#loader-wrapper {
visibility: hidden;
transform: translateY(-100%);
transition: all 0.3s 1s ease-out;
}
#loader-wrapper .load-title {
color: #fff;
font-size: 19px;
width: 100%;
text-align: center;
z-index: 99;
position: absolute;
top: calc(50% + 75px);
line-height: 30px;
}
...@@ -54,15 +54,17 @@ export default { ...@@ -54,15 +54,17 @@ export default {
data: {}, data: {},
touchTypeDict, touchTypeDict,
id: '', id: '',
promotionId: '',
// qrCodeUrl: '', // qrCodeUrl: '',
} }
}, },
onLoad(options) { onLoad(options) {
console.log('onLoad options', options) console.log('onLoad options', options)
this.id = options.id this.id = options.id
this.promotionId = options.promotionId
}, },
onReady() { onReady() {
this.getDetail(this.id) this.getDetail(this.id + (this.promotionId ? '/' + this.promotionId : ''))
}, },
created() { created() {
// let id = this.$route.query.id // let id = this.$route.query.id
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!