diff --git a/app.json b/app.json index 9e342a6..45faabf 100644 --- a/app.json +++ b/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", diff --git a/img/message-reminding.svg b/img/message-reminding.svg new file mode 100644 index 0000000..f431cf7 --- /dev/null +++ b/img/message-reminding.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/askHousing copy/askHousing.js b/pages/askHousing copy/askHousing.js deleted file mode 100644 index 45c50fe..0000000 --- a/pages/askHousing copy/askHousing.js +++ /dev/null @@ -1,2483 +0,0 @@ -// pages/edit/edit.js -const chooseLocation = requirePlugin('chooseLocation'); - -var app = getApp() -var config = {}; -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' -let time = new Date() -let todayDate = '', - lastYearDate = ''; -Page({ - /** - * 页面的初始数据 - */ - data: { - loding: true, - // address:'', - isrefusedAuthLocation: 0, //是否拒绝授权地址 - edit: false, - city: {}, - latitude: '', - longitude: '', - info: { - type: { - name: '出租方式', - title: 'type', - data: {}, - value: '', - need: true - }, - location: { - data: {}, - value: '', - title: "location", - name: '所在区域', - need: true - }, - gender: { - name: '租客性别要求', - title: 'gender', - data: [], - value: '', - need: true - - }, - property: { - title: 'property', - value: 'null', - name: '房屋类型', - data: [], - list: {}, - need: true - }, - rentalduration: { - title: 'rentalduration', - value: '', - name: '出租时长', - placeholder: '请填写数字,0为租期不限', - unit: '月', - need: true, - numberType: true - }, - rent: { - title: 'rent', - value: '', - name: '', - placeholder: '请填写数字', - unit: '', - need: true, - numberType: true - }, - floor: { - title: 'floor', - value: '', - name: '所在楼层', - placeholder: '请填写数字', - unit: '楼', - need: true, - numberType: true - }, - acreage: { - title: 'acreage', - value: '', - name: '面积', - placeholder: '请填写数字', - unit: '', - numberType: true - }, - subject: { - title: 'subject', - value: '', - name: '标题', - placeholder: '请填写标题', - need: true - }, - village: { - title: 'village', - value: '', - name: '所在小区', - placeholder: '请填写小区名称' - }, - school: { - title: 'school', - value: '', - name: '附近学校', - placeholder: '可输入附近的学校,最多可输入3个' - }, - distanceschool: { - title: 'distanceschool', - value: '', - name: '距离学校', - placeholder: '可输入与学校的距离' - }, - wechat: { - title: 'wechat', - value: '', - name: '个人微信号', - placeholder: '请正确填写', - unit: '', - }, - whatsapp: { - title: 'whatsapp', - value: '', - name: 'WhatsApp', - placeholder: '请正确填写', - unit: '', - }, - tel: { - title: 'tel', - value: '', - name: '电话号码', - placeholder: '请正确填写', - unit: '', - numberType: true - }, - address: { - title: 'address', - value: '', - name: '地址', - placeholder: '可填写地段、路名、社区、地址等' - }, - introduction: { - title: 'introduction', - value: '', - name: '个人情况介绍', - placeholder: '介绍一下房东/合租人/室友的情况。可以写下作息习惯、性格、是否有养宠物等' - }, - message: { - title: 'message', - value: '', - name: '其他描述', - placeholder: '可以填写如需签约至多久,和谁签约,如何交房租,房子是否断隔房、房租以外的费用项支付规则、户型家具、生活配套、地理位置(距离学校多远)等' - }, - leasetime: { - value: 0, - name: '起租日期' - } - }, - imgs: [], - types: '', - token: '', - uniqid: '', - step: 1, - url: '', - status: 0, - user: {}, - q: '', - write_long_textarea: false, - questions: [], - videos: [], - options: {}, - leasetime: '', //起租日期 - startDate: '', - isInput: false, //当前是否为输入附近学校或小区的状态 - timestamp: "", - updatetime: "", - aroundSchoolList: [], - unfoldState: false, // 发布须知的状态 - triggerRules: 0, // 触发规则状态 0 是未触发 1 是触发规则 1 2 是触发规则2 - current: 2019, - leaseTimeValue: [11], - floorValue: [12], - nearSchoolList: [], // 附近学校的数据 - contactInformationData: [{ - title: '微信', - value: '' - }], // 联系方式的数据 - - contactInformationState: 0, // 联系方式中微信的状态 0 是 初始状态 1 是 填写微信号 2 是上传二维码 - ofDate: [], // 起租日期数据 - dayList: {}, - finalizedDate: [], - week: ['日', '一', '二', '三', '四', '五', '六'], - calculateOfDateList: [], // 起租日期的日历 - calculateOfDateTime: {}, - fieldinfo: [], - inputList: ['acreage'], - contactInformation: 'contactInformation', - popUpIs: '', // 弹窗的 is - popUpdate: [], // 目标数据 - popUpSubtitle: '', - popUpStepState: '', // 0是啥都没有 1 是 保存 2 是保存加下一步 - fieldinfoNew: [], - step: 0, // 步数 - newcity: {}, - aa: [{ - name: '求租方式', - popUpIs: 'AListOF', - popUpStepState: 0, - it: 'basic', - field: "type" - }, { - name: '租期', - popUpIs: 'AListOF', - popUpStepState: 1, - it: 'basic', - }, { - name: '出租时长', - popUpIs: 'AListOF', - popUpStepState: 1, - it: 'basic', - field: "rentalduration" - }, { - name: '选择租期', - popUpIs: 'leaseTime', - popUpStepState: 2, - it: 'basic' - }, { - name: '起租日期', - popUpIs: 'AListOF', - popUpStepState: 1, - it: 'basic', - field: "leasetime" - }, { - name: '选择日期', - popUpIs: 'ofDate', - popUpStepState: 1, - it: 'basic' - }, { - name: '租金预算', - popUpIs: 'rent-budget', - popUpStepState: 2, - it: 'basic', - field: "slider" - }, { - name: '房屋类型', - popUpIs: 'new-marquee-box', - popUpStepState: 1, - it: 'basic', - field: "property" - }, { - name: '所在楼层', - popUpIs: 'new-marquee-box', - popUpStepState: 2, - it: 'basic', - field: "floor" - }, { - name: '面积', - popUpIs: 'rent-budget', - popUpStepState: 2, - it: 'basic', - field: "acreage" - }, { - name: '所在区域', - popUpIs: 'area', - popUpStepState: 1, - field: "location" - }, { - name: '附近学校', - popUpIs: 'nearSchool', - popUpStepState: 2, - field: "school" - }, { - name: '同住人性别要求', - popUpIs: 'AListOF', - popUpStepState: 1, - field: "gender" - }, { - name: '发布者性别', - popUpIs: 'AListOF', - popUpStepState: 1, - field: "gender" - }, { - name: '发布者身份', - popUpIs: 'AListOF', - popUpStepState: 1, - field: "intermediary" - }, { - name: '房屋视频', - popUpIs: 'pop-up-HomeVideo', - popUpStepState: 2, - field: "video" - }, { - name: '房屋照片', - popUpIs: 'pop-up-homePhoto', - popUpStepState: 2, - field: "images" - }, { - name: '求租描述', - popUpIs: 'multilineInput', - popUpStepState: 2, - field: "introduction" - }, { - name: '微信', - popUpIs: 'contactInformation', - popUpStepState: 2, - field: "wechat" - }, { - name: '标题', - popUpIs: 'multilineInput', - popUpStepState: 3, - field: "subject" - }, { - name: '电梯', - popUpIs: 'AListOF', - popUpStepState: 1, - field: "elevator" - }, { - name: '晾晒区', - popUpIs: 'new-marquee-box', - popUpStepState: 1, - field: "sunshinearea" - } - - ], - popUpit: "", - popUpOrder: ['basic', 'address', 'identity', 'introduce', 'contact', 'info'], - newinfo: {}, - areaRegionIndex: 0, - newToken: "", // 新的token - QRCodeUrl: '', // 上传二维码的解析url - publishingrules: [], - focustitle: "", - // 选中起租提前的年月日 - pitchyear: null, - pitchmonth: null, - pitchday: null, - isPC: false, // 判断是否是PC端 - focusState: false, - isAuthorization: 0, - - change: false, // 当两个slider在最右端重合时,将change设置为true,从而隐藏slider2,才能继续操作slider1 - max: 10000, // 两个slider所能达到的最大值 - min: 0, // 两个slider所能取的最小值 - rate: 100, // slider的最大最小值之差和100(或1000)之间的比率 - scale: 1, // 比例系数。页面显示值的时候,需要将slider1Value(slider2Value)乘以比例系数scale - slider1Max: 10000, // slider1的最大取值 - slider1Value: 0, // slider1的值 - slider2Value: 10000, // slider2的值 - slider2Min: 0, // slider2的最小取值 - slider1W: 100, // slider1的宽度 - slider2W: 0, // slider2的宽度 - leftSliderPriceWidthX: '0%', - rightSliderPriceWidthX: '0%', - - aboutRulesList: {}, // 关于发布的数据 - }, - - // 开始滑动 - changeStart: function (e) { - var idx = parseInt(e.currentTarget.dataset.idx) - if (idx === 1) { - // dW是当前操作的slider所能占据的最大宽度百分数 - var dW = (this.data.slider2Value - this.data.min) / this.data.rate - this.setData({ - slider1W: dW, - slider2W: 100 - dW, - slider1Max: this.data.slider2Value, - slider2Min: this.data.slider2Value, - change: false - }) - } else if (idx === 2) { - var dw = (this.data.max - this.data.slider1Value) / this.data.rate - this.setData({ - slider2W: dw, - slider1W: 100 - dw, - slider1Max: this.data.slider1Value, - slider2Min: this.data.slider1Value, - change: false - }) - } - }, - - // 正在滑动 - changing: function (e) { - var idx = parseInt(e.currentTarget.dataset.idx) - var value = e.detail.value - // let rightSliderPriceWidthX = (this.data.max - value) / 116 - 21 - let rightSliderPriceWidthX = 100 - (value / this.data.max * 100) - let leftSliderPriceWidthX = value / this.data.max * 100 - - if (idx === 1) { - this.setData({ - slider1Value: value, - leftSliderPriceWidthX: leftSliderPriceWidthX + '%' - }) - } else if (idx === 2) { - this.setData({ - slider2Value: value, - rightSliderPriceWidthX: rightSliderPriceWidthX + '%' - }) - } - }, - changed: function (e) { - if (this.data.slider1Value === this.data.slider2Value && this.data.slider2Value === this.data.max) { - this.setData({ - change: true - }) - } - }, - - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - // let list = [] - // for (let i = 0; i < 24; i++) { - // list.push(i + '点-' + (i + 1) + '点'); - // } - // this.setData({ - // list - // }) - // console.log("list", list); - - this.calculateOfDate() - wx.showLoading({ - title: '加载中', - }) - - let nowDate = new Date() - - let that = this; - this.setData({ - uniqid: options.uniqid || '', - token: options.token || '', - types: options.types || 'plus', - info: this.data.info, - startDate: [nowDate.getFullYear(), nowDate.getMonth() + 1, nowDate.getDate()].join('-') - }) - - if (options.types == 'edit') { - wx.setNavigationBarTitle({ - title: '编辑信息', - }) - } else { - wx.setNavigationBarTitle({ - title: '发布', - }) - } - this.get_config() - wx.getSystemInfo({ - success: function (res) { - let platform = res.platform - if (platform == 'windows' || platform == 'mac') { - that.setData({ - isPC: true - }) - } - } - }) - - }, - - choosel() { - const key = 'MVNBZ-PEFWI-O4OGT-5ADVJ-7QAYJ-NBFY4'; //使用在腾讯位置服务申请的key - const referer = 'hao'; //调用插件的app的名称 - const location = JSON.stringify({ - latitude: this.data.newinfo.latitude || 22.297759, - longitude: this.data.newinfo.longitude || 114.179495 - }); - wx.navigateTo({ - url: `plugin://chooseLocation/index?key=${key}&referer=${referer}&location=${location}` - }); - }, - - // 如果用户已经同意授权。则开始获取数据 - islogin() { - wx.showLoading({ - title: '加载中', - }) - this.get_config() - }, - - get_config() { - var that = this; - if (app.globalData.config.lists) { - config = app.globalData.config; - that.setData({ - info: that.data.info, - status: app.globalData.status, - user: app.globalData.user - }) - - app.globalData.notice = false; - this.newPublish() - this.getAbout() - } else { - setTimeout(function () { - that.get_config() - }, 200) - } - }, - - // 获取关于发布 - getAbout() { - miucms.request(`${app.globalData.baseURL}/tenement/v2.Publish/about`).then(res => { - this.setData({ - aboutRulesList: res.data - }) - }) - }, - - // 新的获取发布数据 - newPublish() { - wx.showLoading({ - title: '加载中', - }) - let requestData = {} - if (this.data.types == 'edit' || this.data.types == 'edit1') { - requestData = { - uniqid: this.data.uniqid, - token: this.options.token - } - } else { - requestData = { - uniqid: this.data.uniqid, - } - } - // https://app.gter.net/tenement/v2/api/publish - // console.log("requestData", requestData); - - miucms.request(`${app.globalData.baseURL}/tenement/v2/api/publish`, { - intermediary: 6 - }).then(res => { - console.log(res, "res"); - wx.hideLoading() - this.setData({ - loding: false - }) - if (res.code == 401) { - this.setData({ - isAuthorization: 1, - }) - } - if (res.code != 200) { - wx.showModal({ - title: '提示', - content: res.message - }) - return - } - - - let data = res.data - let fieldinfoNew = [] - let locationhead = "" - let locationtail = "" - for (const key in data.fieldinfo) { - let choices = null - data.fieldinfo[key].forEach(element => { - if (!element) return - if (element.field == 'type') { - let choices = element.choices - let choicesnew = [] - let newfield = element.field - choices.forEach(el => { - if (!el) return - if ((this.data.types == 'edit' || this.data.types == 'edit1') && el.key == data.info.type) { - choices.forEach(e => { - if (e.key == [Math.trunc(el.key)]) data.info.type = e.value + '>>' + el.value - }) - } - if (el.key % 1 == 0) { - choicesnew[el.key - 1] = { - value: el.value, - key: el.key, - field: newfield, - choices: [] - } - } else { - choicesnew[Math.trunc(el.key) - 1]['choices'].push({ - value: el.value, - key: el.key, - field: newfield - }) - } - }); - fieldinfoNew[element.field] = ({ - choices: choicesnew, - field: element.field, - title: element.title, - type: element.type, - popupwindow: element.popupwindow, - required: element.required, - }) - return - } - if (element.field == 'rentalduration') { - if (this.data.types == 'edit' || this.data.types == 'edit1') { - element.choices.forEach((el, i) => { - if (el.key == data.info.rentalduration) { - this.data.leaseTimeValue = [i] - data.info.rentalduration = el.value - } - }) - } - fieldinfoNew[element.field] = ({ - choices: [{ - field: element.field, - value: "不限租期", - }, { - field: element.field, - value: "选择租期", - choices: element.choices, - }], - field: element.field, - title: element.title, - type: element.type, - popupwindow: element.popupwindow, - required: element.required, - }) - return - } - - if (element.field == 'leasetime') { - fieldinfoNew[element.field] = ({ - choices: [{ - field: "leasetime", - value: "随时", - }, { - field: "leasetime", - value: "选择日期", - choices: element.choices, - }], - field: element.field, - title: element.title, - type: element.type, - popupwindow: element.popupwindow, - required: element.required, - }) - return - } - - if (element.field == 'property' || element.field == 'gender' || element.field == 'intermediary' || element.field == 'elevator' || element.field == 'sunshinearea') { - choices = [] - if (element.choices.length >= 0) { - if (this.data.types == 'edit' || this.data.types == 'edit1') { - element.choices.forEach(el => { - if (el.key == data.info[element.field]) { - data.info[element.field] = el.value - } - }) - } - - element.choices.forEach(ele => { - ele['field'] = element.field - }); - } else { - let elementnew = element.choices - element.choices = [] - for (const key in elementnew) { - element.choices.push({ - 'field': element.field, - 'value': elementnew[key], - 'key': key - }) - } - } - - fieldinfoNew[element.field] = ({ - choices: element.choices, - field: element.field, - title: element.title, - type: element.type, - popupwindow: element.popupwindow, - required: element.required, - }) - return - } - - if (element.field == 'location') { - let field = element.field - let choices = element.choices - let choicesnew = [] - choices.forEach((el, i) => { - if (!el) return - if (this.data.types == 'edit' || this.data.types == 'edit1') { - if (el.key == data.info[field]) { - locationtail = el.value - } - - if (el.key == [Math.trunc(data.info[field])]) { - locationhead = el.value - this.data.areaRegionIndex = el.key - 1 - } - } - if (el.key % 1 == 0) { - - - choicesnew[el.key - 1] = { - value: el.value, - key: el.key, - choices: [] - } - } else { - choicesnew[Math.trunc(el.key) - 1]['choices'].push({ - value: el.value, - key: el.key, - field: element.field - }) - } - }); - fieldinfoNew[element.field] = ({ - choices: choicesnew, - field: element.field, - title: element.title, - type: element.type, - popupwindow: element.popupwindow, - required: element.required, - }) - return - } - - fieldinfoNew[element.field] = ({ - choices, - field: element.field, - title: element.title, - unit: element.unit, - type: element.type, - placeholder: element.placeholder, - popupwindow: element.popupwindow, - required: element.required, - }) - }); - } - - if (data.info.floor != null) data.info.floor = data.info.floor != 0 ? data.info.floor + '楼' : null - - if (data.type == "edit") this.data.contactInformationState = data.info.iswechattype - else data.info.iswechattype = 0 - - if (data.info.leasetime == 0) data.info.leasetime = '随时' - else if (data.info.leasetime && data.info.leasetime.length > 2) { - let leasetimeTime = new Date(data.info.leasetime) - this.data.pitchyear = leasetimeTime.getFullYear() - this.data.pitchmonth = leasetimeTime.getMonth() + 1 - this.data.pitchday = leasetimeTime.getDate() - } - - if (data.info.rentalduration == 0) data.info.rentalduration = '不限租期' - - if (data.info.rent == 0) data.info.rent = data.info.rent.toString() - - if (data.info.floor != null) this.data.floorValue = [parseInt(data.info.floor) < 0 ? parseInt(data.info.floor) + 3 : parseInt(data.info.floor) + 2] - - - if (data.info.school != null) this.data.nearSchoolList = data.info.school - - if (locationhead != "") data.info.location = `${locationhead}>>${locationtail}` - - - // 将发布者身份 放到最前面 - // data.fieldinfo['status'] = [data.fieldinfo['identity'][1]] || [] - // data.fieldinfo['identity'].splice(1, 1) - - this.setData({ - fieldinfo: data.fieldinfo, - fieldinfoNew, - newcity: data.city, - newinfo: data.info, - newToken: data.token, - imgs: data.info.images, - videos: data.info.video, - publishingrules: data.publishingrules, - floorValue: this.data.floorValue, - nearSchoolList: this.data.nearSchoolList, - newtype: data.type, - newStatus: data.status, - contactInformationState: this.data.contactInformationState, - leaseTimeValue: this.data.leaseTimeValue, - areaRegionIndex: this.data.areaRegionIndex, - unfoldState: data.isrules == 1 ? true : false, - pitchyear: this.data.pitchyear, - pitchmonth: this.data.pitchmonth, - pitchday: this.data.pitchday, - - }) - - wx.hideLoading() - if (this.data.types == 'plus') this.firstStepPopover() - - }).catch(() => { - this.setData({ - loding: false - }) - }) - }, - - // 初始化弹出的窗口 - firstStepPopover() { - return - let field = 'type' - let step = 0 - let it = 'basic' - // let field = 'intermediary' - // let step = 0 - // let it = 'status' - - let popUpIs = "" - let popUpStepState = "" - this.data.aa.forEach(element => { - if (this.data.fieldinfo['status'][0].title == element.name) { - popUpIs = element.popUpIs - popUpStepState = element.popUpStepState - } - }); - this.setData({ - step, - popUpIs, - popUpdate: this.data.fieldinfoNew[field], - popUpit: it, - popUpStepState - }) - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - // 在Mac 是获取 地图插件用户选择的地址信息 - const location = chooseLocation.getLocation() - let that = this - if (location) { - that.data.newinfo.latitude = location.latitude - that.data.newinfo.longitude = location.longitude - that.data.newinfo.address = location.name - that.setData({ - newinfo: that.data.newinfo - }) - if (that.data.popUpIs == "") { - that.popUpNextStep() - } - } - - - var title = that.data.write_long_textarea; - if (title) { - wx.getStorage({ - key: title, - success: function (res) { - if (title == 'aroundSchool') { - that.data.aroundSchoolList[res.data.index].distance = res.data.distance; - that.setData({ - aroundSchoolList: that.data.aroundSchoolList - }) - } else { - that.data.info[title].value = res.data; - that.setData({ - info: that.data.info - }) - } - wx.removeStorage({ - key: title, - success: function (res) { - that.setData({ - write_long_textarea: false - }) - }, - }) - }, - }) - } - - }, - - onReady: function () { - this.picker = this.selectComponent("#custom-picker") - }, - - // 输入。。 - input: function (e) { - let title = e.currentTarget.dataset.title; - this.data.info[title].value = e.detail.value; - this.setData({ - info: this.data.info - }) - }, - // 获取内容 - get_content: function () { - let that = this; - let url = ''; - wx.showLoading({ - title: '加载中', - }) - if (this.data.types == 'edit' || this.data.types == 'edit1') { - url = app.globalData.config.post.edit; - } else { - url = app.globalData.config.post.release - } - var sendData = Object.assign({}, this.data.options, { - session: wx.getStorageSync('session'), - uniqid: that.data.uniqid, - token: that.data.token, - }) - miucms.request(url, sendData).then(data => { - wx.hideLoading() - if (data.code != 200) { - wx.showModal({ - title: '提示', - content: data.message, - }) - return false - } - for (let i in data.data.info) { - if (that.data.info[i]) { - that.data.info[i].value = data.data.info[i] - } - if (i == 'currencytext') { - that.data.info.rent.unit = data.data.info[i]; - } - } - var cityid = data.data.city.id; - - that.data.info.acreage.unit = cityid == '1' ? '平方呎' : '平方米'; - this.data.info.rent.name = (data.data.info.rentalperiod || '月') + '租'; - this.setConfig(data.data.config) - that.setData({ - // types:data.type || 'plus', - token: data.data.token, - uniqid: data.data.uniqid, - // send_info:data.info, - url: data.url, - questions: data.questions || [], - city: data.data.city, - info: that.data.info, - - }) - if (that.data.types == 'edit' || this.data.types == 'edit1') { - for (let i in data.data.info) { - if (that.data.info[i]) { - that.data.info[i]['value'] = data.data.info[i] - } - if (i == 'school') { - this.data.aroundSchoolList = data.data.info.school; - } - - } - if (data.data.info.images_url && data.data.info.images_url.length > 0) { - for (let i = 0; i < data.data.info.images.length; i++) { - that.data.imgs.push({ - aid: data.data.info.images[i], - url: data.data.info.images_url[i] - }) - } - } - 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]; - } - that.data.city['id'] = data.data.info.cityid - 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, - longitude: that.data.longitude, - city: that.data.city, - aroundSchoolList: that.data.aroundSchoolList - }) - - } - - }).catch(res => {}) - }, - // 设置选项的值 - setConfig(config) { - for (let i in config) { - if (i == 'leaseterm') { - continue - } - if (Array.isArray(this.data.info[i].data)) { - // 单选,需要传入数组 - this.data.info[i].data = [] - for (let j in config[i]) { - this.data.info[i].data.push({ - name: config[i][j], - value: j - }) - } - } else { - // 多选,传入obj - this.data.info[i].data = Object.assign({}, config[i]); - } - } - }, - - issubmit: false, - // 提交第二步 - submit2: function (e) { - let that = this; - if (this.issubmit) { - wx.showToast({ - title: '请勿重复提交~', - icon: 'none' - }) - return false; - } - - this.issubmit = true; - let images = [], - video = []; - let status = e.currentTarget.dataset.status; - wx.showLoading({ - title: '提交中...', - }) - if (that.data.imgs.length > 0) { - for (let i = 0; i < that.data.imgs.length; i++) { - 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) { - info['point'] = [this.data.latitude, this.data.longitude] - } else { - info['point'] = [] - } - for (let i in this.data.info) { - info[i] = this.data.info[i].value - } - info['school'] = this.data.aroundSchoolList; - miucms.request(app.globalData.config.post.submit, { - session: wx.getStorageSync('session'), - info: info, - token: that.data.token, - uniqid: that.data.uniqid, - type: that.data.types == 'edit1' ? 'plus' : that.data.types, - status: status, - - }).then(data => { - this.issubmit = false; - wx.hideLoading() - if (data.extraparam && data.extraparam.mode == 'right') { - // 提交成功 - - wx.showToast({ - title: data.message, - }) - - if (status == 0) { - // 只是保存 - wx.redirectTo({ - url: '/pages/user/user?tab=publish' - }) - - } else { - wx.redirectTo({ - url: '/pages/show/show?uniqid=' + data.data.uniqid, - }) - } - - } else { - wx.showModal({ - title: '提示', - content: data.errMsg || data.message, - }) - - } - - }).catch(res => { - 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`, - 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`, - 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) { - let { - title, - placeholder, - index - } = e.currentTarget.dataset; - if (title == 'village' || title == 'school') { - let myComponent = this.selectComponent('#inputComponent'); - myComponent.showPage(title); - return false - } - let that = this, - data = null; - if (title == 'aroundSchool') { - data = { - index, - distance: that.data.aroundSchoolList[index].distance - } - } else { - data = that.data.info[title].value - } - wx.setStorage({ - key: title, - data: data, - success: function (res) { - that.setData({ - write_long_textarea: title - }) - wx.navigateTo({ - url: '../textarea/textarea?name=' + title + '&placeholder=' + placeholder, - }) - } - }) - - }, - - wxParseTagATap: function (e) { - var url = e.currentTarget.dataset.src; - wx.navigateTo({ - url: url, - }) - }, - // 有二级选项的提交 - submitMore(e) { - this.data.info[e.currentTarget.dataset.name].value = e.detail.data; - - this.setData({ - info: this.data.info - }) - }, - // 有一级选项的提交 - submitSingle(e) { - this.data.info[e.currentTarget.dataset.name].value = e.detail.value; - - this.setData({ - info: this.data.info - }) - }, - // 改变日期 - changeDate(e) { - this.data.info.leasetime.value = e.detail.value.substring(0, 10); - this.setData({ - info: this.data.info - }) - }, - changeInputSelect() {}, - // 点击获取位置 - get_location: function () { - let that = this; - wx.getLocation({ - success: function (resget) { - wx.chooseLocation({ - enableHighAccuracy: true, - latitude: that.data.latitude || '22.297759', - longitude: that.data.longitude || '114.179495', - success: function (res) { - that.data.info.address.value = res.address; - that.setData({ - info: that.data.info, - latitude: res.latitude, - longitude: res.longitude - }) - if (res.address) { - // 如果能获取到address - return false - } - }, - fail(err) { - console.log(err); - } - }) - }, - fail(res) { - that.setData({ - isrefusedAuthLocation: 1 - }) - } - }) - - }, - bindopensetting(res) { - var status = res.detail.authSetting['scope.userLocation'], - that = this; - - if (status) { - //用户同意授权 - that.get_location() - that.setData({ - isrefusedAuthLocation: 0 - }) - - } else { - that.setData({ - isrefusedAuthLocation: 2 - }) - wx.showToast({ - title: '您已拒绝授权地址,请点击自行填写~', - icon: 'none' - }) - - } - }, - clearleasetime() { - this.data.info.leasetime.value = 0; - - this.setData({ - info: this.data.info - }) - }, - submitSchool(e) { - this.setData({ - aroundSchoolList: [...e.detail] - }) - }, - - // 切换发布须知的状态 - cutUnfoldState() { - this.setData({ - unfoldState: !this.data.unfoldState - }) - }, - - // 跳转我要申述 - goAppeal() { - wx.redirectTo({ - url: '/pages/appeal/appeal?appealtoken=' + this.data.appealtoken, - }) - }, - // 跳转我的-发布 - goUser() { - wx.redirectTo({ - url: '/pages/user/user?tab=publish', - }) - }, - - // 点击关闭 - triggerRulesClose() { - wx.redirectTo({ - url: '/pages/user/user?tab=publish', - }) - }, - - // 微信号有wxid_ 时弹窗的关闭 - WechatIDClose() { - this.setData({ - triggerRules: 0 - }) - }, - // 点击规则4中的图片预览 - methodPreview() { - wx.previewImage({ - urls: ["https://oss.gter.net/attachment/Zvt57TuJSUvkyhw-xG7Y2l-T_pIqc3nqqsgFptxhXa6RWi26P-BuTQdCF7eV7tkb8MVYZjQ0Mjk~"], - current: "https://oss.gter.net/attachment/Zvt57TuJSUvkyhw-xG7Y2l-T_pIqc3nqqsgFptxhXa6RWi26P-BuTQdCF7eV7tkb8MVYZjQ0Mjk~" - }) - }, - - bindChange: function (e) { - const val = e.detail.value - this.setData({ - leaseTimeValue: val, - ['newinfo.rentalduration']: this.data.fieldinfoNew['rentalduration'].choices[1].choices[val].value - - }) - }, - - bindChange1: function (e) { - const val = e.detail.value - this.setData({ - floorValue: val, - ['newinfo.floor']: this.data.floorValue - 2 + '楼' - }) - }, - - // 点击附近学校的添加学校 - nearSchoolAdd() { - this.data.nearSchoolList.push({ - name: '', - distance: "" - }) - this.setData({ - nearSchoolList: this.data.nearSchoolList - }) - }, - - // 点击附近学校的删除学校 - del_nearSchool(e) { - let index = e.currentTarget.dataset.index - this.data.nearSchoolList.splice(index, 1) - this.setData({ - nearSchoolList: this.data.nearSchoolList - }) - }, - - // 附近学校的输入绑定数据 - nearSchoolInput(e) { - let value = e.detail.value - let { - index, - name - } = e.target.dataset - - this.data.nearSchoolList[index][name] = value - this.setData({ - nearSchoolList: this.data.nearSchoolList - }) - }, - - // 联系方式中微信的切换状态 - contactInformationwechatcut(e) { - let state = e.currentTarget.dataset.state - if (state == 1) { // 选择填写微信号 - this.data.newinfo['wechatdata'] = { - aid: 0, - url: null - } - this.data.newinfo.iswechattype = 1 - } else if (state == 0) { // 回复默认 - this.data.newinfo['wechatdata'] = { - aid: 0, - url: null - } - this.data.newinfo['wechat'] = null - this.data.newinfo['iswechattype'] = 0 - } - this.setData({ - contactInformationState: state - }) - }, - - // 计算起租日期 - calculateOfDate() { - let newyear = time.getFullYear() - let newmonth = time.getMonth() + 1 // 现在的月份 - - let list = [] - for (let i = 0; i < 24; i++) { - let week = (new Date(newyear, newmonth - 1, 1).getDay()) - newmonth = newmonth.toString().padStart(2, 0) - let monthDayCount = this.getCountDays(`${newyear}-${newmonth}`) - - newmonth++ - list.push({ - week, - monthDayCount, - name: newmonth - 1 == 0 ? `${newyear - 1}年${12}月` : `${newyear}年${newmonth - 1}月`, - year: newyear, - month: newmonth - 1, - }) - - if (newmonth == 13) { - newyear++ - newmonth = 1 - } - } - - this.setData({ - calculateOfDateList: list, - calculateOfDateTime: { - year: new Date().getFullYear(), - month: new Date().getMonth() + 1, - day: new Date().getDate() - } - }) - }, - - getCountDays(time) { - var curDate = new Date(time); - // 获取当前月份 - var curMonth = curDate.getMonth() + 1; - // 实际月份比curMonth大1,下面将月份设置为下一个月 - curDate.setMonth(curMonth); - // 将日期设置为0,表示自动计算为上个月(这里指的是当前月份)的最后一天 - curDate.setDate(0); - // 返回当前月份的天数 - return curDate.getDate(); - }, - - // 点击选择日期 - selectOfDate(e) { - let { - year, - month, - day - } = e.target.dataset - this.data.newinfo.leasetime = `${year}-${month.toString().padStart(2, 0)}-${day.toString().padStart(2, 0)}` - this.setData({ - pitchyear: year, - pitchmonth: month, - pitchday: day, - newinfo: this.data.newinfo - }) - this.data.step = this.data.step - 1 - let that = this - that.popUpNextStep() - }, - - // 点击操作弹出弹窗 - clickOption(e) { - let { - field, - step, - it - } = e.currentTarget.dataset - let popUpIs = "" - let popUpStepState = "" - - if (this.data.fieldinfo[it][step].popupwindow == 0) return - this.data.aa.forEach(element => { - if (this.data.fieldinfo[it][step].title == element.name) { - popUpIs = element.popUpIs - popUpStepState = element.popUpStepState - } - }); - - if (popUpIs == 'nearSchool') { - this.data.nearSchoolList.push({ - name: '', - distance: "" - }) - this.setData({ - nearSchoolList: this.data.nearSchoolList - }) - } - - if (field == 'address') { - if (this.data.fieldinfoNew.address.type == 'map') popUpIs = "AddressHongKong" - } - - if (popUpIs == 'unilineInput' || popUpIs == 'multilineInput' || popUpIs == 'multilineInput1') this.data.focustitle = field - - - this.setData({ - step, - popUpIs, - popUpdate: this.data.fieldinfoNew[field], - popUpit: it, - popUpStepState, - focustitle: this.data.focustitle - }) - }, - - // 选择弹窗选项 - selectOption(e) { - let { - choices, - key, - value, - field - } = "" - if (e.currentTarget) { - choices = e.currentTarget.dataset.choices - key = e.currentTarget.dataset.key - value = e.currentTarget.dataset.value - field = e.currentTarget.dataset.field - } else field = e - - - let popUpSubtitle1 = this.data.popUpSubtitle - let popUpIs = "" - let popUpTitle = "" - let popUpStepState = "" - let popUpSubtitle = "" - - if (choices) { - popUpSubtitle = value - this.setData({ - popUpdate: { - choices - }, - }) - } else { - - // 选择出租方式后需要 >> 显示 - if (this.data.fieldinfo[this.data.popUpit][this.data.step].field == 'type') { - this.setData({ - step: this.data.step + 1, - popUpdate: this.data.fieldinfo[this.data.popUpit][this.data.step + 1], - [`newinfo.${this.data.fieldinfo[this.data.popUpit][this.data.step].field}`]: popUpSubtitle1 + '>>' + value - }) - - } else if (this.data.fieldinfo[this.data.popUpit][this.data.step].field == 'leasetime' && value != '随时') { - this.setData({ - step: this.data.step + 1, - }) - } else { - this.setData({ - step: this.data.step + 1, - popUpdate: this.data.fieldinfo[this.data.popUpit][this.data.step + 1], - [`newinfo.${this.data.fieldinfo[this.data.popUpit][this.data.step].field}`]: value - }) - } - } - - 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] - this.data.step = 0 - } - this.data.aa.forEach(element => { - if (this.data.fieldinfo[this.data.popUpit][this.data.step].title == element.name) { - let field = this.data.fieldinfo[this.data.popUpit][this.data.step].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] != "") { - this.setData({ - popUpIs: "" - }) - return - } - this.optionScroll(field) - popUpIs = element.popUpIs - popUpTitle = this.data.fieldinfo[this.data.popUpit][this.data.step].title - popUpStepState = element.popUpStepState - if (popUpIs == 'unilineInput' || popUpIs == 'multilineInput' || popUpIs == 'multilineInput1') { - this.data.focustitle = this.data.fieldinfo[this.data.popUpit][this.data.step].field - } - this.setData({ - popUpdate: this.data.fieldinfoNew[this.data.fieldinfo[this.data.popUpit][this.data.step].field], - focustitle: this.data.focustitle - }) - } - }); - } - - if (popUpIs == 'nearSchool') { - this.data.nearSchoolList.push({ - name: '', - distance: "" - }) - this.setData({ - nearSchoolList: this.data.nearSchoolList - }) - } - - if (popUpIs == 'ofDate' && this.data.newinfo.leasetime == null) { - let calculateOfDateList = this.data.calculateOfDateList[0] - this.data.newinfo.leasetime = calculateOfDateList.year + '-' + calculateOfDateList.month + '-' + new Date().getDate() - } - - this.setData({ - popUpSubtitle, - popUpTitle, - popUpIs, - popUpStepState - }) - }, - - // 弹出上角的关闭弹窗 - closePopUp() { - let currentField = this.data.fieldinfo[this.data.popUpit][this.data.step].field - if (currentField == 'school') { - this.data.nearSchoolList.forEach((element, index) => { - if (element.name == "") { - this.data.nearSchoolList.splice(index, 1) - } - }) - this.setData({ - nearSchoolList: this.data.nearSchoolList - }) - } - - if (this.data.newinfo.leasetime == "选择日期") { - this.data.newinfo.leasetime = "" - } - - if (this.data.popUpIs == 'leaseTime' && currentField == 'rentalduration') { - this.setData({ - ['newinfo.rentalduration']: this.data.fieldinfoNew['rentalduration'].choices[1].choices[this.data.leaseTimeValue].value - }) - } - - if (currentField == 'floor') { - this.setData({ - ['newinfo.floor']: this.data.floorValue - 2 > 0 ? this.data.floorValue - 2 + '楼' : this.data.floorValue - 3 + '楼' - }) - } - - this.setData({ - popUpIs: "", - popUpit: "", - popUpSubtitle: "", - newinfo: this.data.newinfo - }) - }, - - // 填好了 - fillThe() { - let currentField = 'subject' - if (this.data.fieldinfoNew[currentField].required == 1 && (this.data.newinfo[currentField] == null || this.data.newinfo[currentField] == "")) { - wx.showToast({ - title: `请填写${this.data.fieldinfoNew[currentField].title}`, - icon: 'none' - }) - return - } - - this.setData({ - popUpIs: "", - popUpit: "", - popUpSubtitle: "", - }) - }, - - // 弹窗右上角的跳过 - popUpSkip(e) { - let currentFieldinfo = this.data.fieldinfo[this.data.popUpit][this.data.step] // 当前步数的 fieldinfo 数据 - // 在 学校弹窗 跳过时需要 验证是否有填学校名称,没有填则删除数据 - if (currentFieldinfo.field == 'school') { - for (var i = 0; i < this.data.nearSchoolList.length; i++) { - if (this.data.nearSchoolList[i].name == '') { - this.data.nearSchoolList.splice(i, 1) - i-- - } - } - this.setData({ - nearSchoolList: this.data.nearSchoolList - }) - } - - this.data.step = this.data.step + 1 - 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] - this.data.step = 0 - } - - let nextfield = this.data.fieldinfo[this.data.popUpit][this.data.step].field - if (this.data.newinfo[nextfield] != null && this.data.newinfo[nextfield] != "") { - this.setData({ - popUpIs: "" - }) - return - } - - this.data.aa.forEach(element => { - if (this.data.fieldinfo[this.data.popUpit][this.data.step].title == element.name) { - if (element.popUpIs == 'nearSchool') { - this.data.nearSchoolList.push({ - name: '', - distance: "" - }) - this.setData({ - nearSchoolList: this.data.nearSchoolList - }) - } - this.optionScroll(this.data.fieldinfo[this.data.popUpit][this.data.step].field) - this.setData({ - popUpIs: element.popUpIs, - popUpTitle: this.data.fieldinfo[this.data.popUpit][this.data.step].title, - popUpdate: this.data.fieldinfoNew[this.data.fieldinfo[this.data.popUpit][this.data.step].field], - popUpStepState: element.popUpStepState - }) - } - }); - }, - - // 下一步 - popUpNextStep(e) { - let currentField = this.data.fieldinfo[this.data.popUpit][this.data.step].field - let popUpIs = "" - - // 下一步是附近学校时 判断学校名是否为空 空则删除对应学校数据 - if (currentField == 'school') { - for (var i = 0; i < this.data.nearSchoolList.length; i++) { - if (this.data.nearSchoolList[i].name == '') { - this.data.nearSchoolList.splice(i, 1) - i-- - } - } - this.setData({ - nearSchoolList: this.data.nearSchoolList - }) - } - - // 出租时长 - if (currentField == 'rentalduration') { - this.setData({ - ['newinfo.rentalduration']: this.data.fieldinfoNew['rentalduration'].choices[1].choices[this.data.leaseTimeValue].value - }) - } - - // 楼层 - if (currentField == 'floor') { - this.setData({ - ['newinfo.floor']: this.data.floorValue - 2 > 0 ? this.data.floorValue - 2 + '楼' : this.data.floorValue - 3 + '楼' - }) - } - - // 判断当前弹窗是否是必填项 再判断是否有填写数据,有执行下一步 - if (this.data.fieldinfoNew[currentField].required == 1 && (this.data.newinfo[currentField] == null || this.data.newinfo[currentField] == "" || this.data.newinfo[currentField] == undefined)) { - wx.showToast({ - title: `${currentField == 'scholl' ? '请设置' : currentField =='message' ? '请填写' : currentField =='introduction' ?'请填写' :currentField =='rent'?'请填写' :'请选择' }${this.data.fieldinfoNew[currentField].title}`, - icon: 'none' - }) - return - } - - // 判断联系方式选填其中一项 都没有则弹出提示 - if (currentField == 'wechat') { - let newinfo = this.data.newinfo - if ((newinfo.tel == null || newinfo.tel == "") && (newinfo.wechat == null || newinfo.wechat == "") && (newinfo['wechatdata']['aid'] == 0) && (newinfo.whatsapp == null || newinfo.whatsapp == "")) { - wx.showToast({ - title: `请填写联系方式`, - icon: 'none' - }) - return - } - } - - if (this.data.fieldinfo[this.data.popUpit][this.data.step].title == '微信' || this.data.fieldinfo[this.data.popUpit][this.data.step].title == 'WhatsApp' || this.data.fieldinfo[this.data.popUpit][this.data.step].title == '电话号码') { - this.data.popUpit = this.data.popUpOrder[this.data.popUpOrder.indexOf(this.data.popUpit) + 1] - this.data.step = -1 - } - - // 步数加一 - this.setData({ - step: this.data.step + 1 - }) - 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] - this.data.step = 0 - } - - // 判断下一步是否有值,有则隐藏弹窗 - let nextfield = this.data.fieldinfo[this.data.popUpit][this.data.step].field - // 判断下一步学校是否有值,原因是school值没有直接放在 nextfield 里,需要特殊处理 - if (nextfield == 'school' && this.data.nearSchoolList.length != 0) { - this.setData({ - popUpIs: "", - popUpSubtitle: "" - }) - return - } - // 判断下一步联系方式是否有值,原因联系方式弹窗不只一个,需要特殊处理 - if (nextfield == 'wechat' && ((this.data.newinfo['tel'] != null && this.data.newinfo['tel'] != '') || (this.data.newinfo['whatsapp'] != null && this.data.newinfo['whatsapp'] != '') || (this.data.newinfo['wechatdata'] && this.data.newinfo['wechatdata'].aid != 0))) { - this.setData({ - popUpIs: "", - popUpSubtitle: "" - }) - return - } - // 这是判断下一步是否有值的总处理 - if (this.data.newinfo[nextfield] != null && this.data.newinfo[nextfield] != "") { - this.setData({ - popUpIs: "", - popUpSubtitle: "" - }) - return - } - - this.data.aa.forEach(element => { - if (this.data.fieldinfo[this.data.popUpit][this.data.step].title == element.name) { - // 附近学校没有数据时加一个默认数据 - if (element.popUpIs == 'nearSchool' && this.data.nearSchoolList.length == 0) { - this.data.nearSchoolList.push({ - name: '', - distance: "" - }) - } - - // 因为 field == 'address' 分香港和非香港地区 这个是香港地区的 地址,调用地图API - if (this.data.fieldinfoNew[this.data.fieldinfo[this.data.popUpit][this.data.step].field].field == 'address') { - if (this.data.fieldinfoNew.address.type == 'map') { - element.popUpIs = "AddressHongKong" - } - } - - if (this.data.types.indexOf('edit') > -1 && this.data.fieldinfo[this.data.popUpit][this.data.step].popupwindow == 0) { - this.setData({ - popUpIs: "" - }) - return - } - - this.optionScroll(this.data.fieldinfoNew[this.data.fieldinfo[this.data.popUpit][this.data.step].field].field) - if (element.popUpIs == 'unilineInput' || element.popUpIs == 'multilineInput' || element.popUpIs == 'multilineInput1') { - this.data.focustitle = this.data.fieldinfo[this.data.popUpit][this.data.step].field - } - - this.setData({ - popUpdate: this.data.fieldinfoNew[this.data.fieldinfo[this.data.popUpit][this.data.step].field], - popUpIs: element.popUpIs, - popUpStepState: element.popUpStepState, - popUpTitle: this.data.fieldinfo[this.data.popUpit][this.data.step].title, - popUpSubtitle: "", - nearSchoolList: this.data.nearSchoolList, - focustitle: this.data.focustitle - }) - } - }); - }, - - // 单行输入框的输入 - popUpInput(e) { - let value = e.detail.value - let { - field, - popupit - } = e.currentTarget.dataset - if (field == 'introduction') value = value.substr(0, 500) - else if (field == 'address') value = value.substr(0, 100) - else if (field == 'subject') value = value.substr(0, 80) - - this.setData({ - [`newinfo.${e.currentTarget.dataset.field}`]: value - }) - }, - - popUpInput1(e) { - let value = e.detail.value - let { - field, - popupit - } = e.currentTarget.dataset - value = value.substr(0, 500) - - this.setData({ - [`newinfo.message`]: value - }) - }, - - // 点击 弹窗-单行输入框 里的完成, 获取数据并下一步 - popUpconfirm(e) { - let value = e.detail.value - let { - field, - popupit - } = e.currentTarget.dataset - - this.setData({ - [`newinfo.${field}`]: value - }) - this.popUpNextStep() - }, - - modification(e) { - this.setData({ - popUpIs: 'nearSchool', - popUpdate: this.data.fieldinfoNew['school'], - popUpit: 'address', - step: e.currentTarget.dataset.step, - popUpStepState: 2 - }) - }, - - // 新的发布 - NewRelease(e) { - // 判断微信号里有没有wxid_ - if (this.data.newinfo.wechat && this.data.newinfo.wechat.indexOf('wxid_') == 0) { - this.setData({ - triggerRules: 4 - }) - return - } - - if (this.issubmit) { - wx.showToast({ - title: '请勿重复提交~', - icon: 'none' - }) - return false - } - this.issubmit = true - - wx.showLoading({ - title: '提交中...' - }) - let status = e.currentTarget.dataset.status - 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() - } - - let newinfo = { // 下面验证需要提交的数据,...解决浅拷贝问题 - ...this.data.newinfo - } - - 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 (this.data.nearSchoolList.length > 0) { - for (var i = 0; i < this.data.nearSchoolList.length; i++) { - if (this.data.nearSchoolList[i].name == '') { - this.data.nearSchoolList.splice(i, 1) - i-- - } - } - this.setData({ - nearSchoolList: this.data.nearSchoolList - }) - } - - newinfo.school = this.data.nearSchoolList - - if (newinfo.rentalduration == '不限租期') { - newinfo.rentalduration = 0 - } - - if (newinfo.leasetime == '随时') { - newinfo.leasetime = 0 - } - - for (const key in fieldinfo) { - fieldinfo[key].forEach(element => { - if (!element) return - // 出租方式 - if (element.field == "type") { - this.data.fieldinfoNew[element.field].choices.forEach(el => { - el.choices.forEach(e => { - if (newinfo.type && newinfo.type.indexOf(e.value) >= 0) { - newinfo.type = e.key - } - }) - }) - } - - // 出租时长 - if (element.field == "rentalduration") { - element.choices.forEach(res => { - if (res.value == newinfo.rentalduration) { - newinfo.rentalduration = res.key - } - }) - } - - // 房屋类型 - if (element.field == "property") { - element.choices.forEach(res => { - if (res.value == newinfo.property) { - newinfo.property = res.key - } - }) - } - - // 性别 - if (element.field == "gender") { - element.choices.forEach((el, index) => { - if (el.value == newinfo.gender) { - newinfo.gender = index + 1 - } - }) - } - - // 发布者身份 - 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 - } - }) - }) - } - }) - } - - miucms.request(app.globalData.baseURL + '/tenement/publish/submit', { - info: newinfo, - token: this.data.newToken, - status - }).then(res => { - this.issubmit = false - if (res.code == 200) { - if (status == 0) { - wx.redirectTo({ - url: '/pages/user/user?tab=publish', - }) - } else { - wx.redirectTo({ - url: '/pages/show/show?uniqid=' + res.data.uniqid + '&cityid=' + this.data.newcity.id, - }) - } - } - if (res.code == 201) { - if (res.data && (res.data.rule == 1 || res.data.rule == 2 || res.data.rule == 3 || res.data.rule == 4)) { - this.setData({ - triggerRules: res.data.rule, - appealtoken: res.data.appealtoken - }) - wx.hideLoading() - return - } - - wx.showModal({ - title: '提示', - content: res.message - }) - - if (res.data.type == 'field') { - if (res.data && res.data.field != 'rent') { - for (const key in this.data.fieldinfo) { - this.data.fieldinfo[key].forEach(el => { - if (el.field == res.data.field) { - // 滚动 - wx.pageScrollTo({ - selector: `.clickInput${res.data.field}`, - offsetTop: -200 - }) - } - }) - } - } - - this.calculateTargetPopup(res.data.field) - } - } - wx.hideLoading() - }).catch(err => { - console.log(err); - this.issubmit = false - wx.hideLoading() - }) - - }, - - // 点击所在区域的左边 - clickAreaRegion(e) { - let index = e.currentTarget.dataset.index - this.setData({ - areaRegionIndex: index - }) - }, - - // 点击所在区域的右边 - clickAreaDistrict(e) { - let { - value, - key, - field - } = e.currentTarget.dataset - this.data.newinfo[field] = this.data.fieldinfoNew[field].choices[this.data.areaRegionIndex].value + '>>' + value - - this.setData({ - newinfo: this.data.newinfo - }) - - this.popUpNextStep() - }, - - chooseLocation: function (e) { - let that = this - // 因为 PC端 不能使用 wx.chooseLocation 组件,需要判断打开地图插件还是组件 - if (this.data.isPC) { - this.choosel() - } else { - wx.chooseLocation({ - latitude: this.data.newinfo.latitude || 22.297759, - longitude: this.data.newinfo.longitude || 114.179495, - success: function (e) { - that.data.newinfo.latitude = e.latitude - that.data.newinfo.longitude = e.longitude - that.data.newinfo.address = e.name - that.setData({ - newinfo: that.data.newinfo - }) - if (that.data.popUpIs == "") { - that.popUpNextStep() - } - - }, - fail: () => { - //未打开定位 - wx.getSetting({ - success: (res) => { - if (!res.authSetting['scope.userLocation']) { - // 打开设置界面 - wx.openSetting({}) - } - } - }) - } - }) - } - }, - - // 上传二维码 - UploadQRCode() { - let that = this - wx.chooseImage({ - count: 1, - sizeType: ['compressed'], - sourceType: ['album'], - success: function (res) { - let size = res.tempFiles[0].size / 1024 / 1024 - if (size > 10) return - let path = res.tempFiles[0].path - wx.showLoading({ - title: '上传中...' - }) - - // 开始上传二维码 - that.UploadQRCodeSend(path) - } - }) - }, - - // 上传二维码 - UploadQRCodeSend(imgUrl) { - let that = this - const uploadTask = wx.uploadFile({ - url: `${app.globalData.baseURL}/tenement/publish/uploadweixinqrcode`, - filePath: imgUrl, - name: 'files', - header: app.globalData.header, - success: function (res) { - var res = JSON.parse(res.data); - if (res.code == 200) { - that.setData({ - ['newinfo.wechatdata.url']: res.data.url, - ['newinfo.wechatdata.aid']: res.data.aid, - ['newinfo.wechatdata.image']: res.data.image, - ['newinfo.iswechattype']: 2, - contactInformationState: 2 - }) - wx.showToast({ - title: '上传成功', - }) - } else { - wx.showModal({ - title: '提示', - content: res.message - }) - } - wx.hideLoading() - }, - fail: err => { - wx.hideLoading() - } - }) - }, - - // 用户提交后返回没有填写字段需要弹出字段窗 - calculateTargetPopup(field) { - let fieldinfo = this.data.fieldinfo - for (const key in fieldinfo) { - fieldinfo[key].forEach((element, index) => { - if (element.field == field) { - this.data.aa.forEach(el => { - if (el.name == element.title) { - this.setData({ - popUpIs: el.popUpIs, - popUpTitle: this.data.fieldinfo[key][index].title, - popUpdate: this.data.fieldinfoNew[this.data.fieldinfo[key][index].field], - step: index, - popUpit: key, - popUpStepState: el.popUpStepState - }) - } - }) - } - }) - - } - }, - - // 检查输入的微信号是否是 wxid_开头的 - microSignalCheck() { - if (this.data.newinfo.wechat && this.data.newinfo.wechat.indexOf('wxid_') == 0) { - this.setData({ - triggerRules: 4, - popUpIs: "" - }) - } - }, - - // 选项滚动 - optionScroll(field) { - // 月租和面积不滚动,原因是当用户弹出月租弹窗图层是同时获取焦点的,这样会把焦点一起滚动 - if (field == "rent" || field == "acreage") { - return - } - - for (const key in this.data.fieldinfo) { - this.data.fieldinfo[key].forEach(el => { - if (el.field == field) { - // 滚动 - wx.pageScrollTo({ - selector: `.clickInput${field}`, - offsetTop: -200 - }) - } - }) - } - }, - - bindfocusfocus() { - if (!this.data.isPC) { - this.setData({ - focusState: true - }) - } - }, - bindblurblur() { - this.setData({ - focusState: false - }) - }, - - setValue(e) { - let key = e.currentTarget.dataset['key'] || (e.detail.currentTarget && e.detail.currentTarget.dataset['key']) - let value = e.currentTarget.dataset['value'] || (e.detail.currentTarget && e.detail.currentTarget.dataset['value']) - let status = e.currentTarget.dataset['status'] || (e.detail.currentTarget && e.detail.currentTarget.dataset['status']) - - if (status == 'boolean' && value == "false") value = false - else if (status == 'boolean' && value == "true") value = true - - this.setData({ - [key]: value - }) - }, - - // 禁止用户滚动,原因是有可能输入框会被用户滚走 - handScroll() { - return - }, - - -}) \ No newline at end of file diff --git a/pages/askHousing copy/askHousing.json b/pages/askHousing copy/askHousing.json deleted file mode 100644 index 5307720..0000000 --- a/pages/askHousing copy/askHousing.json +++ /dev/null @@ -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" - } -} \ No newline at end of file diff --git a/pages/askHousing copy/askHousing.wxml b/pages/askHousing copy/askHousing.wxml deleted file mode 100644 index 6a372bf..0000000 --- a/pages/askHousing copy/askHousing.wxml +++ /dev/null @@ -1,945 +0,0 @@ - - - - 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; - - - - - - - - - - - - - - - - - - - - - - - - - - - 发布求房源 - - - - - 发布须知 - - 展开 - - - - - - {{ index + 1 + '.'}}{{ item }} - - - - - - - - - - 香港 - - 求房源 - - - - 您还可以发布 3 条普通房源 - - 了解更多 - - - - - - - - - {{ newcity.name }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 请至少提供其中一项联系方式,这是对方联系你的唯一途径 - - - - - 微信 - - - - - 上传二维码 - - - - - - - - - - - - - - - - - - - - 重新上传 - - - - - - - - {{ item.title }} - - - - - - - - - - - - - 发布须知: - 请按真实身份发布、请勿发布非寄托官方群/代看房信息,违规发布将被永久禁言,感谢合作! - - - - - - - {{ newtype }} - - 保存并退出 - 马上发布 - - - 提交 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pages/askHousing copy/askHousing.wxss b/pages/askHousing copy/askHousing.wxss deleted file mode 100644 index 1dd699e..0000000 --- a/pages/askHousing copy/askHousing.wxss +++ /dev/null @@ -1,1694 +0,0 @@ -/* pages/edit/edit.wxss */ -@import '../common//common.wxss'; - -.header { - padding: 30rpx; - font-size: 30rpx; - font-size: 0; -} - -.container { - padding-bottom: 170rpx; - width: 100vw; - overflow-x: hidden; - background: rgba(246, 246, 246, 1); -} - -.header image { - width: 88rpx; - height: 88rpx; - border-radius: 50%; - vertical-align: top; - -} - -.header .r { - display: inline-block; - width: calc(100% - 88rpx); - padding-left: 16rpx; -} - -.header .username { - font-size: 30rpx; - color: #333; - line-height: 88rpx; -} - -.header-tips { - color: #000000; - /* padding: 20px 30rpx; */ - padding: 0px 30rpx; - line-height: 1.6; - border-top: 20rpx solid rgba(246, 246, 246, 1); - font-size: 27rpx; -} - -.header-tips .name-tips { - display: flex; - align-items: center; - justify-content: space-between; - color: #333333; - font-size: 30rpx; - line-height: 45rpx; -} - -.header-tips .name-tips .box { - display: flex; - align-items: center; - font-weight: 650; - -} - -.header-tips .name-tips image { - width: 35rpx; - height: 40rpx; - margin-right: 15rpx; -} - -.header-tips .name-tips text { - color: #7F7F7F; - line-height: 45rpx; - font-size: 24rpx; -} - -.header-tips text { - color: #555555; - line-height: 45rpx; -} - -.header-tips .name-tips .name-tips-unfold-btn { - height: 50rpx; - border: 2rpx solid #d7d7d7; - padding: 0 24rpx; - border-radius: 30rpx; - color: #7f7f7f; - display: flex; - align-items: center; - font-size: 21rpx; - -} - -.header-tips .name-tips .name-tips-unfold-btn image { - width: 18rpx; - height: 13rpx; -} - -.bottomArrow { - width: 13rpx; - height: 13rpx; - border-bottom: 2rpx solid #7f7f7f; - border-right: 2rpx solid #7f7f7f; - transform: rotate(45deg); - margin-left: 5px; -} - -.rightArrow { - width: 13rpx; - height: 13rpx; - border-top: 2rpx solid #7f7f7f; - border-right: 2rpx solid #7f7f7f; - transform: rotate(45deg); - margin-left: 5px; -} - -.header-tips .name-tips-close-btn { - width: 34rpx; - height: 34rpx; - border: 2rpx solid #aaaaaa; - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - margin: 0 auto; - margin-top: 30rpx; -} - -.header-tips .name-tips-close-btn image { - width: 20rpx; - height: 14rpx; -} - -.repeatedRelease, -.submitFailure { - position: fixed; - top: 0; - left: 0; - display: flex; - width: 750rpx; - height: 100vh; - background-color: rgba(0, 0, 0, 0.6); - z-index: 1001; - align-items: flex-end; - flex-direction: column; - justify-content: flex-end; -} - -.repeatedRelease .repeatedRelease-centre { - border-bottom: 1rpx dotted #d7d7d7; -} - -.repeatedRelease .repeatedRelease-bottom { - display: flex; - justify-content: center; - align-items: center; - flex-direction: column; - border-radius: 20rpx; - position: relative; - padding-top: 56rpx; - background-color: #f2f2f2; - margin: 30rpx 30rpx 50rpx; -} - -.repeatedRelease .repeatedRelease-bottom .repeatedRelease-title { - display: flex; - align-items: center; - flex-direction: column; - color: #333; - font-size: 32rpx; - line-height: 32rpx; - font-weight: 650; - -} - -.repeatedRelease .repeatedRelease-bottom .repeatedRelease-title .repeatedRelease-title-icon { - display: flex; - align-items: center; -} - -.repeatedRelease .repeatedRelease-bottom .repeatedRelease-title text { - height: 65rpx; - line-height: 65rpx; -} - -.repeatedRelease .repeatedRelease-bottom .repeatedRelease-title image { - width: 42rpx; - height: 48rpx; - margin-right: 20rpx; -} - -/* 黄色的点 */ -.yellow-dot { - width: 7.5rpx; - height: 15rpx; - display: block; - background-color: rgba(255, 215, 82, 1); - margin-right: 20rpx; - border-radius: 30rpx; - -} - -.nearbySchool-yellow-dot { - width: 8rpx; - height: 16rpx; - display: block; - background-color: rgba(255, 215, 82, 1); - margin-right: 20rpx; - border-radius: 8rpx; -} - -.serial-number { - height: 38rpx; - line-height: 38rpx; - padding: 0 20rpx; - background-color: rgba(255, 215, 82, 1); - display: inline-block; - border-radius: 22rpx 0 22rpx 0; - font-size: 20rpx; - margin-right: 22rpx; -} - -.footer-btn { - position: fixed; - bottom: 0; - width: 750rpx; - /* height: 150rpx; */ - height: 186rpx; - display: flex; - justify-content: space-between; - align-items: center; - background-color: #fff; - border-top: 2rpx solid #d7d7d7; - padding: 0 25rpx; - z-index: 2; -} - -.footer-btn .submit { - flex: 1; - display: flex; - justify-content: center; - align-items: center; - /* height: 90rpx; */ - /* line-height: 90rpx; */ - 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; */ - /* border-radius: 50rpx; */ - border-radius: 82.5rpx; - color: #fff; - /* font-weight: 400; */ - font-weight: 650; - font-size: 36rpx; - color: #fff; -} - -.footer-btn .save1 { - margin-right: 30rpx; - color: #000; - background-color: #fff; - font-weight: 400; - border: 1rpx solid rgba(215, 215, 215, 1); -} - -.trigger-rules-close-icon { - position: absolute; - top: 0rpx; - right: 30rpx; - width: 30rpx; - height: 30rpx; - transform: rotate(45deg); - padding: 25rpx 0rpx; -} - -.edit-option { - padding-top: 48rpx; -} - -.edit-option-item { - border-bottom: 15rpx solid #eeeff3; - padding: 0 30rpx 45rpx; -} - -.edit-box { - background-color: #fff; - /* border-radius: 60rpx 60rpx 0 0; */ -} - -.edit-top { - height: 150rpx; - line-height: 150rpx; - display: flex; - justify-content: center; - align-items: center; - margin-top: 16rpx; - color: #333; - font-weight: 400; - border-bottom: 2rpx dashed #d7d7d7; - font-size: 30rpx; -} - -.edit-top .clickInputLeftArrow { - margin-right: 13px; -} - -.edit-box .edit-top-img { - width: 26rpx; - height: 30rpx; - margin-right: 20rpx; -} - -.clickInput-box { - margin-top: 55rpx; -} - -.edit-option .edit-option-item:first-of-type .clickInput-box:first-of-type { - margin-top: 0; -} - -.clickInput-box input { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - width: 586rpx; -} - -.clickInput-box:last-child { - /* padding-bottom: 45rpx; */ -} - -.clickInput-title { - color: #555; - font-size: 28rpx; - line-height: 28rpx; -} - -.clickInput { - display: flex; - align-items: center; - justify-content: space-between; - border: 2rpx solid #d7d7d7; - padding: 0 30rpx; - height: 100rpx; - line-height: 100rpx; - border-radius: 10rpx; - margin-top: 28rpx; -} - -.clickInput input { - width: 100%; -} - -.clickInput-img { - width: 22rpx; - height: 13rpx; - transform: rotate(-90deg); -} - -.clickInput-imgimg { - width: 22rpx; - height: 13rpx; -} - -.homeVideo-box { - margin-top: 55rpx; -} - -.homeVideo-title { - color: #555; - font-size: 28rpx; - line-height: 28rpx; -} - -.homeVideo-list { - justify-content: space-between; - width: 678rpx; - flex-wrap: wrap; - -} - -.homeVideo-list::after { - content: ""; - width: 178rpx; - margin-top: 24rpx; -} - -.homeVideo-case { - width: 678rpx; - justify-content: space-between; -} - -.homeVideo-add { - width: 178rpx; - height: 178rpx; - border: 2rpx solid #d3d3d3; - border-radius: 10rpx; - background-color: #f2f2f2; - display: flex; - justify-content: center; - align-items: center; - margin-top: 24rpx; - position: relative; -} - -.homeVideo-add-video { - max-width: 100%; - max-height: 100%; - border-radius: 10rpx; -} - -.homeVideo-add-img { - width: 38rpx; - height: 38rpx; -} - -.homePhoto-box { - margin-top: 55rpx; -} - -.homePhoto-title { - color: #555; - font-size: 28rpx; - line-height: 28rpx; -} - -.homePhoto-add { - width: 178rpx; - height: 178rpx; - border: 2rpx solid #d3d3d3; - border-radius: 10rpx; - background-color: #f2f2f2; - display: flex; - justify-content: center; - align-items: center; - position: relative; - margin-right: 20rpx; - margin-bottom: 20rpx; -} - -.homePhoto-add-icon { - width: 38rpx; - height: 38rpx; -} - -.homePhoto-add-img { - max-width: 100%; - max-height: 100%; -} - -.red-dot { - position: absolute; - top: -16rpx; - right: -16rpx; - width: 32rpx; - height: 32rpx; - background-color: #c54235; - border-radius: 50%; -} - -.homePhoto-boxes { - margin-top: 24rpx; - display: flex; - flex-wrap: wrap; -} - -.homeVideo-videoplay { - width: 50rpx; - height: 50rpx; - position: absolute; -} - -.clickInputLeftArrow { - width: 17rpx; - height: 17rpx; - border-bottom: 2rpx solid #7f7f7f; - border-right: 2rpx solid #7f7f7f; - transform: rotate(-45deg); - margin-left: 5px; -} - - -.clickInputBottomArrow { - width: 17rpx; - height: 17rpx; - border-bottom: 2rpx solid #7f7f7f; - border-right: 2rpx solid #7f7f7f; - transform: rotate(45deg); - margin-left: 5px; -} - -.pop-up-arrow { - width: 30rpx; - height: 30rpx; - transform: rotate(-90deg); - - /* width: 20rpx; */ - /* height: 20rpx; */ - /* border-bottom: 7rpx solid #333333; - border-right: 7rpx solid #333333; - transform: rotate(45deg); - margin-top: -8rpx; */ -} - - -.pop-up { - position: fixed; - top: 0; - left: 0; - height: 100vh; - width: 750rpx; - z-index: 1001; - display: flex; - align-items: flex-end; - background-color: rgba(0, 0, 0, 0.596078431372549); -} - -.pop-up-box { - width: 100%; - background-color: #fff; - border-radius: 60rpx 60rpx 0 0; - display: flex; - align-items: center; - flex-direction: column; - position: relative; - overflow-y: scroll; - /* z-index: 100; */ -} - -.pop-up-top { - width: 90rpx; - height: 46rpx; - line-height: 46rpx; - display: flex; - justify-content: center; - align-items: center; - background-color: #fdda55; - border-radius: 0 0 50rpx 50rpx; - position: relative; -} - -.pop-up-box .pop-up-title { - font-size: 42rpx; - margin-top: 80rpx; - font-weight: 650; -} - -.AListOF-option { - flex-direction: column; - width: 100%; -} - -.option-box { - display: flex; - width: 100%; - padding: 0 74rpx; - margin-top: 66rpx; - padding-bottom: 46rpx; - max-height: 60vh; - overflow: scroll; -} - -.AListOF-option-item { - width: 100%; -} - -.option-item { - height: 120rpx; - line-height: 120rpx; - text-align: center; - font-size: 30rpx; - background-color: #f2f2f2e0; - border-radius: 20rpx; - margin-bottom: 30rpx; - -} - -.pop-up-footer { - height: 186rpx; - line-height: 186rpx; - text-align: center; - font-size: 30rpx; - color: #000; - font-weight: 850; - border-top: 2rpx solid #d7d7d7; - width: 100%; - display: flex; - z-index: 2; - padding: 0 30rpx; -} - -.pop-up-footer .pop-up-save, -.pop-up-footer .pop-up-nextStep { - /* flex: 1; */ - width: 330rpx; - display: flex; - justify-content: center; - align-items: center; - height: 96rpx; - line-height: 96rpx; - background-color: #fff; - border-radius: 82.5rpx; - font-size: 36rpx; - border: 1rpx solid rgba(215, 215, 215, 1); - font-weight: 400; -} - -.pop-up-footer .pop-up-nextStep { - background-color: rgba(98, 177, 255, 1); - color: #fff; - font-weight: 650; - margin-left: 30rpx; - border: 1rpx solid rgba(98, 177, 255, 1); -} - -.twoLines-option { - display: flex; - justify-content: space-between; - flex-wrap: wrap; -} - -.twoLines-option .twoLines-option-item { - width: 270rpx; -} - -.last-step-text { - color: #555555; - font-size: 24rpx; - margin-top: 40rpx; - line-height: 42rpx; -} - -.unilineInput-box { - height: 120rpx; - line-height: 120rpx; - width: 100%; - margin: 0 30rpx; - background-color: #f4f4f4; - width: 690rpx; - border-radius: 15rpx; - display: flex; - padding: 0 20rpx; - margin-top: 70rpx; - margin-bottom: 150rpx; -} - -.unilineInput-box input { - flex: 1; - height: 120rpx; - line-height: 120rpx; -} - -.pop-up-skip { - font-size: 28rpx; - color: #555; - position: absolute; - top: 38rpx; - right: 30rpx; - display: flex; - align-items: center; -} - -.intro { - margin: 30px; - text-align: center; -} - -.picker { - height: 130rpx; - line-height: 130rpx; - background-color: rgba(98, 177, 255, 0.145098039215686); - width: 600rpx; - border-radius: 50rpx; - display: inline-flex; - justify-content: center; - align-items: center; - border: none; - color: #c40000; -} - -.pickerpitch { - font-weight: bolder; - font-size: 30rpx; -} - -.pop-up-HomeVideo .homeVideo-add { - margin-top: 72rpx; - margin-bottom: 132rpx; -} - -.close-btn { - position: absolute; - width: 32rpx; - height: 32rpx; - background-color: #c40000; - display: flex; - justify-content: center; - align-items: center; - border-radius: 50rpx; - transform: rotate(45deg); - top: -16rpx; - right: -16rpx; -} - -.close-btn image { - width: 18rpx; - height: 18rpx; -} - -.picker { - position: relative; -} - -.picker::after, -.picker::before { - content: ""; - height: 1px; - width: 100%; - position: absolute; - top: -1000px; - left: 0; -} - -.pop-up-homePhoto-image-box { - display: flex; - justify-content: space-between; - flex-wrap: wrap; - padding: 0 15rpx; - margin-top: 70rpx; - margin-bottom: 76rpx; -} - -.pop-up-homePhoto-image-box .homePhoto-add { - margin: 0 30rpx; -} - -.pop-up-homePhoto-image { - width: 178rpx; - height: 178rpx; - border: 2rpx solid #d3d3d3; - border-radius: 10rpx; - margin: 0 30rpx 20rpx; - position: relative; -} - -.pop-up-homePhoto-image .pop-up-homePhoto-image-item { - width: 178rpx; - height: 178rpx; -} - -.pop-up-homePhoto-image.pop-up-homePhoto-image-kong { - border-style: dashed; -} - -.multilineInput .last-step-text { - padding: 0 30rpx; - margin-bottom: 30rpx; -} - -.numberwords { - display: flex; - align-self: flex-end; - color: #aaa; - height: 48rpx; - line-height: 24rpx; - padding-right: 24rpx; - padding-bottom: 24rpx; -} - -.multilineInput .multilineInput-textarea { - width: 690rpx; - border-top: 2rpx dashed #d7d7d7; - padding: 30rpx; - min-height: 700rpx; -} - -.nearSchool {} - -.nearSchool .nearSchool-box { - display: flex; - flex-direction: column; - align-items: center; - margin-top: 52rpx; - margin-bottom: 34rpx; - max-height: 60vh; -} - -.nearSchool .nearSchool-item { - position: relative; - display: flex; - flex-direction: column; - border-radius: 20rpx; - width: 690rpx; - height: 242rpx; - border: 2rpx solid #d7d7d7; - margin-bottom: 30rpx; -} - -.nearSchool .nearSchool-serial { - position: absolute; - width: 40rpx; - height: 40rpx; - border-radius: 20rpx 0 20rpx 0; - background-color: #ffd752; - display: flex; - justify-content: center; - align-items: center; - font-size: 16rpx; - color: #998232; - top: -2rpx; - left: -2rpx; -} - -.nearSchool .nearSchool-input { - height: 102rpx; - display: block; - padding: 0 28rpx; -} - -.nearSchool .nearSchool-textarea { - padding: 24rpx 30rpx; - border-top: 2rpx solid #d7d7d7; - width: 630rpx; - height: 80rpx; -} - -.nearSchool .nearSchool-add { - display: flex; - width: 75rpx; - height: 75rpx; - justify-content: center; - align-items: center; - background-color: #f2f2f2; - border-radius: 50rpx; - margin-top: 44rpx; -} - -.nearSchool .nearSchool-add image { - width: 34rpx; - height: 34rpx; -} - -.yellowDot { - width: 9rpx; - height: 22rpx; - border-radius: 8rpx; - margin-right: 14rpx; - background-color: #ffd752; -} - -.contactInformation .contactInformation-item .title { - display: flex; - align-items: center; - margin-bottom: 36rpx; -} - -.contactInformation .contactInformation-box { - display: flex; - width: 690rpx; - flex-direction: column; - margin-top: 74rpx; -} - -.contactInformation .contactInformation-item { - margin-bottom: 64rpx; -} - -.contactInformation .contactInformation-wechat { - display: flex; - align-items: center; - justify-content: space-between; - width: 690rpx; - /* margin: 36rpx 0 66rpx; */ -} - -.contactInformation .contactInformation-wechat-item { - /* width: 330rpx; */ - width: 690rpx; - height: 100rpx; - line-height: 100rpx; - background-color: #f4f4f4; - border-radius: 15rpx; - display: flex; - align-items: center; - justify-content: center; - position: relative; -} - -/* .contactInformation .contactInformation-wechat-item .contactInformation-recommend { - position: absolute; - top: 0; - right: 0; - margin: 0; - width: 70rpx; - height: 70rpx; -} */ - -.contactInformation .contactInformation-wechat-item image { - width: 28rpx; - height: 28rpx; - margin-right: 14rpx; -} - -.contactInformation .contactInformation-input { - height: 116rpx; - line-height: 116rpx; - padding: 0 18rpx; - border: 2rpx solid #d7d7d7; - border-radius: 20rpx; -} - -.contactInformation .last-step-text { - padding: 0 30rpx; -} - -.contactInformation .contactInformation-wechat-input { - display: flex; - border: 2rpx solid #d7d7d7; - - border-radius: 20rpx; -} - -.contactInformation .contactInformation-wechat-input .already-uploaded, -.contactInformation .contactInformation-wechat-input input { - flex: 1; - border-right: 2rpx solid #d7d7d7; - height: 100rpx; - line-height: 100rpx; - padding-left: 20rpx; -} - -.contactInformation .contactInformation-wechat-input .already-uploaded { - display: flex; - justify-content: center; - align-items: center; -} - -.contactInformation .contactInformation-wechat-input .already-uploaded image { - width: 32rpx; - height: 32rpx; - margin-right: 16rpx; -} - -.contactInformation .QRCode-box { - width: 690rpx; - height: 180rpx; - border: 1rpx solid rgba(215, 215, 215, 1); - border-radius: 15rpx; - position: relative; -} - -.contactInformation .QRCode-box .QRCode-img { - width: 150rpx; - height: 150rpx; -} - -.contactInformation .contactInformation-close { - display: flex; - justify-content: center; - align-items: center; - height: 100rpx; - line-height: 100rpx; - width: 82rpx; -} - -.contactInformation .contactInformation-close image { - width: 26rpx; - height: 26rpx; - transform: rotate(45deg); -} - - -.ofDate .ofDate-week { - width: 100%; - display: flex; - justify-content: space-between; - /* padding: 0 64rpx; */ - border-bottom: 2rpx dashed #d7d7d7; - line-height: 68rpx; - height: 68rpx; - margin-top: 66rpx; - padding: 0 25rpx; -} - -.ofDate .ofDate-week .ofDate-week-item { - width: 100rpx; - text-align: center; -} - -.ofDate .ofDate-box { - max-height: 55vh; - overflow: scroll; -} - -.ofDate .ofDate-item { - margin-top: 78rpx; -} - -.ofDate .ofDate-date { - display: flex; - flex-wrap: wrap; - /* justify-content: space-between; */ - margin-top: 34rpx; - padding: 0 25rpx; -} - -.ofDate .ofDate-blank, -.ofDate .ofDate-number { - width: 100rpx; - height: 95rpx; - line-height: 95rpx; - text-align: center; - color: #555; -} - -.ofDate .ofDate-title { - color: #000; - font-size: 24rpx; - font-weight: 650; - text-align: center; -} - -.ofDate .ofDate-number-already { - color: #D7D7D7; -} - -.ofDate .ofDate-number-current { - position: relative; - z-index: 2; - display: flex; - justify-content: center; - align-items: center; -} - -.ofDate .ofDate-number-current::before { - content: ""; - width: 60rpx; - height: 60rpx; - background-color: #e5e8f0; - border-radius: 50rpx; - position: absolute; - z-index: -1; -} - -.area .area-box { - border-top: 2rpx dashed #d7d7d7; - margin-top: 68rpx; - width: 100%; - display: flex; - height: 60vh; - overflow-y: scroll; - -} - -.area .area-box .area-region { - background-color: #f2f2f2; - -} - -.area .area-box .area-region-item { - height: 100rpx; - line-height: 100rpx; - width: 190rpx; - text-align: center; - -} - -.area .area-box .area-region-item.area-region-item-pitch { - background-color: #fff; - font-weight: 800; - display: flex; - justify-content: center; - align-items: center; -} - -.area .area-box .yellow-dot { - width: 10rpx; - height: 28rpx; - background-color: #ffd752; - border-radius: 30rpx; -} - -.area .area-box .area-district { - flex: 1; - height: 100%; - overflow-y: scroll; -} - -.area .area-box .area-district .area-district-item { - height: 100rpx; - line-height: 100rpx; - padding-left: 45rpx; - border-bottom: 2rpx solid #f2f2f2; -} - -.pageInput-box { - margin-top: 55rpx; -} - -.pageInput { - border: 2rpx solid #d7d7d7; - display: flex; - justify-content: space-between; - height: 100rpx; - line-height: 100rpx; - align-items: center; - padding: 0 30rpx; - margin-top: 28rpx; - border-radius: 10rpx; -} - -.pageInput input { - flex: 1; - height: 100rpx; -} - -.pageInput text { - color: #555; -} - - -.contact-way-hint { - color: #ccae42; - display: flex; - justify-content: center; - align-items: center; - font-size: 25rpx; - margin-top: 55rpx; -} - -.contact-way { - margin-top: 55rpx; -} - -.contact-way .contact-way-title { - color: #555; - font-size: 28rpx; - line-height: 28rpx; -} - -.contact-way .contact-way-input { - display: flex; - align-items: center; - justify-content: space-between; - border: 2rpx solid #d7d7d7; - padding: 0 30rpx; - height: 100rpx; - line-height: 100rpx; - border-radius: 10rpx; - margin-top: 28rpx; - width: 630rpx; - display: block; -} - -.pageTextarea-box { - margin-top: 55rpx; -} - -.pageTextarea-box .pageTextarea-title { - color: #555; - font-size: 28rpx; - line-height: 28rpx; -} - -.pageTextarea-box .pageTextarea { - border: 2rpx solid #d7d7d7; - border-radius: 10rpx; - margin-top: 28rpx; - display: flex; - flex-direction: column; -} - -.pageTextarea-box .pageTextarea .pageTextarea-numberwords { - display: flex; - justify-content: flex-end; - color: #aaa; - padding-right: 15rpx; - padding-bottom: 15rpx; -} - -.pageTextarea-box .pageTextarea textarea { - min-height: 175rpx; - padding: 30rpx 30rpx 0; - width: 630rpx; - height: 230rpx; -} - -.pageTextarea-box .pageTextarea input { - height: 100rpx; - padding: 0 30rpx; - width: 630rpx; -} - -.nearbySchool { - margin-top: 55rpx; -} - -.nearbySchool-box { - width: 690rpx; - border-radius: 10rpx; - border: 2rpx solid #d7d7d7; - padding: 0 30rpx; - margin-top: 28rpx; -} - -.nearbySchool-box .nearbySchool-item { - display: flex; - flex-direction: column; - padding-top: 34rpx; - padding-bottom: 40rpx; - font-size: 24rpx; -} - -.nearbySchool-box .nearbySchool-item:not(:last-child) { - border-bottom: 2rpx dashed #d7d7d7; -} - -.nearbySchool-box .nearbySchool-item .nearbySchool-title { - display: flex; - align-items: center; - margin-bottom: 20rpx; - font-size: 25rpx; - line-height: 25rpx; - font-weight: 650; -} - -.nearbySchool-box .nearbySchool-item .nearbySchool-title text { - display: block; - width: 600rpx; - word-break: break-all; - line-height: 30rpx; -} - -.nearbySchool-box .nearbySchool-item .nearbySchool-content { - margin-left: 28rpx; - word-break: break-word; - line-height: 38rpx; -} - -.nearbySchool-box .nearbySchool-title { - color: #555; - font-size: 28rpx; - line-height: 28rpx; -} - -.nearbySchool-box .nearbySchool-modification { - height: 90rpx; - line-height: 90rpx; - display: flex; - justify-content: center; - text-align: center; - color: #7F7F7F; -} - -.picker { - max-height: 60vh; -} - -.option-hover, -.option-hove { - background-color: rgba(98, 177, 255, 1); - color: #fff; -} - -.AddressHongKong-box { - align-items: center; - padding-right: 30rpx; -} - -.pitchdate { - content: ""; - width: 60rpx; - height: 60rpx; - border-radius: 50%; - color: #fff !important; - position: relative; - z-index: 1; -} - -.pitchdate::after { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - content: ""; - display: block; - width: 60rpx; - height: 60rpx; - background-color: rgba(98, 177, 255, 1); - border-radius: 50%; - color: #fff !important; - z-index: -1; -} - -.click-areaDistrict-hover { - color: #000; - font-weight: 600; -} - -.keyboard { - width: 750rpx; - height: 90rpx; - line-height: 90rpx; - font-size: 35rpx; - color: rgb(36, 187, 108, 1); - border: 2rpx solid #eeeeee; - border-left: none; - border-right: none; - z-index: 999; - background-color: #fff; - display: flex; - align-items: center; -} - -.keyboard1 { - padding-left: 35rpx; -} - -.keyboard .keyboard-view { - height: 90rpx; - line-height: 90rpx; - margin: 0 35rpx; - flex: 1; - display: flex; -} - -.keyboard .keyboard-view:first-child { - justify-content: flex-start; -} - -.keyboard .keyboard-view:last-child { - color: #aaa; - justify-content: flex-end; - text-align: right; -} - -.submitFailure-box .submitFailure-title text:first-child { - margin-bottom: 0; -} - -.submitFailure-box .submitFailure-title { - margin: 40rpx 0 38rpx; -} - -.notice-publication { - background-color: rgba(246, 246, 246, 1); - height: 105rpx; - border-radius: 15rpx; - line-height: 36rpx; - font-size: 24rpx; - color: #555555; - padding: 0 18rpx; - margin-top: 48rpx; -} - -.notice-publication .notice-publication-key { - color: #000000; - font-weight: 650; - display: contents; -} - -.edit-head-surplus { - justify-content: space-between; - height: 72rpx; - background-color: #fff; - font-size: 25rpx; - border-radius: 20rpx; - margin: 0 30rpx 36rpx; - padding: 0 24rpx; -} - -.edit-head-surplus text { - font-weight: 650; -} - -.edit-head-surplus .edit-head-surplus-icon { - width: 24rpx; - height: 24rpx; - margin-left: 12rpx; -} - -.edit-head-head { - justify-content: space-between; - margin: 30rpx 30rpx 40.5rpx; -} - -.edit-head-head .edit-head-area { - color: #000000; - line-height: 45rpx; - font-size: 36rpx; - font-weight: 650; -} - -.edit-head-head .edit-head-area .edit-head-area-icon { - width: 36rpx; - height: 36rpx; - margin-right: 12rpx; -} - -.edit-head-head .edit-head-type { - height: 42rpx; - font-size: 27rpx; - color: #555555; - border: 1rpx solid rgba(215, 215, 215, 1); - padding: 0 11rpx; - border-radius: 53rpx; -} - -.rent-budget {} - -.rent-budget .rent-budget-unit { - font-size: 24rpx; - color: #fff; - background-color: #000000; - width: 108rpx; - height: 36rpx; - border-radius: 8rpx; - /* margin-left: calc(100% - 180rpx); */ - margin-top: 60rpx; - margin-right: 69rpx; - align-self: flex-end; -} - - - -/* 标记 */ - -wx-slider { - /* opacity: 0; */ -} - -wx-slider .wx-slider-handle-wrapper { - height: 12rpx; -} - -.rent-budget .sliderHCon { - width: 100%; - margin: auto; - display: flex; - justify-content: center; - align-items: center; - flex-direction: column; -} - -.rent-budget .twoSlider { - width: 100%; - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - position: relative; -} - -.rent-budget .select-area { - padding-top: 102rpx; - margin: 0 auto 129rpx; - display: flex; - flex-direction: column; - align-items: center; -} - -.rent-budget .slider-container { - width: calc(100% - 14px); - display: flex; - position: relative; -} - -.rent-budget .slider-right { - padding-left: 11rpx; -} - -.rent-budget .slider-left, -.rent-budget .slider-right { - margin: 0; -} - -.rent-budget .select-construct { - position: relative; - width: 600rpx; - margin: 0 auto; -} - -.rent-budget .select-value { - position: absolute; - top: 22.5rpx; - color: #50E3C2; - font-weight: 700; - font-size: 42rpx; - white-space: nowrap; - height: 48rpx; -} - -.pop-target-area {} - -.pop-target-area .pop-area-list { - width: 100%; - border-top: 1rpx solid #ebebeb; - padding-top: 39rpx; - padding-left: 57rpx; - padding-right: 30rpx; - margin-top: 30rpx; - max-height: 60vh; - overflow: auto; -} - -.pop-target-area .pop-area-item { - margin-bottom: 45rpx; -} - -.pop-target-area .pop-area-name { - color: #000; - font-size: 30rpx; - font-weight: 650; - position: relative; - margin-bottom: 30rpx; -} - -.pop-target-area .pop-area-name::after { - content: ""; - position: absolute; - top: 50%; - left: -27rpx; - transform: translateY(-50%); - background-color: rgba(253, 218, 85, 1); - width: 9rpx; - height: 27rpx; - border-radius: 8rpx; -} - -.pop-target-area .pop-area-content { - flex-wrap: wrap; -} - -.pop-target-area .pop-area-content-item { - border: 1rpx solid rgba(235, 235, 235, 1); - border-radius: 15rpx; - height: 72rpx; - font-size: 27rpx; - color: #7f7f7f; - padding: 0 18rpx; - margin-right: 15rpx; - margin-bottom: 15rpx; -} - -.pop-target-area .pop-area-content-item.pitch { - color: #50E3C2; - border-color: #50E3C2; -} - -.pop-target-area .pop-area-pitch-list { - border-top: 1rpx solid #ebebeb; - width: 750rpx; - background-color: rgba(246, 246, 246, 1); - flex-wrap: wrap; - padding: 20rpx 30rpx 0; - justify-content: space-between; - -} - -.pop-target-area .pop-area-pitch-item { - margin-bottom: 24rpx; -} - -.pop-target-area .pop-area-pitch-index { - color: #fff; - width: 30rpx; - height: 30rpx; - border-radius: 50%; - background-color: #000000; - margin-right: 15rpx; - font-size: 20rpx; -} - -.pop-target-area .pop-area-pitch-content { - color: #000000; - font-size: 24rpx; - width: 220rpx; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - display: inline-block; -} - -.pop-target-area .pop-area-pitch-cross { - width: 18rpx; - height: 18rpx; - margin-left: 24rpx; -} - -.pop-target-area .last-step-text { - padding: 0 30rpx; -} - -.pop-new-marquee-box { - height: 500rpxx; -} - -.pop-new-marquee-box .pop-new-marquee-unlimited { - font-size: 24rpx; - color: #000; - align-self: flex-start; - margin-left: 48rpx; - margin-bottom: 48rpx; - margin-top: 91.5rpx; -} - -.pop-new-marquee-box .pop-new-marquee-unlimited .pop-new-marquee-unlimited-icom { - width: 30rpx; - height: 30rpx; - margin-right: 12rpx; -} - -.pop-new-marquee-box .pop-new-marquee-unlimited .pop-new-marquee-unlimited-unselected-icom { - border: 5rpx solid #d7d7d7; - border-radius: 50%; -} - -.pop-new-marquee-box .pop-new-marquee-line { - width: 654rpx; - height: 1rpx; - background-color: #ebebeb; -} - -.pop-new-marquee-box .pop-new-marquee-list { - flex-wrap: wrap; - justify-content: space-between; - padding: 27.75rpx 0 27.75rpx 48rpx; - margin-bottom: 64.5rpx; - width: 100%; -} - -.pop-new-marquee-box .pop-new-marquee-list .pop-new-marquee-item { - width: 33.33%; - padding: 27.75rpx 0; - font-size: 27rpx; - color: #555555; -} - -.pop-new-marquee-box .pop-new-marquee-list .pop-new-marquee-case { - width: 30rpx; - height: 30rpx; - border-radius: 8rpx; - border: 4rpx solid #aaaaaa; - margin-right: 15rpx; -} - -.target-area {} - -.target-area .target-area-list { - flex-direction: column; - padding-top: 28rpx; -} - -.target-area .target-area-list .target-area-item { - margin-bottom: 3rpx; -} - -.target-area .target-area-list .target-area-index { - width: 30rpx; - height: 30rpx; - border-radius: 50%; - background-color: #000; - color: #fff; - font-size: 20rpx; - margin-right: 15rpx; -} - -.target-area .target-area-list .target-area-content { - width: 650rpx; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - display: inline-block; -} - -.target-area .target-area-list .target-area-cross { - width: 18rpx; - height: 18rpx; - padding: 24rpx; -} - -.target-area .target-area-edit { - width: 192rpx; - height: 60rpx; - font-size: 30rpx; - color: #555555; - background-color: rgba(242, 242, 242, 0.96078431372549); - border-radius: 300rpx; - margin: 34rpx auto 0; -} - -.target-area .target-area-edit .target-area-edit-icon { - width: 30rpx; - height: 30rpx; - margin-right: 9rpx; -} \ No newline at end of file diff --git a/pages/askHousing/askHousing.js b/pages/askHousing/askHousing.js index 935ee7e..8cb52ed 100644 --- a/pages/askHousing/askHousing.js +++ b/pages/askHousing/askHousing.js @@ -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 - // } - // }) - // }) - // } }) } diff --git a/pages/askHousing/askHousing.wxml b/pages/askHousing/askHousing.wxml index eab0920..588c6e6 100644 --- a/pages/askHousing/askHousing.wxml +++ b/pages/askHousing/askHousing.wxml @@ -115,7 +115,6 @@ - {{ newcity.name }} @@ -208,15 +207,6 @@ - @@ -333,48 +323,6 @@ - - - - - - - - - - - - - - - diff --git a/pages/askHousing/askHousing.wxss b/pages/askHousing/askHousing.wxss index b84b8ea..53ec21f 100644 --- a/pages/askHousing/askHousing.wxss +++ b/pages/askHousing/askHousing.wxss @@ -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 { diff --git a/pages/edit/edit.wxml b/pages/edit/edit.wxml index ba6fda6..f93bde4 100644 --- a/pages/edit/edit.wxml +++ b/pages/edit/edit.wxml @@ -355,7 +355,6 @@ - {{ item.title || popUpTitle }} diff --git a/pages/edit/edit.wxss b/pages/edit/edit.wxss index 4567339..f487d13 100644 --- a/pages/edit/edit.wxss +++ b/pages/edit/edit.wxss @@ -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 { diff --git a/pages/shishi/shishi.js b/pages/shishi/shishi.js deleted file mode 100644 index b002280..0000000 --- a/pages/shishi/shishi.js +++ /dev/null @@ -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); - } -}) \ No newline at end of file diff --git a/pages/shishi/shishi.json b/pages/shishi/shishi.json deleted file mode 100644 index 8835af0..0000000 --- a/pages/shishi/shishi.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/shishi/shishi.wxml b/pages/shishi/shishi.wxml deleted file mode 100644 index f8d1263..0000000 --- a/pages/shishi/shishi.wxml +++ /dev/null @@ -1,8 +0,0 @@ - -pages/shishi/shishi.wxml - - 发送内容: - - - - diff --git a/pages/shishi/shishi.wxss b/pages/shishi/shishi.wxss deleted file mode 100644 index d0b0cc4..0000000 --- a/pages/shishi/shishi.wxss +++ /dev/null @@ -1,4 +0,0 @@ -/* pages/shishi/shishi.wxss */ -.send-content { - margin-top: 200rpx; -} \ No newline at end of file diff --git a/pages/show/show.wxml b/pages/show/show.wxml index ce43ef3..df3663b 100644 --- a/pages/show/show.wxml +++ b/pages/show/show.wxml @@ -219,7 +219,6 @@ - @@ -379,7 +378,8 @@ - {{ info.count_view*1 + thread.views*1 || '-' }} + + {{ info.count_view || '-' }} {{ info.count_fav }} @@ -691,7 +691,11 @@ @@ -741,7 +745,7 @@