...
|
...
|
@@ -43,11 +43,6 @@ Page({ |
|
|
type_idk: Number(options.index) + 1
|
|
|
})
|
|
|
}
|
|
|
console.log('3443894839',this.data.indexk)
|
|
|
|
|
|
console.log('38843',this.data.type_idk)
|
|
|
|
|
|
|
|
|
this.getkeywordlist()
|
|
|
},
|
|
|
|
...
|
...
|
@@ -79,10 +74,6 @@ Page({ |
|
|
price: this.data.price,
|
|
|
text: this.data.text
|
|
|
})
|
|
|
console.log(this.data.address)
|
|
|
console.log(this.data.price)
|
|
|
console.log(this.data.text)
|
|
|
|
|
|
},
|
|
|
|
|
|
// 获取关键字列表
|
...
|
...
|
@@ -90,21 +81,12 @@ Page({ |
|
|
let that = this;
|
|
|
var url = 'index/search';
|
|
|
var params = {
|
|
|
|
|
|
|
|
|
}
|
|
|
app.post(url, params, "post").then((res) => {
|
|
|
console.log(res);
|
|
|
// let newwordlist=res;
|
|
|
// newwordlist.forEach(function(value,index,array){
|
|
|
// value.son.forEach(function(valuek,indexk,array){
|
|
|
// valuek.sel=false
|
|
|
// })
|
|
|
// })
|
|
|
that.setData({
|
|
|
wordlist:res
|
|
|
})
|
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
|
})
|
...
|
...
|
@@ -113,9 +95,11 @@ Page({ |
|
|
// 搜素地名关键字
|
|
|
seladdress(e) {
|
|
|
let that = this;
|
|
|
|
|
|
let id = e.currentTarget.dataset.id;
|
|
|
let index = e.currentTarget.dataset.index;
|
|
|
let parent_id = e.currentTarget.dataset.parent_id;
|
|
|
let name = e.currentTarget.dataset.name;
|
|
|
console.log(id,index,parent_id,name);
|
|
|
that.data.address.forEach(function(value, indexk, array) {
|
|
|
if (id == value.id) {
|
|
|
value.sel = !value.sel;
|
...
|
...
|
@@ -130,33 +114,13 @@ Page({ |
|
|
}
|
|
|
}
|
|
|
})
|
|
|
|
|
|
that.setData({
|
|
|
address: that.data.address,
|
|
|
addressarr: that.data.addressarr
|
|
|
})
|
|
|
|
|
|
// app.globalData.addressarr = this.data.addressarr;
|
|
|
|
|
|
// app.globalData.textarr = this.data.textarr;
|
|
|
// app.globalData.pricearr = this.data.pricearr;
|
|
|
// app.globalData.keyword = this.data.keyword;
|
|
|
// app.globalData.type_id = this.data.type_id;
|
|
|
// app.globalData.index = this.data.index;
|
|
|
|
|
|
|
|
|
wx.navigateTo({
|
|
|
url: '/pages/searchsecond/searchsecond?textarr='+this.data.textarr+'&pricearr='+this.data.pricearr+'&keyword='+this.data.keyword+'&type_id='+this.data.type_idk+'&index='+this.data.indexk+'&addressarr='+this.data.addressarr,
|
|
|
url: '/pages/searchsecond/searchsecond?textarr='+this.data.textarr+'&pricearr='+this.data.pricearr+'&keyword='+this.data.keyword+'&type_id='+parent_id+'&index='+this.data.indexk+'&addressarr='+this.data.addressarr+'&sontype_id='+id,
|
|
|
})
|
|
|
|
|
|
|
|
|
// this.setData({
|
|
|
// page: 1,
|
|
|
// searcharr: [],
|
|
|
// sousuoword: false
|
|
|
// })
|
|
|
|
|
|
// this.getsousuo();
|
|
|
},
|
|
|
|
|
|
// 搜索内容关键词
|
...
|
...
|
@@ -183,28 +147,9 @@ Page({ |
|
|
text: that.data.text,
|
|
|
textarr: that.data.textarr
|
|
|
})
|
|
|
// app.globalData.addressarr = this.data.addressarr;
|
|
|
|
|
|
// app.globalData.textarr = this.data.textarr;
|
|
|
// app.globalData.pricearr = this.data.pricearr;
|
|
|
// app.globalData.keyword = this.data.keyword;
|
|
|
// app.globalData.type_id = this.data.type_id;
|
|
|
// app.globalData.index = this.data.index;
|
|
|
wx.navigateTo({
|
|
|
url: '/pages/searchsecond/searchsecond?textarr='+this.data.textarr+'&pricearr='+this.data.pricearr+'&keyword='+this.data.keyword+'&type_id='+this.data.type_idk+'&index='+this.data.indexk+'&addressarr='+this.data.addressarr,
|
|
|
})
|
|
|
|
|
|
|
|
|
// this.setData({
|
|
|
// page: 1,
|
|
|
// searcharr: [],
|
|
|
// sousuoword: false
|
|
|
// })
|
|
|
|
|
|
// this.getsousuo();
|
|
|
|
|
|
console.log(that.data.text);
|
|
|
console.log(that.data.textarr)
|
|
|
},
|
|
|
|
|
|
// 搜索价格关键词
|
...
|
...
|
@@ -215,7 +160,6 @@ Page({ |
|
|
console.log(price)
|
|
|
let index = e.currentTarget.dataset.index;
|
|
|
that.data.price.forEach(function(value, indexk, array) {
|
|
|
|
|
|
if (price == value.name) {
|
|
|
console.log(value.name)
|
|
|
value.sel = !value.sel;
|
...
|
...
|
@@ -235,37 +179,18 @@ Page({ |
|
|
price: that.data.price,
|
|
|
pricearr: that.data.pricearr
|
|
|
})
|
|
|
// app.globalData.addressarr = this.data.addressarr;
|
|
|
|
|
|
// app.globalData.textarr = this.data.textarr;
|
|
|
// app.globalData.pricearr = this.data.pricearr;
|
|
|
// app.globalData.keyword = this.data.keyword;
|
|
|
// app.globalData.type_id = this.data.type_id;
|
|
|
// app.globalData.index = this.data.index;
|
|
|
wx.navigateTo({
|
|
|
url: '/pages/searchsecond/searchsecond?textarr='+this.data.textarr+'&pricearr='+this.data.pricearr+'&keyword='+this.data.keyword+'&type_id='+this.data.type_idk+'&index='+this.data.indexk+'&addressarr='+this.data.addressarr,
|
|
|
})
|
|
|
// this.setData({
|
|
|
// page: 1,
|
|
|
// searcharr: [],
|
|
|
// sousuoword: false
|
|
|
// })
|
|
|
|
|
|
// this.getsousuo();
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 输入关键字搜索
|
|
|
|
|
|
enterword(e) {
|
|
|
console.log(e)
|
|
|
this.setData({
|
|
|
keyword: e.detail.value,
|
|
|
sousuoword: true
|
|
|
})
|
|
|
|
|
|
console.log(this.data.keyword)
|
|
|
},
|
|
|
|
...
|
...
|
@@ -276,13 +201,9 @@ Page({ |
|
|
keyword: e.detail.value,
|
|
|
sousuoword: true
|
|
|
})
|
|
|
|
|
|
console.log('34874334899',this.data.type_id)
|
|
|
|
|
|
},
|
|
|
sousuo() {
|
|
|
app.globalData.addressarr = this.data.addressarr;
|
|
|
|
|
|
app.globalData.textarr = this.data.textarr;
|
|
|
app.globalData.pricearr = this.data.pricearr;
|
|
|
app.globalData.keyword = this.data.keyword;
|
...
|
...
|
@@ -292,27 +213,8 @@ Page({ |
|
|
wx.navigateTo({
|
|
|
url: '/pages/searchsecond/searchsecond?textarr='+this.data.textarr+'&pricearr='+this.data.pricearr+'&keyword='+this.data.keyword+'&type_id='+this.data.type_idk+'&index='+this.data.indexk+'&addressarr='+this.data.addressarr,
|
|
|
})
|
|
|
|
|
|
// if (this.data.keyword == '') {
|
|
|
// wx.showToast({
|
|
|
// title: '请输入搜索内容',
|
|
|
// icon: 'none'
|
|
|
// })
|
|
|
// } else {
|
|
|
|
|
|
|
|
|
// }
|
|
|
// this.setData({
|
|
|
// page: 1,
|
|
|
// searcharr: [],
|
|
|
// sousuoword: false
|
|
|
// })
|
|
|
|
|
|
// this.getsousuo();
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 搜索列表
|
|
|
getsousuo() {
|
|
|
let that = this;
|
...
|
...
|
@@ -332,10 +234,6 @@ Page({ |
|
|
that.setData({
|
|
|
searcharr: that.data.searcharr.concat(res)
|
|
|
})
|
|
|
// that.setData({
|
|
|
// sousuoword: true
|
|
|
// })
|
|
|
|
|
|
if (res.length != 0 && this.data.type_id == 1) {
|
|
|
that.setData({
|
|
|
showlist: 1,
|
...
|
...
|
@@ -361,8 +259,6 @@ Page({ |
|
|
})
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 播放视频
|
|
|
govideo(e) {
|
|
|
console.log(e)
|
...
|
...
|
@@ -371,10 +267,6 @@ Page({ |
|
|
wx.navigateTo({
|
|
|
url: '/pages/videodetail/videodetail?id=' + id,
|
|
|
})
|
|
|
// wx.navigateTo({
|
|
|
// url: '/pages/videoplay/videoplay?url=' + url,
|
|
|
// })
|
|
|
|
|
|
},
|
|
|
|
|
|
govideomei(e) {
|
...
|
...
|
|