<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      uniapp 小程序獲取當前經緯度,傳遞給后端

      // #ifdef MP-WEIXIN
                  //定位方法
                  getUserLocation: function() {
                      var _this = this;
                      wx.getSetting({
                          success: (res) => {
                              // res.authSetting['scope.userLocation'] == undefined    表示 初始化進入該頁面
                              // res.authSetting['scope.userLocation'] == false    表示 非初始化進入該頁面,且未授權
                              // res.authSetting['scope.userLocation'] == true    表示 地理位置授權
                              if (res.authSetting['scope.userLocation'] != undefined && res.authSetting[
                                      'scope.userLocation'] != true) {
                                  //未授權
                                  wx.showModal({
                                      title: '請求授權當前位置',
                                      content: '需要獲取您的地理位置,請確認授權',
                                      success: function(res) {
                                          if (res.cancel) {
                                              //取消授權
                                              wx.showToast({
                                                  title: '拒絕授權',
                                                  icon: 'none',
                                                  duration: 1000
                                              })
                                              _this.locationRole = false;
                                          } else if (res.confirm) {
                                              //確定授權,通過wx.openSetting發(fā)起授權請求
                                              wx.openSetting({
                                                  success: function(res) {
                                                      if (res.authSetting[
                                                              "scope.userLocation"] ==
                                                          true) {
                                                          wx.showToast({
                                                              title: '授權成功',
                                                              icon: 'success',
                                                              duration: 1000
                                                          })
                                                          _this.locationRole = true;
                                                          //再次授權,調用wx.getLocation的API
                                                          _this.geo();
                                                      } else {
                                                          wx.showToast({
                                                              title: '授權失敗',
                                                              icon: 'none',
                                                              duration: 1000
                                                          })
                                                          _this.locationRole = false;
                                                      }
                                                  }
                                              })
                                          }
                                      }
                                  })
                              } else if (res.authSetting['scope.userLocation'] == undefined) {
                                  //用戶首次進入頁面,調用wx.getLocation的API
                                  _this.geo();
                              } else {
                                  console.log('授權成功')
                                  _this.locationRole = true;
                                  //調用wx.getLocation的API
                                  _this.geo();
                              }
                          }
                      })
                  },
                  // 獲取定位城市
                  geo: function() {
                      // var _this = this;
                      // wx.getLocation({
                      //     type: 'wgs84',
                      //     success: function(res) {
                      //         _this.latitude = res.latitude
                      //         _this.longitude = res.longitude
                      //         _this.stationDetails()
                      //     }
                  
                      // })
                      var _this = this;
                      // wx.showLoading({
                      //     title: '定位中...',
                      //     mask: true,
                      // })
                      wx.getLocation({
                          // type: 'wgs84',
                          type: 'gcj02',
                          success: function(res) {
                              console.log('location111', res)
                              _this.latitude = res.latitude
                              _this.longitude = res.longitude
                              wx.hideLoading()
                              // 調用得方法==============
                              // _this.stationDetails()
                          }
                      });
                      // new Promise((resolve, reject) => {
                      //     let _locationChangeFn = (res) => {
                      //         console.log('location change', res)
                      //         _this.latitude = res.latitude
                      //         _this.longitude = res.longitude
                      //         _this.stationDetails()
                      //         wx.hideLoading()
                      //         // wx.offLocationChange(_locationChangeFn)
                      //     }
                      //     wx.startLocationUpdate({
                      //         success: (res) => {
                      //             console.log(res, 5656);
                      //             wx.onLocationChange(_locationChangeFn)
                      //             resolve()
                      //         },
                      //         fail: (err) => {
                      //             console.log('獲取當前位置失敗', err)
                      //             wx.hideLoading()
                      //             reject()
                      //         }
                      //     })
                      // })
                  },
                  // #endif

       

      posted @ 2023-11-16 10:22  遇你溫柔如初  閱讀(226)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 色综合色天天久久婷婷基地| 在线观看中文字幕码国产| 九九热在线免费视频精品| 人人爽亚洲aⅴ人人爽av人人片| 久久亚洲精品情侣| 97久久精品亚洲中文字幕无码| 国产精品久久久久久久专区| 日韩av在线一区二区三区| 欧美性猛交xxxx富婆| 亚洲中文字幕无码中字| 麻豆精品一区二区视频在线 | 欧美老少配性行为| 人妻丝袜无码专区视频网站| 91网站在线看| 玩两个丰满老熟女久久网| 日韩乱码视频一区二区三区| 欧美大bbbb流白水| 亚洲国产午夜精品理论片| 国产熟女丝袜av一二区| 人妻被猛烈进入中文字幕| 不卡一区二区国产在线| 亚洲18禁一区二区三区| 中文字幕一区二区网站| 始兴县| 视频一区二区三区刚刚碰| 2019亚洲午夜无码天堂| av性色av久久无码ai换脸| 日韩精品人妻黄色一级片| 国产亚洲一二三区精品| 国产成人无码一区二区三区在线| 国产一区二三区日韩精品| 亚洲av无在线播放中文| 亚洲精品国产成人| 欧美大肥婆大肥bbbbb| 激情综合色综合啪啪开心| 嘉黎县| 中国性欧美videofree精品| 欧洲亚洲国内老熟女超碰| av深夜免费在线观看| 日韩精品久久不卡中文字幕| 国产欧美国日产高清|