|
|
@@ -5,12 +5,14 @@
|
|
|
<view class="nav-left" @click="goBack">
|
|
|
<u-icon name="close" color="#333" size="32"></u-icon>
|
|
|
</view>
|
|
|
- <view class="nav-title">城市选择</view>
|
|
|
- <view class="nav-right"></view>
|
|
|
+ <view class="nav-title">{{city||'北京'}}</view>
|
|
|
+ <view @click="goTo" class="nav-right">
|
|
|
+ <image src="../../static/images/filter.svg" mode="widthFix"></image> 筛选城市
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="content">
|
|
|
- <hg-level4-address :city="city"
|
|
|
+ <hg-level4-address :city="city" :county="county"
|
|
|
placeholder="请选择地址"
|
|
|
@confirm="onAddressConfirm"
|
|
|
>
|
|
|
@@ -28,14 +30,16 @@
|
|
|
data() {
|
|
|
return {
|
|
|
statusBarHeight: 0, // 状态栏高度
|
|
|
-
|
|
|
+ city: '', //市
|
|
|
+ county: '', //区
|
|
|
};
|
|
|
},
|
|
|
- onLoad(option) {
|
|
|
+ onLoad(options) {
|
|
|
// 获取状态栏高度
|
|
|
let systemInfo = uni.getSystemInfoSync();
|
|
|
this.statusBarHeight = systemInfo.statusBarHeight || 0;
|
|
|
- this.city = option.city
|
|
|
+ this.city = options&&options.city
|
|
|
+ this.county = options&&options.county
|
|
|
},
|
|
|
onShow() {
|
|
|
|
|
|
@@ -43,10 +47,21 @@
|
|
|
methods: {
|
|
|
onAddressConfirm(selected) {
|
|
|
console.log("选中的地址:", selected);
|
|
|
- },
|
|
|
+ this.city = selected[1].name
|
|
|
+ this.county = selected[2].name
|
|
|
+ let data = {
|
|
|
+ city: this.city=='全国'||this.city=='全部'?'':this.city,
|
|
|
+ county: this.county == '全部' ? '' : this.county
|
|
|
+ }
|
|
|
+ uni.$emit('filterCity', data)
|
|
|
+ uni.navigateBack()
|
|
|
+ },
|
|
|
goBack(){
|
|
|
+ uni.navigateBack()
|
|
|
+ },
|
|
|
+ goTo(){
|
|
|
uni.navigateTo({
|
|
|
- url:'/package/search/search'
|
|
|
+ url:'/package/jobIntention/city'
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
@@ -66,11 +81,27 @@
|
|
|
box-sizing: border-box;
|
|
|
padding: 0 32rpx;
|
|
|
.nav-left, .nav-right {
|
|
|
- width: 60rpx;
|
|
|
+ width: 146rpx;
|
|
|
height: 60rpx;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- justify-content: center;
|
|
|
+ justify-content: flex-start;
|
|
|
+ padding-left: 20rpx;
|
|
|
+ }
|
|
|
+ .nav-right{
|
|
|
+ width: fit-content;
|
|
|
+ white-space: nowrap;
|
|
|
+ color: #016Bf6;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-start;
|
|
|
+ padding-left: 0rpx;
|
|
|
+ image{
|
|
|
+ width: 28rpx;
|
|
|
+ display: block;
|
|
|
+ margin-right:6rpx;
|
|
|
+ position: relative;
|
|
|
+ top:2rpx
|
|
|
+ }
|
|
|
}
|
|
|
.nav-title {
|
|
|
color: rgba(51, 51, 51, 1);
|