|
@@ -162,14 +162,17 @@ Page({
|
|
|
},
|
|
},
|
|
|
fiveSearch(e) {
|
|
fiveSearch(e) {
|
|
|
const value = e.detail.value.trim();
|
|
const value = e.detail.value.trim();
|
|
|
|
|
+ console.log(value)
|
|
|
if (value) {
|
|
if (value) {
|
|
|
let list = [],
|
|
let list = [],
|
|
|
copyLiveList = this.data.copyLiveList;
|
|
copyLiveList = this.data.copyLiveList;
|
|
|
for (let index = 0; index < copyLiveList.length; index++) {
|
|
for (let index = 0; index < copyLiveList.length; index++) {
|
|
|
- if (copyLiveList[index].fbrand.includes(value) || copyLiveList[index].faddress.includes(value)) {
|
|
|
|
|
|
|
+ let data = copyLiveList[index]
|
|
|
|
|
+ if (data.fbrand.includes(value)) {
|
|
|
list.push(copyLiveList[index])
|
|
list.push(copyLiveList[index])
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ console.log(list)
|
|
|
this.setData({
|
|
this.setData({
|
|
|
liveList: list
|
|
liveList: list
|
|
|
})
|
|
})
|
|
@@ -184,6 +187,7 @@ Page({
|
|
|
const {
|
|
const {
|
|
|
index
|
|
index
|
|
|
} = e.target.dataset;
|
|
} = e.target.dataset;
|
|
|
|
|
+ console.log(index)
|
|
|
if (this.data.showDownIndex == index) return this.setData({
|
|
if (this.data.showDownIndex == index) return this.setData({
|
|
|
showDownIndex: -1
|
|
showDownIndex: -1
|
|
|
});
|
|
});
|
|
@@ -200,9 +204,30 @@ Page({
|
|
|
/* 选择分类 */
|
|
/* 选择分类 */
|
|
|
modeSelect(e) {
|
|
modeSelect(e) {
|
|
|
const {
|
|
const {
|
|
|
|
|
+ name
|
|
|
|
|
+ } = e.target.dataset;
|
|
|
|
|
+ console.log(name)
|
|
|
|
|
+ let list = [],
|
|
|
|
|
+ copyLiveList = this.data.copyLiveList;
|
|
|
|
|
+ if (name == '全部') {
|
|
|
|
|
+ list = copyLiveList
|
|
|
|
|
+ } else {
|
|
|
|
|
+ for (let index = 0; index < copyLiveList.length; index++) {
|
|
|
|
|
+ let data = copyLiveList[index]
|
|
|
|
|
+ if (data.flocationclass == name) {
|
|
|
|
|
+ list.push(copyLiveList[index])
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ showDownIndex: -1,
|
|
|
|
|
+ liveSelectClassify: name,
|
|
|
|
|
+ liveList: list
|
|
|
|
|
+ });
|
|
|
|
|
+ /* const {
|
|
|
name,
|
|
name,
|
|
|
index
|
|
index
|
|
|
- } = e.target.dataset;
|
|
|
|
|
|
|
+ } =
|
|
|
if (this.data.showDownIndex == 1) {
|
|
if (this.data.showDownIndex == 1) {
|
|
|
let list = JSON.parse(JSON.stringify(this.data.liveList));
|
|
let list = JSON.parse(JSON.stringify(this.data.liveList));
|
|
|
if (name == '全部') {
|
|
if (name == '全部') {
|
|
@@ -212,11 +237,7 @@ Page({
|
|
|
};
|
|
};
|
|
|
var liveList = handleList.twoDimensionalArr(List, 4, 10);
|
|
var liveList = handleList.twoDimensionalArr(List, 4, 10);
|
|
|
//直播大厅
|
|
//直播大厅
|
|
|
- this.setData({
|
|
|
|
|
- showDownIndex: -1,
|
|
|
|
|
- liveSelectClassify: name,
|
|
|
|
|
- showLiveList: liveList
|
|
|
|
|
- });
|
|
|
|
|
|
|
+
|
|
|
} else {
|
|
} else {
|
|
|
//热门展商
|
|
//热门展商
|
|
|
let list = JSON.parse(JSON.stringify(this.data.agentList));
|
|
let list = JSON.parse(JSON.stringify(this.data.agentList));
|
|
@@ -231,7 +252,7 @@ Page({
|
|
|
agentSelectClassify: name,
|
|
agentSelectClassify: name,
|
|
|
showAgentList: agentList
|
|
showAgentList: agentList
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
|
|
+ } */
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
@@ -264,8 +285,8 @@ Page({
|
|
|
*/
|
|
*/
|
|
|
onPullDownRefresh: function () {
|
|
onPullDownRefresh: function () {
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- pageNumber:1,
|
|
|
|
|
- pageTotal:1
|
|
|
|
|
|
|
+ pageNumber: 1,
|
|
|
|
|
+ pageTotal: 1
|
|
|
})
|
|
})
|
|
|
this.getLiveChannelData()
|
|
this.getLiveChannelData()
|
|
|
},
|
|
},
|