- 大佬们,wx.request的回调函数里可以给data里的变量赋值吗?
[图片][图片] 一直报那个adapterSource未定义
2020-04-29 - 写了一个本地数据库在详情页里怎么调用啊,为哦是吗AppData里明明已经有了就是显示不出来?大佬们
Page({ data: { ellipsis: false, ellipsis1: false, }, onLoad: function (options) { const postsData = require('../localData/localData.js'); var id = options.id; var adapterSource = postsData.adapterSource[id]; this.setData({ adapterSource: adapterSource }) }, f1: function (event) { wx.navigateTo({ url: '/pages/list/list' }) }, tel: function () { wx.makePhoneCall({ phoneNumber: '17623030926', }) }, data: { }, wz: function (event) { console.log(adapterSource); wx.getLocation({ type: 'gcj02', success: function (res) { var latitude = res.latitude var longitude = res.longitude wx.openLocation({ latitude: latitude, longitude: longitude, scale: 28 }) } }) }, ellipsis: function () { var value = !this.data.ellipsis; this.setData({ ellipsis: value }) }, ellipsis1: function () { var value = !this.data.ellipsis1; this.setData({ ellipsis1: value }) }, }) 这里是AppData里显示的 [图片]
2019-12-18 - 写了一个本地数据库在详情页里怎么调用啊,为哦是吗AppData里明明已经有了就是显示不出来?大佬们
Page({ data: { ellipsis: false, ellipsis1: false, }, onLoad: function (options) { const postsData = require('../localData/localData.js'); var id = options.id; var adapterSource = postsData.adapterSource[id]; this.setData({ adapterSource: adapterSource }) }, f1: function (event) { wx.navigateTo({ url: '/pages/list/list' }) }, tel: function () { wx.makePhoneCall({ phoneNumber: '17623030926', }) }, data: { }, wz: function (event) { console.log(adapterSource); wx.getLocation({ type: 'gcj02', success: function (res) { var latitude = res.latitude var longitude = res.longitude wx.openLocation({ latitude: latitude, longitude: longitude, scale: 28 }) } }) }, ellipsis: function () { var value = !this.data.ellipsis; this.setData({ ellipsis: value }) }, ellipsis1: function () { var value = !this.data.ellipsis1; this.setData({ ellipsis1: value }) }, }) 这里是AppData里显示的 [图片]
2019-12-18