最近有客户反映zblog博客微信小程序搜索结果无法搜索出内容,今天更新一下前端文件,解决了这个问题。
原来的载入数据的链接出错,使用的是原来的插件名称,可以直接修改search.js文件
getlist: function (options) { var that = this; wx.request({ url: 'https://' + DOMAIN + '/zb_users/plugin/tayunwxsmart/list.php' + '?search=' + this.data.catid + '&page=' + this.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.cats1; var len = newsArr.length; for (var i = 0; i < len; i++) { list_t.push(newsArr[i]); } if (len > 0) { //没有更多数据 that.setData({ cats1: list_t, ismore: len > 0, floatDisplay: "none" }) } else { that.setData({ cats1: list_t, ismore: len > 0, floatDisplay: "black" }); } wx.setNavigationBarTitle({ title: '搜索:' + that.data.catid, }) }, fail: function (err) { that.hideLoading(); console.log("错误码:" + err.errCode); console.log("错误信息:" + err.errMsg); } }); },
替换上面内容就可以了,也可以直接下载下面最新的前端文件。
替换完成后就可以正常搜索到内容了。
大小 : 529 KB | 下载量 : 36 | 文件类型 : 压缩文件