1 Star 0 Fork 0

YaNan / uni-app-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
App.vue 856 Bytes
一键复制 编辑 原始数据 按行查看 历史
YaNan 提交于 2020-04-01 16:57 . 登录注册
<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>
1
https://gitee.com/ya2an/uni-app-demo.git
git@gitee.com:ya2an/uni-app-demo.git
ya2an
uni-app-demo
uni-app-demo
master

搜索帮助