You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
1.7 KiB
77 lines
1.7 KiB
<template> |
|
<div class="lottie-bg"> |
|
<div id="lottie"><img src="../../assets/images/live-logo.gif" rel="preload" style="width: 100%;" /></div> |
|
</div> |
|
</template> |
|
|
|
<script> |
|
import { mapState, mapMutations, mapActions } from 'vuex'; |
|
// 组件 |
|
// import request from "@//api/request"; |
|
import { wxappAuth, getUser } from '@/api/user'; |
|
import dayjs from 'dayjs'; |
|
import cookie from '@/utils/store/cookie'; |
|
import { parseQuery, login, handleQrCode } from '@/utils'; |
|
|
|
export default { |
|
name: 'Loading', |
|
data() { |
|
return {}; |
|
}, |
|
mounted() { |
|
var url = handleQrCode(); |
|
// 判断是否是分销 |
|
if (url) { |
|
var spread = cookie.get('spread'); |
|
let urlSpread = parseInt(url.spread); |
|
if (!Number.isNaN(urlSpread) && spread !== urlSpread) { |
|
cookie.set('spread', urlSpread || 0); |
|
} else if (spread === 0 || typeof spread !== 'number') { |
|
cookie.set('spread', urlSpread || 0); |
|
} |
|
} |
|
this.toLaunch(); |
|
// login({ |
|
// fail: () => { |
|
// this.toLaunch(); |
|
// } |
|
// }); |
|
}, |
|
methods: { |
|
...mapActions(['changeAuthorization', 'changeUserInfo']), |
|
toLaunch() { |
|
console.log(this); |
|
this.changeAuthorization(false); |
|
this.$yrouter.switchTab({ |
|
path: '/pages/home/index', |
|
}); |
|
} |
|
} |
|
}; |
|
</script> |
|
|
|
<style scoped> |
|
.lottie-bg { |
|
position: fixed; |
|
left: 0; |
|
top: 0; |
|
background-color: #fff; |
|
width: 100%; |
|
height: 100%; |
|
z-index: 999; |
|
display: -webkit-flex; |
|
display: flex; |
|
-webkit-align-items: center; |
|
align-items: center; |
|
-webkit-justify-content: center; |
|
justify-content: center; |
|
} |
|
|
|
#lottie { |
|
width: 35%; |
|
display: block; |
|
overflow: hidden; |
|
transform: translate3d(0, 0, 0); |
|
margin: auto; |
|
} |
|
</style>
|
|
|