This commit is contained in:
A1300399510 2023-04-26 15:19:08 +08:00
parent e9b8a377bd
commit 8756df11fb
3 changed files with 43 additions and 19 deletions

View File

@ -364,7 +364,6 @@ Page({
var idx = parseInt(e.currentTarget.dataset.idx)
var value = e.detail.value
let popUpdate = this.data.popUpdate
console.log("popUpdate", popUpdate);
let rightSliderPriceWidthX = 100 - (value / popUpdate.max * 100)
let leftSliderPriceWidthX = value / popUpdate.max * 100
@ -382,9 +381,10 @@ Page({
popUpdate.value = [popUpdate.slider1Value, popUpdate.slider2Value]
console.log("popUpdate", popUpdate);
this.data.popUpdate = popUpdate
this.data.newinfo[popUpdate.field] = popUpdate.value
this.data.fieldinfoNew[popUpdate.field] = popUpdate
},
changed: function (e) {
let popUpdate = this.data.popUpdate
@ -549,15 +549,21 @@ Page({
fieldinfoNew[element.field]['min'] = 0
fieldinfoNew[element.field]['rate'] = 100
fieldinfoNew[element.field]['slider1Max'] = 10000
fieldinfoNew[element.field]['slider1Value'] = 0
fieldinfoNew[element.field]['slider2Value'] = 10000
fieldinfoNew[element.field]['slider2Min'] = 0
fieldinfoNew[element.field]['slider1W'] = 100
fieldinfoNew[element.field]['slider2W'] = 0
fieldinfoNew[element.field]['leftSliderPriceWidthX'] = '0%'
fieldinfoNew[element.field]['rightSliderPriceWidthX'] = '0%'
if (Array.isArray(data.info[element.field]) && data.info[element.field].length > 0) data.info[element.field] = [0, 10000]
if (Array.isArray(data.info[element.field]) && data.info[element.field].length == 0) {
// data.info[element.field] = [0, 10000]
fieldinfoNew[element.field]['slider1Value'] = 0
fieldinfoNew[element.field]['slider2Value'] = 10000
} else {
fieldinfoNew[element.field]['slider1Value'] = data.info[element.field][0]
fieldinfoNew[element.field]['slider2Value'] = data.info[element.field][1]
}
}
fieldinfoNew[element.field]['value'] = data.info[element.field]
@ -1170,7 +1176,8 @@ Page({
upload_picnew: function (imgUrl, type) {
var that = this;
const uploadTask = wx.uploadFile({
url: `${app.globalData.baseURL}/tenement/publish/upload`,
// url: `${app.globalData.baseURL}/tenement/publish/upload`,
url: `${app.globalData.baseURL}/tenement/v2/api/publish/upload`,
filePath: imgUrl,
name: 'files',
formData: {
@ -1262,7 +1269,8 @@ Page({
})
const uploadTask = wx.uploadFile({
url: `${app.globalData.baseURL}/tenement/publish/upload`,
// url: `${app.globalData.baseURL}/tenement/publish/upload`,
url: `${app.globalData.baseURL}/tenement/v2/api/publish/upload`,
filePath: videoUrl,
name: 'files',
formData: {
@ -1661,7 +1669,6 @@ Page({
let fieldinfoNew = this.data.fieldinfoNew
if (this.data.fieldinfo[it][step].popupwindow == 0) return
popUpIs = fieldinfoNew[field].popUpIs
popUpStepState = fieldinfoNew[field].popUpStepState
@ -1681,7 +1688,6 @@ Page({
if (popUpIs == 'unilineInput' || popUpIs == 'multilineInput' || popUpIs == 'multilineInput1') this.data.focustitle = field
console.log("this.data.newinfo[field9]", this.data.newinfo[field]);
this.data.fieldinfoNew[field]['value'] = this.data.newinfo[field]
console.log("this.data.fieldinfoNew[field]['value']", this.data.fieldinfoNew[field]['value']);
this.setData({
@ -2080,10 +2086,6 @@ Page({
return
}
console.log(this.data.fieldinfo[this.data.popUpit][this.data.step].field);
console.log("441", this.data.popUpdate);
let field = this.data.fieldinfo[this.data.popUpit][this.data.step].field
let popUpdate = {
...this.data.fieldinfoNew[field]
@ -2120,8 +2122,6 @@ Page({
nearSchoolList: this.data.nearSchoolList,
focustitle: this.data.focustitle
})
// }
// });
},
// 单行输入框的输入
@ -2460,7 +2460,8 @@ Page({
UploadQRCodeSend(imgUrl) {
let that = this
const uploadTask = wx.uploadFile({
url: `${app.globalData.baseURL}/tenement/publish/uploadweixinqrcode`,
// url: `${app.globalData.baseURL}/tenement/publish/uploadweixinqrcode`,
url: `${app.globalData.baseURL}/tenement/v2/api/publish/uploadweixinqrcode`,
filePath: imgUrl,
name: 'files',
header: app.globalData.header,

View File

@ -30,6 +30,16 @@
floor: function (value) { // 数据向下取值的
return Math.floor(value)
},
tofixedOne: function (num) {
console.log("!isNaN(num)", !isNaN(num));
if (isNaN(num)) {
num = 0
}
console.log("num", num);
return num.toFixed(1)
}
}
@ -290,7 +300,7 @@
<view class="clickInput-box {{'clickInput' + item.field }}">
<view class="clickInput-title">{{ item.title }}<text style="color:#C54235;margin-left: 10rpx;">*</text></view>
<view class="clickInput" bindtap="clickOption" data-field="{{ item.field }}" data-step="{{ index }}" data-it="{{ it }}">
<block wx:if="{{ item.field == 'property' && newinfo[item.field].length != 0 }}">
<block wx:if="{{ item.field == 'property' && newinfo[item.field].length != 0 }}">
<block wx:for="{{ newinfo[item.field] }}" wx:for-item="it">{{ propertyObj[it] }}{{ index != newinfo[item.field].length - 1 ? ' / ' : '' }}</block>
</block>
<block wx:elif="{{ item.field == 'floor' && newinfo[item.field].length != 0 }}">
@ -880,6 +890,9 @@
<view class="pop-up-top" bindtap="closePopUp">
<image class="pop-up-arrow" mode="widthFix" src="/img/back.png"></image>
</view>
<view class="pop-up-skip" bindtap="popUpSkip" wx:if="{{ item.required == 0 }}"><text>跳过</text>
<view class="clickInputLeftArrow"></view>
</view>
<view class="pop-up-title">{{ item.title }}</view>
<view wx:if="{{ item.field == 'rent' }}" class="rent-budget-unit flexcenter">{{ item.unit }}/月</view>
<view wx:else class="rent-budget-unit flexcenter">{{ item.unit }}</view>
@ -890,10 +903,11 @@
<view class="select-value flexcenter" style="left: {{ item.leftSliderPriceWidthX }};right: {{ item.rightSliderPriceWidthX }};">{{ item.slider1Value }} ~ {{ item.slider2Value }}</view>
<view class='select-area'>
<view class='slider-container'>
<slider style='width:{{ item.slider1W+"%" }}' class='slider-left' min='{{ item.min }}' max='{{ item.slider1Max }}' color='#50e3c2' activeColor='#f2f2f2' bindchanging='changing' catchtouchstart='changeStart' block-size="14" block-color="#50e3c2" bindchange='changed' data-idx='1' value="{{ item.slider1Value }}"></slider>
<slider wx:if='{{ !item.change }}' style='width:{{ item.slider2W+"%" }}' class='slider-right' min='{{ item.slider2Min }}' max='{{ item.max }}' color='#f2f2f2' activeColor='#50e3c2' bindchanging='changing' catchtouchstart='changeStart' block-size="14" block-color="#50e3c2" bindchange='changed' data-idx='2' value="{{ item.slider2Value }}"></slider>
<slider style='width:{{ item.slider1W+"%" }}' class='slider-left' min='{{ item.min }}' max='{{ item.slider1Max }}' color='#50e3c2' activeColor='#f2f2f2' step="1" bindchanging='changing' catchtouchstart='changeStart' block-size="14" block-color="#50e3c2" bindchange='changed' data-idx='1' value="{{ item.slider1Value }}"></slider>
<slider wx:if='{{ !item.change }}' style='width:{{ item.slider2W+"%" }}' class='slider-right' min='{{ item.slider2Min }}' max='{{ item.max }}' color='#f2f2f2' step="1" activeColor='#50e3c2' bindchanging='changing' catchtouchstart='changeStart' block-size="14" block-color="#50e3c2" bindchange='changed' data-idx='2' value="{{ item.slider2Value }}"></slider>
</view>
</view>
<view class="square-meter select-value flexcenter" style="left: {{ item.leftSliderPriceWidthX }};right: {{ item.rightSliderPriceWidthX }};">约等于 {{ m1.tofixedOne(item.slider1Value * 0.093) }} ~ {{ m1.tofixedOne(item.slider2Value * 0.093) }} 平方米</view>
</view>
</view>
</view>

View File

@ -1456,6 +1456,15 @@ wx-slider .wx-slider-handle-wrapper {
height: 48rpx;
}
.rent-budget .select-value.square-meter {
position: absolute;
bottom: 90.75rpx;
font-size: 24rpx;
color: #aaa;
font-weight: 400;
top: auto;
}
.pop-target-area {}
.pop-target-area .pop-area-list {