| 1234567891011121314151617181920212223242526272829 |
- <script>
- export default {
- // 此处globalData为了演示其作用,不是uView框架的一部分
- globalData: {
- username: '白居易'
- },
- onLaunch() {
- this.$store.dispatch('getUserInfo').then(res=>{
- console.log(res)
- }).catch(e=>{
- console.log('未登录')
- });
- uni.getSystemInfo({
- success:res=>{
- console.log(res)
- this.$store.commit('setSystemInfo', res);
- }
- })
- }
- };
- </script>
- <style lang="scss">
- @import 'uview-ui/index.scss';
- @import 'common/demo.scss';
- .container {
- min-height: 100vh;
- }
- </style>
|