11.26 修改K线图样式

This commit is contained in:
尚政杰
2025-11-26 17:19:38 +08:00
parent 48f49c6cf0
commit 4e64455b9b
4803 changed files with 146408 additions and 648 deletions

View File

@@ -37,10 +37,10 @@
</view>
</scroll-view>
</view>
<scroll-view scroll-y class="eventListC fixed" :style="'top:'+listTop+'px'" @scrolltolower="loadMoreData()">
<view style="width:750rpx; height:400rpx">
<scroll-view scroll-y class="eventListC fixed" :style="'top:'+listTop+'px'" refresher-enabled :refresher-triggered="isRefreshing" @refresherrefresh="pullDownRefresh()" @scrolltolower="loadMoreData()">
<!-- <view style="width:750rpx; height:400rpx">
<l-echart ref="chartRef"></l-echart>
</view>
</view> -->
<view class="list">
<view class="item" @click="clickEventItem(item.id)" v-for="(item,index) in eventList" :key="index">
<view class="flex">
@@ -68,9 +68,9 @@
{{getRateStr(item.related_week_chg)}}%
</view>
</scroll-view>
<scroll-view scroll-x class="stockList">
<!-- <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)?'down':'up')">{{(getRateUpOrDown(sitem.daily_change)?'':'+')+sitem.daily_change}}%</text></view>
</scroll-view>
</scroll-view> -->
<view class="timeToolBarC flex">
<view class="time flex1">{{getLocaleTime(item.created_at)}}</view>
<view class="toolBarC flex">
@@ -91,7 +91,7 @@
</view>
</view>
</scroll-view>
<uni-popup ref="sortPopup" type="top" mask-background-color="transparent">
<uni-popup ref="sortPopup" type="top" mask-background-color="transparent" :animation="false">
<view class="sortPopup relative">
<image class="arrow absolute" src="/static/icon/home/sortArrow.png" mode="widthFix"></image>
<view class="list" :style="'margin-top:'+sortListTop+'px;'">
@@ -263,6 +263,7 @@
import { filterOptions, eventList, homeData, industryCategoryList, loginByEmail, followEvent, stockCategoryList } from '@/request/api'
import { getRateStr, getRateUpOrDown, getLocaleTime } from '@/utils/util.js'
const echarts = require('../../uni_modules/lime-echart/static/echarts.min.js');
import posthog from '@/utils/posthog.js';
export default {
data() {
@@ -274,6 +275,7 @@
contentTop:'',
listTop:'',
sortListTop:'',
isRefreshing:false,
keywords:'', //关键词
sortList:[],
selectSortKey:'', //选中排序key
@@ -449,7 +451,8 @@
monthDateList.push(daysOfMonth)
}
}
this.monthDateList = monthDateList
this.monthDateList = monthDateList
posthog.capture("首页")
},
onReady() {
uni.createSelectorQuery().select('#topCategory').boundingClientRect(rect=>{
@@ -461,11 +464,18 @@
this.secondScrollWidth = Math.round(rect.width)
}
}).exec()
},
onPullDownRefresh() {
this.clickSearch()
},
methods: {
/**
* 下拉刷新
*/
pullDownRefresh(){
this.isRefreshing = true
this.clickSearch()
},
/**
* 上拉加载
*/
loadMoreData()
{
if(!this.loadAll)
@@ -916,7 +926,7 @@
this.importanceList.unshift({desc: "全部",key: "all",name: "全部"})
}else
{
reject(1)
resolve(1)
uni.showToast({
title:res.message,
icon:'none'
@@ -1025,85 +1035,85 @@
}
}
eventList(param).then(res=>{
this.isRefreshing = false
if(res.success)
{
let valueData = []
let data = res.data.overall_stats.change_distribution
valueData.push({
value:data.limit_down,
itemStyle: {color:'#35542266'},
label:{
textStyle: {color:'#35542266'},
},
})
valueData.push({
value:data.down_over_5,
itemStyle: {color:'#35542299'},
label:{
textStyle: {color:'#355422'},
},
},)
valueData.push({
value:data.down_5_to_1,
itemStyle: {color:'#355422CC'},
label:{
textStyle: {color:'#355422'},
},
})
valueData.push({
value:data.down_within_1,
itemStyle: {color:'#355422'},
label:{
textStyle: {color:'#355422'},
},
})
valueData.push({
value:data.flat,
itemStyle: {color:'#ACB0C0'},
label:{
textStyle: {color:'#666'},
},
},)
valueData.push({
value:data.up_within_1,
itemStyle: {color:'#C00000'},
label:{
textStyle: {color:'#C00000'},
},
})
valueData.push({
value:data.up_1_to_5,
itemStyle: {color:'#C00000CC'},
label:{
textStyle: {color:'#C00000'},
}
})
valueData.push({
value:data.up_over_5,
itemStyle: {color:'#C0000099'},
label:{
textStyle: {color:'#C00000'},
}
})
valueData.push({
value:data.limit_up,
itemStyle: {color:'#C0000066'},
label:{
textStyle: {color:'#C0000066'},
}
})
this.option.series[0].data = valueData
this.init()
// let valueData = []
// let data = res.data.overall_stats.change_distribution
// valueData.push({
// value:data.limit_down,
// itemStyle: {color:'#35542266'},
// label:{
// textStyle: {color:'#35542266'},
// },
// })
// valueData.push({
// value:data.down_over_5,
// itemStyle: {color:'#35542299'},
// label:{
// textStyle: {color:'#355422'},
// },
// },)
// valueData.push({
// value:data.down_5_to_1,
// itemStyle: {color:'#355422CC'},
// label:{
// textStyle: {color:'#355422'},
// },
// })
// valueData.push({
// value:data.down_within_1,
// itemStyle: {color:'#355422'},
// label:{
// textStyle: {color:'#355422'},
// },
// })
// valueData.push({
// value:data.flat,
// itemStyle: {color:'#ACB0C0'},
// label:{
// textStyle: {color:'#666'},
// },
// },)
// valueData.push({
// value:data.up_within_1,
// itemStyle: {color:'#C00000'},
// label:{
// textStyle: {color:'#C00000'},
// },
// })
// valueData.push({
// value:data.up_1_to_5,
// itemStyle: {color:'#C00000CC'},
// label:{
// textStyle: {color:'#C00000'},
// }
// })
// valueData.push({
// value:data.up_over_5,
// itemStyle: {color:'#C0000099'},
// label:{
// textStyle: {color:'#C00000'},
// }
// })
// valueData.push({
// value:data.limit_up,
// itemStyle: {color:'#C0000066'},
// label:{
// textStyle: {color:'#C0000066'},
// }
// })
// this.option.series[0].data = valueData
// this.init()
if(this.page==1)
{
this.eventList = res.data.events
}else
this.eventList = this.eventList.concat(res.data.events)
this.loadAll = !res.data.pagination.has_next
}
}).catch(error=>{
this.isRefreshing = false
})
},
/**
@@ -1565,7 +1575,8 @@
border-radius: 5rpx;
font-size: 28rpx;
font-weight: 500;
color: #B0B0B0;
// color: #B0B0B0;
color:#858C9A;
.start
{
text-align: right;