代码拉取完成,页面将自动刷新
<script>
import {
mapMutations,
} from "vuex"
export default {
methods: {
...mapMutations(['setLocation'])
},
onLaunch:function() {
uni.getLocation({
type: 'gcj02',
success: (res) => {
let location = [res.longitude, res.latitude]
// this.setLocation(location)
this.setLocation(location)
}
})
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
},
}
</script>
<style>
/*每个页面公共css */
@import './common/uni.css';
/* @import './common/font.scss'; */
@import './common/animate.min.css';
@import './common/icon.css';
.y-f,
.y-f-ac,
.y-f-ajc {
display: flex;
}
.y-f-ac {
align-items: center;
}
.y-f-ajc {
justify-content: center;
align-items: center;
}
page{
/* background-color: #F2F2F2 !important; */
}
</style>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。