|
|
@ -10,9 +10,11 @@ |
|
|
<view class="pop-mask" v-if="is_openTabbar" @click="close"></view> |
|
|
<view class="pop-mask" v-if="is_openTabbar" @click="close"></view> |
|
|
<view :class="isPageScroll==='1'&& is_openTabbar?'isPageScroll':'p-r'"> |
|
|
<view :class="isPageScroll==='1'&& is_openTabbar?'isPageScroll':'p-r'"> |
|
|
<view class="tabBar-list dis-flex b-f" :class="{'border-line':is_openTabbar,'border-bottom':is_openTabbar}"> |
|
|
<view class="tabBar-list dis-flex b-f" :class="{'border-line':is_openTabbar,'border-bottom':is_openTabbar}"> |
|
|
<block v-for="(tabItem,index) in SelectInfo.top" :key="index" v-if="index < 3"> |
|
|
<block v-for="(tabItem,index) in SelectInfo.top" :key="index" v-if="index<3"> |
|
|
<view class="tabBar-item dis-flex flex-x-center flex-y-center f-28 flex-box" :style="currentType===tabItem.subscript?'color:#FF4444;':'color:#333333'" |
|
|
<view class="tabBar-item dis-flex flex-x-center flex-y-center f-28 flex-box" |
|
|
@click="openTabbar(tabItem.subscript)" v-if="tabItem.status===1 && (requestType ==1 && index!=0)"> |
|
|
:style="currentType===tabItem.subscript?'color:#FF4444;':'color:#333333'" |
|
|
|
|
|
@click="openTabbar(tabItem.subscript)" v-if="tabItem.status===1"> |
|
|
|
|
|
<!-- 改了v-if="tabItem.status===1 && (requestType ==1 && index!=0)",改成以上 --> |
|
|
<view class="m-right10 onelist-hidden tabBar-itemTitle">{{(title && index ==1 && requestType!= '文章头条' )?title:(title && index ==0 && requestType== '文章头条' )?title:tabItem.title}}</view> |
|
|
<view class="m-right10 onelist-hidden tabBar-itemTitle">{{(title && index ==1 && requestType!= '文章头条' )?title:(title && index ==0 && requestType== '文章头条' )?title:tabItem.title}}</view> |
|
|
<view class="iconfont" :class="currentType===tabItem.subscript?'icon-fold':'icon-unfold'"></view> |
|
|
<view class="iconfont" :class="currentType===tabItem.subscript?'icon-fold':'icon-unfold'"></view> |
|
|
</view> |
|
|
</view> |
|
|
@ -191,7 +193,9 @@ |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
is_openTabbar: false, |
|
|
is_openTabbar: false, |
|
|
SelectInfo: {}, |
|
|
SelectInfo: { |
|
|
|
|
|
top: [] |
|
|
|
|
|
}, |
|
|
currentType: null, |
|
|
currentType: null, |
|
|
cityData: {}, |
|
|
cityData: {}, |
|
|
city_id: null, |
|
|
city_id: null, |
|
|
@ -228,7 +232,9 @@ |
|
|
this.getSelectInfo(); |
|
|
this.getSelectInfo(); |
|
|
this.agencyData = uni.getStorageSync('agencyData'); |
|
|
this.agencyData = uni.getStorageSync('agencyData'); |
|
|
|
|
|
|
|
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
|
console.log(this.SelectInfo.top, '--------'); |
|
|
|
|
|
}, 10000) |
|
|
}, |
|
|
}, |
|
|
components:{ |
|
|
components:{ |
|
|
wPicker |
|
|
wPicker |
|
|
@ -354,7 +360,7 @@ |
|
|
this.$emit('getcityWork',item.id); |
|
|
this.$emit('getcityWork',item.id); |
|
|
this.SelectInfo.top.map(items=>{ |
|
|
this.SelectInfo.top.map(items=>{ |
|
|
if(items.subscript == 'nwe_area' || items.subscript == 'area_id'){ |
|
|
if(items.subscript == 'nwe_area' || items.subscript == 'area_id'){ |
|
|
items.title = item.name; |
|
|
items.title = item.name;//临时注释测试 |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
this.close(); |
|
|
this.close(); |
|
|
@ -370,7 +376,7 @@ |
|
|
_this.areaList = []; |
|
|
_this.areaList = []; |
|
|
this.SelectInfo.top.map(items=>{ |
|
|
this.SelectInfo.top.map(items=>{ |
|
|
if(items.subscript == 'nwe_area' || items.subscript == 'area_id'){ |
|
|
if(items.subscript == 'nwe_area' || items.subscript == 'area_id'){ |
|
|
items.title = item.name; |
|
|
items.title = item.name;//临时注释测试 |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
return |
|
|
return |
|
|
@ -392,7 +398,7 @@ |
|
|
_this.$emit('getcityWork',item.id); |
|
|
_this.$emit('getcityWork',item.id); |
|
|
this.SelectInfo.top.map(items=>{ |
|
|
this.SelectInfo.top.map(items=>{ |
|
|
if(items.subscript == 'nwe_area' || items.subscript == 'area_id'){ |
|
|
if(items.subscript == 'nwe_area' || items.subscript == 'area_id'){ |
|
|
items.title = item.name; |
|
|
items.title = item.name;//临时注释测试 |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
return |
|
|
return |
|
|
@ -505,6 +511,7 @@ |
|
|
this.getindustryFour(0,this.industryThree[0]); |
|
|
this.getindustryFour(0,this.industryThree[0]); |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
/*获取二级行业信息*/ |
|
|
getindustryTwo(index,items){ |
|
|
getindustryTwo(index,items){ |
|
|
this.industryTwo = []; |
|
|
this.industryTwo = []; |
|
|
this.industryThree = []; |
|
|
this.industryThree = []; |
|
|
@ -569,6 +576,7 @@ |
|
|
this.is_openTabbar = false; |
|
|
this.is_openTabbar = false; |
|
|
this.currentType = null; |
|
|
this.currentType = null; |
|
|
}, |
|
|
}, |
|
|
|
|
|
/* 获取行业信息*/ |
|
|
getindustry(url){ |
|
|
getindustry(url){ |
|
|
// |
|
|
// |
|
|
this.industryOne = []; |
|
|
this.industryOne = []; |
|
|
@ -604,7 +612,7 @@ |
|
|
App._post_form(url, { |
|
|
App._post_form(url, { |
|
|
|
|
|
|
|
|
}, res => { |
|
|
}, res => { |
|
|
let SelectInfo = res.data; |
|
|
// let SelectInfo = res.data; |
|
|
let title; |
|
|
let title; |
|
|
if(res.data.class){ |
|
|
if(res.data.class){ |
|
|
|
|
|
|
|
|
@ -625,12 +633,13 @@ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
if(res.data.orders){ |
|
|
if(res.data.orders){ |
|
|
|
|
|
// 如果有排序的选项列表 |
|
|
setTimeout(()=>{ |
|
|
setTimeout(()=>{ |
|
|
_this.getOrderId(res.data.orders[0]); |
|
|
_this.getOrderId(res.data.orders[0]); |
|
|
|
|
|
|
|
|
_this.getCitys(); |
|
|
_this.getCitys(); |
|
|
}) |
|
|
}) |
|
|
_this.$emit('getOrderId', SelectInfo.orders[0].val,title); |
|
|
_this.$emit('getOrderId', res.data.orders[0].val,title); |
|
|
} |
|
|
} |
|
|
// 相亲新增 |
|
|
// 相亲新增 |
|
|
if(res.data.sort) { |
|
|
if(res.data.sort) { |
|
|
@ -639,31 +648,38 @@ |
|
|
_this.getCitys(); |
|
|
_this.getCitys(); |
|
|
_this.getGnederId(res.data.gneder[0]); |
|
|
_this.getGnederId(res.data.gneder[0]); |
|
|
}) |
|
|
}) |
|
|
_this.$emit('getSortId', SelectInfo.sort[0].val,title); |
|
|
_this.$emit('getSortId', res.data.sort[0].val,title); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!!SelectInfo.area) { |
|
|
if (!!res.data.area) { |
|
|
_this.getCityarea(SelectInfo.area,true); |
|
|
_this.getCityarea(res.data.area,true); |
|
|
SelectInfo.top.map(item=>{ |
|
|
res.data.top.map(item=>{ |
|
|
if(item.subscript == 'area'){ |
|
|
if(item.subscript == 'area'){ |
|
|
item.title = agencyData.areaname; |
|
|
item.title = agencyData.areaname; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
if(!!SelectInfo.industry){ |
|
|
if(!!res.data.industry){ |
|
|
_this.getindustry(SelectInfo.industry); |
|
|
// 获取行业信息 |
|
|
|
|
|
_this.getindustry(res.data.industry); |
|
|
} |
|
|
} |
|
|
if(SelectInfo.top.length > 3){ |
|
|
if(res.data.top.length > 3){ |
|
|
_this.$emit('getmore',SelectInfo); |
|
|
_this.$emit('getmore',res.data); |
|
|
} |
|
|
|
|
|
if(_this.SelectInfo.orders) { |
|
|
|
|
|
_this.setData({ |
|
|
|
|
|
orderId: SelectInfo.orders[0].val |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
// if(_this.SelectInfo.orders) { |
|
|
|
|
|
// _this.setData({ |
|
|
|
|
|
// orderId: SelectInfo.orders[0].val |
|
|
|
|
|
// }) |
|
|
|
|
|
// }// 这一步在this.getOrderId里重复了,注释先 |
|
|
|
|
|
|
|
|
|
|
|
// _this.setData({ |
|
|
|
|
|
// SelectInfo |
|
|
|
|
|
// }); |
|
|
|
|
|
// _this.SelectInfo.top = res.data.top; |
|
|
_this.setData({ |
|
|
_this.setData({ |
|
|
SelectInfo |
|
|
SelectInfo: res.data |
|
|
}); |
|
|
}) |
|
|
|
|
|
// _this.SelectInfo = res.data; |
|
|
// _this.SelectInfo.top.splice(0) |
|
|
// _this.SelectInfo.top.splice(0) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
@ -792,6 +808,8 @@ |
|
|
tabIndex = tabbarList.findIndex(item => item.subscript === 'class'); |
|
|
tabIndex = tabbarList.findIndex(item => item.subscript === 'class'); |
|
|
tabbarList[tabIndex].title = classTwoItem.name; |
|
|
tabbarList[tabIndex].title = classTwoItem.name; |
|
|
}, |
|
|
}, |
|
|
|
|
|
/*获取当前排序选项的ID |
|
|
|
|
|
*/ |
|
|
getOrderId(orderItem) { |
|
|
getOrderId(orderItem) { |
|
|
let _this = this; |
|
|
let _this = this; |
|
|
|
|
|
|
|
|
|