onShareAppMessage: function () {
},
data :{
currentTab:0,
winWidth:0,
winWidth:0,
indicatorDots:false,
autoplay:true,
interval:5000,
duration:1000,
imgUrls:[
“/image/haibao/1.jpg”,
“/image/haibao/2.jpg”,
“/image/haibao/3.jpg”,
“/image/haibao/4.jpg”
]
},
onLoad:function(e){
var page = this;
wx.getSystemInfo({
success: function(res) {
console.log(res);
page.setData({ winWidth:res.windowWidth});
page.setData({winHeight:res.windowHeight});
}
})
this.loadMovies();
},
switchNav:function(e) {
var id = e.currentTarget.id;
this.setData({currentTab:id});
},
loadMovies:function(){
var page=this;
var key = util.getDataKey();
wx.request({
url: ‘https://api.douban.com/v2/movie/in_theaters?apikey=’+key,
method:‘GET’,
header:{
“Content-Type”:“json”
},
success:function(res){
console.log(res);
var subjects=res.data.subjects;
var size=subjects.length;
var len= parselnt(size /3 ) ;
console.log(len);
console.log(subject);
page.setData({movies:subjects});
page.setData({winHeight:(len +1)*230});
}
})
}
自行检查了很多遍发现没有打错,但是这个错误一直不知道怎么解决,代码是除了问题的代码,求大神解答(还需要看别的代码的话再提供)