1.31 财务分析,财务数据模块完善,产业链桑基图展示

This commit is contained in:
尚政杰
2026-01-31 17:19:16 +08:00
parent 1c13386dfc
commit 0a2dab4936
527 changed files with 3390 additions and 604 deletions

View File

@@ -0,0 +1 @@
"use strict";const t=require("../../common/vendor.js"),e=require("../../request/api.js"),a=require("../../common/assets.js"),i={data:()=>({navH:t.inject("navHeight"),contentTop:"",allStockData:[],filteredData:[],currentDate:"",topLists:[{title:"超大盘股",value:">1000亿"},{title:"大盘股",value:"500-1000亿"},{title:"中盘股",value:"100-500亿"}],list2Index:0}),onLoad(e){this.currentDate=e.currentDate,this.contentTop=this.navH+115/750*t.inject("windowWidth"),this.marketHeatmap()},methods:{handleTypeClick(t){this.list2Index=t,this.marketHeatmap()},getTableItem(t){const e=t.market_cap?t.market_cap.toFixed(2):"0.00",a=t.amount?t.amount.toFixed(2):"0.00",i=t.change_percent?Number(t.change_percent):0;let r="",s="";return i>0?(r=`+${i}%`,s="positive"):i<0?(r=`${i}%`,s="negative"):(r="0%",s="zero"),[[t.stock_name,t.stock_code],[r,"",s],[`${e}亿元`],[`${a}亿元`],[t.industry||"暂无"]]},marketHeatmap(){let t={limit:500,date:this.currentDate};e.marketHeatmap(t).then((t=>{this.allStockData=t.data||[],this.filterStockByMarketCap()})).catch((t=>{}))},filterStockByMarketCap(){const{list2Index:t,allStockData:e}=this;let a=[];switch(t){case 0:a=e.filter((t=>t.market_cap>1e3));break;case 1:a=e.filter((t=>t.market_cap>=500&&t.market_cap<=1e3));break;case 2:a=e.filter((t=>t.market_cap>=100&&t.market_cap<=500));break;default:a=e}this.filteredData=a},itemDetails(e){t.index.navigateTo({url:"/pagesStock/stockCenterDetails/stockCenterDetails?code="+e.stock_code})}}};if(!Array){t.resolveComponent("navBar")()}Math;const r=t._export_sfc(i,[["render",function(e,i,r,s,o,c){return{a:t.p({leftText:"详情",hideNavBg:!0}),b:a._imports_0,c:a._imports_1,d:t.o((t=>e.clickSearch())),e:e.keywords,f:t.o((t=>e.keywords=t.detail.value)),g:t.s("top:"+o.navH+"px;"),h:t.f(o.topLists,((e,a,i)=>({a:t.t(e.title),b:o.list2Index==a?"#BB8520":"#070707",c:t.t(e.value),d:o.list2Index==a?"#BB8520":"#070707",e:t.o((t=>c.handleTypeClick(a)),a),f:a,g:o.list2Index==a?"1rpx solid #F2C369":"none"}))),i:t.f(["股票名称","涨跌幅","市值","成交额","行业"],((e,a,i)=>({a:t.t(e),b:a}))),j:t.f(o.filteredData,((e,a,i)=>({a:t.f(c.getTableItem(e),((e,a,i)=>t.e({a:t.t(e[0]),b:0==a},0==a?{c:t.t(e[1])}:{},{d:a,e:0==a?"#222222":1==a?"positive"===e[2]?"#EC3440":"#01AB5D":"#666666"}))),b:t.o((t=>c.itemDetails(e))),c:a%2==0?"#fff":"#FAFAFC"}))),k:t.s("top:"+o.contentTop+"px;")}}]]);wx.createPage(r);

View File

@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "",
"usingComponents": {
"nav-bar": "../../components/navBar/navBar"
}
}

View File

@@ -0,0 +1 @@
<view><nav-bar wx:if="{{a}}" u-i="1d94e03e-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="searchC fixed flex" style="{{g}}"><image class="icon" src="{{c}}" mode="widthFix"></image><input class="flex1" type="text" placeholder="输入股票代码或名称" placeholder-style="color:#eeeeee" confirm-type="search" bindconfirm="{{d}}" value="{{e}}" bindinput="{{f}}"/></view><scroll-view scroll-y class="stockDetailsC fixed" style="{{k}}"><view><view style="display:grid;grid-template-columns:repeat(3, 1fr);gap:16rpx;margin:0 20rpx"><view wx:for="{{h}}" wx:for-item="item" wx:key="f" bindtap="{{item.e}}" style="{{'padding:12rpx' + ';' + ('border-bottom:' + item.g)}}"><view style="{{'font-size:24rpx;color:#070707;font-weight:bold;text-align:center' + ';' + ('color:' + item.b)}}">{{item.a}}</view><view style="{{'font-size:20rpx;font-weight:400;text-align:center' + ';' + ('color:' + item.d)}}">{{item.c}}</view></view></view><view style="height:1rpx;margin:0 20rpx;background-color:#E7E7E7"></view><view style="display:grid;grid-template-columns:repeat(5, 1fr);gap:10rpx;background-color:#FAFAFC;line-height:60rpx;margin:0 20rpx;margin-top:20rpx"><view wx:for="{{i}}" wx:for-item="item" wx:key="b" style="color:#666666;font-size:20rpx;font-weight:500;text-align:center">{{item.a}}</view></view><view wx:for="{{j}}" wx:for-item="obj" bindtap="{{obj.b}}" style="{{'display:grid;grid-template-columns:repeat(5, 1fr);gap:10rpx;min-height:60rpx;margin:0 20rpx' + ';' + ('background-color:' + obj.c)}}"><view wx:for="{{obj.a}}" wx:for-item="item" wx:key="d" style="{{'padding:10rpx 0;color:#666666;font-size:20rpx;font-weight:500;text-align:center;display:flex;justify-content:center;align-items:center;flex-direction:column' + ';' + ('color:' + item.e)}}"><view>{{item.a}}</view><view wx:if="{{item.b}}" style="color:#666666;font-size:20rpx;font-weight:500">{{item.c}}</view></view></view><view style="height:25rpx"></view></view></scroll-view></view>

View File

@@ -0,0 +1 @@
page{background-color:#070707}.topBg{top:0;left:0;width:100%;height:auto}.searchC{background-color:rgba(41,41,41,.7);left:0;right:0;margin:20rpx 25rpx 0;padding:0 25rpx;height:70rpx;border-radius:35rpx;font-size:22rpx;font-weight:500}.searchC .icon{margin-right:12rpx;width:25rpx;height:auto}.searchC input{height:100%;color:#fff}.stockDetailsC{left:25rpx;width:calc(100vw - 50rpx);bottom:env(safe-area-inset-bottom);background-color:#fff;border-radius:10rpx}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,8 @@
{
"navigationBarTitleText": "",
"usingComponents": {
"nav-bar": "../../components/navBar/navBar",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup",
"l-c-calendar2": "../../components/LCCalendar2/LCCalendar2"
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
page{background-color:#070707}.topBg{top:0;left:0;width:100%;height:auto}.searchC{background-color:rgba(41,41,41,.7);left:0;right:0;margin:20rpx 25rpx 0;padding:0 25rpx;height:70rpx;border-radius:35rpx;font-size:22rpx;font-weight:500}.searchC .icon{margin-right:12rpx;width:25rpx;height:auto}.searchC input{height:100%;color:#fff}.stockDetailsC{left:25rpx;width:calc(100vw - 50rpx);bottom:calc(55px + env(safe-area-inset-bottom));background-color:#fff;border-radius:10rpx}.detailPopup{max-height:70%;background-color:#fff;color:red;border-radius:20rpx 20rpx 0 0;padding-bottom:env(safe-area-inset-bottom)}