洛阳学员端
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.

56 lines
1.4 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
  1. <template>
  2. <view class="pageBgImg pad">
  3. <view class="status_bar"></view>
  4. <view class="" style="height: 100rpx;"></view>
  5. <topInfo></topInfo>
  6. <subject0></subject0>
  7. </view>
  8. </template>
  9. <script>
  10. import topInfo from './comp/topInfo.vue'
  11. import subject0 from './comp/subject0.vue'
  12. export default {
  13. components: { topInfo, subject0 },
  14. data() {
  15. return {
  16. }
  17. },
  18. onShow() {
  19. this.getProviderFn()
  20. },
  21. methods: {
  22. getProviderFn() {
  23. // uni.getProvider({
  24. // serviceType: 'location',
  25. // success(res) {
  26. // // res.providerList包含了所有支持的定位服务类型列表
  27. // if (res.providerList && res.providerList[0] === 'gps') {
  28. // // 只有GPS定位才能保证返回真实的物理位置信息
  29. // // startRealLocation();
  30. // } else {
  31. // console.log('无法获取真实的物理位置');
  32. // }
  33. // },
  34. // fail(err) {
  35. // console.error('获取定位服务类型失败', err);
  36. // }
  37. // });
  38. uni.startGPS({
  39. success(res) {
  40. console.log('已成功开始获取真实的物理位置');
  41. getUserPosition();
  42. },
  43. fail(err) {
  44. console.error('开始获取真实的物理位置失败', err);
  45. }
  46. });
  47. }
  48. }
  49. }
  50. </script>
  51. <style scoped lang="scss">
  52. </style>