| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <script>
- export default {
- onLaunch: function() {
- console.log('App Launch')
- if(sessionStorage.getItem('token')=='null' ||sessionStorage.getItem('token')==null){
- 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';
- }
- else if((sessionStorage.getItem('token')=='null' && sessionStorage.getItem('errorMsg')=='null')||(sessionStorage.getItem('token')=='null' && sessionStorage.getItem('errorMsg')==null)) {
-
- 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';
- } else if (sessionStorage.getItem('token')=='null' && sessionStorage.getItem('errorMsg')=='获取用户信息失败') {
- // uni.navigateTo({
- // url:'pages/huoquanshibai/huoquanshibai'
- // })
- }
- // if((!localStorage.getItem('openId2')&&localStorage.getItem('code')) || (localStorage.getItem('openId2')=='null'&&localStorage.getItem('code'))){
- // this.getOpenId()
- // }else if(localStorage.getItem('code')=='null'|| localStorage.getItem('code')=='undefined' || localStorage.getItem('code')==null){
- // 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';
- // }
- },
- onShow: function() {
- console.log('App Show')
- },
- onHide: function() {
- console.log('App Hide')
- }
- }
- </script>
- <style>
- /* 全局引入iconfont */
- @import 'static/css/iconfont.css';
- /*每个页面公共css */
- page{
- background-color: #F2F3F5;
- }
- uni-page-body,html,body{
- height: 100%;
- }
- </style>
|