Files
miniapp/App.vue
T

39 lines
820 B
Vue
Raw Normal View History

2023-08-30 09:44:26 +08:00
<script>
2023-09-05 16:14:07 +08:00
import config from './config'
import store from '@/store'
import { getToken } from '@/utils/auth'
2023-09-15 18:09:31 +08:00
import { initEid,startEid } from './mp_ecard_sdk/main';
2023-09-05 16:14:07 +08:00
export default {
2023-09-14 18:11:50 +08:00
globalData:{
requestUrl:'http://121.40.189.20:9001',
},
2023-09-05 16:14:07 +08:00
onLaunch: function() {
2023-09-15 18:09:31 +08:00
this.initApp();
initEid();
2023-09-05 16:14:07 +08:00
},
methods: {
// 初始化应用
initApp() {
// 初始化应用配置
this.initConfig()
// 检查用户登录状态
//#ifdef H5
this.checkLogin()
//#endif
},
initConfig() {
this.globalData.config = config
},
checkLogin() {
if (!getToken()) {
this.$tab.reLaunch('/pages/login')
}
}
}
}
2023-08-30 09:44:26 +08:00
</script>
2023-09-05 16:14:07 +08:00
<style lang="scss">
@import '@/static/scss/index.scss'
2023-08-30 09:44:26 +08:00
</style>