callout 也是 就闪现一下没了。。
map markers icon只显示一下然后瞬间变回默认了怎么回事啊 求大佬讲一下
2018-09-21wx.setStorage
小程序登录小程序怎么利用账号密码登录,不是微信授权的哪一种。。并且登录完成后、第二次进入就不在登录
2018-08-20在网上也有人遇见同样的问题了 解决方案:在app.js中还没有给globalData赋值时却提前跳转到了调用globalData数据的页面,所以导致渲染失败,个人建议做个引导或加载页面,给数据一个缓冲的过程; 我在App.js里的代码 [代码]App({[代码][代码] [代码][代码]onLaunch: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]this[代码][代码].getOpenid().then(()=>{[代码][代码] [代码][代码]return[代码] [代码]that.setAdmin()[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]getOpenid: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码] [代码][代码]return[代码] [代码]new[代码] [代码]Promise([代码][代码]function[代码] [代码](resolve, reject) {[代码][代码] [代码][代码]wx.getStorage({[代码][代码] [代码][代码]key: [代码][代码]'openid'[代码][代码],[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]that.globalData.openId = res.data[代码][代码] [代码][代码]return[代码] [代码]resolve([代码][代码]'app.js login success'[代码][代码])[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]wx.login({[代码][代码] [代码][代码]success: res => {[代码][代码] [代码][代码]var[代码] [代码]code = res.code; [代码][代码]//返回code[代码][代码] [代码][代码]var[代码] [代码]appId = [代码][代码] [代码][代码]var[代码] [代码]secret = [代码][代码] [代码][代码]wx.request({[代码][代码] [代码][代码]url: [代码][代码]'https://api.weixin.qq.com/sns/jscode2session?appid='[代码] [代码]+ appId + [代码][代码]'&secret='[代码] [代码]+ secret + [代码][代码]'&js_code='[代码] [代码]+ code + [代码][代码]'&grant_type=authorization_code'[代码][代码],[代码][代码] [代码][代码]data: {},[代码][代码] [代码][代码]header: {[代码][代码] [代码][代码]'content-type'[代码][代码]: [代码][代码]'json'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]wx.setStorage({[代码][代码] [代码][代码]key: [代码][代码]"openid"[代码][代码],[代码][代码] [代码][代码]data: res.data.openid[代码][代码] [代码][代码]})[代码][代码] [代码][代码]that.globalData.openId = res.data.openid[代码][代码] [代码][代码]return[代码] [代码]resolve([代码][代码]'app.js login success'[代码][代码])[代码] [代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]setAdmin:[代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码] [代码][代码]return[代码] [代码]new[代码] [代码]Promise([代码][代码]function[代码] [代码](resolve, reject) {[代码][代码] [代码][代码]wx.request({[代码][代码] [代码][代码]url: [代码][代码]'http://132.232.22.140:8889/api/club/adminComfirm'[代码][代码],[代码][代码] [代码][代码]method:[代码][代码]'post'[代码][代码],[代码][代码] [代码][代码]data:{[代码][代码] [代码][代码]id:that.globalData.openId[代码][代码] [代码][代码]},[代码][代码] [代码][代码]header:{[代码][代码] [代码][代码]"content-type"[代码][代码]:[代码][代码]'application/json'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]success:[代码][代码]function[代码][代码](res){[代码][代码] [代码][代码]if[代码][代码](res.data.code ==300){[代码][代码] [代码][代码]wx.reLaunch({[代码][代码] [代码][代码]url: [代码][代码]'../../pages/findpage/index'[代码][代码],[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]if[代码][代码](res.data.code == 200){[代码][代码] [代码][代码]that.globalData.myclub = res.data.clubnumber[代码][代码] [代码][代码]that.globalData.myname = res.data.name[代码][代码] [代码][代码]that.globalData.adminOn = [代码][代码]true[代码][代码] [代码][代码]wx.reLaunch({[代码][代码] [代码][代码]url: [代码][代码]'../../pages/index/index'[代码][代码],[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]globalData: {[代码][代码] [代码][代码]userInfo: [代码][代码]null[代码][代码],[代码][代码] [代码][代码]openId:[代码][代码]null[代码][代码],[代码][代码] [代码][代码]myclub:[代码][代码]null[代码][代码],[代码][代码] [代码][代码]myname:[代码][代码]null[代码][代码],[代码][代码] [代码][代码]adminOn:[代码][代码]false[代码][代码],[代码][代码] [代码][代码]findClub:[代码][代码]null[代码][代码],[代码][代码] [代码][代码]findClubNumber:[代码][代码]null[代码][代码] [代码][代码]}[代码][代码]})[代码]因为之前就遇见过页面初始化完成之后没有得到数据,所以我在首页设置的是一个空页面 app.json [代码]"pages"[代码][代码]: [[代码][代码] [代码][代码]"pages/midware/index"[代码][代码],[代码][代码] [代码][代码]"pages/index/index"[代码][代码],[代码][代码] [代码][代码]"pages/findpage/index"[代码][代码],[代码][代码] [代码][代码]"pages/signup/index"[代码][代码],[代码][代码] [代码][代码]"pages/join/index"[代码][代码],[代码][代码] [代码][代码]"pages/option/index"[代码][代码],[代码][代码] [代码][代码]"pages/details/index"[代码][代码],[代码][代码] [代码][代码]"pages/setting/index"[代码][代码],[代码][代码] [代码][代码]"pages/memo/index"[代码][代码] [代码][代码]],[代码]第一个就是空页面,然后主页面的选择在上面App.js里面来判断的,按道理来说,在页面初始化过程中除了对globalData进行赋值之外没有任何取值的操作呀
报错 Error: Expected updated data but...小程序报错 [代码]Expected updated data but get first rendering data;Expected updated data but get first rendering data[代码] [代码]Error: Expected updated data but get first rendering data[代码] 在开发工具上会二次渲染,但是在手机上就不能了,而且这个报错是时有时无的,求大神分享一下报错的原因,该如何排查呢
2018-07-30