- 位置获取授权不弹出,app.json设置permission了,开发者工具都正常
- 当前 Bug 的表现(可附上截图) [图片] [图片] [图片] - 预期表现 [代码]wx.getLocation({[代码][代码] [代码][代码]type: [代码][代码]"wgs84"[代码][代码],[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](t) {[代码][代码] [代码][代码]console.log([代码][代码]'定位开始'[代码][代码]);[代码][代码] [代码][代码]wx.setStorageSync([代码][代码]"Location"[代码][代码], t);[代码][代码] [代码][代码]console.log([代码][代码]'这是位置信息'[代码][代码]),console.log(t);[代码][代码] [代码][代码]var[代码] [代码]e = t.latitude + [代码][代码]","[代码] [代码]+ t.longitude;[代码][代码] [代码][代码]app.util.request({[代码][代码] [代码][代码]url: [代码][代码]"entry/wxapp/map"[代码][代码],[代码][代码] [代码][代码]cachetime: [代码][代码]"0"[代码][代码],[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]op: e[代码][代码] [代码][代码]},[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](i) {[代码][代码] [代码] [代码] [代码][代码]var[代码] [代码]status = wx.getStorageSync([代码][代码]"langStatus"[代码][代码]);[代码][代码] [代码][代码]console.log([代码][代码]'这是服务器提供的位置信息'[代码][代码]),console.log(i), app.util.request({[代码][代码] [代码][代码]url: [代码][代码]"entry/wxapp/System"[代码][代码],[代码][代码] [代码][代码]cachetime: [代码][代码]"0"[代码][代码],[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]langType: status[代码][代码] [代码][代码]},[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](t) {[代码][代码] [代码][代码]console.log([代码][代码]'这是关于位置信息的系统信息'[代码][代码]),console.log(t), [代码][代码]"1"[代码] [代码]== t.data.dw_more && c.setData({[代码][代码] [代码][代码]dwcity: i.data.result.address_component.district[代码][代码] [代码][代码]}), [代码][代码]"2"[代码] [代码]== t.data.dw_more && c.setData({[代码][代码] [代码][代码]dwcity: i.data.result.address_component.city[代码][代码] [代码][代码]});[代码][代码] [代码][代码]var[代码] [代码]e = t.data.gd_key;[代码][代码] [代码][代码]""[代码] [代码]== e && wx.showModal({[代码][代码] [代码][代码]title: [代码][代码]"配置提示"[代码][代码],[代码][代码] [代码][代码]content: [代码][代码]"请在后台配置高德地图的key"[代码][代码],[代码][代码] [代码][代码]showCancel: !0,[代码][代码] [代码][代码]cancelText: [代码][代码]"取消"[代码][代码],[代码][代码] [代码][代码]confirmText: [代码][代码]"确定"[代码][代码],[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](t) {},[代码][代码] [代码][代码]fail: [代码][代码]function[代码][代码](t) {},[代码][代码] [代码][代码]complete: [代码][代码]function[代码][代码](t) {}[代码][代码] [代码][代码]}), [代码][代码]new[代码] [代码](require([代码][代码]"../amap-wx.js"[代码][代码]).AMapWX)({[代码][代码] [代码][代码]key: e[代码][代码] [代码][代码]}).getWeather({[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](t) {[代码][代码] [代码][代码]console.log([代码][代码]'这是搞的地图提供的位置信息'[代码][代码],t);[代码][代码] [代码][代码]var[代码] [代码]e, a, n = t.liveData.city, i = t.liveData.weather, o = t.liveData.reporttime.slice(0, 10), s = (0 == (e = [代码][代码]new[代码] [代码]Date(o)).getDay() && (a = [代码][代码]"星期日"[代码][代码]), [代码][代码] [代码][代码]1 == e.getDay() && (a = [代码][代码]"星期一"[代码][代码]), 2 == e.getDay() && (a = [代码][代码]"星期二"[代码][代码]), 3 == e.getDay() && (a = [代码][代码]"星期三"[代码][代码]), [代码][代码] [代码][代码]4 == e.getDay() && (a = [代码][代码]"星期四"[代码][代码]), 5 == e.getDay() && (a = [代码][代码]"星期五"[代码][代码]), 6 == e.getDay() && (a = [代码][代码]"星期六"[代码][代码]), [代码][代码] [代码][代码]a), r = t.temperature.data;[代码][代码] [代码][代码]c.setData({[代码][代码] [代码][代码]area: n,[代码][代码] [代码][代码]reporttime: o,[代码][代码] [代码][代码]weather: i,[代码][代码] [代码][代码]w1: s,[代码][代码] [代码][代码]temperature: r[代码][代码] [代码][代码]});[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: [代码][代码]function[代码][代码](t) {}[代码][代码] [代码][代码]});[代码] [代码] [代码] [代码] [代码] [代码] [代码][代码]wx.setStorageSync([代码][代码]"System"[代码][代码], t.data), 1 == t.data.many_city ? (wx.setStorageSync([代码][代码]"city"[代码][代码], t.data.cityname), [代码] [代码] [代码][代码]console.log([代码][代码]"这是c"[代码][代码], c),[代码][代码] [代码][代码]console.log([代码][代码]'这是城市属性'[代码][代码], wx.getStorageSync([代码][代码]"city_type"[代码][代码])),[代码][代码] [代码][代码]c.setData({[代码][代码] [代码][代码]city: t.data.cityname[代码][代码] [代码][代码]})) : (console.log([代码][代码]'这是城市属性'[代码][代码],wx.getStorageSync([代码][代码]"city_type"[代码][代码])), 1 != wx.getStorageSync([代码][代码]"city_type"[代码][代码]) ? (wx.setStorageSync([代码][代码]"city"[代码][代码], c.data.dwcity), [代码][代码] [代码] [代码] [代码][代码]c.setData({[代码][代码] [代码][代码]city: c.data.dwcity[代码][代码] [代码][代码]})) : (console.log([代码][代码]"这是c"[代码][代码], wx.getStorageSync([代码][代码]"city"[代码][代码])),c.setData({[代码][代码] [代码][代码]city: wx.getStorageSync([代码][代码]"city"[代码][代码])[代码][代码] [代码][代码]}), console.log([代码][代码]"choosecity"[代码][代码])));[代码][代码] [代码][代码]var[代码] [代码]n = wx.getStorageSync([代码][代码]"city"[代码][代码]);[代码][代码] [代码][代码]console.log([代码][代码]'这是城市名称'[代码][代码],n), app.util.request({[代码][代码] [代码][代码]url: [代码][代码]"entry/wxapp/SaveHotCity"[代码][代码],[代码][代码] [代码][代码]cachetime: [代码][代码]"0"[代码][代码],[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]cityname: n,[代码][代码] [代码][代码]user_id: wx.getStorageSync([代码][代码]"users"[代码][代码]).id[代码][代码] [代码][代码]},[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](t) {[代码][代码] [代码][代码]console.log(t);[代码][代码] [代码][代码]}[代码][代码] [代码][代码]});[代码][代码] [代码][代码]n = wx.getStorageSync([代码][代码]"city"[代码][代码]);[代码][代码] [代码][代码]c.setData({[代码][代码] [代码][代码]bkarr: a[代码][代码] [代码][代码]}), c.refresh(), c.seller();[代码][代码] [代码][代码]}[代码][代码] [代码][代码]});[代码][代码] [代码][代码]}[代码][代码] [代码][代码]});[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: [代码][代码]function[代码][代码](t) {[代码][代码] [代码] [代码] [代码][代码]console.log([代码][代码]'定位失败'[代码][代码],t);[代码][代码] [代码][代码]app.checkPermission();[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}),[代码] [代码]//小程序进入首页 权限校验[代码][代码]checkPermission:[代码][代码]function[代码] [代码](obj){[代码][代码] [代码][代码]console.log([代码][代码]"-------------checkPermission----------"[代码][代码]);[代码][代码] [代码][代码]wx.getSetting({[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]if[代码] [代码](!res.authSetting[[代码][代码]'scope.userLocation'[代码][代码]]) {[代码][代码] [代码][代码]console.log([代码][代码]"-------------不满足scope.userLocation权限----------"[代码][代码]);[代码][代码] [代码][代码]//申请授权[代码][代码] [代码][代码]wx.authorize({[代码][代码] [代码][代码]scope: [代码][代码]'scope.userLocation'[代码][代码],[代码][代码] [代码][代码]success() {[代码][代码] [代码][代码]console.log([代码][代码]'重新申请定位成功'[代码][代码])[代码][代码] [代码][代码]}, fail: [代码][代码]function[代码] [代码](t) { [代码][代码] [代码][代码]console.log([代码][代码]'重新申请定位失败authorize'[代码][代码],t)[代码][代码] [代码] [代码] [代码][代码]wx.openSetting({[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](t) {[代码][代码] [代码][代码]console.log([代码][代码]'这是授权结果'[代码][代码],res.authSetting)[代码][代码] [代码][代码]res.authSetting = {[代码][代码] [代码][代码]"scope.userInfo"[代码][代码]: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]"scope.userLocation"[代码][代码]: [代码][代码]true[代码][代码] [代码][代码]}[代码][代码] [代码][代码]},fail:[代码][代码]function[代码][代码](t){[代码][代码] [代码][代码]console.log([代码][代码]'授权结果失败open setting'[代码][代码], t)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]});[代码][代码] [代码] [代码] [代码][代码]}[代码][代码] [代码] [代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码]}[代码]开发者工具里正常,真机调试也正常,预览·开发版·发布版都定位失败,没弹出。设置里面只有用户信息授权选项,我看很多人遇到此类问题,这是代码写错了的问题还是????????????[图片] [代码],[代码][代码] [代码][代码]"permission"[代码][代码]: {[代码][代码] [代码][代码]"scope.userLocation"[代码][代码]: {[代码][代码] [代码][代码]"desc"[代码][代码]: [代码][代码]"你的位置信息将用于定位您的家庭地址"[代码][代码] [代码][代码]}[代码][代码] [代码][代码]},[代码]
2019-06-16 - 为什么小程序底部导航识别不了字体??
底部导航的字体怎么设置,帮帮我大虾们!!!
2016-12-30 - 为什么小程序底部导航识别不了字体??
我是一名维族开发人员,我在开发小程序中遇到的最大问题是维字字体问题,我用了好多时间识别了页面上的字体了,但是小程序底部导(tabbar)航的字体实在识别不了了,因为底部导航没有字体参数。 我觉得用除了汉语意外语言的小程序应用也很多,所以我建议小程序必须考虑非汉字应用的问题。
2016-12-21