[图片]
域名未经过ICP备案 ,但已经备案过了?域名备案通过了,【Request合法域名】选项栏 中 不能识别备案信息。无法新增备案的域名是 不带www的域名如 abc.com ,在【Request合法域名】 中能否新增 www.abc.com 的域名没有引导说明。
2021-07-24方法是没问题的。第一次打开[图片] 是对的。第二次就提示 类型错误·
getApp()的问题- 需求的场景描述(希望解决的问题) [图片] [代码]//page.js[代码] [代码] [代码] [代码]let App_Instance = getApp(); [代码][代码]//App 实例[代码] [代码]let AppData = App_Instance.globalData;[代码][代码]Page({[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 页面的初始数据[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]data: {[代码] [代码] [代码][代码]},[代码][代码] [代码][代码]//发起授权,只执行一次 重新授权需要引导用户点击设置授权项[代码][代码] [代码][代码]authorization: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]console.log([代码][代码]"开始调用Authorization"[代码][代码]);[代码][代码] [代码][代码]let that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]try[代码][代码]{[代码][代码] [代码][代码]let is_scope_userLocation = wx.getStorageSync([代码][代码]'is_scope_userLocation'[代码][代码]);[代码][代码] [代码][代码]if[代码] [代码](is_scope_userLocation == [代码][代码]true[代码][代码]) {[代码][代码] [代码][代码]console.log([代码][代码]'Hello '[代码][代码]);[代码][代码] [代码][代码]console.log(App_Instance);[代码][代码] [代码][代码]App_Instance.getLatLng();[代码][代码] [代码][代码]} [代码][代码]else[代码] [代码]{[代码][代码] [代码][代码]//发起 预授权[代码][代码] [代码][代码]wx.authorize({[代码][代码] [代码][代码]scope: [代码][代码]'scope.userLocation'[代码][代码],[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) { [代码][代码]//同意[代码][代码] [代码][代码]wx.setStorage({[代码][代码] [代码][代码]key: [代码][代码]'is_scope_userLocation'[代码][代码],[代码][代码] [代码][代码]data: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]});[代码][代码] [代码][代码]App_Instance.getLatlng();[代码][代码]//直接调用接口[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]console.log([代码][代码]"用户拒绝授权"[代码][代码]);[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'请手动打开设置'[代码][代码],[代码][代码] [代码][代码]icon: [代码][代码]'loading'[代码][代码],[代码][代码] [代码][代码]duration: 1500[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]}[代码][代码]catch[代码][代码](e){[代码][代码] [代码][代码]console.log(e);[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]},[代码][代码] [代码][代码]/**[代码][代码] [代码][代码]* 生命周期函数--监听页面加载[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]onLoad: [代码][代码]function[代码] [代码](options) {[代码] [代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 生命周期函数--监听页面初次渲染完成[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]onReady: [代码][代码]function[代码] [代码]() {[代码] [代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 生命周期函数--监听页面显示[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]onShow: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]this[代码][代码].authorization(); [代码][代码]//进入页面时发起【预】授权[代码][代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 生命周期函数--监听页面隐藏[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]onHide: [代码][代码]function[代码] [代码]() {[代码] [代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 生命周期函数--监听页面卸载[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]onUnload: [代码][代码]function[代码] [代码]() {[代码] [代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 页面相关事件处理函数--监听用户下拉动作[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]onPullDownRefresh: [代码][代码]function[代码] [代码]() {[代码] [代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 页面上拉触底事件的处理函数[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]onReachBottom: [代码][代码]function[代码] [代码]() {[代码] [代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 用户点击右上角分享[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]onShareAppMessage: [代码][代码]function[代码] [代码]() {[代码] [代码] [代码][代码]}[代码][代码]})[代码] 为什么 定义了getLatlng方法 还是显示 类型错误? - 希望提供的能力
2019-01-21