洛阳学员端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

68 lines
1.4 KiB

<script>
export default {
onLaunch: function() {
this.getLocationAuthority()
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
},
methods: {
getLocationAuthority() {
let _this = this
uni.getLocation({
type: 'wgs84',
success: function(res) {
_this.$store.dispatch('getUserInfo')
},
fail: function(err) {
console.log('为什么失败了')
console.log(err)
uni.showModal({
content: '为了能够获取精确的数据,请去手机设置里手动开启app定位权限',
showCancel: false,
confirmText: '知道了,关闭弹窗',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
});
}
}
}
</script>
<style lang="scss">
/*每个页面公共css */
@import '@/uni_modules/uview-ui/index.scss';
@import 'common/css/app.scss';
.pageBgImg {
background: url('./static/images/bigImg/topBg.png') #F6F7FA no-repeat;
background-size: 100% 278rpx;
}
.topBg{
background: url('./static/images/bigImg/topBg.png') #F6F7FA no-repeat;
background-size: 100% 100%;
}
.h1 {
text {
&.active {
&::before {
background: url('./static/images/bigImg/h1Active.png') #F6F7FA no-repeat;
background-size: 100% 100%;
}
}
}
}
</style>