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.
57 lines
1.4 KiB
57 lines
1.4 KiB
<template>
|
|
<view class="pageBgImg pad">
|
|
<view class="status_bar"></view>
|
|
<view class="" style="height: 100rpx;"></view>
|
|
<topInfo></topInfo>
|
|
<subject0></subject0>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import topInfo from './comp/topInfo.vue'
|
|
import subject0 from './comp/subject0.vue'
|
|
export default {
|
|
components: { topInfo, subject0 },
|
|
data() {
|
|
return {
|
|
|
|
}
|
|
},
|
|
onShow() {
|
|
this.getProviderFn()
|
|
},
|
|
methods: {
|
|
getProviderFn() {
|
|
// uni.getProvider({
|
|
// serviceType: 'location',
|
|
// success(res) {
|
|
// // res.providerList包含了所有支持的定位服务类型列表
|
|
// if (res.providerList && res.providerList[0] === 'gps') {
|
|
// // 只有GPS定位才能保证返回真实的物理位置信息
|
|
// // startRealLocation();
|
|
// } else {
|
|
// console.log('无法获取真实的物理位置');
|
|
// }
|
|
// },
|
|
// fail(err) {
|
|
// console.error('获取定位服务类型失败', err);
|
|
// }
|
|
// });
|
|
|
|
uni.startGPS({
|
|
success(res) {
|
|
console.log('已成功开始获取真实的物理位置');
|
|
getUserPosition();
|
|
},
|
|
fail(err) {
|
|
console.error('开始获取真实的物理位置失败', err);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
|
|
</style>
|