Browse Source

改版9.12街道改成只有一个

release
zhaoyongnian 5 years ago
parent
commit
1b4e2a3014
  1. 3
      src/subpages/basicReality/components/selectStreet/selectStreet.scss
  2. 25
      src/subpages/basicReality/components/selectStreet/selectStreet.ts
  3. 5
      src/subpages/basicReality/components/selectStreet/selectStreet.wxml

3
src/subpages/basicReality/components/selectStreet/selectStreet.scss

@ -16,7 +16,8 @@
background: #f6f8f8;
border-radius: 28rpx;
position: relative;
min-width: 250rpx;
// min-width: 250rpx;
min-width: 150rpx;
height: 56rpx;
}

25
src/subpages/basicReality/components/selectStreet/selectStreet.ts

@ -13,17 +13,11 @@ Component({
data: {
streetVisible: false,
timeVisible: false,
streetList: [
{
select: true,
title: '全部',
id: '',
}
],
streetList: [],
choosedStreet: {
title: '全部',
// @ts-ignore
id: ''
// title: '全部',
// // @ts-ignore
// id: ''
},
date: (utils.formatTimestamp(new Date())).substr(0, 10),
timeList: [
@ -55,12 +49,21 @@ Component({
let streetList = [];
try {
let res: any = await getStreetList()
res.data.forEach((item: any, index: any) => {
res.data.forEach((item: any) => {
this.data.streetList.push({
// @ts-ignore
select: false,
// @ts-ignore
title: item.deptName,
// @ts-ignore
id: item.deptId,
})
this.setData({ // 2020.9.11 去掉全部只保留瑜山街道
// @ts-ignore
'choosedStreet.title': item.deptName,
// @ts-ignore
'choosedStreet.id': item.deptId
})
})
this.setData({
// @ts-ignore

5
src/subpages/basicReality/components/selectStreet/selectStreet.wxml

@ -1,12 +1,13 @@
<view class="select-item">
<view class="select-street" bindtap="showStreet">
<!--bindtap="showStreet" -->
<view class="select-street">
<view class="street-info" id="streetInfo">
<view class="image-and-text">
<image src="https://epdc-shibei.elinkservice.cn/epdcFile/M00/02/B3/rBAAM16XtbeAaJoJAAAJJL-Rd40945.png"></image>
<text class="street-name">{{choosedStreet.title}}</text>
</view>
<image class="{{ streetVisible ? '_reverse' : 'reverse'}}" src="../../images/xiala.png"></image>
<!--<image class="{{ streetVisible ? '_reverse' : 'reverse'}}" src="../../images/xiala.png"></image>-->
</view>
<view class="option-list" style="height: {{streetVisible ? '240rpx': '0'}}">
<view bindtap="onChnageStreet" data-id="{{item.id}}" class="list-item" wx:for="{{streetList}}" wx:key="index" wx:for-index="index">

Loading…
Cancel
Save