2023-04-21 15:39:57 +08:00

727 lines
41 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<import src="../common/common.wxml" />
<wxs module="m1">
function fn(arr, arg, state) {
var result = {
indexOf: false,
toString: ''
}
for (var i = 0; i < arr.length; i++) {
if (state == 'type' || state == 'location') {
if (arr[i] && arr[i].indexOf(arg) != -1) {
result.indexOf = true return result
}
} else { if (arr[i] && arr[i] == arg) { result.indexOf = true return result } }
result.indexOf[i] = arr.indexOf(arg) > -1;
}
return result;
}
module.exports.fn = fn;
</wxs>
<import src="../common/common.wxml" />
<import src="../../wxParse/wxParse.wxml" />
<view class="container" wx:if="{{ !loding }}">
<header-nav inner-text="Some text">{{ isInput? isInput :( types=='edit' ?'编辑房源信息' :'发布房源信息' ) }}</header-nav>
<view class="header-tips">
<view class="name-tips">
<view class="box">
<image src="../../img/u125.png" mode="widthFix"></image>发布须知
</view>
<view wx:if="{{ !unfoldState }}" class="name-tips-unfold-btn" bindtap="cutUnfoldState"><text>展开</text>
<view class="bottomArrow"></view>
</view>
</view>
<block wx:if="{{ unfoldState }}">
<view style="margin-top:40rpx;">
<text wx:for="{{ publishingrules }}" wx:key="index" style="display: block;">{{ index + 1 + '.'}}{{ item }}</text>
</view>
<view class="name-tips-close-btn" bindtap="cutUnfoldState">
<image src="../../img/u124.svg" mode="heightFix"></image>
</view>
</block>
</view>
<view class="edit-box">
<view class="edit-top">
<image class="edit-top-img" mode="widthFix" src="/img/u706.png"></image>
<!-- {{ newcity.country }} <view class="clickInputLeftArrow"></view> {{ newcity.name }} -->
{{ newcity.name }}
</view>
<view class="edit-option">
<!-- 发布者身份 -->
<view class="edit-option-item">
<template is="clickInput" data="{{ item:fieldinfo.status[0], index:0,it:'status',newinfo }}"></template>
</view>
<!-- 基础区域 -->
<view class="edit-option-item">
<block wx:for="{{ fieldinfo.basic }}" wx:key="index">
<template wx:if="{{ item.field == 'acreage' || item.field == 'rent' }}" is="pageInput" data="{{ item,index,it:'basic',newinfo,fieldinfo }}"></template>
<template wx:elif="{{ item.field == 'property' || item.field == 'floor' }}" is="clickInputUnderArrow" data="{{ item,index,it:'basic',newinfo }}"></template>
<template wx:else is="clickInput" data="{{ item,index,it:'basic',newinfo,fieldinfoNew,leaseTimeValue }}"></template>
</block>
</view>
<!-- 所在区域 -->
<view class="edit-option-item">
<block wx:for="{{ fieldinfo.address }}" wx:key="index">
<template wx:if="{{ item.field == 'school' && nearSchoolList.length > 0 }}" is="nearbySchool" data="{{ item, nearSchoolList,index }}"></template>
<template wx:else is="clickInput" data="{{ item,it:'address',index,newinfo,fieldinfo,newcity}}"></template>
</block>
</view>
<!-- 租客性别要求 -->
<view class="edit-option-item">
<template is="clickInput" data="{{ item:fieldinfo.identity[0], index:0,it:'identity',newinfo }}"></template>
</view>
<!-- 房屋视频和照片区域 -->
<view class="edit-option-item">
<block wx:for="{{ fieldinfo.upload }}" wx:key="index">
<template wx:if="{{ item.field == 'video' }}" is="homeVideo" data="{{ videos,it:'upload' }}"></template>
<template wx:else is="homePhoto" data="{{ imgs,it:'upload' }}"></template>
</block>
</view>
<!-- 个人介绍 -->
<view class="edit-option-item">
<block wx:for="{{ fieldinfo.introduce }}" wx:key="index">
<template is="clickInput" data="{{ item,index,it:'introduce',newinfo,fieldinfo }}"></template>
</block>
</view>
<!-- 联系方式填写 -->
<view class="edit-option-item contactInformation">
<view class="contact-way-hint">- 请至少提供其中一项联系方式,这是对方联系你的唯一途径 -</view>
<block wx:for="{{ fieldinfo.contact }}" wx:key="index">
<view wx:if="{{ item.field == 'wechat' }}" class="contact-way contact-way-WeChat">
<view class="contact-way-title" style="padding-bottom: 28rpx;">微信</view>
<view class="contactInformation-wechat" wx:if="{{ contactInformationState == 0 }}">
<view class="contactInformation-wechat-item" hover-class="option-hover" hover-stay-time="50" bindtap="contactInformationwechatcut" data-state="1">
<image mode="widthFix" src="/img/pengreydark.png"></image><text>填写微信号</text>
</view>
<view class="contactInformation-wechat-item" hover-class="option-hover" bindtap="UploadQRCode" data-state="2">
<image src="/img/u789.svg"></image>
<image class="contactInformation-recommend" src="/img/u666.png"></image>
<text>上传二维码</text>
</view>
</view>
<view class="contactInformation-wechat-input" wx:elif="{{ contactInformationState == 1 }}">
<input type="text" placeholder="{{ item.placeholder }}" data-field="{{ item.field }}" bindinput="popUpInput" value="{{newinfo[item.field]}}" bindblur="microSignalCheck" />
<view class="contactInformation-close" bindtap="contactInformationwechatcut" data-state="0">
<image src="/img/plusgrey.png"></image>
</view>
</view>
<view class="contactInformation-wechat-input" wx:elif="{{ contactInformationState == 2}}">
<view class="already-uploaded">
<image src="/img/u684.svg"></image>
<text>已上传</text>
</view>
<view class="contactInformation-close" bindtap="contactInformationwechatcut" data-state="0">
<image src="/img/plusgrey.png"></image>
</view>
</view>
</view>
<view wx:elif="{{ item.field != 'wechat'}}" class="contact-way contact-way-WhatsApp">
<view class="contact-way-title">{{ item.title }}</view>
<input class="contact-way-input" placeholder="{{ item.placeholder }}" value="{{newinfo[item.field]}}" type="{{ item.type }}" bindinput="popUpInput" data-field="{{ item.field }}" />
</view>
</block>
</view>
<!-- 标题 -->
<view class="edit-option-item">
<block wx:for="{{ fieldinfo.info }}" wx:key="index">
<template is="pageTextarea" cursor-spacing="20" data="{{ item,index,it:'info',newinfo }}"></template>
</block>
</view>
</view>
</view>
<view class="footer-btn">
<block wx:if="{{newtype=='plus' || (newtype=='edit' && newStatus == 0 )}}">
<view bindtap='NewRelease' data-status="0" class="submit save1">保存并退出</view>
<view bindtap='NewRelease' data-status="1" class="submit">马上发布</view>
</block>
<block wx:if="{{ newtype=='edit' && newStatus == 1 }}">
<view bindtap='NewRelease' data-status="1" class="submit">提交</view>
</block>
</view>
<!-- 弹窗应该出现那个状态在这里处理-->
<view class="pop-up-dispose">
<template is="{{ popUpIs }}" data="{{ item:popUpdate,fieldinfoNew,popUpSubtitle,leaseTimeValue,week, calculateOfDateList,calculateOfDateTime,popUpTitle,floorValue,popUpStepState,newinfo,nearSchoolList,contactInformationState,fieldinfo,imgs,videos,areaRegionIndex,newtype,newStatus,focustitle,pitchyear,pitchmonth,pitchday,focusState }}"></template>
</view>
<!-- 触发规则1时 重复发布 -->
<block wx:if="{{ triggerRules == 1 }}">
<template is="repeatedRelease"></template>
</block>
<!-- 触发规则2时 提交失败 -->
<block wx:elif="{{ triggerRules == 2 }}">
<template is="submitFailuretwo"></template>
</block>
<!-- 触发规则3时 提交失败 -->
<block wx:elif="{{ triggerRules == 3 }}">
<template is="submitFailurethree"></template>
</block>
<!-- 触发规则4时 你的微信号有误 -->
<block wx:elif="{{ triggerRules == 4 }}">
<template is="wrong-micro-signal"></template>
</block>
</view>
<!-- 禁用的输入框款-箭头右 -->
<template name="clickInput">
<view class="clickInput-box {{'clickInput' + item.field }}">
<view class="clickInput-title">{{ item.title }}<text wx:if="{{ item.required == 1}}" style="color:#C54235;margin-left: 10rpx;">*</text></view>
<view class="clickInput" bindtap="clickOption" data-it="{{ it }}" data-step="{{ index }}" data-field="{{ item.field }}">
<input disabled type="{{ item.type }}" value="{{ newinfo[item.field] }}" placeholder="{{ fieldinfo[it][index].field == 'school' ? '请设置' : fieldinfo[it][index].field == 'message' ? '请填写' : fieldinfo[it][index].field == 'introduction' ? '请填写' : fieldinfo[it][index].field == 'address' ? (newcity.alias == 'Hongkong' ? '请选择' : '请输入') : '请选择'}}" />
<view class="clickInputLeftArrow"></view>
</view>
</view>
</template>
<!-- 禁用的输入框款-箭头下 -->
<template name="clickInputUnderArrow">
<view class="clickInput-box {{'clickInput' + item.field }}">
<view class="clickInput-title">{{ item.title }}<text style="color:#C54235;margin-left: 10rpx;">*</text></view>
<view class="clickInput" bindtap="clickOption" data-field="{{ item.field }}" data-step="{{ index }}" data-it="{{ it }}">
<input disabled type="{{ item.type }}" placeholder="请选择" value="{{newinfo[item.field]}}" />
<view class="clickInputBottomArrow"></view>
</view>
</view>
</template>
<!-- 当前页页面直接操作的输入框 -- 例如 面积 月租 -->
<template name="pageInput">
<view class="pageInput-box {{'clickInput' + item.field }}">
<view class="clpageInputickInput-title">{{ item.title }}<text wx:if="{{ item.required == 1}}" style="color:#C54235;margin-left: 10rpx;">*</text></view>
<view class="pageInput" bindtap="clickOption" data-field="{{ item.field }}" data-step="{{ index }}" data-it="{{ it }}">
<input type="{{item.type}}" placeholder="{{ item.placeholder }}" value="{{ newinfo[item.field] }}" disabled="{{fieldinfo[it][index].popupwindow == 1 ? true : false}}" />
<text>{{ item.unit }}</text>
</view>
</view>
</template>
<!-- 房屋视频 -->
<template name="homeVideo">
<view class="homeVideo-box">
<view class="homeVideo-title">房屋视频最多可上传1个不大于10M</view>
<!-- 上传按钮 -->
<view class="homeVideo-add" bindtap="get_video" wx:if="{{ videos.length == 0 }}">
<image class="homeVideo-add-img" src="/img/plusgrey.png"></image>
</view>
<!-- 展示视频 -->
<view class="homeVideo-add" wx:else>
<video class="homeVideo-add-video" show-center-play-btn="{{false}}" show-fullscreen-btn="{{ false }}" show-play-btn="{{ false }}" initial-time="0" src="{{ videos[0].url || videos[0].image}}"></video>
<image class="homeVideo-videoplay" src="/img/videoplay.png"></image>
<view class="close-btn" catchtap="del_pic" data-box="video">
<image src="/img/plusf.png"></image>
</view>
</view>
</view>
</template>
<!-- 房屋照片 -->
<template name="homePhoto">
<view class="homePhoto-box">
<view class="homePhoto-title">房屋照片最多可上传6张不大于10M/张)</view>
<view class="homePhoto-boxes">
<view class="homePhoto-add" bindtap="get_img" wx:for="{{ imgs }}" wx:key="aid">
<image class="homePhoto-add-img" mode="aspectFill" src="{{ item.url || item.image }}"></image>
<view class="close-btn" catchtap="del_pic" data-box="img" data-index="{{ index }}">
<image src="/img/plusf.png"></image>
</view>
</view>
<view class="homePhoto-add" bindtap="get_img" wx:if="{{ imgs.length != 6 }}">
<image class="homePhoto-add-icon" src="/img/plusgrey.png"></image>
</view>
</view>
</view>
</template>
<!-- 弹窗一列 -->
<template name="AListOF">
<view class="AListOF pop-up" catchtouchmove="handScroll">
<view class="pop-up-box">
<view class="pop-up-top" bindtap="closePopUp">
<view class="pop-up-arrow"></view>
</view>
<view class="pop-up-title">{{ item.title || popUpTitle }}</view>
<text class="last-step-text" wx:if="{{ popUpSubtitle }}">{{ popUpSubtitle }}</text>
<view class="AListOF-option option-box">
<view wx:for="{{ item.choices }}" wx:for-item="it" wx:key="index" data-i="{{ m1.fn([newinfo[it.field]],it.value, it.field).indexOf }}" data-a="{{ newinfo[it.value] }}" class="AListOF-option-item option-item {{ m1.fn([newinfo[it.field]],it.value, it.field).indexOf ? 'option-hove':'' }}" hover-class="option-hover" hover-stay-time="5" bindtap="selectOption" data-key="{{ it.key }}" data-field="{{ it.field }}" data-choices="{{ it.choices }}" data-value="{{ it.value }}">
{{it.value}}</view>
</view>
<template is="pop-up-footer" data="{{ popUpStepState,field:item.field,newtype,newStatus }}"></template>
</view>
</view>
</template>
<!-- 弹窗-两列 -->
<template name="twoLines">
<view class="twoLines pop-up" catchtouchmove="handScroll">
<view class="pop-up-box">
<view class="pop-up-top" bindtap="closePopUp">
<view class="pop-up-arrow"></view>
</view>
<view class="pop-up-title">{{ item.title || popUpTitle }}</view>
<text class="last-step-text">{{popUpSubtitle}}</text>
<view class="twoLines-option option-box">
<view wx:for="{{ item.choices }}" wx:key="index" class="twoLines-option-item option-item {{item.field}} {{ m1.fn([newinfo[item.field]],item.value, item.field ).indexOf ? 'option-hover':'' }}" hover-class="option-hover" wx:key="index" data-key="{{ item.key}}" bindtap="selectOption" data-key="{{ it.key }}" data-field="{{ it.field }}" data-choices="{{ it.choices }}" data-value="{{ item.value }}">
{{ item.value }}</view>
</view>
<template is="pop-up-footer" data="{{ popUpStepState,field:item.field,newtype,newStatus }}"></template>
</view>
</view>
</template>
<!-- 弹窗-单行输入框 -->
<template name="unilineInput">
<view class="unilineInput pop-up" id="unilineInput{{item.field}}" catchtouchmove="handScroll">
<view class="pop-up-box">
<view class="pop-up-skip" bindtap="popUpSkip" wx:if="{{ item.required == 0 }}"><text>跳过</text>
<view class="clickInputLeftArrow"></view>
</view>
<view class="pop-up-top" bindtap="closePopUp">
<view class="pop-up-arrow"></view>
</view>
<view class="pop-up-title">{{ item.title == '月租' ? '月租金额' : item.title }}</view>
<view class="unilineInput-box">
<input type="{{ item.type }}" cursor-spacing="50" placeholder="{{ item.placeholder }}" data-field="{{ item.field }}" bindinput="popUpInput" bindconfirm="popUpconfirm" value="{{newinfo[item.field]}}" focus="{{ focustitle == item.field ? true : false}}" confirm-type="done">
<keyboard-accessory>
<cover-view class="keyboard keyboard1" catchtap="popUpNextStep" data-field="{{ item.field }}">
完成
</cover-view>
</keyboard-accessory>
</input>
<text class="unilineInput-unit">{{ item.unit }}</text>
</view>
<template is="pop-up-footer" data="{{ popUpStepState,field:item.field,newtype,newStatus }}"></template>
</view>
</view>
</template>
<!--弹窗-出租时长 -->
<template name="leaseTime">
<view class="leaseTime pop-up">
<view class="pop-up-box">
<view class="pop-up-top" bindtap="closePopUp">
<view class="pop-up-arrow"></view>
</view>
<view class="pop-up-title">{{ item.title || popUpTitle }}</view>
<text class="last-step-text">{{popUpSubtitle}}</text>
<picker-view indicator-class="picker" indicator-style="height: 50px;" style="width: 100%; height: 670rpx;margin: 100rpx 0;" immediate-change="{{ true }}" value="{{leaseTimeValue}}" bindchange="bindChange">
<picker-view-column style="text-align: center;margin: 0 75rpx 200rpx;">
<view wx:for="{{ item.choices }}" wx:key="key" class="{{ index == leaseTimeValue ? 'pickerpitch' : ''}}" style="line-height: 50px;" data-item="{{ item }}">{{item.value}}</view>
</picker-view-column>
</picker-view>
<template is="pop-up-footer" data="{{ popUpStepState,field:item.field,newtype,newStatus }}"></template>
</view>
</view>
</template>
<!--弹窗-所在楼层 -->
<template name="floor">
<view class="leaseTime pop-up">
<view class="pop-up-box">
<view class="pop-up-top" bindtap="closePopUp">
<view class="pop-up-arrow"></view>
</view>
<view class="pop-up-title">{{ item.title || popUpTitle }}</view>
<text class="last-step-text">{{popUpSubtitle}}</text>
<picker-view indicator-class="picker" indicator-style="height: 50px;" style="width: 100%; height: 670rpx;margin: 80rpx 0;" immediate-change="{{ true }}" value="{{floorValue}}" bindchange="bindChange1">
<picker-view-column style="text-align: center;margin: 0 75rpx 200rpx;">
<view wx:for="{{ 103 }}" wx:key="key" class="{{ index == floorValue ? 'pickerpitch' : ''}}" style="line-height: 50px;" data-item="{{ item-3 }}">
{{ item - 3 >= 0 ? item - 2 : item - 3}} {{ index == floorValue ? '楼' : '' }}</view>
</picker-view-column>
</picker-view>
<template is="pop-up-footer" data="{{ popUpStepState,newtype,newStatus }}"></template>
</view>
</view>
</template>
<!-- 弹窗-房屋视频 -->
<template name="pop-up-HomeVideo">
<view class="pop-up-HomeVideo pop-up" catchtouchmove="handScroll">
<view class="pop-up-box">
<view class="pop-up-skip" bindtap="popUpSkip"><text>跳过</text>
<view class="clickInputLeftArrow"></view>
</view>
<view class="pop-up-top" bindtap="closePopUp">
<view class="pop-up-arrow"></view>
</view>
<view class="pop-up-title">房屋视频</view>
<text class="last-step-text">最多可上传1个</text>
<!-- 上传视频 -->
<view class="homeVideo-add" bindtap="get_video" wx:if="{{ videos.length == 0 }}">
<image class="homeVideo-add-img" src="/img/plusgrey.png"></image>
</view>
<!-- 展示视频 -->
<view class="homeVideo-add" wx:else>
<video class="homeVideo-add-video" show-center-play-btn="{{false}}" show-fullscreen-btn="{{ false }}" show-play-btn="{{ false }}" initial-time="0" src="{{ videos[0].url || videos[0].image }}"></video>
<image class="homeVideo-videoplay" src="/img/videoplay.png"></image>
<view class="close-btn" catchtap="del_pic" data-box="video">
<image src="/img/plusf.png"></image>
</view>
</view>
<template is="pop-up-footer" data="{{ popUpStepState,field:item.field,newtype,newStatus }}"></template>
</view>
</view>
</template>
<!-- 弹窗-房屋照片 -->
<template name="pop-up-homePhoto">
<view class="pop-up-homePhoto pop-up" catchtouchmove="handScroll">
<view class="pop-up-box">
<view class="pop-up-skip" bindtap="popUpSkip"><text>跳过</text>
<view class="clickInputLeftArrow"></view>
</view>
<view class="pop-up-top" bindtap="closePopUp">
<view class="pop-up-arrow"></view>
</view>
<view class="pop-up-title">房屋照片</view>
<text class="last-step-text">最多可上传6张不大于10M</text>
<!-- 上传图片 -->
<view class="pop-up-homePhoto-image-box">
<view class="pop-up-homePhoto-image" wx:for="{{ imgs }}" wx:key="index">
<image mode="aspectFit" class="pop-up-homePhoto-image-item" src="{{ item.url || item.image }}">
</image>
<view class="close-btn" catchtap="del_pic" data-box="img" data-index="{{ index }}">
<image src="/img/plusf.png"></image>
</view>
</view>
<view class="pop-up-homePhoto-image pop-up-homePhoto-image-kong" wx:for="{{ 5 - imgs.length }}" wx:key="index">
</view>
<view class="homePhoto-add" bindtap="get_img" wx:if="{{ imgs.length != 6 }}">
<image class="homePhoto-add-img homePhoto-add-icon" src="/img/plusgrey.png"></image>
</view>
</view>
<template is="pop-up-footer" data="{{ popUpStepState,field:item.field,newtype,newStatus }}"></template>
</view>
</view>
</template>
<!-- 弹窗-多行输入 -->
<!-- 个人情况介绍 和 其他描述 -->
<template name="multilineInput" catchtouchmove="handScroll">
<view class="multilineInput pop-up">
<view class=" pop-up-box">
<view class="pop-up-top" bindtap="closePopUp">
<view class="pop-up-arrow"></view>
</view>
<view class="pop-up-title">{{ item.title }}</view>
<text class="last-step-text">{{ item.placeholder }}</text>
<textarea class="multilineInput-textarea" bindfocus="bindfocusfocus" bindblur="bindblurblur" style="min-height: {{ item.field == 'subject' ? '405rpx' : item.field =='address' ? '405rpx' : '700rpx'}};" placeholder="请输入" value="{{ newinfo[item.field]}}" data-field="{{ item.field }}" bindinput="{{ item.field == 'message' ? 'popUpInput1': 'popUpInput'}}" cursor-spacing="40" maxlength="{{ item.field == 'subject' ? '80' : item.field =='address' ? '100' : '500'}}" focus="{{ focustitle == item.field ? true : false}}" bindconfirm="{{ item.field == 'subject' ? 'fillThe' : 'popUpNextStep' }}">
<keyboard-accessory>
<cover-view class="keyboard" catchtap="{{ item.field == 'subject' ? 'fillThe' : 'popUpNextStep'}}" data-field="{{ item.field }}">
<cover-view class="keyboard-view">完成</cover-view>
<cover-view class="keyboard-view">{{ item.field == 'subject' ? (newinfo[item.field] == null ? 80 : 80 - newinfo[item.field].length) : item.field =='address' ? (newinfo[item.field] == null ? 100 : 100 - newinfo[item.field].length ) : (newinfo[item.field] == null ? 500 : 500 - newinfo[item.field].length) }}</cover-view>
</cover-view>
</keyboard-accessory>
</textarea>
<view class="numberwords">
<block wx:if="{{ !focusState }}">{{ item.field == 'subject' ? (newinfo[item.field] == null ? 80 : (80 - newinfo[item.field].length)) : item.field =='address' ? (newinfo[item.field] == null ? 100 : 100 - newinfo[item.field].length ) : (newinfo[item.field] == null ? 500 : 500 - newinfo[item.field].length) }}</block>
</view>
<template is="pop-up-footer" data="{{ popUpStepState,field:item.field,newtype,newStatus }}"></template>
</view>
</view>
</template>
<template name="multilineInput1">
<view class="multilineInput pop-up">
<view class=" pop-up-box">
<view class="pop-up-top" bindtap="closePopUp">
<view class="pop-up-arrow"></view>
</view>
<view class="pop-up-title">{{ item.title }}</view>
<text class="last-step-text">{{ item.placeholder }}</text>
<textarea class="multilineInput-textarea" bindfocus="bindfocusfocus" bindblur="bindblurblur" style="min-height: {{ item.field == 'subject' ? '405rpx' : item.field =='address' ? '405rpx' : '700rpx'}};" placeholder="请输入" value="{{ newinfo[item.field]}}" data-field="{{ item.field }}" bindinput="popUpInput1" cursor-spacing="40" maxlength="{{ item.field == 'subject' ? '80' : '500'}}" focus="{{ focustitle == item.field ? true : false}}" bindconfirm="popUpNextStep">
<keyboard-accessory>
<cover-view class="keyboard" catchtap="popUpNextStep" data-field="{{ item.field }}">
<cover-view class="keyboard-view">完成</cover-view>
<cover-view class="keyboard-view">{{ newinfo[item.field] == null ? 500 : 500 - newinfo[item.field].length }}</cover-view>
</cover-view>
</keyboard-accessory>
</textarea>
<view class="numberwords">
<!-- <block wx:if="{{ !focusState }}">{{ newinfo[item.field].length || 0 }} {{'/'}} {{ '500' }}</block> -->
<block wx:if="{{ !focusState }}">{{ newinfo[item.field] == null ? 500 : 500 - newinfo[item.field].length }}</block>
</view>
<template is="pop-up-footer" data="{{ popUpStepState,field:item.field,newtype,newStatus }}"></template>
</view>
</view>
</template>
<!-- 弹窗-附近学校 -->
<template name="nearSchool">
<view class="nearSchool pop-up" catchtouchmove="handScroll">
<view class="pop-up-box">
<view class="pop-up-skip" bindtap="popUpSkip"><text>跳过</text>
<view class="clickInputLeftArrow"></view>
</view>
<view class="pop-up-top" bindtap="closePopUp">
<view class="pop-up-arrow"></view>
</view>
<view class="pop-up-title">{{ item.title }}</view>
<text class="last-step-text">{{ item.placeholder }}</text>
<view class="nearSchool-box">
<view class="nearSchool-item" wx:for="{{ nearSchoolList }}" wx:for-item="it" wx:key="index">
<view class="nearSchool-serial">{{ index + 1 }}</view>
<view wx:if="{{ nearSchoolList.length != 1 }}" class="close-btn" catchtap="del_nearSchool" data-index="{{ index }}">
<image src="/img/plusf.png"></image>
</view>
<input class="nearSchool-input" placeholder="请输入学校名称" bindinput="nearSchoolInput" data-index="{{ index }}" data-name="name" value="{{ it.name }}" maxlength="200" />
<textarea class="nearSchool-textarea" placeholder="房源距离该学校有多远?可以写步行或坐车需要花费的时间…" cursor-spacing="10" bindinput="nearSchoolInput" data-index="{{ index }}" data-name="distance" value="{{ it.distance }}" maxlength="200"></textarea>
</view>
<view class="nearSchool-add" bindtap="nearSchoolAdd" wx:if="{{ nearSchoolList.length < 3 }}">
<image src="/img/plus-3.png" mode="widthFix"></image>
</view>
</view>
<template is="pop-up-footer" data="{{ popUpStepState,field:item.field,newtype,newStatus }}"></template>
</view>
</view>
</template>
<!-- 弹窗-联系方式 -->
<template name="contactInformation">
<view class="contactInformation pop-up" catchtouchmove="handScroll">
<view class="pop-up-box">
<view class="pop-up-top" bindtap="closePopUp">
<view class="pop-up-arrow"></view>
</view>
<view class="pop-up-title">联系方式</view>
<text class="last-step-text">请至少提供其中一项联系方式,这是对方联系你的唯一途径</text>
<view class="contactInformation-box">
<block wx:for="{{ fieldinfo.contact }}" wx:key="index">
<view wx:if="{{ item.field == 'wechat' }}" class="contactInformation-item">
<view class="title">
<view class="yellowDot"></view><text>微信</text>
</view>
<view class="contactInformation-wechat" wx:if="{{ contactInformationState == 0 }}">
<view class="contactInformation-wechat-item" hover-class="option-hover" bindtap="contactInformationwechatcut" data-state="1">
<image mode="widthFix" src="/img/pengreydark.png"></image><text>填写微信号</text>
</view>
<view class="contactInformation-wechat-item" hover-class="option-hover" bindtap="UploadQRCode" data-state="2">
<image src="/img/u789.svg"></image>
<image class="contactInformation-recommend" src="/img/u666.png"></image>
<text>上传二维码</text>
</view>
</view>
<view class="contactInformation-wechat-input" wx:elif="{{ contactInformationState == 1 }}">
<input type="{{ item.type }}" bindinput="popUpInput" data-field="{{ item.field }}" value="{{ newinfo[item.field]}}" placeholder="{{ item.placeholder }}" bindblur="microSignalCheck" />
<view class="contactInformation-close" bindtap="contactInformationwechatcut" data-state="0">
<image src="/img/plusgrey.png"></image>
</view>
</view>
<view class="contactInformation-wechat-input" wx:elif="{{ contactInformationState == 2}}">
<view class="already-uploaded">
<image src="/img/u684.svg"></image>
<text>已上传</text>
</view>
<view class="contactInformation-close" bindtap="contactInformationwechatcut" data-state="0">
<image src="/img/plusgrey.png"></image>
</view>
</view>
</view>
<view wx:if="{{ item.field != 'wechat' }}" class="contactInformation-item">
<view class="title">
<view class="yellowDot"></view><text>{{ item.title }}</text>
</view>
<input class="contactInformation-input" placeholder="{{ item.placeholder }}" value="{{newinfo[item.field]}}" type="{{ item.type }}" bindinput="popUpInput" data-field="{{ item.field }}" />
</view>
</block>
</view>
<template is="pop-up-footer" data="{{ popUpStepState,field:item.field,newtype,newStatus }}"></template>
</view>
</view>
</template>
<!-- 选择起租日期 -->
<template name="ofDate">
<view class="ofDate pop-up">
<view class="pop-up-box">
<view class="pop-up-top" bindtap="closePopUp">
<view class="pop-up-arrow"></view>
</view>
<view class="pop-up-title">选择起租日期</view>
<view class="ofDate-week">
<view class="ofDate-week-item" wx:for="{{ week }}" wx:key="index">{{ item }}</view>
</view>
<view class="ofDate-box">
<!-- 日历第一个月和其他分开,原因是当前月份需要判断是否已过期 -->
<view class="ofDate-item">
<view class="ofDate-title">{{ calculateOfDateList[0].name }}</view>
<view class="ofDate-date">
<view class="ofDate-blank" wx:for="{{ calculateOfDateList[0].week }}" wx:key="index"></view>
<view wx:for="{{ calculateOfDateTime.day - 1 }}" wx:for-index="i" class="ofDate-number ofDate-number-already" wx:key="i">
{{ i + 1 }}
</view>
<view class="ofDate-number ofDate-number-current {{(pitchyear == calculateOfDateList[0].year) && (pitchmonth == calculateOfDateList[0].month) && (pitchday == calculateOfDateTime.day ) ? 'pitchdate' : ''}}" bindtap="selectOfDate" data-year="{{ calculateOfDateList[0].year }}" data-month="{{ calculateOfDateList[0].month }}" data-day="{{ calculateOfDateTime.day }}">
{{ calculateOfDateTime.day }}
</view>
<view wx:for="{{ calculateOfDateList[0].monthDayCount - calculateOfDateTime.day }}" wx:key="index" class="ofDate-number {{(pitchyear == calculateOfDateList[0].year) && (pitchmonth == calculateOfDateList[0].month) && (pitchday == calculateOfDateTime.day + index + 1) ? 'pitchdate' : ''}}" bindtap="selectOfDate" data-year="{{ calculateOfDateList[0].year }}" data-month="{{ calculateOfDateList[0].month }}" data-day="{{ calculateOfDateTime.day + index + 1 }}">
{{ calculateOfDateTime.day + index + 1 }}
</view>
</view>
</view>
<view class="ofDate-item" wx:for="{{ calculateOfDateList }}" wx:for-item="s" wx:if="{{ index > 0}}" wx:key="index">
<view class="ofDate-title">{{ s.name }}</view>
<view class="ofDate-date">
<view class="ofDate-blank" wx:for="{{ s.week }}" wx:key="index"></view>
<view wx:for="{{ s.monthDayCount }}" wx:for-index="i" wx:key="i" class="ofDate-number {{(pitchyear == s.year) && (pitchmonth == s.month) && (pitchday == i + 1) ? 'pitchdate' : ''}}" bindtap="selectOfDate" data-year="{{ s.year }}" data-month="{{ s.month }}" data-day="{{ i + 1 }}">
{{ i + 1 }} </view>
</view>
</view>
</view>
<template is="pop-up-footer" data="{{ popUpStepState,field:item.field,newtype,newStatus }}"></template>
</view>
</view>
</template>
<!-- 所在区域 -->
<template name="area">
<view class="area pop-up">
<view class="pop-up-box">
<view class="pop-up-top" bindtap="closePopUp">
<view class="pop-up-arrow"></view>
</view>
<view class="pop-up-title">
{{ item.title }}
</view>
<view class="area-box">
<!-- 左边 -->
<view class="area-region">
<block wx:for="{{ item.choices }}" wx:for-item="it" wx:for-index="i" wx:key="key">
<view class="area-region-item {{ i == areaRegionIndex ? 'area-region-item-pitch' : ''}}" bindtap="clickAreaRegion" data-index="{{ i }}">
<view class="yellow-dot" wx:if="{{ i == areaRegionIndex }}"></view>
<text>{{ it.value }}</text>
</view>
</block>
</view>
<!-- 右边 -->
<view class="area-district">
<view class="area-district-item {{ m1.fn([newinfo[item.field]],it.value,'location').indexOf ? 'option-hover':'' }}" wx:for="{{ item.choices[areaRegionIndex].choices }}" wx:for-item="it" wx:for-index="i" wx:key="key" bindtap="clickAreaDistrict" hover-class="click-areaDistrict-hover" data-key="{{it.key}}" data-value="{{ it.value }}" data-field="{{ item.field }}">
{{ it.value }}
</view>
</view>
</view>
<template is="pop-up-footer" data="{{ popUpStepState,field:item.field,newtype,newStatus }}"></template>
</view>
</view>
</template>
<!-- 当前页面的标题 -->
<template name="pageTextarea">
<view class="pageTextarea-box {{'clickInput' + item.field }}" bindtap="clickOption" data-it="{{ it }}" data-step="{{ index }}" data-field="{{ item.field }}">
<view class="pageTextarea-title">{{ item.title }} <text wx:if="{{ item.required == 1}}" style="color:#C54235;margin-left: 10rpx;">*</text></view>
<view class="pageTextarea" wx:if="{{ item.type == 'textarea' }}">
<textarea placeholder="{{ item.placeholder }}" maxlength="80" data-field="{{ item.field }}" cursor-spacing="20" bindinput="popUpInput" value="{{ newinfo[item.field] }}" disable-default-padding="{{ true }}">
<keyboard-accessory>
<cover-view class="keyboard" catchtap="{{ item.field == 'subject' ? 'fillThe' : 'popUpNextStep'}}" data-field="{{ item.field }}">
<cover-view class="keyboard-view">完成</cover-view>
<cover-view class="keyboard-view">{{ newinfo[item.field] == null ? 80 : 80 - newinfo[item.field].length }}</cover-view>
</cover-view>
</keyboard-accessory>
</textarea>
<!-- <view class="pageTextarea-numberwords">{{ (80 - (newinfo[item.field].length || 0)) >= 0 ?(80 - (newinfo[item.field].length || 0)) : 0 }}{{' / 80'}}</view> -->
<view class="pageTextarea-numberwords">{{ newinfo[item.field] == null ? 80 : 80 - newinfo[item.field].length }}</view>
</view>
<view class="pageTextarea" wx:elif="{{ item.type == 'text' }}">
<input type="text" placeholder="{{ item.placeholder }}" data-field="{{ item.field }}" bindinput="popUpInput" value="{{ newinfo[item.field] }}" />
</view>
</view>
</template>
<template name="pop-up-footer">
<view class="pop-up-footer" wx:if="{{ popUpStepState == 1 && newStatus != 1}}">
<view class="pop-up-save" bindtap='NewRelease' data-status="0">保存并退出</view>
</view>
<view class="pop-up-footer" wx:if="{{ popUpStepState == 2}}">
<view class="pop-up-save" bindtap='NewRelease' data-status="0" wx:if="{{ newStatus != 1}}">保存并退出</view>
<view class="pop-up-nextStep" catchtap="popUpNextStep" data-field="{{ field }}">下一步</view>
</view>
<view class="pop-up-footer" wx:if="{{ popUpStepState == 3 }}">
<view class="pop-up-save" bindtap='NewRelease' data-status="0" wx:if="{{ newtype != 'edit' && newStatus != 1 }}">
保存并退出</view>
<view class="pop-up-nextStep" bindtap="fillThe">填好了</view>
</view>
</template>
<!-- 当前数据 附近学校有数据时 -->
<template name="nearbySchool">
<view class="nearbySchool {{'clickInput' + item.field }}">
<view class="nearbySchool-title">{{ item.title }}</view>
<view class="nearbySchool-box">
<view class="nearbySchool-item" wx:for="{{ nearSchoolList }}" wx:key="index">
<view class="nearbySchool-title">
<view class="nearbySchool-yellow-dot"></view>
<text>{{ item.name }}</text>
</view>
<view class="nearbySchool-content">
{{ item.distance }}
</view>
</view>
<view class="nearbySchool-modification" bindtap="modification" data-step="{{ index }}">修改 > </view>
</view>
</view>
</template>
<!-- 弹窗-香港的地址 -->
<template name="AddressHongKong">
<view class="unilineInput pop-up" id="unilineInput{{item.field}}">
<view class="pop-up-box">
<view class="pop-up-skip" bindtap="popUpSkip" wx:if="{{ item.required == 0 }}"><text>跳过</text>
<view class="clickInputLeftArrow"></view>
</view>
<view class="pop-up-top" bindtap="closePopUp">
<view class="pop-up-arrow"></view>
</view>
<view class="pop-up-title">地址</view>
<view class="unilineInput-box AddressHongKong-box">
<input type="{{ item.type }}" placeholder="请选择" data-field="{{ item.field }}" bindtap="chooseLocation" value="{{newinfo[item.field]}}" disabled />
<text class="clickInputLeftArrow">{{ item.unit }}</text>
</view>
<template is="pop-up-footer" data="{{ popUpStepState,field:item.field,newtype,newStatus }}"></template>
</view>
</view>
</template>
<block wx:if="{{ isAuthorization==1 }}">
<go-login bindislogin="islogin"></go-login>
</block>