当前位置: 首页 > news >正文

小企业网站价格网页上传wordpress

小企业网站价格,网页上传wordpress,网站网站建设考虑要素,凡科网 小程序wx.onLocationChange(function callback) | 微信开放文档微信开发者平台文档https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.onLocationChange.html 小程序 获取当前城市位置-高德地图_Start2019-CSDN博客小程序获取位置信息#xff0c;包括省市区、用户…wx.onLocationChange(function callback) | 微信开放文档微信开发者平台文档https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.onLocationChange.html 小程序 获取当前城市位置-高德地图_Start2019-CSDN博客小程序获取位置信息包括省市区、用户拒绝后调起用户授权设置页重新授权获取位置信息https://blog.csdn.net/Start2019/article/details/122542917上一篇文章是获取用户所在城市地址信息这里是根据经纬度监听位置大概3秒刷新一次经纬度。 需要在app.json中配置 requiredBackgroundModes: [location],permission: {scope.userLocation: {desc: 你的位置信息将用于小程序扫描货物码时的地址展示}}, 微信小程序后台持续定位功能使用 - ShawYoi - 博客园微信小程序团队在7月30日更新了 基础库 2.8.0 其中新添加了小程序后台持续定位功能和联系定位的接口 从上到下分别是 1.wx.onLocationChange//监听位置实时变化 2.wx.sthttps://www.cnblogs.com/cokolxvd/p/11393510.html 具体做法  const app getApp(); Page({onShow: function () { this.wxLocation(); //检测是否授权位置信息若授权则开始监听位置//开启监听const _locationChangeFn res {// console.log(location change, res.latitude, res.longitude);app.getAddress(res.latitude, res.longitude)}wx.onLocationChange(_locationChangeFn); },//生命周期函数--监听页面隐藏onHide: function () {wx.offLocationChange(); //取消监听},//检测位置信息wxLocation(){wx.getSetting({success(res){ if(res.authSetting[scope.userLocationBackground]){wx.startLocationUpdate({success: (res) {console.log(startLocationUpdate-res, res)},fail: (err) {console.log(startLocationUpdate-err, err)}})} else {if(!res.authSetting[scope.userLocation]){ //打开设置页面去授权//扫描货物码时开始提示。否则取消后还是能继续扫描只有返回到该页面时才提示起不到引导用户授权效果 } else { wx.startLocationUpdate({success: (res) {console.log(startLocationUpdate-res, res)},fail: (err) {console.log(startLocationUpdate-err, err)}}) }} //判断authSetting[scope.userLocationBackground]结束}});},//点击货物码click: function(){wx.getSetting({success(res){if(!res.authSetting[scope.userLocation]){app.utils.showModal(检测到您没打开此小程序的定位权限是否去设置打开, 提示).then((){wx.openSetting({success: function(e){console.log(打开授权页面,e);app.getUserLocation(); //获取地址},})})} else {//已授权要做的操作}}});} }) app.getAddress(res.latitude, res.longitude) 是我封装在 app.js 中的函数具体使用过程可以在上个博客中去看一下。 const amapFile require(./libs/amap-wx.130); App({//获取用户经纬度 latitude纬度, longitude经度getUserLocation(){var that this;wx.getLocation({success: function(res){console.log(经纬度,res); // that.setData({userInfo.latitude: res.latitude, userInfo.longitude: res.longitude});that.getAddress(res.latitude,res.longitude)}})},//转换成省市区 latitude纬度long经度getAddress(latitude, longitude){// latitude22.26,longitude 112.57;var that this;var myAmapFun new amapFile.AMapWX({ key: that.addressKey }); myAmapFun.getRegeo({location: longitude , latitude ,//location的格式为经度,纬度success: function (data) {let {province,city,district} data[0].regeocodeData.addressComponent;city (city || city.length0) ? city:;console.log(省市区, province,city,district)},fail: function (info) { }})}, }) 微信小程序实时获取用户经纬度地理位置信息_电脑小技巧_上网技巧_QQ地带微信小程序实时获取用户经纬度地理位置信息https://www.oicqzone.com/pc/2019092024670.html
http://www.pierceye.com/news/267141/

相关文章:

  • 去百度建网站北京企业网站设计公司
  • mysql 收费 网站建设wordpress主题后台不显示
  • 网站cname解析陕西住房建设厅考试官方网站
  • 网站建设有关书籍设计制作散发寄递
  • 威海建设信息网站织梦网站广告代码如何写
  • 玉林市网站开发公司wordpress tag静态化
  • 广州网站建设建航科技百度域名书写
  • 免费做网站安全吗网站不备案可以访问吗
  • 网上做网站兼职最近10条重大新闻
  • 企业网站制作 徐州政务网站建设要求
  • 网站链接加密重庆黄埔seo整站优化
  • 没有网站怎么做链接视频播放器crm营销管理系统
  • 网站建设艾金手指六六12app源码开发公司
  • 山东做网站建设公司排名互联网官网
  • 民宿网站开发方案静态网站源文件下载
  • 绵阳网站建设优化甘肃省安装建设集团公司网站
  • wordpress建站知乎广告设计软件coreldraw教程
  • wordpress注册无法发送邮件保定seo外包服务商
  • 进口外贸网站有哪些wordpress百度统计代码
  • 建筑网站排行国外网站备案流程
  • dw做网站一般是多大的尺寸网站开发运行环境论文
  • 湖北省建设厅政务公开网站聊城开发app公司
  • 石家庄网站建设接单金融软件网站建设公司排名
  • 企企业业网网站站建建设设哪个网站可以做纸箱
  • 国外专门做视频翻译网站吗山西时代网站建设
  • 云南省城乡住房与建设厅网站杭州网站制作平台公司
  • 程序员做网站美工能过关吗深圳品牌折扣店
  • 地产网站设计怎么做网贷网站
  • 公司网站是如何搭建的跨境电商被骗血本无归
  • 品牌网站建设目标vps怎么做多个网站