提交
This commit is contained in:
parent
cfbc7a141e
commit
c14979f2e7
4
app.json
4
app.json
@ -21,13 +21,11 @@
|
||||
"pages/textarea/textarea",
|
||||
"pages/share/share",
|
||||
"pages/login/index",
|
||||
"pages/test/test",
|
||||
"pages/messageCenter/messageCenter",
|
||||
"pages/webViewwebweb/index",
|
||||
"pages/circularize/circularize",
|
||||
"pages/askHousing/askHousing",
|
||||
"pages/setAvatarNickname/setAvatarNickname",
|
||||
"pages/shishi/shishi"
|
||||
"pages/setAvatarNickname/setAvatarNickname"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
|
18
img/message-reminding.svg
Normal file
18
img/message-reminding.svg
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="32px" height="28px" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<filter x="171px" y="480px" width="32px" height="28px" filterUnits="userSpaceOnUse" id="filter344">
|
||||
<feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetInner" />
|
||||
<feGaussianBlur stdDeviation="2.5" in="shadowOffsetInner" result="shadowGaussian" />
|
||||
<feComposite in2="shadowGaussian" operator="atop" in="SourceAlpha" result="shadowComposite" />
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.313725490196078 0 0 0 0 0.890196078431372 0 0 0 0 0.76078431372549 0 0 0 1 0 " in="shadowComposite" />
|
||||
</filter>
|
||||
<g id="widget345">
|
||||
<image preserveAspectRatio="none" style="overflow:visible" width="22" height="18" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAAqCAYAAAD8pHgAAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAANKADAAQAAAABAAAAKgAAAACCb8TgAAACqklEQVRoBe2WjW3bMBCFk6ADaARtUI3AEbyBtUGzQbhBvUG8gbOBvEHUCeINok7Qfq8AhbNs6s+1LAV+wBOPvHv3I8qAHx6+GB5b5knwfW/x39L1i+JV3wYcgQX8M3O+098aRqEb2cG5D9LsT4Op9xMscZgwnIY6QsouOJe6rjTRkx4g/fdc9iNrtp9zsNTb2TaHCXtNWcElDZaH5mNrgmMP5z7UgR5PPjPOotjgmetQe3rTix+MHEUF5zSYXvRFyFCX8NZD6cWu+k6SECjGIN8W3mqoktopbENmnY5N9C+ECcyxKzjlYBtT/5yZcFhAb52OjZr8hEeTsm9C/hJee6iKGqtm8cZevegi1IuHNRyWbTCvPeeNhOMttJr/aZfkTmEbNKwuINT1NtgZRwh4tQERW0mrM9qQY8zqI7Xs8cuZmkc6dyZAzeg6U9iGFOcejmneag7kcLANCc4dtLpgeyt0kSAF61p1E13wBITkQ9cNWjXbhgznB4zl9lbsWgJDgp9WELFVtOyRK+Q8EOtgF34QEDSx1dskrodAid6hmu7CMwEVjBXXuYcJbIP8BWzLE3zeJnI9RUGsN9YFNbOBQRPWLWcp7MKKgE8YdF2rtwndAGFIXKBJYRc02DP0MIVdUPwOhjp9V28TuxEJQqEXm+hCe41+yK2EHrR6W9uxsc6h9gd6fSJjkSEs4NC6Nt7b4u7CZCGxmlKuvkgJfIVBf8nqyVPDYV2SrKktyLeus58ajqMxv5NmHbv3KvNNjyvAkVPcwjdYQkGfloMJvAquNZBtdsVGnARPk1SZsMh9oAlf9qhS9xsa9domFN1vaMKXPapUuKED6t+jMsxDpN7fmq2kHJTQ/p1Ygn2g5wxGkeM5wLkPox49TGCNx9o6NVKOxDmioil9TV8ffwGMIuR2B9TYZwAAAABJRU5ErkJggg==" x="176px" y="485px" />
|
||||
</g>
|
||||
</defs>
|
||||
<g transform="matrix(1 0 0 1 -171 -480 )">
|
||||
<use xlink:href="#widget345" filter="url(#filter344)" />
|
||||
<use xlink:href="#widget345" />
|
||||
</g>
|
||||
</svg>
|
File diff suppressed because it is too large
Load Diff
@ -1,12 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": " ",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"header-nav": "../../template/headerNav/index",
|
||||
"go-login": "../../template/goLogin/goLogin",
|
||||
"select-single": "../../template/selectSingle/selectSingle",
|
||||
"custom-picker": "/template/datepickerview/datepickerview",
|
||||
"choice-type-release": "/template/choiceTypeRelease/choiceTypeRelease",
|
||||
"about-release": "/template/aboutRelease/aboutRelease"
|
||||
}
|
||||
}
|
@ -1,945 +0,0 @@
|
||||
<!-- 求房源 -->
|
||||
<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="../../wxParse/wxParse.wxml" />
|
||||
<view class="container" wx:if="{{ !loding }}">
|
||||
<!-- 选择发布类型 -->
|
||||
<!-- <choice-type-release></choice-type-release> -->
|
||||
<!-- 关于发布 -->
|
||||
<block wx:if="{{ popUpIs == 'about' }}">
|
||||
<about-release aboutRulesList="{{ aboutRulesList }}" bindsetValue="setValue"></about-release>
|
||||
</block>
|
||||
|
||||
<!-- 发布成功 -->
|
||||
<!-- <template is="succeed-pop"></template> -->
|
||||
|
||||
<!-- 发布失败 -->
|
||||
<!-- <template is="fail-pop"></template> -->
|
||||
|
||||
<!-- 租金预算 -->
|
||||
<!-- <template is="rent-budget" data="{{ min,max,change,slider2W,slider1Max,slider2Min,slider1Value,slider2Value,rate,scale,slider1W,slider2W,leftSliderPriceWidthX,rightSliderPriceWidthX,left }}"></template> -->
|
||||
|
||||
<!-- 目标区域 -->
|
||||
<!-- <template is="pop-target-area"></template> -->
|
||||
|
||||
<!-- 新的服务类型 -->
|
||||
<!-- <template is="new-marquee-box"></template> -->
|
||||
|
||||
<header-nav inner-text="Some text" bgcolor="rgba(246, 246, 246, 1)">发布求房源</header-nav>
|
||||
|
||||
<view class="header-tips" wx:if="{{ false }}">
|
||||
<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>
|
||||
<block wx:if="{{ true }}">
|
||||
<view class="edit-head-head flexacenter">
|
||||
<view class="edit-head-area flexacenter">
|
||||
<image class="edit-head-area-icon" mode="widthFix" src="/img/u706.png"></image>香港
|
||||
</view>
|
||||
<view class="edit-head-type flexcenter">求房源</view>
|
||||
</view>
|
||||
|
||||
<view class="edit-head-surplus flexacenter" bindtap="setValue" data-key="popUpIs" data-value="about">
|
||||
<view class="edit-head-surplus-text">您还可以发布 <text>3</text> 条普通房源</view>
|
||||
<view class="flexacenter">
|
||||
了解更多<image class="edit-head-surplus-icon" src="/img/blue-arrow.svg"></image>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<view class="edit-box">
|
||||
<view class="edit-top" wx:if="{{ false }}">
|
||||
<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' }}" 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 == 'location' }}" is="target-area"></template>
|
||||
<!-- <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">
|
||||
<block wx:for="{{ fieldinfo.identity }}" wx:key="index">
|
||||
<template is="clickInput" data="{{ item,index,it:'identity',newinfo }}"></template>
|
||||
</block>
|
||||
</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>
|
||||
<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>
|
||||
<block wx:elif="{{ contactInformationState == 2}}">
|
||||
<view class="QRCode-box flexcenter">
|
||||
<image class="QRCode-img" mode="widthFix" src="{{ newinfo.wechatdata.image }}"></image>
|
||||
<view class="close-btn" catchtap="setValue" data-key="contactInformationState" data-value="0">
|
||||
<image src="/img/plusf.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="contactInformation-wechat-item" hover-class="option-hover" bindtap="UploadQRCode" data-state="2" style="margin-top: 30rpx;">
|
||||
<image src="/img/u789.svg"></image>
|
||||
<text>重新上传</text>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
<!-- <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 class="notice-publication flexcenter">
|
||||
<view class="notice-publication-key">发布须知:</view>
|
||||
请按真实身份发布、请勿发布非寄托官方群/代看房信息,违规发布将被永久禁言,感谢合作!
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="footer-btn"> {{ newtype }}
|
||||
<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">房屋视频(最多可上传3个,不大于5M/个)</view>
|
||||
|
||||
<view class="flexflex homeVideo-list">
|
||||
<!-- 展示视频 -->
|
||||
<view class="homeVideo-add" wx:for="{{ videos }}" wx:key="index">
|
||||
<video class="homeVideo-add-video" show-center-play-btn="{{false}}" show-fullscreen-btn="{{ false }}" show-play-btn="{{ false }}" initial-time="0" src="{{ item.url || item.image}}"></video>
|
||||
<image class="homeVideo-videoplay" src="/img/videoplay.png"></image>
|
||||
<view class="close-btn" catchtap="del_pic" data-index="{{index}}" data-box="video">
|
||||
<image src="/img/plusf.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 上传按钮 -->
|
||||
<view class="homeVideo-add" bindtap="get_video" wx:if="{{ videos.length != 3 }}">
|
||||
<image class="homeVideo-add-img" src="/img/plusgrey.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- 房屋照片 -->
|
||||
<template name="homePhoto">
|
||||
<view class="homePhoto-box">
|
||||
<view class="homePhoto-title">房屋照片(最多可上传9张,不大于5M/张)</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 != 9 }}">
|
||||
<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> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</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> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</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> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</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> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</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> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</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> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</view>
|
||||
<view class="pop-up-title">房屋视频</view>
|
||||
<text class="last-step-text">最多可上传3个,不大于5M/个</text>
|
||||
|
||||
<view class="flexacenter homeVideo-case">
|
||||
<!-- 展示视频的 -->
|
||||
<view class="homeVideo-add" wx:for="{{ videos }}" wx:key="index">
|
||||
<video class="homeVideo-add-video" show-center-play-btn="{{false}}" show-fullscreen-btn="{{ false }}" show-play-btn="{{ false }}" initial-time="0" src="{{ item.url || item.image }}"></video>
|
||||
<image class="homeVideo-videoplay" src="/img/videoplay.png"></image>
|
||||
<view class="close-btn" catchtap="del_pic" data-index="{{ index }}" data-box="video">
|
||||
<image src="/img/plusf.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 没有视频时候的空白 -->
|
||||
<block wx:if="{{ videos.length < 2 }}">
|
||||
<view class="homeVideo-add" wx:for="{{ videos.length == 1 ? 1 : 2 }}" style="background: #fff;" wx:key="index"></view>
|
||||
</block>
|
||||
|
||||
<!-- 上传视频按钮 -->
|
||||
<view class="homeVideo-add" bindtap="get_video" wx:if="{{ videos.length != 3 }}">
|
||||
<image class="homeVideo-add-img" src="/img/plusgrey.png"></image>
|
||||
</view>
|
||||
</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">
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</view>
|
||||
<view class="pop-up-title">房屋照片</view>
|
||||
<text class="last-step-text">最多可上传6张,不大于5M</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="{{ 8 - imgs.length }}" wx:key="index">
|
||||
</view>
|
||||
<view class="homePhoto-add" bindtap="get_img" wx:if="{{ imgs.length != 9 }}">
|
||||
<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">
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</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">
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</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> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</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> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</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>
|
||||
<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>
|
||||
<block wx:elif="{{ contactInformationState == 2}}">
|
||||
<view class="QRCode-box flexcenter">
|
||||
<image class="QRCode-img" mode="widthFix" src="{{ newinfo.wechatdata.image }}"></image>
|
||||
<view class="close-btn" catchtap="setValue" data-key="contactInformationState" data-value="0">
|
||||
<image src="/img/plusf.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="contactInformation-wechat-item" hover-class="option-hover" bindtap="UploadQRCode" data-state="2" style="margin-top: 30rpx;">
|
||||
<image src="/img/u789.svg"></image>
|
||||
<text>重新上传</text>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
<!-- <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> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</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> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</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 flexcenter" wx:if="{{ popUpStepState == 1 && newStatus != 1}}">
|
||||
<view class="pop-up-save" style="width: 360rpx;" bindtap='NewRelease' data-status="0">保存并退出</view>
|
||||
</view>
|
||||
<view class="pop-up-footer flexcenter" 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 flexcenter" 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">
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</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>
|
||||
|
||||
<!-- 租金预算 -->
|
||||
<template name="rent-budget">
|
||||
<view class="rent-budget pop-up">
|
||||
<view class="pop-up-box">
|
||||
<view class="pop-up-top" bindtap="closePopUp">
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</view>
|
||||
<view class="pop-up-title">租金预算</view>
|
||||
<view class="rent-budget-unit flexcenter">HK$/月</view>
|
||||
|
||||
<view class='sliderHCon'>
|
||||
<view class='twoSlider'>
|
||||
<view class='select-construct'>
|
||||
<view class="select-value flexcenter" style="left: {{ leftSliderPriceWidthX }};right: {{ rightSliderPriceWidthX }};">{{ slider1Value }} ~ {{ slider2Value }}</view>
|
||||
<view class='select-area'>
|
||||
<view class='slider-container'>
|
||||
<slider style='width:{{slider1W+"%"}}' class='slider-left' min='{{min}}' max='{{slider1Max}}' color='#50e3c2' activeColor='#f2f2f2' bindchanging='changing' catchtouchstart='changeStart' block-size="14" block-color="#50e3c2" bindchange='changed' data-idx='1' value="{{ slider1Value }}"></slider>
|
||||
<slider wx:if='{{!change}}' style='width:{{slider2W+"%"}}' class='slider-right' min='{{slider2Min}}' max='{{max}}' color='#f2f2f2' activeColor='#50e3c2' bindchanging='changing' catchtouchstart='changeStart' block-size="14" block-color="#50e3c2" bindchange='changed' data-idx='2' value="{{ slider2Value }}"></slider>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<template is="pop-up-footer" data="{{ popUpStepState:1,field:item.field,newtype,newStatus }}"></template>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<!-- 当前页面-目标区域 -->
|
||||
<template name="target-area">
|
||||
<view class="target-area clickInput-box">
|
||||
<view class="clickInput-title">目标区域<text style="color:#C54235;margin-left: 10rpx;">*</text></view>
|
||||
<view class="target-area-list">
|
||||
<view class="target-area-item flexacenter" wx:for="{{ 3 }}" wx:key="index">
|
||||
<view class="target-area-index flexcenter">{{ index }}</view>
|
||||
<view class="target-area-content">九龙 > 尖沙咀/佐敦</view>
|
||||
<image class="target-area-cross" src="/img/close-c.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="target-area-edit flexcenter">
|
||||
<image class="target-area-edit-icon" src="/img/pen-edit.png" mode="widthFix"></image> 修改
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- 弹窗-目标区域 -->
|
||||
<template name="pop-target-area">
|
||||
<view class="pop-target-area pop-up">
|
||||
<view class="pop-up-box">
|
||||
<view class="pop-up-top" bindtap="closePopUp">
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</view>
|
||||
<view class="pop-up-title">目标区域</view>
|
||||
<text class="last-step-text">最多可选择6个目标区域</text>
|
||||
<view class="pop-area-list">
|
||||
<view class="pop-area-item" wx:for="{{ 5 }}">
|
||||
<view class="pop-area-name">港岛</view>
|
||||
<view class="pop-area-content flexflex">
|
||||
<view class="pop-area-content-item flexcenter {{ index == 0 ? 'pitch' : '' }}" wx:for="{{ 10 }}" wx:key="index">不限</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="pop-area-pitch-list flexacenter">
|
||||
<view class="pop-area-pitch-item flexacenter" wx:for="{{ 2 }}" wx:key="index">
|
||||
<view class="pop-area-pitch-index flexcenter">{{ index + 1}}</view>
|
||||
<view class="pop-area-pitch-content flexacenter">上环上环上环上环/中环</view>
|
||||
<image class="pop-area-pitch-cross" src="/img/close-c.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<template is="pop-up-footer" data="{{ popUpStepState:2,field:item.field,newtype,newStatus }}"></template>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<!-- 新的多选框 -->
|
||||
<template name="new-marquee-box">
|
||||
<view class="pop-new-marquee-box pop-up">
|
||||
<view class="pop-up-box">
|
||||
<view class="pop-up-top" bindtap="closePopUp">
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</view>
|
||||
<view class="pop-up-title">服务类型</view>
|
||||
<view class="pop-new-marquee-unlimited flexacenter">
|
||||
<image wx:if="{{ false }}" class="pop-new-marquee-unlimited-icom" mode="widthFix" src="/img/green-circle-pitch.svg"></image>
|
||||
<view class="pop-new-marquee-unlimited-icom pop-new-marquee-unlimited-unselected-icom"></view>
|
||||
不限
|
||||
</view>
|
||||
<view class="pop-new-marquee-line"></view>
|
||||
<view class="pop-new-marquee-list flexflex">
|
||||
<view class="pop-new-marquee-item flexacenter" wx:for="{{ 7 }}" wx:key="index">
|
||||
<view class="pop-new-marquee-case"></view>唐楼
|
||||
</view>
|
||||
</view>
|
||||
<template is="pop-up-footer" data="{{ popUpStepState:2 }}"></template>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
File diff suppressed because it is too large
Load Diff
@ -7,8 +7,6 @@ var id = 0;
|
||||
var timer = null;
|
||||
var miucms = require('../../utils/miucms.js');
|
||||
var WxParse = require('../../wxParse/wxParse.js');
|
||||
var tempFilePaths = [],
|
||||
tempFilePathVideo = [];
|
||||
var tempFilePath = '';
|
||||
var submit = false;
|
||||
let mapKey = 'IGSBZ-4B7KX-MOG4O-TN3JQ-KA6M5-32FGO'
|
||||
@ -161,7 +159,6 @@ Page({
|
||||
q: '',
|
||||
write_long_textarea: false,
|
||||
questions: [],
|
||||
videos: [],
|
||||
options: {},
|
||||
leasetime: '', //起租日期
|
||||
startDate: '',
|
||||
@ -199,98 +196,83 @@ Page({
|
||||
newcity: {},
|
||||
aa: {
|
||||
type: {
|
||||
name: '求租方式',
|
||||
popUpIs: 'AListOF',
|
||||
popUpStepState: 0,
|
||||
it: 'basic',
|
||||
field: "type"
|
||||
},
|
||||
rentalduration: {
|
||||
name: '租期',
|
||||
popUpIs: 'AListOF',
|
||||
popUpStepState: 1,
|
||||
it: 'basic',
|
||||
field: "rentalduration"
|
||||
},
|
||||
leasetime: {
|
||||
name: '起租日期',
|
||||
popUpIs: 'AListOF',
|
||||
popUpStepState: 1,
|
||||
it: 'basic',
|
||||
field: "leasetime"
|
||||
},
|
||||
rent: {
|
||||
name: '租金预算',
|
||||
popUpIs: 'rent-budget',
|
||||
popUpStepState: 2,
|
||||
it: 'basic',
|
||||
field: "slider"
|
||||
},
|
||||
property: {
|
||||
name: '房屋类型',
|
||||
popUpIs: 'new-marquee-box',
|
||||
popUpStepState: 2,
|
||||
it: 'basic',
|
||||
field: "property"
|
||||
},
|
||||
floor: {
|
||||
name: '所在楼层',
|
||||
popUpIs: 'new-marquee-box',
|
||||
popUpStepState: 2,
|
||||
it: 'basic',
|
||||
field: "floor"
|
||||
},
|
||||
elevator: {
|
||||
name: '电梯',
|
||||
popUpIs: 'AListOF',
|
||||
popUpStepState: 1,
|
||||
field: "elevator"
|
||||
},
|
||||
sunshinearea: {
|
||||
name: '晾晒区',
|
||||
popUpIs: 'new-marquee-box',
|
||||
popUpStepState: 2,
|
||||
field: "sunshinearea"
|
||||
},
|
||||
acreage: {
|
||||
name: '面积',
|
||||
popUpIs: 'rent-budget',
|
||||
popUpStepState: 2,
|
||||
it: 'basic',
|
||||
field: "acreage"
|
||||
},
|
||||
location: {
|
||||
name: '目标区域',
|
||||
popUpIs: 'pop-target-area',
|
||||
popUpStepState: 2,
|
||||
field: "location"
|
||||
},
|
||||
gender: {
|
||||
name: '同住人性别要求',
|
||||
popUpIs: 'AListOF',
|
||||
popUpStepState: 1,
|
||||
field: "gender"
|
||||
},
|
||||
publishergender: {
|
||||
name: '发布者性别',
|
||||
popUpIs: 'AListOF',
|
||||
popUpStepState: 1,
|
||||
field: "publishergender"
|
||||
},
|
||||
introduction: {
|
||||
name: '求租描述',
|
||||
popUpIs: 'multilineInput',
|
||||
popUpStepState: 2,
|
||||
field: "introduction"
|
||||
},
|
||||
wechat: {
|
||||
name: '微信',
|
||||
popUpIs: 'contactInformation',
|
||||
popUpStepState: 2,
|
||||
field: "wechat"
|
||||
},
|
||||
subject: {
|
||||
name: '标题',
|
||||
popUpIs: 'multilineInput',
|
||||
popUpStepState: 3,
|
||||
field: "subject"
|
||||
@ -820,12 +802,6 @@ Page({
|
||||
// data.fieldinfo['status'] = [data.fieldinfo['identity'][1]] || []
|
||||
// data.fieldinfo['identity'].splice(1, 1)
|
||||
|
||||
//
|
||||
// if (data.info.rent.length == 2) {
|
||||
// data.info.rent[0] = Number(data.info.rent[0])
|
||||
// data.info.rent[] = Number(data.info.rent[1])
|
||||
// }
|
||||
|
||||
this.setData({
|
||||
id: data.id,
|
||||
fieldinfo: data.fieldinfo,
|
||||
@ -836,7 +812,6 @@ Page({
|
||||
newToken: data.token,
|
||||
imgs: data.info.images,
|
||||
allowpublishednum: data.allowpublishednum,
|
||||
videos: data.info.video,
|
||||
publishingrules: data.publishingrules,
|
||||
floorValue: this.data.floorValue,
|
||||
nearSchoolList: this.data.nearSchoolList,
|
||||
@ -879,12 +854,6 @@ Page({
|
||||
}
|
||||
popUpIs = popUpdate.popUpIs
|
||||
popUpStepState = popUpdate.popUpStepState
|
||||
// this.data.aa.forEach(element => {
|
||||
// if (this.data.fieldinfo['status'][0].title == element.name) {
|
||||
// popUpIs = element.popUpIs
|
||||
// popUpStepState = element.popUpStepState
|
||||
// }
|
||||
// });
|
||||
|
||||
this.setData({
|
||||
step,
|
||||
@ -1024,14 +993,7 @@ Page({
|
||||
})
|
||||
}
|
||||
}
|
||||
if (data.data.info.video_url && data.data.info.video_url.length > 0) {
|
||||
for (let i = 0; i < data.data.info.video.length; i++) {
|
||||
that.data.videos.push({
|
||||
aid: data.data.info.video[i],
|
||||
url: data.data.info.video_url[i],
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (data.data.info.point && data.data.info.point.length == 2) {
|
||||
that.data.latitude = data.data.info.point[0];
|
||||
that.data.longitude = data.data.info.point[1];
|
||||
@ -1040,7 +1002,6 @@ Page({
|
||||
that.setData({
|
||||
info: that.data.info,
|
||||
imgs: that.data.imgs,
|
||||
videos: that.data.videos,
|
||||
timestamp: data.data.info.timestamp,
|
||||
updatetime: data.data.info.updatetime,
|
||||
latitude: that.data.latitude,
|
||||
@ -1088,8 +1049,7 @@ Page({
|
||||
}
|
||||
|
||||
this.issubmit = true;
|
||||
let images = [],
|
||||
video = [];
|
||||
let images = []
|
||||
let status = e.currentTarget.dataset.status;
|
||||
wx.showLoading({
|
||||
title: '提交中...',
|
||||
@ -1099,14 +1059,9 @@ Page({
|
||||
images.push(that.data.imgs[i].aid)
|
||||
}
|
||||
}
|
||||
if (that.data.videos.length > 0) {
|
||||
for (let i = 0; i < that.data.videos.length; i++) {
|
||||
video.push(that.data.videos[i].aid)
|
||||
}
|
||||
}
|
||||
|
||||
let info = {
|
||||
images,
|
||||
video,
|
||||
point: []
|
||||
}
|
||||
if (this.data.latitude) {
|
||||
@ -1160,215 +1115,6 @@ Page({
|
||||
this.issubmit = false
|
||||
})
|
||||
},
|
||||
// 选择图片
|
||||
get_img: function () {
|
||||
var that = this;
|
||||
let limitSuffix = ['svg'] // 需要限制的后缀数组
|
||||
|
||||
wx.chooseImage({
|
||||
count: 9 - that.data.imgs.length,
|
||||
sizeType: ['compressed'],
|
||||
success: function (res) {
|
||||
let isLt10M = true;
|
||||
let isSvg = true
|
||||
var imgList = [];
|
||||
for (var i = 0; i < res.tempFiles.length; i++) {
|
||||
var size = res.tempFiles[i].size / 1024 / 1024;
|
||||
let suffixIndex = res.tempFiles[i].path.lastIndexOf('.')
|
||||
let suffix = res.tempFiles[i].path.slice(suffixIndex + 1, res.tempFiles[i].path.length)
|
||||
// 小于3M且照片数量<6的时候才触发上传
|
||||
if (size < 5 && !limitSuffix.includes(suffix.toLowerCase())) that.upload_picnew(res.tempFiles[i].path, "image")
|
||||
else if (size >= 5) isLt10M = false;
|
||||
else if (limitSuffix.includes(suffix.toLowerCase())) isSvg = false
|
||||
}
|
||||
|
||||
if (!isLt10M) {
|
||||
// 存在大于3M的,只提示一次
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '图片大小不能超过5M',
|
||||
})
|
||||
} else if (!isSvg) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '上传文件后缀不允许',
|
||||
})
|
||||
}
|
||||
},
|
||||
fail(err) {
|
||||
wx.showModal({
|
||||
title: 'chooseImageErr',
|
||||
content: err,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 上传图片
|
||||
upload_picnew: function (imgUrl, type) {
|
||||
var that = this;
|
||||
const uploadTask = wx.uploadFile({
|
||||
// url: `${app.globalData.baseURL}/tenement/publish/upload`,
|
||||
url: `${app.globalData.baseURL}/tenement/v2/api/publish/upload`,
|
||||
filePath: imgUrl,
|
||||
name: 'files',
|
||||
formData: {
|
||||
uniqid: that.data.uniqid,
|
||||
session: app.globalData.session,
|
||||
type
|
||||
},
|
||||
header: app.globalData.header,
|
||||
success: function (res) {
|
||||
try {
|
||||
var data = JSON.parse(res.data);
|
||||
if (data.code == 200) {
|
||||
data = data.data
|
||||
if (data.aid > 0) {
|
||||
// 长度<6个的时候再push
|
||||
if (that.data.imgs.length < 9) {
|
||||
that.data.imgs.push({
|
||||
url: data.url,
|
||||
aid: data.aid
|
||||
})
|
||||
that.setData({
|
||||
imgs: that.data.imgs
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: '最多可上传9张',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: data.state,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: data.message
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
wx.showToast({
|
||||
title: 'uploadCatch' + e,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: function (err) {
|
||||
wx.showModal({
|
||||
title: 'uploadFileErr',
|
||||
content: err,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 选择mp4
|
||||
get_video: function () {
|
||||
let that = this;
|
||||
// wx.chooseVideo({
|
||||
wx.chooseMedia({
|
||||
count: 3 - that.data.videos.length,
|
||||
mediaType: ['video'],
|
||||
success: function (res) {
|
||||
let isSize5M = false
|
||||
let tempFiles = res.tempFiles
|
||||
tempFiles.forEach(element => {
|
||||
var size = element.size / 1024 / 1024;
|
||||
if (size > 5) isSize5M = true
|
||||
else that.upload_videonew(element.tempFilePath)
|
||||
})
|
||||
|
||||
if (isSize5M) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '视频大小不能超过5M',
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 上传mp4
|
||||
upload_videonew: function (videoUrl) {
|
||||
var that = this;
|
||||
wx.showLoading({
|
||||
title: '视频上传中',
|
||||
})
|
||||
|
||||
const uploadTask = wx.uploadFile({
|
||||
// url: `${app.globalData.baseURL}/tenement/publish/upload`,
|
||||
url: `${app.globalData.baseURL}/tenement/v2/api/publish/upload`,
|
||||
filePath: videoUrl,
|
||||
name: 'files',
|
||||
formData: {
|
||||
uniqid: that.data.uniqid,
|
||||
session: app.globalData.session,
|
||||
type: 'video'
|
||||
},
|
||||
header: app.globalData.header,
|
||||
success: function (res) {
|
||||
try {
|
||||
let re = JSON.parse(res.data)
|
||||
if (re.code == 200) {
|
||||
let data = re.data
|
||||
that.data.videos.push({
|
||||
url: data.url,
|
||||
aid: data.aid
|
||||
})
|
||||
that.setData({
|
||||
videos: that.data.videos
|
||||
})
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: re.message
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
} catch (e) {
|
||||
wx.showToast({
|
||||
title: 'uploadVideoCatch' + e,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: function (err) {
|
||||
wx.showModal({
|
||||
title: 'uploadVideoErr',
|
||||
content: err,
|
||||
})
|
||||
},
|
||||
complete(res) {
|
||||
wx.hideLoading()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除图片 和 视频
|
||||
del_pic: function (e) {
|
||||
let {
|
||||
index,
|
||||
box
|
||||
} = e.currentTarget.dataset;
|
||||
if (box == 'img') {
|
||||
this.data.imgs.splice(index, 1)
|
||||
this.setData({
|
||||
imgs: this.data.imgs
|
||||
})
|
||||
} else {
|
||||
this.data.videos.splice(index, 1)
|
||||
this.setData({
|
||||
videos: this.data.videos
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
// 长内容
|
||||
to_textarea: function (e) {
|
||||
@ -1538,6 +1284,7 @@ Page({
|
||||
triggerRules: 0
|
||||
})
|
||||
},
|
||||
|
||||
// 点击规则4中的图片预览
|
||||
methodPreview() {
|
||||
wx.previewImage({
|
||||
@ -1552,7 +1299,6 @@ Page({
|
||||
this.setData({
|
||||
leaseTimeValue: val,
|
||||
['newinfo.rentalduration']: popUpdate.choices[val].value
|
||||
// ['newinfo.rentalduration']: this.data.fieldinfoNew['rentalduration'].choices[1].choices[val].value
|
||||
})
|
||||
},
|
||||
|
||||
@ -1779,10 +1525,8 @@ Page({
|
||||
this.setData({
|
||||
['popUpdate.choices']: choices,
|
||||
['popUpdate.value']: value,
|
||||
// ['popUpdate.popUpIs']: popUpIs,
|
||||
popUpSubtitle,
|
||||
popUpIs,
|
||||
// popUpIs: choices['popUpIs'],
|
||||
popUpStepState,
|
||||
})
|
||||
|
||||
@ -1812,14 +1556,6 @@ Page({
|
||||
|
||||
}
|
||||
|
||||
// this.data.aa.forEach(element => {
|
||||
// if (value == element.name) {
|
||||
// popUpStepState = element.popUpStepState
|
||||
// popUpIs = element.popUpIs
|
||||
// popUpTitle = this.data.fieldinfo[element.it][this.data.step].title
|
||||
// }
|
||||
// });
|
||||
|
||||
if (popUpIs == "") {
|
||||
if (this.data.fieldinfo[this.data.popUpit].length == this.data.step && this.data.popUpOrder.indexOf(this.data.popUpit) != -1) {
|
||||
this.data.popUpit = this.data.popUpOrder[this.data.popUpOrder.indexOf(this.data.popUpit) + 1]
|
||||
@ -1827,19 +1563,11 @@ Page({
|
||||
}
|
||||
|
||||
let fieldinfoNew = this.data.fieldinfoNew
|
||||
// let popUpdate = { ...fieldinfoNew[this.data.fieldinfo[this.data.popUpit][this.data.step].field] }
|
||||
let popUpdate = {
|
||||
...fieldinfoNew[this.data.fieldinfo[this.data.popUpit][this.data.step].field]
|
||||
}
|
||||
let field = popUpdate.field
|
||||
if (field == 'video') {
|
||||
if (this.data.videos.length > 0) {
|
||||
this.setData({
|
||||
popUpIs: ""
|
||||
})
|
||||
return
|
||||
}
|
||||
} else if (this.data.newinfo[field] != null && this.data.newinfo[field] != "") {
|
||||
if (this.data.newinfo[field] != null && this.data.newinfo[field] != "") {
|
||||
this.setData({
|
||||
popUpIs: ""
|
||||
})
|
||||
@ -1951,12 +1679,6 @@ Page({
|
||||
})
|
||||
}
|
||||
|
||||
if (currentField == 'floor') {
|
||||
// this.setData({
|
||||
// ['newinfo.floor']: this.data.floorValue - 2 > 0 ? this.data.floorValue - 2 + '楼' : this.data.floorValue - 3 + '楼'
|
||||
// })
|
||||
}
|
||||
|
||||
this.setData({
|
||||
popUpIs: "",
|
||||
popUpit: "",
|
||||
@ -2015,8 +1737,6 @@ Page({
|
||||
}
|
||||
|
||||
let popUpdate = fieldinfoNew[this.data.fieldinfo[this.data.popUpit][this.data.step].field]
|
||||
// this.data.aa.forEach(element => {
|
||||
// if (this.data.fieldinfo[this.data.popUpit][this.data.step].title == element.name) {
|
||||
if (popUpdate.popUpIs == 'nearSchool') {
|
||||
this.data.nearSchoolList.push({
|
||||
name: '',
|
||||
@ -2033,8 +1753,6 @@ Page({
|
||||
popUpdate,
|
||||
popUpStepState: popUpdate.popUpStepState
|
||||
})
|
||||
// }
|
||||
// });
|
||||
},
|
||||
|
||||
// 下一步
|
||||
@ -2142,9 +1860,6 @@ Page({
|
||||
|
||||
let popUpStepState = popUpdate.popUpStepState
|
||||
|
||||
// return
|
||||
// this.data.aa.forEach(element => {
|
||||
// if (this.data.fieldinfo[this.data.popUpit][this.data.step].title == element.name) {
|
||||
|
||||
// 因为 field == 'address' 分香港和非香港地区 这个是香港地区的 地址,调用地图API
|
||||
if (this.data.fieldinfoNew[popUpdate.field].field == 'address') {
|
||||
@ -2266,11 +1981,6 @@ Page({
|
||||
let fieldinfoNew = this.data.fieldinfoNew
|
||||
let fieldinfo = this.data.fieldinfo
|
||||
|
||||
// 所在楼层
|
||||
// if (status == 0 && this.data.popUpIs == 'floor') {
|
||||
// this.data.newinfo.floor = this.data.floorValue[0] - 2 > 0 ? this.data.floorValue[0] - 2 + '楼' : this.data.floorValue[0] - 3 + '楼'
|
||||
// }
|
||||
|
||||
if (this.data.newinfo && this.data.newinfo.subject) this.data.newinfo.subject = this.data.newinfo.subject.trim()
|
||||
|
||||
|
||||
@ -2279,15 +1989,9 @@ Page({
|
||||
}
|
||||
|
||||
newinfo.images = this.data.imgs
|
||||
newinfo.video = this.data.videos
|
||||
// newinfo.floor = parseInt(newinfo.floor) // floor数据加了‘楼’子需要转正整数
|
||||
// if (newinfo.acreage != null && newinfo.acreage != "") {
|
||||
// newinfo.acreage = Number(newinfo.acreage)
|
||||
// }
|
||||
|
||||
if (newinfo.latitude) {
|
||||
newinfo['point'] = [newinfo.latitude, newinfo.longitude]
|
||||
}
|
||||
if (newinfo.latitude) newinfo['point'] = [newinfo.latitude, newinfo.longitude]
|
||||
|
||||
|
||||
// 判断附近学校是否为空
|
||||
if (this.data.nearSchoolList.length > 0) {
|
||||
@ -2332,16 +2036,6 @@ Page({
|
||||
})
|
||||
}
|
||||
|
||||
// 房屋类型
|
||||
// if (element.field == "property") {
|
||||
// console.log("res.value", newinfo.property);
|
||||
// element.choices.forEach(res => {
|
||||
// if (res.value == newinfo.property) {
|
||||
// newinfo.property = res.key
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
// 性别
|
||||
if (element.field == "gender") {
|
||||
element.choices.forEach((el, index) => {
|
||||
@ -2359,26 +2053,6 @@ Page({
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 发布者身份
|
||||
// if (element.field == 'intermediary') {
|
||||
// element.choices.forEach((el, index) => {
|
||||
// if (el.value == newinfo.intermediary) {
|
||||
// newinfo.intermediary = el.key
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
// 所在区域
|
||||
// if (element.field == 'location') {
|
||||
// this.data.fieldinfoNew[element.field].choices.forEach(el => {
|
||||
// el.choices.forEach(e => {
|
||||
// if (newinfo.location && newinfo.location.indexOf(e.value) >= 0) {
|
||||
// newinfo.location = e.key
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// }
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,6 @@
|
||||
<view class="edit-box">
|
||||
<view class="edit-top" wx:if="{{ false }}">
|
||||
<image class="edit-top-img" mode="widthFix" src="/img/u706.png"></image>
|
||||
<!-- {{ newcity.country }} <view class="clickInputLeftArrow"></view> {{ newcity.name }} -->
|
||||
{{ newcity.name }}
|
||||
</view>
|
||||
|
||||
@ -208,15 +207,6 @@
|
||||
</view>
|
||||
|
||||
</block>
|
||||
<!-- <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">
|
||||
@ -333,48 +323,6 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- 房屋视频 -->
|
||||
<template name="homeVideo">
|
||||
<view class="homeVideo-box">
|
||||
<view class="homeVideo-title">房屋视频(最多可上传3个,不大于5M/个)</view>
|
||||
|
||||
<view class="flexflex homeVideo-list">
|
||||
<!-- 展示视频 -->
|
||||
<view class="homeVideo-add" wx:for="{{ videos }}" wx:key="index">
|
||||
<video class="homeVideo-add-video" show-center-play-btn="{{false}}" show-fullscreen-btn="{{ false }}" show-play-btn="{{ false }}" initial-time="0" src="{{ item.url || item.image}}"></video>
|
||||
<image class="homeVideo-videoplay" src="/img/videoplay.png"></image>
|
||||
<view class="close-btn" catchtap="del_pic" data-index="{{index}}" data-box="video">
|
||||
<image src="/img/plusf.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 上传按钮 -->
|
||||
<view class="homeVideo-add" bindtap="get_video" wx:if="{{ videos.length != 3 }}">
|
||||
<image class="homeVideo-add-img" src="/img/plusgrey.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- 房屋照片 -->
|
||||
<template name="homePhoto">
|
||||
<view class="homePhoto-box">
|
||||
<view class="homePhoto-title">房屋照片(最多可上传9张,不大于5M/张)</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 != 9 }}">
|
||||
<image class="homePhoto-add-icon" src="/img/plusgrey.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- 弹窗一列 -->
|
||||
<template name="AListOF">
|
||||
<view class="AListOF pop-up" catchtouchmove="handScroll">
|
||||
@ -399,7 +347,6 @@
|
||||
<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> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</view>
|
||||
<view class="pop-up-title">{{ item.title || popUpTitle }}</view>
|
||||
@ -421,7 +368,6 @@
|
||||
<view class="clickInputLeftArrow"></view>
|
||||
</view>
|
||||
<view class="pop-up-top" bindtap="closePopUp">
|
||||
<!-- <view class="pop-up-arrow"></view> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</view>
|
||||
<view class="pop-up-title">{{ item.title == '月租' ? '月租金额' : item.title }}</view>
|
||||
@ -483,89 +429,6 @@
|
||||
</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> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</view>
|
||||
<view class="pop-up-title">房屋视频</view>
|
||||
<text class="last-step-text">最多可上传3个,不大于5M/个</text>
|
||||
|
||||
<view class="flexacenter homeVideo-case">
|
||||
<!-- 展示视频的 -->
|
||||
<view class="homeVideo-add" wx:for="{{ videos }}" wx:key="index">
|
||||
<video class="homeVideo-add-video" show-center-play-btn="{{false}}" show-fullscreen-btn="{{ false }}" show-play-btn="{{ false }}" initial-time="0" src="{{ item.url || item.image }}"></video>
|
||||
<image class="homeVideo-videoplay" src="/img/videoplay.png"></image>
|
||||
<view class="close-btn" catchtap="del_pic" data-index="{{ index }}" data-box="video">
|
||||
<image src="/img/plusf.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 没有视频时候的空白 -->
|
||||
<block wx:if="{{ videos.length < 2 }}">
|
||||
<view class="homeVideo-add" wx:for="{{ videos.length == 1 ? 1 : 2 }}" style="background: #fff;" wx:key="index"></view>
|
||||
</block>
|
||||
|
||||
<!-- 上传视频按钮 -->
|
||||
<view class="homeVideo-add" bindtap="get_video" wx:if="{{ videos.length != 3 }}">
|
||||
<image class="homeVideo-add-img" src="/img/plusgrey.png"></image>
|
||||
</view>
|
||||
</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">
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</view>
|
||||
<view class="pop-up-title">房屋照片</view>
|
||||
<text class="last-step-text">最多可上传6张,不大于5M</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="{{ 8 - imgs.length }}" wx:key="index">
|
||||
</view>
|
||||
<view class="homePhoto-add" bindtap="get_img" wx:if="{{ imgs.length != 9 }}">
|
||||
<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">
|
||||
@ -628,7 +491,6 @@
|
||||
<view class="clickInputLeftArrow"></view>
|
||||
</view>
|
||||
<view class="pop-up-top" bindtap="closePopUp">
|
||||
<!-- <view class="pop-up-arrow"></view> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</view>
|
||||
<view class="pop-up-title">{{ item.title }}</view>
|
||||
@ -659,7 +521,6 @@
|
||||
<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> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</view>
|
||||
<view class="pop-up-title">联系方式</view>
|
||||
@ -729,7 +590,6 @@
|
||||
<view class="ofDate pop-up">
|
||||
<view class="pop-up-box">
|
||||
<view class="pop-up-top" bindtap="closePopUp">
|
||||
<!-- <view class="pop-up-arrow"></view> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</view>
|
||||
<view class="pop-up-title">选择租期</view>
|
||||
@ -777,7 +637,6 @@
|
||||
<view class="area pop-up">
|
||||
<view class="pop-up-box">
|
||||
<view class="pop-up-top" bindtap="closePopUp">
|
||||
<!-- <view class="pop-up-arrow"></view> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</view>
|
||||
<view class="pop-up-title">
|
||||
@ -864,26 +723,6 @@
|
||||
</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">
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</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>
|
||||
|
@ -242,6 +242,7 @@
|
||||
font-weight: 650;
|
||||
font-size: 36rpx;
|
||||
color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.footer-btn .save1 {
|
||||
@ -249,7 +250,7 @@
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
font-weight: 400;
|
||||
border: 1rpx solid rgba(215, 215, 215, 1);
|
||||
border: 2rpx solid rgba(215, 215, 215, 1);
|
||||
}
|
||||
|
||||
.trigger-rules-close-icon {
|
||||
@ -582,7 +583,7 @@
|
||||
background-color: #fff;
|
||||
border-radius: 82.5rpx;
|
||||
font-size: 36rpx;
|
||||
border: 1rpx solid rgba(215, 215, 215, 1);
|
||||
border: 2rpx solid rgba(215, 215, 215, 1);
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
@ -591,7 +592,7 @@
|
||||
color: #fff;
|
||||
font-weight: 650;
|
||||
margin-left: 30rpx;
|
||||
border: 1rpx solid rgba(98, 177, 255, 1);
|
||||
border: 2rpx solid rgba(98, 177, 255, 1);
|
||||
}
|
||||
|
||||
.twoLines-option {
|
||||
|
@ -355,7 +355,6 @@
|
||||
<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> -->
|
||||
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
|
||||
</view>
|
||||
<view class="pop-up-title">{{ item.title || popUpTitle }}</view>
|
||||
|
@ -233,14 +233,15 @@
|
||||
}
|
||||
|
||||
.footer-btn .submit {
|
||||
flex: 1;
|
||||
/* flex: 1; */
|
||||
width: 330rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
/* height: 90rpx; */
|
||||
/* line-height: 90rpx; */
|
||||
height: 96rpx;
|
||||
line-height: 96rpx;
|
||||
/* line-height: 96rpx; */
|
||||
background-color: rgba(98, 177, 255, 1);
|
||||
/* background-color: #333333; */
|
||||
/* box-shadow: rgb(0 0 0 / 35%) 0px 0px 10rpx; */
|
||||
@ -254,11 +255,11 @@
|
||||
}
|
||||
|
||||
.footer-btn .save1 {
|
||||
margin-right: 30rpx;
|
||||
/* margin-right: 30rpx; */
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
font-weight: 400;
|
||||
border: 1rpx solid rgba(215, 215, 215, 1);
|
||||
border: 2rpx solid rgba(215, 215, 215, 1);
|
||||
}
|
||||
|
||||
.trigger-rules-close-icon {
|
||||
@ -603,7 +604,7 @@
|
||||
background-color: #fff;
|
||||
border-radius: 82.5rpx;
|
||||
font-size: 36rpx;
|
||||
border: 1rpx solid rgba(215, 215, 215, 1);
|
||||
border: 2rpx solid rgba(215, 215, 215, 1);
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
@ -612,7 +613,7 @@
|
||||
color: #fff;
|
||||
font-weight: 650;
|
||||
margin-left: 30rpx;
|
||||
border: 1rpx solid rgba(98, 177, 255, 1);
|
||||
border: 2rpx solid rgba(98, 177, 255, 1);
|
||||
}
|
||||
|
||||
.twoLines-option {
|
||||
|
@ -1,53 +0,0 @@
|
||||
let socketMsgQueue = ["测试"];
|
||||
|
||||
function sendSocketMessage(msg) {
|
||||
wx.sendSocketMessage({
|
||||
data: msg
|
||||
})
|
||||
}
|
||||
Page({
|
||||
data: {
|
||||
html: ""
|
||||
},
|
||||
/**
|
||||
* 连接
|
||||
*/
|
||||
handleConnect() {
|
||||
console.log("触发");
|
||||
wx.connectSocket({
|
||||
url: 'ws:81.69.170.111:4000',
|
||||
header: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
complete: res => {
|
||||
console.log(res);
|
||||
}
|
||||
})
|
||||
// 监听
|
||||
wx.onSocketOpen((result) => {
|
||||
console.log("websocket连接已打开");
|
||||
for (let i = 0; i < socketMsgQueue.length; i++) {
|
||||
// 发送数据
|
||||
sendSocketMessage(socketMsgQueue[i])
|
||||
}
|
||||
socketMsgQueue = [];
|
||||
})
|
||||
// 失败监控
|
||||
wx.onSocketError((result) => {
|
||||
console.log("websocket连接失败", result);
|
||||
})
|
||||
// 监听服务器的数据返回
|
||||
wx.onSocketMessage((result) => {
|
||||
console.log("服务器的数据返回", result);
|
||||
this.setData({
|
||||
html: result.data
|
||||
});
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 输入的内容
|
||||
*/
|
||||
handleInput(val) {
|
||||
socketMsgQueue.push(val.detail.value);
|
||||
}
|
||||
})
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
<!--pages/shishi/shishi.wxml-->
|
||||
<text>pages/shishi/shishi.wxml</text>
|
||||
<view class="send-content">
|
||||
<text>发送内容:</text>
|
||||
<input class="weui-input" auto-focus type="text" bindinput="handleInput"></input>
|
||||
</view>
|
||||
<button class="send-btn" type="primary" bindtap="handleConnect">websocket连接测试</button>
|
||||
<rich-text nodes="{{html}}"></rich-text>
|
@ -1,4 +0,0 @@
|
||||
/* pages/shishi/shishi.wxss */
|
||||
.send-content {
|
||||
margin-top: 200rpx;
|
||||
}
|
@ -219,7 +219,6 @@
|
||||
</view>
|
||||
|
||||
<!-- 图片和视频 -->
|
||||
<!-- <view class="media-box" wx:if="{{ !(info.video.length == 0 && info.picturegroup.length == 0) }}"> -->
|
||||
<view class="media-box" wx:if="{{ info.video && info.video.length != 0 && info.picturegroup && info.picturegroup.length != 0 }}">
|
||||
<view class="media-header">
|
||||
<block wx:if="{{ info.video.length != 0 }}">
|
||||
@ -379,7 +378,8 @@
|
||||
<block wx:else>
|
||||
<view class='toptips'>
|
||||
<view class='i'>
|
||||
<image class='eye' src="../../img/eye.png" />{{ info.count_view*1 + thread.views*1 || '-' }}
|
||||
<!-- <image class='eye' src="../../img/eye.png" />{{ info.count_view*1 + thread.views*1 || '-' }} -->
|
||||
<image class='eye' src="../../img/eye.png" />{{ info.count_view || '-' }}
|
||||
</view>
|
||||
<view class='i'>
|
||||
<image class='star' src="../../img/star.png" />{{ info.count_fav }}
|
||||
@ -691,7 +691,11 @@
|
||||
<template name="HResource-detail-tier1">
|
||||
<view class="HResource-detail-tier">
|
||||
<view class="HResource-detail-name">{{ name }}</view>
|
||||
<view class="HResource-detail-value flexacenter">{{ value1 }} <view class="HResource-detail-vertical"></view>{{ value2 }}</view>
|
||||
<view class="HResource-detail-value flexacenter">{{ value1 }}
|
||||
<block wx:if="{{ value2 }}">
|
||||
<view class="HResource-detail-vertical"></view>{{ value2 }}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<!-- 香港房源的详细详细表格 整租、 房屋类型 楼层 -->
|
||||
@ -741,7 +745,7 @@
|
||||
<!-- 浏览量等 -->
|
||||
<template name="HResourceState">
|
||||
<view class="HResourceState">
|
||||
<view class="HResourceState-item">浏览:{{ info.count_view*1 + thread.views*1 || '-' }}</view>
|
||||
<view class="HResourceState-item">浏览:{{ info.count_view || '-' }}</view>
|
||||
<view class="HResourceState-item">发布:{{ info.timestamp }}</view>
|
||||
<view class="HResourceState-item">更新:{{ info.updatetime }}</view>
|
||||
</view>
|
||||
|
@ -1,66 +0,0 @@
|
||||
// pages/test/test.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
<!--pages/test/test.wxml-->
|
||||
<text>pages/test/test.wxml</text>
|
||||
|
||||
<!-- <image src="/img/1.jpeg" class="img" mode="widthFix" show-menu-by-longpress="true"></image>
|
||||
<image src="/img/2.png" class="img" mode="widthFix" show-menu-by-longpress="true"></image>
|
||||
<image src="/img/3.png" class="img" mode="widthFix" show-menu-by-longpress="true"></image>
|
||||
<image src="/img/4.jpeg" class="img" mode="widthFix" show-menu-by-longpress="true"></image>
|
||||
<image src="/img/5.jpeg" class="img" mode="widthFix" show-menu-by-longpress="true"></image>
|
||||
<image src="/img/6.jpeg" class="img" mode="widthFix" show-menu-by-longpress="true"></image> -->
|
@ -1,6 +0,0 @@
|
||||
/* pages/test/test.wxss */
|
||||
.img{
|
||||
width: 90vw;
|
||||
height: 90vw;
|
||||
margin-top: 40px;
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
<import src="../common/common.wxml" />
|
||||
<import src="../../wxParse/wxParse.wxml" />
|
||||
<view class="container" wx:if="{{ !loding }}">
|
||||
<header-nav inner-text="Some text" isIndexPage="index" isMessageCount="true" unreadMessages="{{ unreadMessages }}" bindunreadMessagesalter="unreadMessagesalter">
|
||||
<header-nav inner-text="Some text" isIndexPage="index" isMessageCount="true" unreadMessages="{{ unreadMessages }}" bindunreadMessagesalter="unreadMessagesalter" bgcolor="transparent" position="{{ 'absolute' }}">
|
||||
<view>寄托香港租房</view>
|
||||
</header-nav>
|
||||
|
||||
@ -13,6 +13,48 @@
|
||||
<view wx:for="{{ item }}" wx:key="i" wx:for-item="it" wx:for-index="i"></view>
|
||||
</view>
|
||||
|
||||
<view class="header-new" style="margin-top: -{{ screen_data.totalTopHeight }}px;">
|
||||
<view class="header-message flexacenter">
|
||||
<view class="header-user-message flexacenter">
|
||||
<view class="header-user-avatar">
|
||||
<image class="header-user-avatar-icon" src="{{ user.avatar }}"></image>
|
||||
</view>
|
||||
<view class="header-user-info flexflex">
|
||||
<view class="header-user-name flexacenter">Ada.Wu</view>
|
||||
<view class="header-user-uid flexacenter">UID:56789</view>
|
||||
</view>
|
||||
</view>
|
||||
<button open-type="contact" class='contact' bindcontact="bindcontact">
|
||||
<image class="contact-icon" src="/img/u1872.png" mode="widthFix"></image>
|
||||
反馈
|
||||
</button>
|
||||
</view>
|
||||
<view class="header-btn flexacenter">
|
||||
<view class="header-btn-item flex1 flexcenter">
|
||||
<view class="header-btn-box message-reminding flexcenter">
|
||||
<image class="header-btn-icon" mode="widthFix" src="/img/message-reminding.svg"></image>
|
||||
</view>
|
||||
<view class="header-btn-text">消息提醒</view>
|
||||
</view>
|
||||
<view class="header-btn-item flex1 flexcenter">
|
||||
<view class="header-btn-box issue-housing flexcenter">
|
||||
<image class="header-btn-icon" mode="widthFix" src="/img/plus-3.png"></image>
|
||||
</view>
|
||||
<view class="header-btn-text">发布房源</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="list-new">
|
||||
<view class="list-new-top">
|
||||
<view class="list-new-top-item">
|
||||
|
||||
收藏</view>
|
||||
<view class="list-new-top-item"></view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class='header'>
|
||||
<view class="user-box">
|
||||
<view class="info">
|
||||
|
@ -274,7 +274,7 @@
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.header .contact .contact-icon {
|
||||
.contact .contact-icon {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
margin: 0;
|
||||
@ -790,4 +790,89 @@
|
||||
.authentication-icon {
|
||||
width: 125rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
|
||||
|
||||
.header-new {
|
||||
background: linear-gradient(21.8146326062447deg, rgba(224, 240, 255, 1) 21%, rgba(98, 177, 255, 1) 141%);
|
||||
padding-top: 253.5rpx;
|
||||
padding-bottom: 36rpx;
|
||||
}
|
||||
|
||||
.header-new .header-message {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.header-new .header-message .header-user-info {
|
||||
color: #000000;
|
||||
flex-direction: column;
|
||||
margin-left: 18rpx;
|
||||
}
|
||||
|
||||
.header-new .header-message .header-user-name {
|
||||
font-size: 30rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
|
||||
.header-new .header-message .header-user-uid {
|
||||
font-size: 24rpx;
|
||||
height: 39rpx;
|
||||
}
|
||||
|
||||
.header-new .header-user-avatar {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
margin-left: 33rpx;
|
||||
}
|
||||
|
||||
.header-new .header-user-avatar .header-user-avatar-icon {
|
||||
border-radius: 50%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.header-new .header-btn {
|
||||
width: 690rpx;
|
||||
height: 180rpx;
|
||||
margin: 63rpx auto 0;
|
||||
background-color: rgba(255, 255, 255, 0.3);
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.header-new .header-btn .header-btn-item {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.header-new .header-btn .header-btn-item:first-of-type {
|
||||
border-right: 2rpx solid #cbe5ff;
|
||||
}
|
||||
|
||||
.header-new .header-btn .message-reminding .header-btn-icon {
|
||||
width: 48rpx;
|
||||
height: 42rpx;
|
||||
}
|
||||
|
||||
.header-new .header-btn .message-reminding {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
border-radius: 12rpx;
|
||||
background-color: rgba(80, 227, 194, 1);
|
||||
}
|
||||
|
||||
.header-new .header-btn .header-btn-text {
|
||||
font-size: 24rpx;
|
||||
color: #555555;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
|
||||
.header-new .header-btn .issue-housing {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
background-color: rgba(253, 223, 109, 1);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.header-new .header-btn .issue-housing .header-btn-icon {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
}
|
@ -1,442 +0,0 @@
|
||||
const app = getApp();
|
||||
|
||||
|
||||
/*
|
||||
小程序利用canvas实现一键保存图片功能
|
||||
https://blog.csdn.net/Charles_Tian/article/details/80910616 */
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
cname: '',
|
||||
renwu: '',
|
||||
yuyan: '',
|
||||
fan: '',
|
||||
xg: '',
|
||||
imgurl: '', //人物头像
|
||||
canvasHidden: true, //设置画板的显示与隐藏,画板不隐藏会影响页面正常显示
|
||||
wxappName: '页面生成图片', //小程序名称
|
||||
shareImgPath: '',
|
||||
screenWidth: '', //设备屏幕宽度
|
||||
shareImgSrc: '',
|
||||
|
||||
},
|
||||
infoShow: function () {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.api_url + 'rest/findProgram/36',
|
||||
method: 'GET',
|
||||
header: { 'Accept': 'application/json' },
|
||||
success: function (res) {
|
||||
|
||||
WxParse.wxParse('article_content', 'html', res.data.errMsg.s_remark, that, 5) //获取详细信息 res.data.content详细信息数据
|
||||
that.setData({
|
||||
info: res.data.errMsg
|
||||
// article_content: WxParse.wxParse('article_content', 'html', res.data.errMsg.n_remark, that, 5) //获取详细信息 res.data.content详细信息数据
|
||||
})
|
||||
wx.setStorageSync('cmsinfo', res.data.errMsg)
|
||||
},
|
||||
//接口调用失败的回调函数
|
||||
fail: function (res) {
|
||||
var newData = wx.getStorageInfoSync('cmsinfo')
|
||||
if (newData) {
|
||||
obj.setData({ info: newData })
|
||||
}
|
||||
that.setData({ toastHidden: false, msg: '当前网格异常,请稍后再试' })
|
||||
},
|
||||
//口调用结束的回调函数(调用成功、失败都会执行)
|
||||
complete: function () {
|
||||
//显示出加载中的提示
|
||||
that.setData({ loadHidden: true })
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
this.infoShow();
|
||||
var that = this;
|
||||
|
||||
wx.getImageInfo({
|
||||
src: '../../images/bj.png',
|
||||
success: function (res) {
|
||||
console.log(res)
|
||||
that.setData({
|
||||
shareImgSrc: '../../' + res.path
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
wx.getImageInfo({
|
||||
src: '../../images/11.png',
|
||||
success: function (res) {
|
||||
console.log(res)
|
||||
that.setData({
|
||||
shareImgPath: '../../' + res.path
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
//获取用户设备信息,屏幕宽度
|
||||
wx.getSystemInfo({
|
||||
success: res => {
|
||||
that.setData({
|
||||
screenWidth: res.screenWidth
|
||||
})
|
||||
console.log(that.data.screenWidth)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
that.setData({
|
||||
cname: options.id
|
||||
});
|
||||
var yuyan = new Array('多注意外表,近期将有桃花运', '不要留钱在手,近期将走财运', '留意新认识的人,将遇改变人生的贵人', '走路留意,可能会走狗屎运', '放开吃喝,三个月内你不会发胖', '身边有人正在准备一个惊喜给你');
|
||||
var c = Math.floor(Math.random() * 6);
|
||||
var renwu = new Array('富察容音', '弘历', '魏璎珞', '娴妃', '高贵妃', '叶太医', '富察·傅恒', '海兰察', '陆晚晚', '明玉');
|
||||
var a = Math.floor(Math.random() * 6);
|
||||
var fan = new Array('因皇子去世一直耿耿于怀,内心苦闷。富察容音常有胸闷、乳房疼痛的症状,是情志失意导致的乳腺问题。', '前朝政务繁多,后宫妃嫔争宠,后宫女人几乎都有乳腺困扰,皇上命叶太医制出乳丹,帮助解决嫔妃的乳腺问题。', '长期想着复仇,情志不畅,所以月经紊乱,乳房有肿块都不知道。幸得叶太医乳丹相助,帮其解决乳腺问题。', '不能保家人周全,无奈黑化,也一直深受乳腺问题的烦恼。', '唯恐失去皇上宠爱,天天苦于宫斗,饱受乳腺问题烦恼。', '苦于没有疑难杂症给他医治,后被皇上指派解决嫔妃的乳腺问题,研发出乳丹。', '因为没有和心爱的女人在一起,从而抱恨终身。', '心爱的女人在成亲当天自杀,让海兰察心痛一生。', '自身实力与家庭背景都很薄弱,不求富贵,只求安保。', '因体内被纯贵妃扎的针重伤加之受顺嫔挑唆,以金剪插心,自尽而亡。');
|
||||
var xg = new Array('内心温柔,心胸宽广,最终别人,也能得到别人尊重。', '爱憎分明、内心骄傲,做人做事不会选择将就。', '客观理智、内心透彻,内心善良富有正义,重视承诺。', '追求单纯但是内心又自卑,遇到失望的事情,会变得偏执。', '喜形于色,为人处世情绪化,从不压抑内心想法。', '本是江湖游医却救阿哥、激皇上(治病)、怼太医,萌萌的外表下藏着一颗济世救人的医者仁心。', '深得皇上的宠爱和重视,表面上看是一个冷清的人,实际上是一个专情热血的男子。', '心性善良,智勇双全,屡经战阵,注重研习兵法,受众尊崇的将领。', '温婉贤淑的大家闺秀,才貌出众,天性善良,不争名利,清新脱俗。', '性格直爽,忠肝义胆,说话毒舌但是心地善良。');
|
||||
var img = new Array('http://login.pink333.com/uploads/20180828/4c9b626b59d6a0b38a03089d1da4d906.jpg',
|
||||
'http://login.pink333.com/uploads/20180828/d942b0f1bccc4e6c6081bd5f3398fd4e.jpg',
|
||||
'http://login.pink333.com/uploads/20180828/29af4184e336f82a38ecd3de07a01569.jpg',
|
||||
'http://login.pink333.com/uploads/20180828/eacea6d98f57fdcda835003fd8734c14.jpg',
|
||||
'http://login.pink333.com/uploads/20180828/9416f7ac87e99efd8a179dedec15d0c0.jpg',
|
||||
'http://login.pink333.com/uploads/20180828/1ee16bba3d950f8fce32d8e6d01025b3.jpg',
|
||||
'http://login.pink333.com/uploads/20180828/2114ed95f319b23afa498b6064b90517.jpg',
|
||||
'http://login.pink333.com/uploads/20180828/07682aa82440bd48bec9cfcdf8830fb0.jpg',
|
||||
'http://login.pink333.com/uploads/20180828/2f71cd25f32922035c08071042cda134.jpg',
|
||||
'http://login.pink333.com/uploads/20180828/ff6f46a6ad3c15200f1d380aa1ccde25.jpg');
|
||||
|
||||
if (a == 0) {
|
||||
that.setData({
|
||||
fan: fan[0],
|
||||
xg: xg[0],
|
||||
});
|
||||
wx.getImageInfo({
|
||||
src: '../../images/fcry.png',
|
||||
success: function (res) {
|
||||
console.log(res)
|
||||
that.setData({
|
||||
imgurl: '../../' + res.path
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
if (a == 1) {
|
||||
that.setData({
|
||||
fan: fan[1],
|
||||
xg: xg[1]
|
||||
});
|
||||
wx.getImageInfo({
|
||||
src: '../../images/hl.png',
|
||||
success: function (res) {
|
||||
console.log(res)
|
||||
that.setData({
|
||||
imgurl: '../../' + res.path
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
if (a == 2) {
|
||||
that.setData({
|
||||
fan: fan[2],
|
||||
xg: xg[2]
|
||||
});
|
||||
wx.getImageInfo({
|
||||
src: '../../images/wyl.png',
|
||||
success: function (res) {
|
||||
console.log(res)
|
||||
that.setData({
|
||||
imgurl: '../../' + res.path
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
if (a == 3) {
|
||||
that.setData({
|
||||
fan: fan[3],
|
||||
xg: xg[3]
|
||||
});
|
||||
wx.getImageInfo({
|
||||
src: '../../images/xf.jpg',
|
||||
success: function (res) {
|
||||
console.log(res)
|
||||
that.setData({
|
||||
imgurl: '../../' + res.path
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
if (a == 4) {
|
||||
that.setData({
|
||||
fan: fan[4],
|
||||
xg: xg[4]
|
||||
});
|
||||
wx.getImageInfo({
|
||||
src: '../../images/ggf.png',
|
||||
success: function (res) {
|
||||
console.log(res)
|
||||
that.setData({
|
||||
imgurl: '../../' + res.path
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
if (a == 5) {
|
||||
that.setData({
|
||||
fan: fan[5],
|
||||
xg: xg[5]
|
||||
});
|
||||
wx.getImageInfo({
|
||||
src: '../../images/yty.png',
|
||||
success: function (res) {
|
||||
console.log(res)
|
||||
that.setData({
|
||||
imgurl: '../../' + res.path
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
if (a == 6) {
|
||||
that.setData({
|
||||
fan: fan[6],
|
||||
xg: xg[6]
|
||||
});
|
||||
wx.getImageInfo({
|
||||
src: '../../images/fcfh.jpg',
|
||||
success: function (res) {
|
||||
console.log(res)
|
||||
that.setData({
|
||||
imgurl: '../../' + res.path
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
if (a == 7) {
|
||||
that.setData({
|
||||
fan: fan[7],
|
||||
xg: xg[7]
|
||||
});
|
||||
wx.getImageInfo({
|
||||
src: '../../images/hnc.png',
|
||||
success: function (res) {
|
||||
console.log(res)
|
||||
that.setData({
|
||||
imgurl: '../../' + res.path
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
if (a == 8) {
|
||||
that.setData({
|
||||
fan: fan[8],
|
||||
xg: xg[8]
|
||||
});
|
||||
wx.getImageInfo({
|
||||
src: '../../images/lww.png',
|
||||
success: function (res) {
|
||||
console.log(res)
|
||||
that.setData({
|
||||
imgurl: '../../' + res.path
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
if (a == 9) {
|
||||
that.setData({
|
||||
fan: fan[9],
|
||||
xg: xg[9]
|
||||
});
|
||||
wx.getImageInfo({
|
||||
src: '../../images/my.png',
|
||||
success: function (res) {
|
||||
console.log(res)
|
||||
that.setData({
|
||||
imgurl: '../../' + res.path
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
that.setData({
|
||||
yuyan: yuyan[c],
|
||||
renwu: renwu[a]
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
var that = this;
|
||||
var context = wx.createCanvasContext('share')
|
||||
context.setStrokeStyle("#00ff00")
|
||||
context.setLineWidth(1)
|
||||
context.stroke()
|
||||
context.draw(false, this.getTempFilePath)
|
||||
},
|
||||
|
||||
//获取临时路径
|
||||
getTempFilePath: function () {
|
||||
wx.canvasToTempFilePath({
|
||||
canvasId: 'share',
|
||||
success: (res) => {
|
||||
this.setData({
|
||||
shareTempFilePath: res.tempFilePath
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 绘制多行文本,考虑到内容过多可能会显示不全,这里增加一个函数
|
||||
*/
|
||||
drawText: function (ctx, str, leftWidth, initHeight, titleHeight, canvasWidth) {
|
||||
var lineWidth = 0;
|
||||
var lastSubStrIndex = 0; //每次开始截取的字符串的索引
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
lineWidth += ctx.measureText(str[i]).width;
|
||||
if (lineWidth > canvasWidth) {
|
||||
ctx.fillText(str.substring(lastSubStrIndex, i), leftWidth, initHeight); //绘制截取部分
|
||||
initHeight += 16; //16为字体的高度
|
||||
lineWidth = 0;
|
||||
lastSubStrIndex = i;
|
||||
titleHeight += 30;
|
||||
}
|
||||
if (i == str.length - 1) { //绘制剩余部分
|
||||
ctx.fillText(str.substring(lastSubStrIndex, i + 1), leftWidth, initHeight);
|
||||
}
|
||||
}
|
||||
// 标题border-bottom 线距顶部距离
|
||||
titleHeight = titleHeight + 10;
|
||||
return titleHeight
|
||||
},
|
||||
|
||||
//保存至相册
|
||||
saveImageToPhotosAlbum: function () {
|
||||
var that = this;
|
||||
var unit = that.data.screenWidth / 375
|
||||
//2. canvas绘制文字和图片
|
||||
const ctx = wx.createCanvasContext('share');
|
||||
var bgImgPath = that.data.shareImgSrc;
|
||||
var fanstr = '前世烦恼:' + that.data.fan;
|
||||
var rwxg = '人物性格:' + that.data.xg;
|
||||
//这里是把页面上的数据写入到画布里,具体的坐标需要各位自行调整
|
||||
ctx.drawImage(bgImgPath, 0, 0, 375, 580);
|
||||
ctx.drawImage(that.data.shareImgPath, 50, 450, 284, 80);
|
||||
ctx.drawImage(that.data.imgurl, 146, 100, 100, 100);
|
||||
ctx.setFontSize(13)
|
||||
ctx.setFillStyle('#5e7436')
|
||||
ctx.fillText('姓名:' + that.data.cname, 50, 241)
|
||||
ctx.fillText('人物匹配:' + that.data.renwu, 50, 271);
|
||||
ctx.fillText('近期预言:' + that.data.yuyan, 50, 300);
|
||||
|
||||
this.drawText(ctx, fanstr, 50, 330, 145, 280);
|
||||
this.drawText(ctx, rwxg, 50, 400, 145, 280);
|
||||
//ctx.fillText('前世烦恼:' + that.data.fan, 50, 330);
|
||||
//ctx.fillText('人物性格:' + that.data.xg, 50, 360);
|
||||
ctx.stroke()
|
||||
ctx.draw(false, function () {
|
||||
// 3. canvas画布转成图片
|
||||
wx.canvasToTempFilePath({
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: 375,
|
||||
height: 580,
|
||||
destWidth: 375,
|
||||
destHeight: 580,
|
||||
canvasId: 'share',
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
that.setData({
|
||||
shareImgSrc: res.tempFilePath
|
||||
})
|
||||
if (!res.tempFilePath) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '图片绘制中,请稍后重试',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
//4. 当用户点击分享到朋友圈时,将图片保存到相册
|
||||
wx.saveImageToPhotosAlbum({
|
||||
filePath: that.data.shareImgSrc,
|
||||
success(res) {
|
||||
console.log(res);
|
||||
wx.showModal({
|
||||
title: '图片保存成功',
|
||||
content: '图片成功保存到相册了,去发圈噻~',
|
||||
showCancel: false,
|
||||
confirmText: '好哒',
|
||||
confirmColor: '#72B9C3',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
}
|
||||
that.setData({
|
||||
canvasHidden: true
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
const that = this;
|
||||
wx.downloadFile({
|
||||
url: that.data.shareImgSrc,
|
||||
success: function (res) {
|
||||
that.data.shareImgSrc = res.tempFilePath
|
||||
}, fail: function (res) {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
// onShareAppMessage: function () {
|
||||
|
||||
// }
|
||||
})
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
<canvas canvas-id='share' style='width:375px;height:580px' hidden='{{canvasHidden}}'></canvas>
|
||||
<view class='container-main'>
|
||||
<view class='am-title'>点击图片预览后,长按或点击右上角保存分享</view>
|
||||
|
||||
<view class='point-img'>
|
||||
<image src='../../images/bj.png' class='bjt'></image>
|
||||
<view class="point-container">
|
||||
<view class="am-img"><image src='{{imgurl}}'></image></view>
|
||||
<view class='am-cname'>姓名:<text>{{cname}}</text></view>
|
||||
<view class='am-yuyan'>近期预言:<text>{{yuyan}}</text></view>
|
||||
<view class='am-renwu'>人物匹配:<text>{{renwu}}</text></view>
|
||||
<view class='am-fan'>前世烦恼:<text>{{fan}}</text></view>
|
||||
<view class='am-xg'>人物性格:<text>{{xg}}</text></view>
|
||||
<view class="content"><image src='../../images/11.png' class='seal'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class='am-div'></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class='am-footer'>
|
||||
<button open-type="share" data-tag="share1" id="btn_share1">转发</button>
|
||||
<button bindtap='saveImageToPhotosAlbum'>保存图片</button>
|
||||
|
||||
</view>
|
@ -1,26 +0,0 @@
|
||||
.container-main {width:100%;}
|
||||
.am-title {background-color:#96c9ca; height:70rpx;line-height:70rpx; text-align: center; color:#ffffff;
|
||||
font-family: PingFangSC-Light,helvetica,'Heiti SC';font-size:.9rem;}
|
||||
|
||||
.point-img { width:100%;height:100%;}
|
||||
.bjt {width:100%; height:85%; position: absolute; z-index: -1;}
|
||||
.am-title2 {font-size:1.6rem;padding-top:20px;padding-bottom:20px;font-weight:bold; text-align: center;color:#ffffff;}
|
||||
.seal {width:284px;height:80px;position: absolute;left:5%;}
|
||||
|
||||
.point-container {top:20vh;text-align: left;font-size:1.0rem;border-radius: 10rpx; position: absolute;
|
||||
margin:10px;padding:10px;margin-top:0px;color:#5e7436;}
|
||||
.am-img {text-align: center;left:35vw;}
|
||||
.am-img image {width:200rpx;height:200rpx;}
|
||||
.point-container text {font-weight:bold;}
|
||||
.point-container .am-cname {padding-top:15rpx; padding-left:20rpx;padding-right:20rpx;}
|
||||
.point-container .am-yuyan {padding-top:15rpx; padding-left:20rpx;padding-right:20rpx;}
|
||||
.point-container .am-renwu {padding-top:15rpx;padding-left:20rpx;padding-right:20rpx;}
|
||||
.point-container .am-fan {padding-top:15rpx;padding-left:20rpx;padding-right:20rpx;}
|
||||
.point-container .am-xg {padding-top:15rpx;padding-left:20rpx;padding-right:20rpx;}
|
||||
|
||||
.content {margin:15rpx auto; text-align: left;}
|
||||
.am-div {height:20rpx;}
|
||||
.am-footer {display:flex;height: 100rpx;width: 100%; text-align: center;position: absolute;bottom:-5px;left:0;}
|
||||
.am-footer button {border:#ff6a38 1px solid; border-radius:20rpx; width:300rpx;
|
||||
height: 70rpx; text-align: center; line-height:70rpx;
|
||||
font-size: 30rpx;background-color:#ffffff; letter-spacing:2px;color: #E97855;}
|
@ -15,7 +15,8 @@ Component({
|
||||
isMessageCount: Boolean,
|
||||
unreadMessages: Number,
|
||||
isMessage: Boolean,
|
||||
bgcolor: String
|
||||
bgcolor: String,
|
||||
position: String, // css 定位方式
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -3,7 +3,7 @@
|
||||
<view>
|
||||
<new-features></new-features>
|
||||
<view class="NavBar-holder" style="height:{{screen_data.totalTopHeight}}px"></view>
|
||||
<view class="NavBar" style="height:{{screen_data.totalTopHeight}}px;background-color: {{ bgcolor }};">
|
||||
<view class="NavBar" style="height:{{screen_data.totalTopHeight}}px;background-color: {{ bgcolor }};position:{{ position }};">
|
||||
<view class="NavBar-statusBar" style="height:{{screen_data.statusBarHeight}}px"></view>
|
||||
<view class="NavBar-titlebar" style="height:{{screen_data.titleBarHeight}}px">
|
||||
<view class="NavBar-content">
|
||||
|
Loading…
x
Reference in New Issue
Block a user