|
|
|
@ -158,17 +158,16 @@ |
|
|
|
|
console.log(this.menuList,'打印列表列表') |
|
|
|
|
this.setingFn() |
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
if(this.areaCodeList1.length == 0){ |
|
|
|
|
if(this.areaCodeList1.length<1){ |
|
|
|
|
this.areaCodeList = uni.getStorageSync('areaCodeList') |
|
|
|
|
console.log('0000000000000') |
|
|
|
|
}else{ |
|
|
|
|
this.areaCodeList = this.areaCodeList1 |
|
|
|
|
console.log('11111111111111') |
|
|
|
|
} |
|
|
|
|
// this.areaCodeList = this.areaCodeList1 |
|
|
|
|
console.log(this.areaCodeList,this.areaCodeList1,'11111111111111') |
|
|
|
|
this.areaCodeList.unshift({areaName:'全部'}) |
|
|
|
|
},1000) |
|
|
|
|
},3000) |
|
|
|
|
console.log('%c 子组件参数↓','font-size:30px;color:red') |
|
|
|
|
console.log(this.areaCodeList,uni.getStorageSync('areaCodeList'),this.areaCodeList1,'ssssssssssssss') |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
selectedTitleObj() { |
|
|
|
@ -198,6 +197,7 @@ |
|
|
|
|
// 用于对比滑动的是哪一列数据 |
|
|
|
|
const val = e.detail.value |
|
|
|
|
this.areaIndex = val |
|
|
|
|
this.region = val |
|
|
|
|
console.log(this.areaIndex,val,'省市区下标') |
|
|
|
|
if(this.areaIndex[0] !== val[0]) { |
|
|
|
|
// 如果滑动的是第一列数据,让二三列恢复到0 |
|
|
|
@ -216,8 +216,10 @@ |
|
|
|
|
if(this.areaCodeList[val[0]].childList[0].areaName != '全部'){ |
|
|
|
|
this.areaCodeList[val[0]].childList.unshift({areaName:'全部'}) |
|
|
|
|
} |
|
|
|
|
if(this.areaCodeList[val[0]].childList[val[1]].childList[0].areaName != '全部'){ |
|
|
|
|
this.areaCodeList[val[0]].childList[val[1]].childList.unshift({areaName:'全部'}) |
|
|
|
|
if(this.areaIndex[1]!=0){ |
|
|
|
|
if(this.areaCodeList[val[0]].childList[val[1]].childList[0].areaName != '全部'){ |
|
|
|
|
this.areaCodeList[val[0]].childList[val[1]].childList.unshift({areaName:'全部'}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.provinceCode = this.areaCodeList[this.areaIndex[0]].id |
|
|
|
|
this.cityCode = this.areaCodeList[this.areaIndex[0]].childList[this.areaIndex[1]].id |
|
|
|
@ -234,7 +236,8 @@ |
|
|
|
|
}else{ |
|
|
|
|
this.seleIdex = e + '/'+ w + '/' + j |
|
|
|
|
} |
|
|
|
|
this.oilCode = this.seleIdex |
|
|
|
|
// this.oilCode = this.seleIdex |
|
|
|
|
console.log(e,w,j,'aaaaaaaaaaaaaaaaa') |
|
|
|
|
}, |
|
|
|
|
setingFn(){ |
|
|
|
|
if(this.productCodeList){ |
|
|
|
@ -697,14 +700,14 @@ |
|
|
|
|
obj.result.areaCode = this.areaCode |
|
|
|
|
obj.result.distance = this.provinceCode?'':this.cityCode?'':this.areaCode?'':this.detailItems |
|
|
|
|
obj.result.sort = this.paixu==1?'juli':'price' |
|
|
|
|
obj.result.oilProductCode = this.oilCode |
|
|
|
|
// obj.result.distance = this.detailItems |
|
|
|
|
console.log(obj,'look me!') |
|
|
|
|
console.log(obj,this.oilCode,'look me!') |
|
|
|
|
// console.log(this.seleIdex.split('/'),this.productCodeList[this.seleIdex.split('/')[1]][this.seleIdex.split('/')[0]],this.seleIdex.split('/')[2],'dddddddddddddddddd') |
|
|
|
|
if(this.seleIdex!==null&&this.seleIdex.split('/')[2]==2){ |
|
|
|
|
|
|
|
|
|
obj.result.oilProductCode = this.productCodeList[this.seleIdex.split('/')[1]][this.seleIdex.split('/')[0]]?this.productCodeList[this.seleIdex.split('/')[1]][this.seleIdex.split('/')[0]]:'' |
|
|
|
|
obj.titles.oilProductCode = obj.result.oilProductCode?obj.result.oilProductCode:'全部' |
|
|
|
|
this.oilCode = obj.result.oilProductCode |
|
|
|
|
console.log(obj,'look me!2') |
|
|
|
|
this.$emit("confirm", obj); |
|
|
|
|
return |
|
|
|
|