前段时间我们发布了zblog百度营销小程序 专题页面加载反馈出现重复列表,无法正常加载。
今天发布2.1版本,修复专题页加载文章列表的问题。
修改代码:
swan.request({ url: 'https://' + DOMAIN + '/zb_users/plugin/tayunmarket/list.php'+ '?cate='+ res.data['date'][0].zhuanti +'&page='+ that.data.page +'', //开发者服务器接口地址 method: 'GET', dataType: 'json', data: { }, header: { 'content-type': 'application/json' // 默认值 }, success: function (res) { that.hideLoading(); console.log(res.data.date); var newsArr=res.data.date; var list_t = that.data.lists; var len = newsArr.length; for (var i = 0; i < len; i++) { list_t.push(newsArr[i]); } if(len>0){ //没有更多数据 that.setData({ lists: list_t, ismore: len > 0, floatDisplay: "none" }) }else{ that.setData({ lists: list_t, floatDisplay: "black" }); } swan.setNavigationBarTitle({ title:res.data['date'][0].cate, }) swan.setPageInfo({ title: res.data['date'][0].cate+'-'+that.data.smartitle, keywords: res.data['date'][0].cate, description: '关于:'+res.data['date'][0].cate+'的介绍和相关文章', image: [res.data['date'][0].postimg,], success: function () { console.log('setPageInfo success'); }, fail: function (err) { console.log('setPageInfo fail', err); } }) },
之前版本的前端,大家可以手动替换这段代码,也可以在下面 下载我们最新的前端文件。
大小 : 376 MB | 下载量 : 21 | 文件类型 : 压缩文件