|
@@ -1,11 +1,18 @@
|
|
|
+import ColResult from '@/components/col-result'
|
|
|
import { promisefiyPostMessage } from '@/helpers/native-message'
|
|
|
import { setAuth } from '@/helpers/utils'
|
|
|
import { setLogin, state } from '@/state'
|
|
|
import { defineComponent } from 'vue'
|
|
|
import request from './request-home'
|
|
|
+import styles from './index.module.less'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'home-layout-center',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ status: false
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.getUserInfo()
|
|
|
},
|
|
@@ -41,10 +48,28 @@ export default defineComponent({
|
|
|
this.$router.push('/home')
|
|
|
} catch {
|
|
|
//
|
|
|
+ this.status = true
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
render() {
|
|
|
- return () => <></>
|
|
|
+ return () => (
|
|
|
+ <>
|
|
|
+ {this.status ? (
|
|
|
+ <div class={styles.error}>
|
|
|
+ <ColResult
|
|
|
+ type="notFond"
|
|
|
+ classImgSize="CERT"
|
|
|
+ tips="加载失败,请稍后重试"
|
|
|
+ buttonText="重新加载"
|
|
|
+ plain={true}
|
|
|
+ onClick={this.getUserInfo}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ ) : (
|
|
|
+ <div></div>
|
|
|
+ )}
|
|
|
+ </>
|
|
|
+ )
|
|
|
}
|
|
|
})
|