1.4 修改概念中心日期默认传值

This commit is contained in:
尚政杰
2026-01-04 18:13:05 +08:00
parent 091c1372fd
commit 260fc7bebf
107 changed files with 480 additions and 256 deletions

View File

@@ -356,7 +356,6 @@
this.selectStartMonth = startYear+'年'+startMonth+'月'
this.startDateStr = this.selectStartDateStr = startYear+'-'+(startMonth>9?startMonth:('0'+startMonth))+'-'+(startDay>9?startDay:('0'+startDay))
this.generateMonthDateListData()
this.getConceptCenterData()
this.getNewestPriceDateData()
this.getRankListData()
this.getMemberStatusData()
@@ -551,7 +550,7 @@
return
}
this.startDateStr = this.selectStartDateStr
this.endDateStr = this.endDateStr
this.endDateStr = this.selectEndDateStr
this.getRankListData()
},
/**
@@ -783,7 +782,14 @@
*/
getConceptCenterData()
{
let param = {query:this.keywords,size:10,page:this.page,sort_by:this.sortType,isJson:1,trade_date:this.selectDateStr}
let dateStr = this.selectDateStr
let selectDateTimestamp = new Date(this.selectDateStr).getTime()
let newestTimeStamp = new Date(this.newestPriceDate).getTime()
if (selectDateTimestamp > newestTimeStamp) {
//如果选择的日期在最新交易日之前
dateStr = this.newestPriceDate
}
let param = {query:this.keywords,size:10,page:this.page,sort_by:this.sortType,isJson:1,trade_date:dateStr}
eventRelatedConcept(param).then(res=>{
this.isRefreshing = false
if (res.page == 1) {
@@ -804,6 +810,7 @@
getNewestPriceDateData(){
newestPriceDate().then(res=>{
this.newestPriceDate = res.latest_trade_date
this.getConceptCenterData()
}).catch(error=>{
})

View File

@@ -119,9 +119,9 @@
this.selectMonthIndex = 20*12+currentMonth-1
this.selectMonth = currentYear+'年'+currentMonth+'月'
//开始日期默认为当前月份第一天
this.startDateStr = currentYear+'-'+currentMonth+'-'+'01'
this.startDateStr = currentYear+'-'+(currentMonth>9?currentMonth:('0'+currentMonth))+'-'+'01'
//结束日期默认为当前日期
this.endDateStr = this.selectDateStr = currentYear+'-'+currentMonth+'-'+(currentDay>9?currentDay:('0'+currentDay))
this.endDateStr = this.selectDateStr = currentYear+'-'+(currentMonth>9?currentMonth:('0'+currentMonth))+'-'+(currentDay>9?currentDay:('0'+currentDay))
// this.getYesterdayDateData()
this.generateMonthDateListData()
if (e.id) {