在我的-发布 列表增加发布时间

This commit is contained in:
A1300399510 2023-07-04 15:27:31 +08:00
parent f59702ae1a
commit a8fc59ad6f
14 changed files with 48 additions and 8 deletions

2
app.js
View File

@ -183,5 +183,7 @@ App({
1: "#50e3c2",
6: "#b3c7f4"
},
isMapFindState: true, // 地图找房入口
}
})

View File

@ -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) {

View File

@ -17,7 +17,7 @@
<view class="search-box flexacenter" bindtap="publicJumps" data-url="/pages/search/search">
<image mode="widthFix" class="search-img" src="/img/search-icon.png"></image>
<input class="search-input flex1" disabled confirm-type="search" bindconfirm="search" placeholder="{{ search.placeholder }}" />
<view wx:if="{{ true }}" class="flexcenter" style="height: 72rpx;" catchtap="publicJumps" data-url="/mapFind/pages/placeMap/index">
<view wx:if="{{ isMapFindState }}" class="flexcenter" style="height: 72rpx;" catchtap="publicJumps" data-url="/mapFind/pages/placeMap/index">
<view class="flexacenter finding-house-map">
<image class="finding-house-map-icon" src="/img/map-icon.png"></image>
地图找房

View File

@ -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 || '',

View File

@ -14,7 +14,7 @@
<view class="header-bj"></view>
<view id="list-header-search">
<template is="list-header-search" data="{{ isNeedMap: true }}"></template>
<template is="list-header-search" data="{{ isNeedMap: isMapFindState }}"></template>
</view>
<xin-head-swiper bindrecordSwiperHeight="recordSwiperHeight" data="{{ imgUrls }}"></xin-head-swiper>

View File

@ -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,

View File

@ -6,7 +6,7 @@
<view class="header-bj"></view>
<header-nav bgcolor="{{ headerSearchTop ? '#fff' : 'transparent' }}">香港租房</header-nav>
<view id="list-header-search">
<template is="list-header-search" data="{{ kw:'',disabled: true,isNeedMap: true }}"></template>
<template is="list-header-search" data="{{ kw:'',disabled: true,isNeedMap: isMapFindState }}"></template>
</view>
<xin-head-swiper bindrecordSwiperHeight="recordSwiperHeight" data="{{ attachment }}"></xin-head-swiper>

View File

@ -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,

View File

@ -5,7 +5,7 @@
<view wx:if="{{ allowsearch }}" style="position: relative;">
<view class="" style="width: 100%;height: 100%;position: absolute;z-index: 111;" catchtap="publicJumps" data-url="/pages/search/search?isAskingSearch=true"></view>
<view wx:if="{{ intermediary != 1 }}" catchtap="setValue" data-key="authenticationPopState" data-value="{{ true }}" class="mengcheng"></view>
<template is="list-header-search" data="{{ kw:'', isNeedMap: false,disabled: true }}"></template>
<template is="list-header-search" data="{{ kw:'', isNeedMap: isMapFindState,disabled: true }}"></template>
</view>
<view class="xin-head-swiper">

View File

@ -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 {

View File

@ -12,7 +12,7 @@
<image class="clear-icon" src="/img/gray-cross.png"></image>
</view>
</view>
<view wx:if="{{ false }}" class="map-btn flexcenter" bindtap="publicJumps" data-url="/mapFind/pages/placeMap/index">
<view wx:if="{{ isMapFindState }}" class="map-btn flexcenter" bindtap="publicJumps" data-url="/mapFind/pages/placeMap/index">
<image class="map-btn-icon" mode="widthFix" src="/img/map-icon.png"></image>
</view>
</view>

View File

@ -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 + '日';
},
})

View File

@ -54,6 +54,10 @@
</view>
</view>
</view>
<view class="house-id flexacenter" wx:if="{{ ispublish }}">
<!-- <view >2023年07月04日发布</view> -->
<view >{{ item['timestamp'] }}发布</view>
</view>
</view>
<view class="right flexflex">
<image wx:if="{{ item.ispic }}" class="image" mode="widthFix" lazy-load src="{{ item.imageurl }}"></image>

View File

@ -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;
}