不只是编译,有时候编译成功 运行也有别的问题;比如 页面的数据不对等
新版开发者工具编译功能间歇性不好用之前发了一个帖子,感觉点完编译不刷新界面,后来重启好了,就把原帖子删了,不知道过了多久一会,又不好用了,很头疼
2018-07-16setData参数错误:“800”
发起请求提示complete未定义刚接触小程序,自己写一个页面,初始化的时候加载缓存数据,当缓存数据不存在的时候请求。 然后在请求中初始化数据,返回 o.complete is not a functon [代码]var config = require([代码][代码]'../../utils/config.js'[代码][代码]);[代码][代码]var page = [代码][代码]0[代码][代码];[代码][代码]var limit = [代码][代码]10[代码][代码];[代码][代码]var get_info_data = function(that){[代码][代码] [代码][代码]wx.request({[代码][代码] [代码][代码]url: config.host + [代码][代码]'/index/user/info_list'[代码][代码],[代码][代码] [代码][代码]data:{[代码][代码] [代码][代码]page[代码][代码]:page[代码][代码],[代码][代码] [代码][代码]limit[代码][代码]:limit[代码][代码],[代码][代码] [代码][代码]},[代码][代码] [代码][代码]header:{[代码][代码] [代码][代码]'Content-type'[代码][代码]:[代码][代码]'application/json'[代码][代码],[代码][代码] [代码][代码]},[代码][代码] [代码][代码]success[代码][代码]:function[代码][代码](res){[代码][代码] [代码][代码]var datas = res.data;[代码][代码] [代码][代码]if[代码] [代码](datas.code == [代码][代码]200[代码][代码]){[代码][代码] [代码][代码]var info_data = wx.getStorageSync([代码][代码]'info_data'[代码][代码]) || [];[代码][代码] [代码][代码]wx.setStorageSync([代码][代码]'info_data'[代码][代码], datas.data);[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]info_data: datas.data,[代码][代码] [代码][代码]info_data_state[代码][代码]:true[代码][代码],[代码][代码] [代码][代码]},[代码][代码]800[代码][代码]);[代码][代码] [代码][代码]page++;[代码][代码] [代码][代码]}[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail[代码][代码]:function[代码][代码](){[代码][代码] [代码][代码]},[代码][代码] [代码][代码]complete[代码][代码]:function[代码][代码](){[代码][代码] [代码] [代码] [代码][代码]}[代码][代码] [代码][代码]});[代码][代码]};[代码][代码]Page({[代码][代码] [代码][代码]/**[代码][代码] [代码][代码]* 页面的初始数据[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]info_data:[],[代码][代码] [代码][代码]info_data_state: [代码][代码]false[代码][代码],[代码][代码] [代码][代码]background: [[代码][代码]'demo-text-1'[代码][代码], [代码][代码]'demo-text-2'[代码][代码], [代码][代码]'demo-text-3'[代码][代码]],[代码][代码] [代码][代码]autoplay[代码][代码]:true[代码][代码],[代码][代码] [代码][代码]indicatorDots[代码][代码]:false[代码][代码],[代码][代码] [代码][代码]interval:[代码][代码]2000[代码][代码],[代码][代码] [代码][代码]duration:[代码][代码]1500[代码][代码],[代码][代码] [代码][代码]anshun: [代码][代码]true[代码][代码],//导航选中[代码][代码] [代码][代码]luke: [代码][代码]false[代码][代码],//导航选[代码][代码] [代码][代码]timeout[代码][代码]:false[代码][代码],//导航选中[代码][代码] [代码][代码]title_anshun:[代码][代码]'A'[代码][代码],[代码][代码] [代码][代码]title_luke:[代码][代码]'b'[代码][代码],[代码][代码] [代码][代码]title_timeout:[代码][代码]'c'[代码][代码],[代码][代码] [代码][代码]},[代码][代码] [代码][代码]anshun: function (e) {[代码][代码] [代码][代码]this.setData({[代码][代码] [代码][代码]anshun: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]luke: [代码][代码]false[代码][代码],[代码][代码] [代码][代码]timeout[代码][代码]:false[代码][代码],[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]luke: function (e) {[代码][代码] [代码][代码]this.setData({[代码][代码] [代码][代码]anshun: [代码][代码]false[代码][代码],[代码][代码] [代码][代码]luke: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]timeout: [代码][代码]false[代码][代码],[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}, [代码][代码] [代码][代码]timeout: function (e) {[代码][代码] [代码][代码]this.setData({[代码][代码] [代码][代码]anshun: [代码][代码]false[代码][代码],[代码][代码] [代码][代码]luke: [代码][代码]false[代码][代码],[代码][代码] [代码][代码]timeout: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]onShow[代码][代码]:function[代码][代码](){[代码][代码] [代码][代码]// 初始化数据 从缓存中读取用户角色信息[代码][代码] [代码][代码]try{[代码][代码] [代码][代码]var info_data = wx.getStorageSync([代码][代码]'info_data'[代码][代码]);[代码][代码] [代码][代码]console.log(info_data)[代码][代码] [代码][代码]if[代码][代码](info_data){[代码][代码] [代码][代码]this.setData({[代码][代码] [代码][代码]info_data[代码][代码]:info_data[代码][代码],[代码][代码] [代码][代码]info_data_state[代码][代码]:true[代码][代码],[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码]else[代码][代码]{[代码][代码] [代码][代码]get_info_data(this);[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}catch(e){}[代码][代码] [代码] [代码] [代码][代码]}[代码][代码]})[代码]错误提示 [代码]VM1303:[代码][代码]1[代码] [代码]TypeError: o.complete [代码][代码]is[代码] [代码]not a [代码][代码]function[代码][代码] [代码][代码]at http:[代码][代码]//127.0.0.1:64951/appservice/__dev__/WAService.js:7:29321[代码][代码] [代码][代码]at e.(anonymous [代码][代码]function[代码][代码]) (http:[代码][代码]//127.0.0.1:64951/appservice/__dev__/WAService.js:3:29569)[代码][代码] [代码][代码]at a (http:[代码][代码]//127.0.0.1:64951/appservice/appservice:1003:9451)[代码][代码] [代码][代码]at e.registerCallback (http:[代码][代码]//127.0.0.1:64951/appservice/appservice:1003:9638)[代码][代码] [代码][代码]at m.forEach (http:[代码][代码]//127.0.0.1:64951/appservice/appservice:1003:5612)[代码][代码] [代码][代码]at [代码][代码]Array[代码][代码].forEach ()[代码][代码] [代码][代码]at d (http:[代码][代码]//127.0.0.1:64951/appservice/appservice:1003:5592)[代码][代码] [代码][代码]at WebSocket.j.onmessage (http:[代码][代码]//127.0.0.1:64951/appservice/appservice:1003:5485)[代码][代码]console.error @ VM1303:[代码][代码]1[代码][代码]m.forEach @ VM1308 appservice:[代码][代码]1003[代码][代码]d @ VM1308 appservice:[代码][代码]1003[代码][代码]j.onmessage @ VM1308 appservice:[代码][代码]1003[代码]新手求解
2018-07-16https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1443433542
关于公众号推送小程序目前在使用的"小打卡"小程序,识别小程序生成的公众号二维码进入公众号后,会接收到推送的小程序,这个推送是如何实现的?我在文档里没有找到将公众号的被动回复设置为小程序的方法
2018-06-05