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; background: #f6f8f8;
border-radius: 28rpx; border-radius: 28rpx;
position: relative; position: relative;
min-width: 250rpx; // min-width: 250rpx;
min-width: 150rpx;
height: 56rpx; height: 56rpx;
} }

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

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

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

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

Loading…
Cancel
Save