App.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <script>
  2. export default {
  3. onLaunch: function() {
  4. console.log('App Launch')
  5. if(localStorage.getItem('token')=='null' && localStorage.getItem('errorMsg')=='null') {
  6. // window.location.href ='https://open.wecard.qq.com/connect/oauth/authorize?app_key=4AA7B3944BDF3739&response_type=code&scope=snsapi_userinfo&ocode=1015730314&redirect_uri=https://chtech.ncjti.edu.cn/kpi/api/sysUser/code&state=https://chtech.ncjti.edu.cn/kpi/api/sysUser/code';
  7. } else if (localStorage.getItem('token')=='null' && localStorage.getItem('errorMsg')=='获取用户信息失败') {
  8. // uni.navigateTo({
  9. // url:'pages/huoquanshibai/huoquanshibai'
  10. // })
  11. }
  12. // if((!localStorage.getItem('openId2')&&localStorage.getItem('code')) || (localStorage.getItem('openId2')=='null'&&localStorage.getItem('code'))){
  13. // this.getOpenId()
  14. // }else if(localStorage.getItem('code')=='null'|| localStorage.getItem('code')=='undefined' || localStorage.getItem('code')==null){
  15. // window.location.href ='https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd87cbe1db0437303&redirect_uri=https%3A%2F%2Fchtech.ncjti.edu.cn%2Fhotel%2Fh5%2F&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect';
  16. // }
  17. },
  18. onShow: function() {
  19. console.log('App Show')
  20. },
  21. onHide: function() {
  22. console.log('App Hide')
  23. }
  24. }
  25. </script>
  26. <style>
  27. /* 全局引入iconfont */
  28. @import 'static/css/iconfont.css';
  29. /*每个页面公共css */
  30. page{
  31. background-color: #F2F3F5;
  32. }
  33. uni-page-body,html,body{
  34. height: 100%;
  35. }
  36. </style>