diff --git a/app.js b/app.js index 47b8165..da89786 100644 --- a/app.js +++ b/app.js @@ -183,5 +183,7 @@ App({ 1: "#50e3c2", 6: "#b3c7f4" }, + + isMapFindState: true, // 地图找房入口 } }) \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js index c9444fd..ee6f8e5 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -45,7 +45,7 @@ Page({ bgColorObj: app.globalData.bgColorObj, miniProgram: "23231", - + isMapFindState: false, isNewVersions: true, }, @@ -76,6 +76,7 @@ Page({ this.setData({ screen_data: app.globalData.screen_data, bottomLift: app.globalData.screen_data.bottomLift, + isMapFindState: app.globalData.isMapFindState, }) // if (app.globalData.code) { if (app.globalData.config && app.globalData.config.lists) { diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 49c1106..fa3de99 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -17,7 +17,7 @@ - + 地图找房 diff --git a/pages/irentList/irentList.js b/pages/irentList/irentList.js index 871f624..13bb92a 100644 --- a/pages/irentList/irentList.js +++ b/pages/irentList/irentList.js @@ -135,6 +135,7 @@ Page({ this.data.money.rent_max = money[1]; } this.setData({ + isMapFindState: app.globalData.isMapFindState, irentCouponBig: app.globalData.irentCouponBig, options: options || {}, school: options.school || '', diff --git a/pages/irentList/irentList.wxml b/pages/irentList/irentList.wxml index 06e75a2..6184e17 100644 --- a/pages/irentList/irentList.wxml +++ b/pages/irentList/irentList.wxml @@ -14,7 +14,7 @@ - + diff --git a/pages/personList/personList.js b/pages/personList/personList.js index deb2041..8c2f8b8 100644 --- a/pages/personList/personList.js +++ b/pages/personList/personList.js @@ -129,6 +129,7 @@ Page({ }, totalSum: 0, // 数据总数 + isMapFindState: false, isNewVersions: true, }, @@ -217,6 +218,7 @@ Page({ config = app.globalData.config; that.data.user = app.globalData.user; this.setData({ + isMapFindState: app.globalData.isMapFindState, screen_data: app.globalData.screen_data, leaseterm: that.data.leaseterm, status: app.globalData.status, diff --git a/pages/personList/personList.wxml b/pages/personList/personList.wxml index 3590153..3690f10 100644 --- a/pages/personList/personList.wxml +++ b/pages/personList/personList.wxml @@ -6,7 +6,7 @@ 香港租房 - + diff --git a/pages/restOfWorld/restOfWorld.js b/pages/restOfWorld/restOfWorld.js index f4fd7e7..b2d61da 100644 --- a/pages/restOfWorld/restOfWorld.js +++ b/pages/restOfWorld/restOfWorld.js @@ -68,6 +68,8 @@ Page({ headerSearchTop: false, totalSum: 0, // 数据总数 allowsearch: false, // 是否需要筛选 + isMapFindState: false, + isNewVersions: true, }, @@ -165,6 +167,7 @@ Page({ config = app.globalData.config; that.data.user = app.globalData.user; this.setData({ + isMapFindState: app.globalData.isMapFindState, screen_data: app.globalData.screen_data, leaseterm: that.data.leaseterm, status: app.globalData.status, diff --git a/pages/restOfWorld/restOfWorld.wxml b/pages/restOfWorld/restOfWorld.wxml index a32b850..2cd9bd4 100644 --- a/pages/restOfWorld/restOfWorld.wxml +++ b/pages/restOfWorld/restOfWorld.wxml @@ -5,7 +5,7 @@ - + diff --git a/pages/search/search.js b/pages/search/search.js index 5926eb4..36af1fd 100644 --- a/pages/search/search.js +++ b/pages/search/search.js @@ -120,6 +120,8 @@ Page({ isAskingSearch: true, // 是否是 求房源的搜索 + isMapFindState: false, + isNewVersions: true, }, @@ -180,6 +182,7 @@ Page({ if (app.globalData.config.lists) { config = app.globalData.config; that.setData({ + isMapFindState: app.globalData.isMapFindState, status: app.globalData.status, screen_data: app.globalData.screen_data, langs: app.globalData.langs, @@ -267,7 +270,7 @@ Page({ */ onReachBottom: function () { if (!app.globalData.config.lists || !this.data.search) return false - + if (this.data.isAskingSearch) { this.askingHousingSearch() } else { diff --git a/pages/search/search.wxml b/pages/search/search.wxml index bb4fc43..23a42b9 100644 --- a/pages/search/search.wxml +++ b/pages/search/search.wxml @@ -12,7 +12,7 @@ - + diff --git a/pages/user/user.js b/pages/user/user.js index aa6c2a4..19d52f6 100644 --- a/pages/user/user.js +++ b/pages/user/user.js @@ -991,6 +991,12 @@ Page({ ele['locationList'] = locationList } else if (location[pendingData]) ele['location'] = `${location[Math.trunc(pendingData)]} > ${location[pendingData]}` + console.log(ele, "ele"); + + if (ele['timestamp']) ele['timestamp'] = this.formatDate(ele['timestamp']) + + + }) let tab = this.data.tab @@ -1111,4 +1117,22 @@ Page({ miucms.copy(this.data.wechat.wechat) }, + // 输出 时间格式 2023年07月04日 + formatDate(timestamp) { + // 创建一个新的Date对象,将时间戳作为参数传入 + var date = new Date(timestamp * 1000); + // 使用Date对象的get方法获取年、月、日 + var year = date.getFullYear(); + var month = date.getMonth() + 1; + var day = date.getDate(); + + // 将月份和日期转为两位数的格式,如果不足两位,前面补0 + if (month < 10) month = '0' + month; + if (day < 10) day = '0' + day; + + // 返回格式化后的日期字符串 + return year + '年' + month + '月' + day + '日'; + + }, + }) \ No newline at end of file diff --git a/template/commonList/commonList.wxml b/template/commonList/commonList.wxml index b4a6353..c7a4c71 100644 --- a/template/commonList/commonList.wxml +++ b/template/commonList/commonList.wxml @@ -54,6 +54,10 @@ + + + {{ item['timestamp'] }}发布 + diff --git a/template/commonList/commonList.wxss b/template/commonList/commonList.wxss index 5acd1f9..dd8a067 100644 --- a/template/commonList/commonList.wxss +++ b/template/commonList/commonList.wxss @@ -100,7 +100,7 @@ .price-section .unit { color: #000000; - font-size: 21rpx; + font-size: 22rpx; font-weight: bolder; font-family: 'Arial-Black', 'Arial Black', sans-serif; }