+
{{ index + 1 }}
九龙 > {{ locationObj[item] }}
diff --git a/pages/edit/edit.js b/pages/edit/edit.js
index 2a39c67..5f43195 100644
--- a/pages/edit/edit.js
+++ b/pages/edit/edit.js
@@ -317,7 +317,7 @@ Page({
}, {
name: '发布者身份',
popUpIs: 'AListOF',
- popUpStepState: 1,
+ popUpStepState: 0,
field: "intermediary"
}, {
name: '房屋视频',
@@ -561,17 +561,17 @@ Page({
if (this.data.types == 'edit' || this.data.types == 'edit1') {
requestData = {
uniqid: this.data.uniqid,
- token: this.options.token
+ token: this.options.token,
+ intermediary: 3,
}
} else {
requestData = {
uniqid: this.data.uniqid,
+ intermediary: 3,
}
}
// miucms.request(`${app.globalData.baseURL}/tenement/publish`, requestData).then(res => {
- miucms.request(`${app.globalData.baseURL}/tenement/v2/api/publish`, {
- intermediary: 3
- }).then(res => {
+ miucms.request(`${app.globalData.baseURL}/tenement/v2/api/publish`, requestData).then(res => {
wx.hideLoading()
this.setData({
loding: false
@@ -838,7 +838,7 @@ Page({
// 初始化弹出的窗口
firstStepPopover() {
- return
+ // return
// let field = 'type'
// let step = 0
// let it = 'basic'
@@ -1712,6 +1712,7 @@ Page({
value,
field
} = ""
+
if (e.currentTarget) {
choices = e.currentTarget.dataset.choices
key = e.currentTarget.dataset.key
@@ -1719,6 +1720,13 @@ Page({
field = e.currentTarget.dataset.field
} else field = e
+ if (field == "intermediary" && value == "求房源") {
+
+ wx.navigateTo({
+ url: `/pages/askHousing/askHousing?uniqid=${this.data.uniqid}`,
+ })
+ return
+ }
let popUpSubtitle1 = this.data.popUpSubtitle
let popUpIs = ""
@@ -2284,7 +2292,8 @@ Page({
})
} else {
wx.redirectTo({
- url: '/pages/show/show?uniqid=' + res.data.uniqid + '&cityid=' + this.data.newcity.id,
+ // url: '/pages/show/show?uniqid=' + res.data.uniqid + '&cityid=' + this.data.newcity.id,
+ url: '/pages/show/show?uniqid=' + res.data.uniqid,
})
}
}
diff --git a/pages/edit/edit.wxml b/pages/edit/edit.wxml
index b97ae87..7fd7b3e 100644
--- a/pages/edit/edit.wxml
+++ b/pages/edit/edit.wxml
@@ -842,8 +842,8 @@
-
-
+
+
diff --git a/pages/index/index.js b/pages/index/index.js
index 7395166..d8a3e51 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -77,10 +77,16 @@ Page({
})
}
+ let findHouseSource = data.data.findHouseSource
+
+ findHouseSource.forEach(element => {
+ if (Array.isArray(element['rent'])) element['rent'] = `${element['rent'][0]} ~ ${ element['rent'][1] }`
+ })
+
that.setData({
HKapartment: data.data.HKapartment,
otherHousing: data.data.otherHousing,
- findHouseSource: data.data.findHouseSource,
+ findHouseSource,
HKhousing: data.data.HKhousing,
banner: data.data.banner,
service: data.data.service,
diff --git a/pages/show/show.js b/pages/show/show.js
index a0dec27..cf5d3f5 100644
--- a/pages/show/show.js
+++ b/pages/show/show.js
@@ -70,7 +70,31 @@ Page({
listingcount: 0, // 房东一共有几个房源
elseResourceData: [], // 其他房源数据
unitTop: 0, // 租金预算的高度
- bottomUnitState: false // 底部租金 预算显示状态
+ bottomUnitState: false, // 底部租金 预算显示状态
+ basicRequirementsList: [{ // 求房源的基本数据 键值对
+ key: "property",
+ name: "房屋类型"
+ }, {
+ key: "floor",
+ name: "所在楼层"
+ }, {
+ key: "elevator",
+ name: "电梯"
+ }, {
+ key: "sunshinearea",
+ name: "晾晒区"
+ }, {
+ key: "acreage",
+ name: "面积"
+ }, {
+ key: "gender",
+ name: "同住人性别要求"
+ }, {
+ key: "publishergender",
+ name: "发布者性别"
+ }, ],
+
+ langs: {}, // 语言包
},
to_share() {
@@ -124,6 +148,8 @@ Page({
screenWidth: screenWidth,
})
this.get_config()
+ app.globalData['langs'] ? this.data.langs = app.globalData['langs'] : this.getDtailsLangs()
+
},
onShow() {
if (wx.getEnterOptionsSync().query && wx.getEnterOptionsSync().query.scancode_time && app.globalData.scancode_time != wx.getEnterOptionsSync().query.scancode_time) {
@@ -133,7 +159,6 @@ Page({
q: wx.getEnterOptionsSync().query.q
})
this.get_config()
- console.log('onshow有更新')
}
},
onUnload() {
@@ -197,9 +222,11 @@ Page({
source: that.data.source,
q: that.data.q
})
- miucms.request(app.globalData.config.show.init, sendData).then(data => {
+ // miucms.request(app.globalData.config.show.init, sendData).then(data => {
+ miucms.request(`${app.globalData.baseURL}/tenement/v2/api/details`, sendData).then(data => {
wx.hideLoading()
- if (data.extraparam) {
+ // if (data.extraparam) {
+ if (data.code != 200) {
wx.showModal({
title: '提示',
content: data.message,
@@ -211,6 +238,15 @@ Page({
}
})
} else {
+
+ data = data.data
+ // data.info.intermediary = 6
+ let info = data.info
+ if (Array.isArray(info['rent'])) {
+ info['rent'] = info['rent'][0] + ' ~ ' + info['rent'][1]
+ }
+
+
that.setData({
irentCouponBig: app.globalData.irentCouponBig || true,
info: data.info,
@@ -227,26 +263,26 @@ Page({
groupid: data.groupid,
listingcount: data.listingcount,
landlordcertification: data.landlordcertification,
+ langs: this.data.langs,
loding: false
})
if (data.info && data.info.introduction && data.info.introduction.length > 0 && data.info.introduction != ' ') {
WxParse.wxParse('info.introduction', 'html', '' + data.info.introduction + '
', that, 0);
}
- if (data.info && data.info.message && data.info.message.length > 0 && data.info.message != ' ') {
- WxParse.wxParse('info.message', 'html', '' + data.info.message + '
', that, 0);
- }
+ if (data.info && data.info.message && data.info.message.length > 0 && data.info.message != ' ') WxParse.wxParse('info.message', 'html', '' + data.info.message + '
', that, 0);
+
// 认证房东 和 listingcount (他的房源数量) >1 时加载其他房源接口
if (data.groupid == 19 && data.listingcount > 1) this.getElseResource()
// 判断是否需要请求顶部广告
- if (data.ads.bannertop) this.requestTopAds(data.ads.bannertop)
+ if (data.ads && data.ads.bannertop) this.requestTopAds(data.ads.bannertop)
// 判断是否是求房源 如果是需要获取租金位置
this.getRentalLocation()
-
+ this.againstTargetArea()
}
}).catch(res => {
wx.hideLoading()
@@ -257,8 +293,70 @@ Page({
})
},
- copy: function (e) {
+ // 获取语言包 保存全局
+ getDtailsLangs() {
+ miucms.request(`${app.globalData.baseURL}/tenement/v2/api/details/langs`).then(res => {
+ if (res.code != 200) return
+ let data = res.data
+ this.setData({
+ langs: data
+ })
+ app.globalData['langs'] = data
+ })
+ },
+
+ // 对照目标区域的
+ againstTargetArea() {
+ let langs = this.data.langs
+ console.log("langs", langs);
+ if (Object.keys(langs).length == 0) {
+ setTimeout(() => {
+ this.againstTargetArea()
+ }, 800)
+ } else {
+ let info = this.data.info
+
+ if (Array.isArray(info['acreage'])) info['acreage'] = info['acreage'][0] + ' ~ ' + info['acreage'][1]
+
+ let list = ['type', 'rentalduration', 'intermediary']
+ console.log("info['floor']", info['floor']);
+ if (Array.isArray(info['floor'])) list.push('floor')
+
+
+ let differentNames = {
+ "intermediary": "intermediary_text"
+ }
+
+ list.forEach(element => {
+ if (info[element] == 0) info[differentNames[element] ? differentNames[element] : element] = '不限'
+ else info[differentNames[element] ? differentNames[element] : element] = langs[element][info[element]]
+ })
+
+ let location = langs.location
+ let pendingData = info['location']
+ let locationList = []
+ for (const key in location) {
+ if (pendingData.indexOf(key) != -1) {
+ locationList.push({
+ head: location[Math.trunc(key)],
+ end: location[key],
+ })
+ }
+ }
+
+ info['locationList'] = locationList
+
+ this.setData({
+ info
+ })
+
+
+ }
+
+ },
+
+ copy: function (e) {
var that = this;
let num = that.data.info[e.currentTarget.dataset.num] + '';
let hint = e.currentTarget.dataset.hint
@@ -760,6 +858,8 @@ Page({
// 点击复制的公共方法
publicCopy(e) {
let value = e.currentTarget.dataset.value
+
+ if (typeof value === 'number') value = value + ''
miucms.copy(value)
},
diff --git a/pages/show/show.wxml b/pages/show/show.wxml
index 7981684..ac959a0 100644
--- a/pages/show/show.wxml
+++ b/pages/show/show.wxml
@@ -48,8 +48,9 @@
{{ info.author }}
- {{ info.intermediary_text }}
- 已出租
+ {{ info.intermediary_text }}
+
+ 已出租
{{ info.subject }}
@@ -65,7 +66,6 @@