-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.vue
50 lines (45 loc) · 879 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
<script>
import { mapMutations } from 'vuex'
export default {
globalData: {
provider: '微信'
},
methods:{
...mapMutations(['login']),
},
onLaunch: function() {
let userInfo = uni.getStorageSync('userInfo');
if(userInfo){
this.login(userInfo);
}
let that = this;
console.log('App Launch');
uni.getProvider({
service: 'oauth',
success: function (res) {
that.$scope.globalData.provider = res.provider[0];
}
});
},
onShow: function() {
console.log('App Show');
},
onHide: function() {
console.log('App Hide');
}
};
</script>
<style lang="less">
@common-color: #333333;
@background-color: #F4F4F4;
body{
color: @common-color;
}
/* 解决头条小程序组件内引入字体不生效的问题 */
/* #ifdef MP-TOUTIAO */
@font-face {
font-family: uniicons;
src: url('/static/uni.ttf');
}
/* #endif */
</style>