From 1ab2ddbd25ad5a647c273de8ba67eca33c1e8f9d Mon Sep 17 00:00:00 2001 From: 1191151619 <1191151619@qq.com> Date: Mon, 2 Aug 2021 10:41:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E5=8E=86=E3=80=81?= =?UTF-8?q?=E5=BE=85=E6=B5=8B=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ui-calendar/ui-calendar.wxml | 7 +++-- pages/calculation/calculation.js | 6 ++++ pages/calculation/calculation.wxml | 2 +- pages/calendar/calendar.js | 29 +++++++++-------- pages/calendar/calendar.wxml | 41 ++++++++++++++++++------- pages/calendar/calendar.wxss | 7 +++++ pages/look-list/look-list.js | 22 ++++++++++++- project.private.config.json | 2 +- 8 files changed, 88 insertions(+), 28 deletions(-) diff --git a/components/ui-calendar/ui-calendar.wxml b/components/ui-calendar/ui-calendar.wxml index 05eaa7d..156ee4e 100644 --- a/components/ui-calendar/ui-calendar.wxml +++ b/components/ui-calendar/ui-calendar.wxml @@ -77,11 +77,14 @@ if (date.getFullYear() == year && date.getMonth() == month && date.getDate() == day) return 'active active-back-one'; // console.log(date, year, month, day); - month = month>9?month+1:'0'+(month+1); + month = month>=9?month+1:'0'+(month+1); + day = day>9?day:'0'+day; + var dataTime = year+'-'+month+'-'+day; + console.log(dataTime); var a = auctionCount.indexOf(dataTime); var b = listedCount.indexOf(dataTime); - + console.log(a,b); if(a>=0&&b>=0){ return 'active active-back-four' }else if(a>=0&&b<0){ diff --git a/pages/calculation/calculation.js b/pages/calculation/calculation.js index adaa35e..690efc3 100644 --- a/pages/calculation/calculation.js +++ b/pages/calculation/calculation.js @@ -39,6 +39,12 @@ Page({ }) } }, + // 待测试 + goUnder(){ + wx.navigateTo({ + url: '/pages/look-list/look-list?title=待测算', + }) + }, bindAddressChange(res) { let cityName = res.detail.value[1] if (cityName) { diff --git a/pages/calculation/calculation.wxml b/pages/calculation/calculation.wxml index a1f4dc2..c081cc6 100644 --- a/pages/calculation/calculation.wxml +++ b/pages/calculation/calculation.wxml @@ -32,7 +32,7 @@ --> - + 待测算 diff --git a/pages/calendar/calendar.js b/pages/calendar/calendar.js index a4bb65a..51149e8 100644 --- a/pages/calendar/calendar.js +++ b/pages/calendar/calendar.js @@ -37,7 +37,9 @@ Page({ calendarSelectedDateStr: '', region: ["500000", "500100"], cityName: '重庆', - info: [], + + info: [],//挂牌列表 + infoT:[],//拍卖列表 auctionCount:[],//有拍卖数量日期 listedCount:[],//有挂牌数量日期 @@ -116,20 +118,20 @@ Page({ // }) // } + $api.getLandlistedList({annoDate:timer,city:this.data.cityName}).then(res=>{ + console.log(res.data) - if(this.data.active===1){ - $api.getLandlistedList({annoDate:timer,city:this.data.cityName}).then(res=>{ - this.setData({ - info: res.data.records - }) + this.setData({ + info: res.data.records }) - }else{ - $api.getLandlistedList2({auctionDate:timer,city:this.data.cityName}).then(res=>{ - this.setData({ - info: res.data.records - }) + }) + + $api.getLandlistedList2({auctionDate:timer,city:this.data.cityName}).then(res=>{ + console.log(res.data) + this.setData({ + infoT: res.data.records }) - } + }) if (typeof this.getTabBar === 'function' && this.getTabBar()) { this.getTabBar().setData({ @@ -155,6 +157,9 @@ Page({ ) } }) + console.log(auctionCount); + console.log(listedCount); + this.setData({ auctionCount: auctionCount, listedCount: listedCount, diff --git a/pages/calendar/calendar.wxml b/pages/calendar/calendar.wxml index f88a546..bf03fe6 100644 --- a/pages/calendar/calendar.wxml +++ b/pages/calendar/calendar.wxml @@ -21,7 +21,7 @@ - + {{cityName}} @@ -29,8 +29,8 @@ - @@ -38,21 +38,40 @@ - {{item.name}} + + {{item.name}} ({{item.id == 1?info.length:infoT.length}}) + - - - {{item.landListedId}} + + + + {{item.landListedId}} + + + + + 暂无数据 + - - - 暂无数据 + + + + {{item.landListedId}} + + + + + 暂无数据 + + + \ No newline at end of file diff --git a/pages/calendar/calendar.wxss b/pages/calendar/calendar.wxss index 9833385..c0f6ecf 100644 --- a/pages/calendar/calendar.wxss +++ b/pages/calendar/calendar.wxss @@ -125,6 +125,13 @@ font-size: 32rpx; font-weight: bold; color: #262936; + display: flex; + align-items: center; + justify-content: center; +} +.tab-title text{ + display: inline-block; + line-height: 1em; } .tab-tag { diff --git a/pages/look-list/look-list.js b/pages/look-list/look-list.js index d3875df..7e875e8 100644 --- a/pages/look-list/look-list.js +++ b/pages/look-list/look-list.js @@ -40,6 +40,8 @@ Page({ calcuNum:null, region: ["500000", "500100"], + + title:'',//传递待测算名 }, // 选择城市 bindAddressChangeCity(res) { @@ -81,23 +83,41 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { + if(options.title){ + this.setData({ + title : options.title, + }) + } $api.getDict('land_transaction').then(res=>{ this.setData({ saleList:res.data }) }) $api.getDict('measure_status').then(res=>{ + if(this.data.title == '待测算'){ + res.data.map((itme,index)=>{ + if(itme.label == this.data.title){ + console.log(itme) + this.setData({ + calcuNum:index, + ['page.measureStatus']:itme.value, + }) + } + }) + } this.setData({ calcuList:res.data }) + this.refresh(); }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { - this.refresh() + }, // 清空 empty(e){ diff --git a/project.private.config.json b/project.private.config.json index 6d4ce85..9e3941e 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -51,7 +51,7 @@ { "name": "看地池", "pathName": "pages/look-list/look-list", - "query": "", + "query": "title=待测算", "scene": null }, {