|
@@ -1,19 +1,54 @@
|
|
|
<template>
|
|
|
- <div class='app-container'></div>
|
|
|
+ <div class='app-container'>
|
|
|
+ <uni-icons :class="[title === '加载中...' ? 'spin' : '']" :type="type" color="#FFF" size="68" />
|
|
|
+ <span>{{ title }}</span>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { getCallBack } from "@/api/ximalaya.js"
|
|
|
export default {
|
|
|
data() {
|
|
|
- return {
|
|
|
-
|
|
|
+ return {
|
|
|
+ type: 'spinner-cycle',
|
|
|
+ title: '加载中...'
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ onLoad(e) {
|
|
|
+ const deviceid = window.location.hash.split('=')[1]
|
|
|
+ getCallBack({ ...e, deviceid: deviceid }).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.type = 'checkbox-filled'
|
|
|
+ this.title = '授权成功!'
|
|
|
+ } else {
|
|
|
+ this.type = 'clear'
|
|
|
+ this.title = '授权失败!'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
|
|
|
- },
|
|
|
- methods: {
|
|
|
+<style lang="scss" scoped>
|
|
|
+.app-container {
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.spin {
|
|
|
+ animation: spin 5s linear infinite;
|
|
|
+}
|
|
|
|
|
|
+@keyframes spin {
|
|
|
+ 0% {
|
|
|
+ transform: rotate(0deg)
|
|
|
+ }
|
|
|
+ 100% {
|
|
|
+ transform: rotate(360deg);
|
|
|
}
|
|
|
}
|
|
|
-</script>
|
|
|
+</style>
|