2021-11-15 10:29:05 +08:00
|
|
|
<template>
|
|
|
|
|
<section class="loading">
|
|
|
|
|
<!-- <div class="iconfont iconfont-iconWeChat"/>-->
|
|
|
|
|
<!-- <div class="iconfont iconfont-iconjuminxinxi"/>-->
|
|
|
|
|
<!-- <div class="iconfont iconfont-iconLogo"/>-->
|
|
|
|
|
<ai-result v-if="result.tips" v-bind="result"/>
|
2021-11-15 15:53:44 +08:00
|
|
|
<input v-if="!!$route.query.code" class="codeText" :value="$route.query.code"/>
|
|
|
|
|
<div class="codeBtn" @click="handleLogin">去登录</div>
|
|
|
|
|
<div flex class="appsPane wrap">
|
|
|
|
|
<b v-for="app in apps" :key="app.key" @tap="redirectTo(app.path)">{{ app.name }}</b>
|
|
|
|
|
</div>
|
2021-11-15 10:29:05 +08:00
|
|
|
</section>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {mapActions, mapState} from 'vuex'
|
|
|
|
|
import AiResult from "../components/AiResult";
|
|
|
|
|
import UTag from "../uview/components/u-tag/u-tag";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: 'loading',
|
|
|
|
|
components: {UTag, AiResult},
|
|
|
|
|
inject: ['root'],
|
|
|
|
|
computed: {
|
|
|
|
|
...mapState(['token', 'apps', 'openUser', 'user']),
|
|
|
|
|
currentApp() {
|
|
|
|
|
return this.apps.find(e => e.key == this.$route.query.app) || {}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
result: {}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
...mapActions(['getToken', 'getAccount', 'agentSign', 'getUserInfo', 'getCode', 'closeAgent']),
|
|
|
|
|
redirectTo(path) {
|
|
|
|
|
let {query, hash} = this.$route
|
|
|
|
|
delete query.app
|
2021-11-15 15:53:44 +08:00
|
|
|
uni.navigateTo({
|
2021-11-15 10:29:05 +08:00
|
|
|
url: `/pages${path}`, success: () => {
|
|
|
|
|
this.$router.push({query, hash})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
2021-11-15 15:53:44 +08:00
|
|
|
handleLogin() {
|
|
|
|
|
uni.navigateTo({url: "./login"})
|
2021-11-15 10:29:05 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
2021-11-15 14:23:50 +08:00
|
|
|
this.result = {
|
|
|
|
|
tips: "欢迎进入开发应用",
|
|
|
|
|
}
|
2021-11-15 10:29:05 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.loading {
|
|
|
|
|
height: 100%;
|
|
|
|
|
position: relative;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
& > span {
|
|
|
|
|
font-size: 36px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.codeText {
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
margin-top: 16px;
|
|
|
|
|
padding: 4px 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
background: #ccc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.codeBtn {
|
|
|
|
|
width: 180px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
background: $uni-color-warning;
|
|
|
|
|
color: #fff;
|
|
|
|
|
padding: 8px;
|
|
|
|
|
margin-top: 16px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.appsPane {
|
|
|
|
|
justify-content: center;
|
|
|
|
|
margin-top: 16px;
|
|
|
|
|
padding: 0 16px;
|
|
|
|
|
|
|
|
|
|
b {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
background: $uni-color-primary;
|
|
|
|
|
color: #fff;
|
|
|
|
|
padding: 8px;
|
|
|
|
|
margin: 4px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|