2.4 组件结构调整,调整会员权限判断

This commit is contained in:
尚政杰
2026-02-04 17:43:41 +08:00
parent eeca65538c
commit 995ee7f220
274 changed files with 7191 additions and 2186 deletions

View File

@@ -18,7 +18,7 @@
<view v-if="stockBasicInfo" class="basicInfoC">
<view class="categoryLabelC flex">
<view class="category">{{stockBasicInfo.industry_l1}}·{{stockBasicInfo.sw_industry_l2}}</view>
<view class="">沪深300上证180</view>
<!-- <view class="">沪深300上证180</view> -->
</view>
<view v-if="quoteDetailsInfo" class="priceC flex">
<view class="currentChgC">
@@ -138,9 +138,11 @@
</view>
</view>
<view class="otherInfoC">
<scroll-view scroll-x class="tabC">
<view :class="'item '+(selectTab==index?'select':'')" v-for="(item,index) in tabList" :key="index"
@click="clickTabItem(index)">{{item.title}}</view>
<scroll-view scroll-x class="tabC">
<block v-for="(item,index) in tabList" :key="index">
<view v-if="item.show" :class="'item '+(selectTab==index?'select':'')"
@click="clickTabItem(index)">{{item.title}}</view>
</block>
</scroll-view>
<block v-if="selectTab==0">
<view class="companyFilesList">
@@ -154,13 +156,27 @@
:circulatingShareholdersList="topCirculatingShareholdersList"></gqjg-view>
</template>
<template v-if="selectCompanyFiles==1">
<gltd-view :managementList="managementList"></gltd-view>
<gltd-view :managementList="managementList"></gltd-view>
<view v-if="isData&&isManagementEmpty" class="noDataC flexColumnCenter">
<image class="icon" src="/pagesStock/static/icon/noData.png" mode="widthFix"></image>
<view class="title">当前暂无相关数据</view>
</view>
</template>
<template v-if="selectCompanyFiles==2">
<fzjg-view :branchList="branchList"></fzjg-view>
<template v-if="selectCompanyFiles==2">
<fzjg-view :branchList="branchList"></fzjg-view>
<view v-if="isData&&branchList.length==0" class="noDataC flexColumnCenter">
<image class="icon" src="/pagesStock/static/icon/noData.png" mode="widthFix"></image>
<view class="title">当前暂无相关数据</view>
</view>
</template>
<block v-if="selectCompanyFiles==3">
<gsxx-view :stockBasicInfo="stockBasicInfo"></gsxx-view>
<block v-if="selectCompanyFiles==3">
<block v-if="stockBasicInfo">
<gsxx-view :stockBasicInfo="stockBasicInfo"></gsxx-view>
</block>
<view v-if="isData&&!stockBasicInfo" class="noDataC flexColumnCenter">
<image class="icon" src="/pagesStock/static/icon/noData.png" mode="widthFix"></image>
<view class="title">当前暂无相关数据</view>
</view>
</block>
</block>
<block v-if="selectTab==1">
@@ -208,11 +224,11 @@
{{item.title}}
</view>
</view>
<news-view :type="selectDongtai" :newsList="newsList" :announcementList="companyAnnouncementList"></news-view>
<news-view :type="selectDongtai" :newsList="newsList" :announcementList="companyAnnouncementList" @search="clickNewsSearch" @newsDetails="clickNewsDetail" @announcementDetails="clickAnnouncementDetail"></news-view>
</block>
</view>
</scroll-view>
<view class="bottomC fixed flex">
<!-- <view class="bottomC fixed flex">
<view class="inputC flex1">
<input type="text" v-model="eventComment" placeholder="对比股票..." placeholder-style="color:#666"
confirm-type="send" @confirm="sendEventComment()" />
@@ -231,7 +247,7 @@
<view>分享</view>
</view>
</view>
</view>
</view> -->
<uni-popup ref="industryRankPop" type="bottom">
<view class="industryRankPop relative">
<view class="popTitle">行业排名</view>
@@ -394,7 +410,7 @@
<view style="font-size: 28rpx; font-weight: bold;">产业链关系</view>
<view>
<image style="width: 21rpx; height: 14rpx; margin-right: 10rpx;" src="/pagesStock/static/icon/yRightArrow.png" mode="widthFix"></image>
<text style="color: #71675D; font-size: 24rpx;">流向 {{item.relationships[0].connected_node}}</text>
<text style="color: #71675D; font-size: 24rpx;">流向 {{item.relationships[0].connected_node}}</text>
</view>
</block>
</view>
@@ -459,22 +475,26 @@
quoteDetailsInfo:null, //股票事实市场价格信息
isExpandIntro:false, //是否展开公司简介
tabList: [{
title: '公司档案'
title: '公司档案',
show:true
},
{
title: '深度分析'
title: '深度分析',
show:true
},
// {
// title:'股票行情'
// },
{
title: '财务全景'
title: '财务全景',
show:true
},
// {
// title:'盈利预测'
// },
{
title: '动态跟踪'
title: '动态跟踪',
show:true
}
],
selectTab: 0,
@@ -496,6 +516,7 @@
topShareholdersList:[], //十大股东列表
topCirculatingShareholdersList:[], //十大流通股东列表
managementList:[], //管理团队列表
isManagementEmpty:false, //管理团队数据是否为空
branchList:[], //分支机构列表
selectCompanyFiles: 0,
inDepthAnalysisList: [{
@@ -614,7 +635,8 @@
companyAnnouncementList:[], //公司公告数据
getLocalDate:getLocalDate,
getRateUpOrDown:getRateUpOrDown, //判断涨跌
getNumStr:getNumStr, //获取数字展示万或亿
getNumStr:getNumStr, //获取数字展示万或亿
isData:false, //是否请求完了数据
}
},
onLoad(e) {
@@ -656,20 +678,58 @@
this.searchShow = false
this.getStockBasicInfoData()
this.getQuoteDetailsData()
if(this.selectTab==0) {
//公司档案
if (this.selectCompanyFiles==0) {
this.getActualControlData()
this.getOwnershipConcentration()
this.getTopShareholdersData()
this.getTopCirculatingShareholdersData()
}else if (this.selectCompanyFiles==1) {
//获取管理团队数据
this.isData = false
this.getManagementTeamData()
}else if (this.selectCompanyFiles==2) {
//获取分支机构数据
this.isData = false
this.getBranchListData()
}
}else if(this.selectTab==1) {
//获取竞争地位数据
if(this.selectInDepthAnalysis==0) {
this.getComprehensiveAnalysisData()
this.getIndustryRankListData()
}
}else if(this.selectTab==2) {
//获取股票信息数据
this.getFinancialStockInfoData()
this.getFinancialComparisonData()
this.getFinancialMetricsData()
this.getFinancialMainBussinessData()
}else if(this.selectTab==3) {
//获取新闻动态数据
this.getNewsListData()
}
},
/**
* 获取买入百分比
*/
getBuyPercent() {
let ratio = this.quoteDetailsInfo.net_active_buy_ratio
return Math.round(accAdd(50,accDiv(ratio,2)))
if (ratio) {
return Math.round(accAdd(50,accDiv(ratio,2)))
} else
return 0
},
/**
* 获取卖出百分比
*/
getSellPercent() {
let ratio = this.quoteDetailsInfo.net_active_buy_ratio
return Math.round(accSub(50,accDiv(ratio,2)))
if (ratio) {
return Math.round(accSub(50,accDiv(ratio,2)))
} else
return 0
},
/**
* 点击查看官网
@@ -830,6 +890,46 @@
{
this.$refs["valueChainPopup"].close()
},
/**
* 新闻动态搜索
* @param {Object} keywords
*/
clickNewsSearch(keywords)
{
this.newsKeywords = keywords
this.getNewsListData()
},
/**
* 查看新闻动态详情
*/
clickNewsDetail(item)
{
uni.navigateTo({
url:'/pages/index/eventDetails/eventDetails?id='+item.id
})
},
/**
* 查看公司公告详情
*/
clickAnnouncementDetail(item)
{
wx.showLoading({
title:'下载中'
})
wx.downloadFile({
url:item.url,
success(res) {
wx.openDocument({
filePath:res.tempFilePath,
showMenu:true,
success(res) {
wx.hideLoading()
}
})
}
})
},
/**
* 点击自选
*/
@@ -983,8 +1083,14 @@
}
return acc;
}, list);
var count = 0
for (let item of this.managementList) {
count += item.list.length
}
this.isManagementEmpty = count==0
this.isData = true
}).catch(error=>{
this.isData = true
})
},
/**
@@ -997,8 +1103,9 @@
}
branchesList(code).then(res=>{
this.branchList = res.data
this.isData = true
}).catch(error=>{
this.isData = true
})
},
/**
@@ -1188,10 +1295,9 @@
if (this.selectSearchStockInfo) {
code = this.selectSearchStockInfo.stock_code
}
let param = {limit:8}
let param = {limit:16}
financialBalanceSheet(code,param).then(res=>{
this.financialBalanceList = res.data
}).catch(error=>{
})
@@ -1205,7 +1311,7 @@
if (this.selectSearchStockInfo) {
code = this.selectSearchStockInfo.stock_code
}
let param = {limit:8}
let param = {limit:16}
cashflowSheet(code,param).then(res=>{
this.cashFlowList = res.data
@@ -1222,10 +1328,9 @@
if (this.selectSearchStockInfo) {
code = this.selectSearchStockInfo.stock_code
}
let param = {limit:8}
let param = {limit:16}
incomeStatementSheet(code,param).then(res=>{
this.incomeStatementList = res.data
}).catch(error=>{
})
@@ -1324,7 +1429,8 @@
.stockDetailsC {
left: 0;
right: 0;
bottom: calc(20rpx + 70rpx + 20rpx + env(safe-area-inset-bottom));
// bottom: calc(20rpx + 70rpx + 20rpx + env(safe-area-inset-bottom));
bottom: 0;
.basicInfoC {
background-color: white;
@@ -1556,10 +1662,6 @@
}
}
.ywjg_list {
color: #2B2B2B;
@@ -1576,6 +1678,20 @@
padding: 25rpx 20rpx;
box-sizing: border-box;
}
}
.noDataC
{
padding: 50rpx 0;
.icon
{
width: 500rpx;
height: auto;
}
.title
{
font-size: 28rpx;
color: #666;
}
}
}
}