Browse Source

修改日历、待测算

master
1191151619 4 years ago
parent
commit
1ab2ddbd25
  1. 7
      components/ui-calendar/ui-calendar.wxml
  2. 6
      pages/calculation/calculation.js
  3. 2
      pages/calculation/calculation.wxml
  4. 29
      pages/calendar/calendar.js
  5. 41
      pages/calendar/calendar.wxml
  6. 7
      pages/calendar/calendar.wxss
  7. 22
      pages/look-list/look-list.js
  8. 2
      project.private.config.json

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

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

2
pages/calculation/calculation.wxml

@ -32,7 +32,7 @@
<image class="table-icon" src="../../assets/images/tab-icon.png"></image>
</view> -->
</view>
<view class="top-box center">
<view class="top-box center" bindtap="goUnder">
<image class="top-icon" src="../../assets/images/dcs.png"></image>
<text>待测算</text>
</view>

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

41
pages/calendar/calendar.wxml

@ -21,7 +21,7 @@
</view>
</picker>
<text>{{cityName}}</text>
<image class="tag" src="../../assets/images/arrow-down.png"></image>
</view>
@ -29,8 +29,8 @@
<image class="cal-back" src="../../assets/images/cal-back.png"></image>
<view class="calendar-box">
<!-- <calendar bind:callSomeFun="onShow"></calendar> -->
<ui-calendar ex-class="calendar-cm-month" bindonDayTap="onCalendarDayTap" auctionCount="{{auctionCount}}" listedCount="{{listedCount}}"
displayTime="{{calendarDisplayTime}}" selectedDate="{{calendarSelectedDate}}"
<ui-calendar ex-class="calendar-cm-month" bindonDayTap="onCalendarDayTap" auctionCount="{{auctionCount}}"
listedCount="{{listedCount}}" displayTime="{{calendarDisplayTime}}" selectedDate="{{calendarSelectedDate}}"
displayMonthNum="{{calendarDisplayMonthNum}}" is-show="{{isCalendarShow}}"></ui-calendar>
</view>
</view>
@ -38,21 +38,40 @@
<view class="tab">
<view class="tab-item {{item.id===active?'active':''}}" wx:for="{{tabList}}" wx:for-index="i" wx:for-item="item"
wx:key="id" bindtap="tabDowm" data-id="{{item.id}}">
<text class="tab-title">{{item.name}}</text>
<view class="tab-title">
{{item.name}} ({{item.id == 1?info.length:infoT.length}})
</view>
<image class="tab-tag" src="../../assets/images/tab-tag.png"></image>
</view>
</view>
<!-- 展示部分 -->
<view class="list" wx:if="{{info.length>0}}">
<view class="item one-title" wx:key="id" wx:for="{{info}}" wx:for-index="id" wx:for-item="item"
bindtap="navigate" data-id="{{item.landListedId}}">
{{item.landListedId}}
<view wx:if="{{active == 1}}">
<view class="list" wx:if="{{info.length>0}}">
<view class="item one-title" wx:key="id" wx:for="{{info}}" wx:for-index="id" wx:for-item="item"
bindtap="navigate" data-id="{{item.landListedId}}">
{{item.landListedId}}
</view>
</view>
<view class="list" wx:if="{{info.length<=0}}">
<view class="item one-title noText">
暂无数据
</view>
</view>
</view>
<view class="list" wx:if="{{info.length<=0}}">
<view class="item one-title noText">
暂无数据
<view wx:else>
<view class="list" wx:if="{{infoT.length>0}}">
<view class="item one-title" wx:key="id" wx:for="{{infoT}}" wx:for-index="id" wx:for-item="item"
bindtap="navigate" data-id="{{item.landListedId}}">
{{item.landListedId}}
</view>
</view>
<view class="list" wx:if="{{infoT.length<=0}}">
<view class="item one-title noText">
暂无数据
</view>
</view>
</view>
</view>
</view>

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

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

2
project.private.config.json

@ -51,7 +51,7 @@
{
"name": "看地池",
"pathName": "pages/look-list/look-list",
"query": "",
"query": "title=待测算",
"scene": null
},
{

Loading…
Cancel
Save