| }, | }, | ||||
| searchShop: function (search){//搜索 | searchShop: function (search){//搜索 | ||||
| console.log(this.data.provinceArr) | |||||
| if (search) { | if (search) { | ||||
| var province = ""; | var province = ""; | ||||
| var city = ""; | var city = ""; | ||||
| this.data.pageNum = 1; | this.data.pageNum = 1; | ||||
| this.data.dataArr = []; | this.data.dataArr = []; | ||||
| this.searchShop(true); | this.searchShop(true); | ||||
| if (this.data.provinceCityArr[0][0] == "") { | |||||
| this.data.provinceCityArr[0][0] = "全部" | |||||
| } | |||||
| if (this.data.provinceCityArr[1][0] == "") { | |||||
| this.data.provinceCityArr[1][0] = "全部"; | |||||
| } | |||||
| }, | }, | ||||
| deleteVal:function(){//清空搜索框 | deleteVal:function(){//清空搜索框 | ||||
| this.setData({ | this.setData({ | ||||
| this.data.pageNum = 1; | this.data.pageNum = 1; | ||||
| this.data.dataArr = []; | this.data.dataArr = []; | ||||
| this.searchShop(true); | this.searchShop(true); | ||||
| if (this.data.provinceCityArr[0][0] == "") { | |||||
| this.data.provinceCityArr[0][0] = "全部" | |||||
| } | |||||
| if (this.data.provinceCityArr[1][0] == "") { | |||||
| this.data.provinceCityArr[1][0] = "全部"; | |||||
| } | |||||
| }, | }, | ||||
| openAddress:function(e){//打开地图 | openAddress:function(e){//打开地图 | ||||
| var index = e.target.dataset.index; | var index = e.target.dataset.index; |