|
|
@@ -14,10 +14,11 @@ Page({
|
|
|
tactivityid: 0, //展会id
|
|
|
//轮播图列表
|
|
|
swiperBannerList: [],
|
|
|
- liveList: [], //云展会直播大厅
|
|
|
+ liveList: [], //云展会直播大厅liveList
|
|
|
+ copyLiveList: [], //备份
|
|
|
showLiveList: [], //显示直播列表
|
|
|
liveClassifyList: [], //直播分类
|
|
|
- liveSelectClassify: '全部', //直播分类选择
|
|
|
+ liveSelectClassify: '全部', //直播分类选择showLiveList
|
|
|
|
|
|
agentList: [], //热门展商
|
|
|
showAgentList: [], //显示热门展商
|
|
|
@@ -101,10 +102,10 @@ Page({
|
|
|
"content": {
|
|
|
"tactivityid": this.data.tactivityid,
|
|
|
"siteid": "BWJ",
|
|
|
- "pageSize": 20,
|
|
|
+ "pageSize": 999,
|
|
|
"pageNumber": this.data.pageNumber
|
|
|
}
|
|
|
- }, false).then(res => {
|
|
|
+ }).then(res => {
|
|
|
console.log("云展会直播大厅", res)
|
|
|
if (res.msg != "成功") {
|
|
|
wx.showToast({
|
|
|
@@ -124,8 +125,10 @@ Page({
|
|
|
let l = this.data.liveList;
|
|
|
liveList = l.concat(res.data.tlivelist)
|
|
|
}
|
|
|
+ wx.stopPullDownRefresh()
|
|
|
this.setData({
|
|
|
liveList,
|
|
|
+ copyLiveList: liveList,
|
|
|
liveClassifyList: ClassifyList,
|
|
|
fagentcount: res.data.fagentcount,
|
|
|
flivecount: res.data.flivecount,
|
|
|
@@ -157,48 +160,22 @@ Page({
|
|
|
arr.unshift('全部');
|
|
|
return arr
|
|
|
},
|
|
|
- /* 直播大厅搜索 */
|
|
|
- searchBlur(e) {
|
|
|
- const {
|
|
|
- value
|
|
|
- } = e.detail;
|
|
|
- const va = value.trim();
|
|
|
- let data = JSON.parse(JSON.stringify(this.data.liveList));
|
|
|
- if (this.data.liveSelectClassify == '全部') {
|
|
|
- if (va == '') {
|
|
|
- this.setData({
|
|
|
- showLiveList: handleList.twoDimensionalArr(data, 4, 10)
|
|
|
- })
|
|
|
- } else {
|
|
|
- let arrList = data.filter(item => {
|
|
|
- let arr = [];
|
|
|
- for (let i in item) {
|
|
|
- if (item[i] != null || item[i] != undefined) arr.push(item[i])
|
|
|
- }
|
|
|
- if (arr.includes(va)) {
|
|
|
- return item
|
|
|
- }
|
|
|
- });
|
|
|
- this.setData({
|
|
|
- showLiveList: handleList.twoDimensionalArr(arrList, 4, 10)
|
|
|
- })
|
|
|
+ fiveSearch(e) {
|
|
|
+ const value = e.detail.value.trim();
|
|
|
+ if (value) {
|
|
|
+ let list = [],
|
|
|
+ copyLiveList = this.data.copyLiveList;
|
|
|
+ for (let index = 0; index < copyLiveList.length; index++) {
|
|
|
+ if (copyLiveList[index].fbrand.includes(value) || copyLiveList[index].faddress.includes(value)) {
|
|
|
+ list.push(copyLiveList[index])
|
|
|
+ }
|
|
|
}
|
|
|
+ this.setData({
|
|
|
+ liveList: list
|
|
|
+ })
|
|
|
} else {
|
|
|
- let cList = data.filter(item => item.flocationclass == this.data.liveSelectClassify),
|
|
|
- list = cList;
|
|
|
- if (va != '') {
|
|
|
- list = cList.filter(item => {
|
|
|
- let arr = [];
|
|
|
- for (let i in item) {
|
|
|
- if (item[i] != null || item[i] != undefined) arr.push(item[i])
|
|
|
- }
|
|
|
- if (arr.includes(va)) {
|
|
|
- return item
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
this.setData({
|
|
|
- showLiveList: handleList.twoDimensionalArr(list, 4, 10)
|
|
|
+ liveList: this.data.copyLiveList
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
@@ -256,7 +233,6 @@ Page({
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
*/
|
|
|
@@ -267,9 +243,7 @@ Page({
|
|
|
/**
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
- onShow: function () {
|
|
|
-
|
|
|
- },
|
|
|
+ onShow: function () {},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面隐藏
|
|
|
@@ -289,7 +263,11 @@ Page({
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
*/
|
|
|
onPullDownRefresh: function () {
|
|
|
-
|
|
|
+ this.setData({
|
|
|
+ pageNumber:1,
|
|
|
+ pageTotal:1
|
|
|
+ })
|
|
|
+ this.getLiveChannelData()
|
|
|
},
|
|
|
|
|
|
/**
|