Merge pull request 'xiugai' (#5) from lixuan into master
Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
@@ -158,17 +158,16 @@
|
|||||||
console.log(this.menuList,'打印列表列表')
|
console.log(this.menuList,'打印列表列表')
|
||||||
this.setingFn()
|
this.setingFn()
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
if(this.areaCodeList1.length == 0){
|
if(this.areaCodeList1.length<1){
|
||||||
this.areaCodeList = uni.getStorageSync('areaCodeList')
|
this.areaCodeList = uni.getStorageSync('areaCodeList')
|
||||||
console.log('0000000000000')
|
|
||||||
}else{
|
}else{
|
||||||
this.areaCodeList = this.areaCodeList1
|
this.areaCodeList = this.areaCodeList1
|
||||||
console.log('11111111111111')
|
|
||||||
}
|
}
|
||||||
|
// this.areaCodeList = this.areaCodeList1
|
||||||
|
console.log(this.areaCodeList,this.areaCodeList1,'11111111111111')
|
||||||
this.areaCodeList.unshift({areaName:'全部'})
|
this.areaCodeList.unshift({areaName:'全部'})
|
||||||
},1000)
|
},3000)
|
||||||
console.log('%c 子组件参数↓','font-size:30px;color:red')
|
console.log('%c 子组件参数↓','font-size:30px;color:red')
|
||||||
console.log(this.areaCodeList,uni.getStorageSync('areaCodeList'),this.areaCodeList1,'ssssssssssssss')
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
selectedTitleObj() {
|
selectedTitleObj() {
|
||||||
@@ -198,6 +197,7 @@
|
|||||||
// 用于对比滑动的是哪一列数据
|
// 用于对比滑动的是哪一列数据
|
||||||
const val = e.detail.value
|
const val = e.detail.value
|
||||||
this.areaIndex = val
|
this.areaIndex = val
|
||||||
|
this.region = val
|
||||||
console.log(this.areaIndex,val,'省市区下标')
|
console.log(this.areaIndex,val,'省市区下标')
|
||||||
if(this.areaIndex[0] !== val[0]) {
|
if(this.areaIndex[0] !== val[0]) {
|
||||||
// 如果滑动的是第一列数据,让二三列恢复到0
|
// 如果滑动的是第一列数据,让二三列恢复到0
|
||||||
@@ -216,8 +216,10 @@
|
|||||||
if(this.areaCodeList[val[0]].childList[0].areaName != '全部'){
|
if(this.areaCodeList[val[0]].childList[0].areaName != '全部'){
|
||||||
this.areaCodeList[val[0]].childList.unshift({areaName:'全部'})
|
this.areaCodeList[val[0]].childList.unshift({areaName:'全部'})
|
||||||
}
|
}
|
||||||
if(this.areaCodeList[val[0]].childList[val[1]].childList[0].areaName != '全部'){
|
if(this.areaIndex[1]!=0){
|
||||||
this.areaCodeList[val[0]].childList[val[1]].childList.unshift({areaName:'全部'})
|
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.provinceCode = this.areaCodeList[this.areaIndex[0]].id
|
||||||
this.cityCode = this.areaCodeList[this.areaIndex[0]].childList[this.areaIndex[1]].id
|
this.cityCode = this.areaCodeList[this.areaIndex[0]].childList[this.areaIndex[1]].id
|
||||||
@@ -234,7 +236,8 @@
|
|||||||
}else{
|
}else{
|
||||||
this.seleIdex = e + '/'+ w + '/' + j
|
this.seleIdex = e + '/'+ w + '/' + j
|
||||||
}
|
}
|
||||||
this.oilCode = this.seleIdex
|
// this.oilCode = this.seleIdex
|
||||||
|
console.log(e,w,j,'aaaaaaaaaaaaaaaaa')
|
||||||
},
|
},
|
||||||
setingFn(){
|
setingFn(){
|
||||||
if(this.productCodeList){
|
if(this.productCodeList){
|
||||||
@@ -697,14 +700,14 @@
|
|||||||
obj.result.areaCode = this.areaCode
|
obj.result.areaCode = this.areaCode
|
||||||
obj.result.distance = this.provinceCode?'':this.cityCode?'':this.areaCode?'':this.detailItems
|
obj.result.distance = this.provinceCode?'':this.cityCode?'':this.areaCode?'':this.detailItems
|
||||||
obj.result.sort = this.paixu==1?'juli':'price'
|
obj.result.sort = this.paixu==1?'juli':'price'
|
||||||
obj.result.oilProductCode = this.oilCode
|
|
||||||
// obj.result.distance = this.detailItems
|
// 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')
|
// 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){
|
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.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:'全部'
|
obj.titles.oilProductCode = obj.result.oilProductCode?obj.result.oilProductCode:'全部'
|
||||||
|
this.oilCode = obj.result.oilProductCode
|
||||||
console.log(obj,'look me!2')
|
console.log(obj,'look me!2')
|
||||||
this.$emit("confirm", obj);
|
this.$emit("confirm", obj);
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -128,7 +128,7 @@
|
|||||||
this.titleList = titleArr;
|
this.titleList = titleArr;
|
||||||
this.tempTitleObj = r;
|
this.tempTitleObj = r;
|
||||||
this.areaCodeList1 = this.areaCodeList
|
this.areaCodeList1 = this.areaCodeList
|
||||||
console.log(this.productCodeList,this.areaCodeList1,'-------------------')
|
console.log(this.productCodeList,this.areaCodeList1,uni.getStorageSync('areaCodeList'),'-------------------')
|
||||||
},
|
},
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
@@ -165,6 +165,7 @@
|
|||||||
this.statusList = arr;
|
this.statusList = arr;
|
||||||
this.titleList = titleArr;
|
this.titleList = titleArr;
|
||||||
this.tempTitleObj = r;
|
this.tempTitleObj = r;
|
||||||
|
this.areaCodeList1 = this.areaCodeList
|
||||||
console.log(this.titleList,this.areaCodeList1,'-------------------ddd')
|
console.log(this.titleList,this.areaCodeList1,'-------------------ddd')
|
||||||
},
|
},
|
||||||
// #endif
|
// #endif
|
||||||
|
|||||||
@@ -132,7 +132,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 广告图片开始 -->
|
<!-- 广告图片开始 -->
|
||||||
<view class=" padding" style=" background-color: #f1f1f1;">
|
<!-- <view class=" padding" style=" background-color: #f1f1f1;">
|
||||||
<view class="">
|
<view class="">
|
||||||
<swiper autoplay interval='5000' style="width: 100%;height: 204rpx;" class="swiper" circular>
|
<swiper autoplay interval='5000' style="width: 100%;height: 204rpx;" class="swiper" circular>
|
||||||
<swiper-item @click="swiperClick(item,index)" v-for="(item,index) in swiperArray">
|
<swiper-item @click="swiperClick(item,index)" v-for="(item,index) in swiperArray">
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<!-- 筛选开始 -->
|
<!-- 筛选开始 -->
|
||||||
<view class="screentop bg-white " @tap="scrollScreen">
|
<view class="screentop bg-white " @tap="scrollScreen">
|
||||||
<!-- <view class="">
|
<!-- <view class="">
|
||||||
|
|||||||
@@ -394,7 +394,6 @@
|
|||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
uni.setStorageSync('productCodeList', res.data.productCodeList)
|
uni.setStorageSync('productCodeList', res.data.productCodeList)
|
||||||
uni.setStorageSync('areaCodeList', res.data.areaCodeList)
|
uni.setStorageSync('areaCodeList', res.data.areaCodeList)
|
||||||
this.areaCodeList = uni.getStorageSync('areaCodeList')
|
|
||||||
if(uni.getStorageSync('areaCodeList')){
|
if(uni.getStorageSync('areaCodeList')){
|
||||||
this.areaCodeList = uni.getStorageSync('areaCodeList')
|
this.areaCodeList = uni.getStorageSync('areaCodeList')
|
||||||
}else{
|
}else{
|
||||||
@@ -447,7 +446,7 @@
|
|||||||
// // console.log(channelCodes, productCodes, siteBrands)
|
// // console.log(channelCodes, productCodes, siteBrands)
|
||||||
// this.$refs.slFilter.resetMenuList(this.menuList)
|
// this.$refs.slFilter.resetMenuList(this.menuList)
|
||||||
}
|
}
|
||||||
console.log(this.menuList,'----')
|
console.log(this.menuList,uni.getStorageSync('areaCodeList'),'----')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onSelected(e) {
|
onSelected(e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user