12345678910111213141516171819202122232425262728293031323334353637383940 |
- <script>
- export default {
- onLaunch: function() {
- // uni.reLaunch({
- // url: '/pages/home/index'
- // });
- // 判断是否有token 跳转对应的页面
- if (uni.getStorageSync('accessToken')) {
- uni.reLaunch({url: '/pages/home/index'})
- // this.$u.route('/pages/vehicleProtection/detailed');
- } else {
- uni.reLaunch({
- url: '/pages/login/index'
- });
- }
- },
- onShow: function() {
- },
- onHide: function() {
- }
- }
- </script>
- <style lang="scss">
- /*每个页面公共css */
- @import '@/uni_modules/uni-scss/index.scss';
- /* #ifndef APP-NVUE */
- @import '@/static/customicons.css';
- // 设置整个项目的背景色
- page {
- background-color: #F4F4F4;
- }
- /* #endif */
- .example-info {
- font-size: 14px;
- color: #333;
- padding: 10px;
- }
- </style>
|