10.13 修改时间筛选逻辑,去掉分时图线上圆圈展示,修改K线图颜色

This commit is contained in:
尚政杰
2025-10-13 16:48:21 +08:00
parent bf2388c3ec
commit b53bb9715e
93 changed files with 736 additions and 352 deletions

View File

@@ -45,7 +45,7 @@
<view class="item" @click="clickEventItem(item.id)" v-for="(item,index) in eventList" :key="index">
<view class="flex">
<view :class="'level '+item.importance">{{item.importance}}</view>
<view class="title">{{item.title}}</view>
<view class="title flex1">{{item.title}}</view>
</view>
<view :class="'content '+(item.isExpand?'':'retract')" @click.stop="clickExpandOrRetract(index)">{{item.description}}</view>
<scroll-view scroll-x class="increaseRateList">
@@ -69,7 +69,7 @@
</view>
</scroll-view>
<scroll-view scroll-x class="stockList">
<view class="stockItem" v-for="(sitem,sindex) in item.related_stocks" :key="sindex" @click.stop="clickLookRelatedStockItem(item.id,sitem.stock_code)">{{sitem.stock_name}} <text class="change">{{(getRateUpOrDown(sitem.daily_change)?'':'+')+sitem.daily_change}}%</text></view>
<view class="stockItem" v-for="(sitem,sindex) in item.related_stocks" :key="sindex" @click.stop="clickLookRelatedStockItem(item.id,sitem.stock_code)">{{sitem.stock_name}} <text :class="'change '+(getRateUpOrDown(sitem.daily_change)?'down':'up')">{{(getRateUpOrDown(sitem.daily_change)?'':'+')+sitem.daily_change}}%</text></view>
</scroll-view>
<view class="timeToolBarC flex">
<view class="time flex1">{{getLocaleTime(item.created_at)}}</view>
@@ -460,8 +460,7 @@
}).exec()
},
onPullDownRefresh() {
this.page = 1
this.getEventListData()
this.clickSearch()
},
methods: {
loadMoreData()
@@ -469,7 +468,11 @@
if(!this.loadAll)
{
this.page ++
this.getEventListData()
if(this.selectScreenCategory==0)
{
this.getEventListData()
}else
this.getHotEventListData()
}
},
async init() {
@@ -483,7 +486,11 @@
clickSearch()
{
this.page = 1
this.getEventListData()
if(this.selectTimeCategory==0)
{
this.getEventListData()
}else
this.getHotEventListData()
},
/**
* 点击事件筛选
@@ -649,21 +656,31 @@
{
if(this.startDate)
{
let date1 = new Date(this.startDate)
let date2 = new Date(item.date)
if(date1>date2)
{
this.endDate = this.startDate
this.endTimeStamp = this.startTimeStamp
if(this.endDate) {
//如果选过结束日期了
this.startDate = item.date
this.startTimeStamp = item.timestamp
this.endDate = null
this.endTimeStamp = null
}else
{
this.endDate = item.date
this.endTimeStamp = item.timestamp
let date1 = new Date(this.startDate)
let date2 = new Date(item.date)
if(date1>date2)
{
this.endDate = this.startDate
this.endTimeStamp = this.startTimeStamp
this.startDate = item.date
this.startTimeStamp = item.timestamp
}else
{
this.endDate = item.date
this.endTimeStamp = item.timestamp
}
}
}else
{
//如果没选过开始日期
this.startDate = item.date
this.startTimeStamp = item.timestamp
}
@@ -845,6 +862,7 @@
title:res.message,
icon:'none'
})
this.clickSearch()
}).catch(error=>{
})
@@ -854,6 +872,11 @@
*/
clickEventItem(id)
{
let that = this
uni.$on('editSuccess',res=>{
that.clickSearch()
uni.$off('editSuccess')
})
uni.navigateTo({
url:'/pages/index/eventDetails/eventDetails?id='+id
})
@@ -1328,6 +1351,7 @@
}
.title
{
// min-width: 0;
font-size: 30rpx;
font-weight: bold;
color: #222;
@@ -1392,7 +1416,11 @@
font-size: 30rpx;
font-weight: bold;
color: #222;
.change
.change.down
{
color: #355422;
}
.change.up
{
color: #F97316;
}