一、获取地址ip及端口号及开发的BASE_URL
console.log(this.$config);
具体开发中一般使用this.$config.apiUrl
二、获取登录人信息
this.$store.getters
开发中一般获取this.$store.getters.userid或者this.$store.getters.username
如果需要获取更详细的登录人信息可以使用userid调取接口(/sys/user/queryById)获取
返回的res打印结果
注意:this.$store.getters.userid可能会受缓存的影响可换成uni.getStorageSync('user_id')不受缓存影响。
三、获取屏幕高度
window.innerHeight+'px'