123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <script>
- // import routingIntercept from '@/common/permission.js'
- import {
- getToken
- } from '@/common/auth.js'
- export default {
- onLaunch(e) {
- // 限制必须在微信中打开H5连接,即公众号中打开
- // var ua = navigator.userAgent.toLowerCase();
- // var isWeixin = ua.indexOf('micromessenger') != -1;
- // if (!isWeixin) {
- // window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=888"
- // }
- const { path } = e
- if (!getToken()) {
- // 非老人自主注册页面, 不允许直接进入
- if (path !== 'pages/createInfo/createInfo') {
- uni.reLaunch({
- url: '/pages/login/index'
- })
- }
- }
- },
- onShow: function() {},
- onHide: function() {}
- }
- </script>
- <style>
- /*每个页面公共css */
- @font-face {
- /* font-family: 'puhui';
- src: url('./static/fonts/AlibabaPuHuiTi-3-65-Medium.ttf'); */
- }
- .global-font {
- /* font-family: 'puhui';
- font-size: 16px;
- color: #333; */
- }
- uni-page-body,
- html,
- body {
- height: 100%;
- }
- </style>
|