-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.vue
52 lines (47 loc) · 845 Bytes
/
App.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<script>
export default {
onLaunch: function() {
uni.hideTabBar();
const userInfo = uni.getStorageSync('userInfo');
if(userInfo){
//判断token是否过期
this.$http.request({
url: this.$url.checkLogin,
header:{token:userInfo.token}
}).then(res =>{
console.log(res);
if(res.success){
uni.switchTab({
url:'/pages/index/index',
success(res) {
console.log(res);
},
fail(err) {
console.log(err);
}
})
}
});
}
},
onShow: function() {
},
onHide: function() {
}
};
</script>
<style>
/* 解决头条小程序组件内引入字体不生效的问题 */
/* #ifdef MP-TOUTIAO */
@font-face {
font-family: uniicons;
src: url('/static/uni.ttf');
}
/* #endif */
view,input{
box-sizing: border-box;
}
li{
list-style: none;
}
</style>