12.17 事件详情相关概念,概念中心增加下拉刷新,分页加载,增加新闻详情展示

This commit is contained in:
尚政杰
2025-12-17 17:42:24 +08:00
parent 13c783a0ad
commit e24b4000fb
106 changed files with 1583 additions and 1143 deletions

View File

@@ -106,6 +106,10 @@ const _sfc_main = {
quickTimeList: ["今天", "昨天", "一周前", "一月前"],
conceptList: [],
page: 1,
isRefreshing: false,
//下拉刷新
loadAll: false,
//是否加载完毕
getRateUpOrDown: utils_util.getRateUpOrDown,
getChgRateStr: utils_util.getChgRateStr,
memberInfo: null
@@ -200,6 +204,22 @@ const _sfc_main = {
}
this.monthDateList = monthDateList;
},
/**
* 下拉刷新
*/
pullDownRefresh() {
this.isRefreshing = true;
this.clickSearch();
},
/**
* 上拉加载
*/
loadMoreData() {
if (!this.loadAll) {
this.page++;
this.getConceptCenterData();
}
},
/**
* 点击搜索
*/
@@ -481,8 +501,17 @@ const _sfc_main = {
getConceptCenterData() {
let param = { query: this.keywords, size: 10, page: this.page, sort_by: this.sortType, isJson: 1, trade_date: this.selectDateStr };
request_api.eventRelatedConcept(param).then((res) => {
this.conceptList = res.results;
this.isRefreshing = false;
if (res.page == 1) {
this.conceptList = res.results;
} else {
this.conceptList = this.conceptList.concat(res.results);
}
if (res.page == res.total_pages) {
this.loadAll = true;
}
}).catch((error) => {
this.isRefreshing = false;
});
},
/**
@@ -556,7 +585,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.p({
leftText: "概念中心",
hideNavBg: true
hideNavBg: true,
hideBack: true
}),
b: common_assets._imports_0,
c: common_assets._imports_1,
@@ -586,7 +616,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
g: common_vendor.n("stockNum " + ($data.getRateUpOrDown(item.price_info.avg_change_pct) ? "down" : "up"))
} : {}, {
h: common_vendor.t(item.description)
}, $data.memberInfo.is_member && $data.memberInfo.subscription_type == "pro" ? {
}, $data.memberInfo && $data.memberInfo.is_member && $data.memberInfo.subscription_type == "pro" ? {
i: common_vendor.f(item.stocks.slice(0, 3), (sitem, sindex, i1) => {
return {
a: common_vendor.t(sitem.stock_name),
@@ -605,15 +635,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
q: index
});
}),
q: $data.memberInfo.is_member && $data.memberInfo.subscription_type == "pro",
q: $data.memberInfo && $data.memberInfo.is_member && $data.memberInfo.subscription_type == "pro",
r: common_assets._imports_1$2,
s: common_vendor.s("top: " + $data.listTop + "px;"),
t: common_assets._imports_11$1,
v: common_vendor.o(($event) => $options.clickRankClose()),
w: common_assets._imports_8,
x: common_vendor.t($data.startDateStr),
y: common_vendor.t($data.endDateStr),
z: common_vendor.f($data.cycleList, (item, index, i0) => {
t: $data.isRefreshing,
v: common_vendor.o(($event) => $options.pullDownRefresh()),
w: common_vendor.o(($event) => $options.loadMoreData()),
x: common_assets._imports_11$1,
y: common_vendor.o(($event) => $options.clickRankClose()),
z: common_assets._imports_8,
A: common_vendor.t($data.startDateStr),
B: common_vendor.t($data.endDateStr),
C: common_vendor.f($data.cycleList, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: common_vendor.n("item " + ($data.selectCycleIndex == index ? "select" : "")),
@@ -621,15 +654,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
d: common_vendor.o(($event) => $options.clickRankCycleListItem(index), index)
};
}),
A: $data.selectCycleIndex == 3
D: $data.selectCycleIndex == 3
}, $data.selectCycleIndex == 3 ? {
B: common_vendor.t($data.selectStartDateStr),
C: common_vendor.o(($event) => $options.clickCustomDateCycle(2)),
D: common_vendor.t($data.selectEndDateStr),
E: common_vendor.o(($event) => $options.clickCustomDateCycle(3)),
F: common_vendor.o(($event) => $options.clickApply())
E: common_vendor.t($data.selectStartDateStr),
F: common_vendor.o(($event) => $options.clickCustomDateCycle(2)),
G: common_vendor.t($data.selectEndDateStr),
H: common_vendor.o(($event) => $options.clickCustomDateCycle(3)),
I: common_vendor.o(($event) => $options.clickApply())
} : {}, {
G: common_vendor.f($data.rankTabList, (item, index, i0) => {
J: common_vendor.f($data.rankTabList, (item, index, i0) => {
return common_vendor.e({
a: $data.selectTab == index
}, $data.selectTab == index ? {
@@ -643,7 +676,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
g: common_vendor.o(($event) => $options.clickRankTabItem(index), index)
});
}),
H: common_vendor.f($data.rankList, (item, index, i0) => {
K: common_vendor.f($data.rankList, (item, index, i0) => {
return common_vendor.e({
a: index == 0
}, index == 0 ? {
@@ -676,7 +709,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
o: common_assets._imports_12$1,
p: common_vendor.t(item.news_count)
} : {}, {
q: common_assets._imports_13$2,
q: common_assets._imports_13$1,
r: common_vendor.t(item.news_count),
s: $data.selectTab == 2
}, $data.selectTab == 2 ? {
@@ -696,21 +729,21 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
B: index
});
}),
I: $data.selectTab == 3 || $data.selectTab == 4,
J: common_vendor.n("icon " + ($data.selectTab == 4 ? "continuousRise" : "")),
K: $data.rankTabList[$data.selectTab].selectIcon,
L: $data.selectTab == 0,
M: $data.selectTab == 1,
N: $data.selectTab == 2,
O: $data.selectTab == 3,
P: $data.selectTab == 4,
Q: common_vendor.sr("rankPopup", "634c6a80-1"),
R: common_vendor.p({
L: $data.selectTab == 3 || $data.selectTab == 4,
M: common_vendor.n("icon " + ($data.selectTab == 4 ? "continuousRise" : "")),
N: $data.rankTabList[$data.selectTab].selectIcon,
O: $data.selectTab == 0,
P: $data.selectTab == 1,
Q: $data.selectTab == 2,
R: $data.selectTab == 3,
S: $data.selectTab == 4,
T: common_vendor.sr("rankPopup", "634c6a80-1"),
U: common_vendor.p({
type: "bottom",
safeArea: false
}),
S: common_assets._imports_13$1,
T: common_vendor.f($data.sortTypeList, (item, index, i0) => {
V: common_assets._imports_13,
W: common_vendor.f($data.sortTypeList, (item, index, i0) => {
return {
a: item.icon,
b: common_vendor.t(item.name),
@@ -718,29 +751,29 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
d: common_vendor.o(($event) => $options.clickSortListItem(item), index)
};
}),
U: common_vendor.s("margin-top:" + $data.sortListTop + "px;"),
V: common_vendor.sr("sortTypePopup", "634c6a80-2"),
W: common_vendor.p({
X: common_vendor.s("margin-top:" + $data.sortListTop + "px;"),
Y: common_vendor.sr("sortTypePopup", "634c6a80-2"),
Z: common_vendor.p({
type: "top",
["mask-background-color"]: "transparent",
animation: false
}),
X: common_vendor.o(($event) => $options.clickCancel()),
Y: common_vendor.o(($event) => $options.clickConfirm()),
Z: common_assets._imports_4$2,
aa: common_vendor.o(($event) => $options.clickPreMonth()),
ab: common_vendor.t($data.selectMonth),
ac: common_vendor.o(() => {
aa: common_vendor.o(($event) => $options.clickCancel()),
ab: common_vendor.o(($event) => $options.clickConfirm()),
ac: common_assets._imports_4$2,
ad: common_vendor.o(($event) => $options.clickPreMonth()),
ae: common_vendor.t($data.selectMonth),
af: common_vendor.o(() => {
}),
ad: common_assets._imports_5$1,
ae: common_vendor.o(($event) => $options.clickNextMonth()),
af: common_vendor.f($data.weekList, (item, index, i0) => {
ag: common_assets._imports_5$1,
ah: common_vendor.o(($event) => $options.clickNextMonth()),
ai: common_vendor.f($data.weekList, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: index
};
}),
ag: common_vendor.f($data.monthDateList[$data.selectMonthIndex], (item, index, i0) => {
aj: common_vendor.f($data.monthDateList[$data.selectMonthIndex], (item, index, i0) => {
return common_vendor.e({
a: item.date == $data.selectDateStr
}, item.date == $data.selectDateStr ? {
@@ -756,29 +789,29 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
g: common_vendor.o(($event) => $options.clickSelectDate(item), index)
});
}),
ah: common_vendor.f($data.quickTimeList, (item, index, i0) => {
ak: common_vendor.f($data.quickTimeList, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: index,
c: common_vendor.o(($event) => $options.clickQuickTimeItem(index), index)
};
}),
ai: common_vendor.sr("transactionDatePopup", "634c6a80-3"),
aj: common_vendor.p({
al: common_vendor.sr("transactionDatePopup", "634c6a80-3"),
am: common_vendor.p({
type: "bottom",
safeArea: false
}),
ak: common_assets._imports_14,
al: common_assets._imports_15,
am: common_assets._imports_16,
an: common_assets._imports_16,
ao: common_assets._imports_17,
ap: common_assets._imports_17,
aq: common_assets._imports_17,
ar: common_vendor.o(($event) => $options.clickLater()),
as: common_vendor.o(($event) => $options.clickUpgradeAtOnce()),
at: common_vendor.sr("vipPopup", "634c6a80-4"),
av: common_vendor.p({
an: common_assets._imports_14,
ao: common_assets._imports_15,
ap: common_assets._imports_16,
aq: common_assets._imports_16,
ar: common_assets._imports_17,
as: common_assets._imports_17,
at: common_assets._imports_17,
av: common_vendor.o(($event) => $options.clickLater()),
aw: common_vendor.o(($event) => $options.clickUpgradeAtOnce()),
ax: common_vendor.sr("vipPopup", "634c6a80-4"),
ay: common_vendor.p({
type: "center"
})
});

File diff suppressed because one or more lines are too long

View File

@@ -72,7 +72,7 @@ page {
.conceptList {
left: 0;
right: 0;
bottom: 0;
bottom: calc(55px + env(safe-area-inset-bottom));
}
.conceptList .list {
padding: 0 25rpx;
@@ -90,6 +90,7 @@ page {
font-size: 30rpx;
font-weight: bold;
color: #3D3D3D;
word-break: break-all;
}
.conceptList .list .item .titleChgStockNumC .chg {
margin-right: 20rpx;
@@ -107,6 +108,7 @@ page {
background-color: #355422;
}
.conceptList .list .item .titleChgStockNumC .stockNum {
flex-shrink: 0;
padding: 0 16rpx;
line-height: 36rpx;
border-radius: 20rpx;
@@ -300,6 +302,8 @@ page {
.rankPopup .rankList {
margin-top: 22rpx;
padding: 0 25rpx;
max-height: 500rpx;
overflow-y: scroll;
}
.rankPopup .rankList .item {
margin-bottom: 20rpx;

View File

@@ -0,0 +1,46 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
const utils_util = require("../../../utils/util.js");
const common_assets = require("../../../common/assets.js");
const _sfc_main = {
data() {
return {
navH: common_vendor.inject("navHeight"),
newsInfo: null,
getLocalTime: utils_util.getLocaleTime
};
},
onLoad(e) {
this.newsInfo = JSON.parse(decodeURIComponent(e.info));
}
};
if (!Array) {
const _easycom_navBar2 = common_vendor.resolveComponent("navBar");
const _easycom_ua_markdown2 = common_vendor.resolveComponent("ua-markdown");
(_easycom_navBar2 + _easycom_ua_markdown2)();
}
const _easycom_navBar = () => "../../../components/navBar/navBar.js";
const _easycom_ua_markdown = () => "../../../components/ua-markdown/ua-markdown.js";
if (!Math) {
(_easycom_navBar + _easycom_ua_markdown)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.p({
leftText: "历史时间轴",
hideNavBg: true
}),
b: common_assets._imports_0,
c: $data.newsInfo
}, $data.newsInfo ? {
d: common_vendor.t($data.newsInfo.title),
e: common_vendor.t($data.getLocalTime($data.newsInfo.published_time)),
f: common_vendor.p({
source: $data.newsInfo.detail
}),
g: common_vendor.s("top: " + $data.navH + "px;")
} : {});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/concept/conceptNewsDetails/conceptNewsDetails.js.map

View File

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

View File

@@ -0,0 +1 @@
<view><nav-bar wx:if="{{a}}" u-i="279e50b2-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view wx:if="{{c}}" class="contentC fixed" style="{{g}}"><view class="title">{{d}}</view><view class="labelTimeC"><text class="time">{{e}}</text></view><view class="content"><ua-markdown wx:if="{{f}}" u-i="279e50b2-1" bind:__l="__l" u-p="{{f}}"/></view></view></view>

View File

@@ -0,0 +1,36 @@
page {
background-color: #070707;
}
.topBg {
top: 0;
left: 0;
width: 100%;
height: auto;
}
.contentC {
background-color: #FFF9F5;
margin: 20rpx 25rpx 0;
padding: 28rpx 30rpx;
left: 0;
right: 0;
bottom: 100rpx;
border-radius: 10rpx;
overflow-y: scroll;
}
.contentC .title {
margin: 0 10rpx;
font-size: 30rpx;
font-weight: bold;
color: #2B2B2B;
}
.contentC .labelTimeC {
margin: 0 10rpx;
}
.contentC .labelTimeC .time {
font-size: 24rpx;
font-weight: 500;
color: #666;
}
.contentC .content {
margin-top: 30rpx;
}

View File

@@ -208,6 +208,15 @@ const _sfc_main = {
this.getReportData();
}
},
/**
* 点击查看新闻详情
* @param {Object} item
*/
clickNewsItem(item) {
common_vendor.index.navigateTo({
url: "/pages/concept/conceptNewsDetails/conceptNewsDetails?info=" + encodeURIComponent(JSON.stringify(item))
});
},
/**
* 获取时间序列数据
*/
@@ -333,7 +342,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.t(item.title),
b: common_vendor.t(item.detail),
c: index
c: index,
d: common_vendor.o(($event) => $options.clickNewsItem(item), index)
};
}),
z: common_vendor.f($data.reportList, (item, index, i0) => {

View File

@@ -1 +1 @@
<view><nav-bar wx:if="{{a}}" u-i="adc20db2-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="timelineTitle fixed" style="{{d}}">{{c}}- 历史时间轴</view><view class="dateStatisticsC fixed" style="{{A}}"><view class="dateC"><view class="yearMonthC flex"><view class="btn" bindtap="{{f}}"><image class="icon" src="{{e}}" mode="widthFix"></image></view><view class="yearMonth flex1"><picker mode="date" fields="month" bindchange="{{h}}">{{g}}</picker></view><view class="btn" bindtap="{{j}}"><image class="icon" src="{{i}}" mode="widthFix"></image></view></view><view class="weekList flex"><view wx:for="{{k}}" wx:for-item="item" wx:key="b" class="item flex1">{{item.a}}</view></view><view class="monthDateList flexWrap"><view wx:for="{{l}}" wx:for-item="item" wx:key="m" class="item flexColumnCenter" bindtap="{{item.n}}"><block wx:if="{{item.a}}"><view class="{{item.e}}">{{item.b}} <view wx:if="{{item.c}}" class="chg">{{item.d}}%</view></view></block><block wx:else><block wx:if="{{item.f}}"><view class="date notCurrentMonth">{{item.g}}</view></block><block wx:else><view class="{{item.l}}">{{item.h}} <view wx:if="{{item.i}}" class="{{item.k}}">{{item.j}}%</view></view></block></block></view></view></view><view class="statisticsC"><view class="date">{{m}}统计</view><view wx:if="{{n}}" class="chgStockNumC flex"><view class="chgC flex flex1"><view class="title">涨跌幅</view><image wx:if="{{o}}" class="icon" src="{{p}}" mode="widthFix"></image><image wx:else class="icon" src="{{q}}" mode="widthFix"></image><view class="{{s}}">{{r}}%</view></view><view class="stockNumC flex flex1"><view class="title">统计股票</view><view class="stockNum">{{t}} 只股票</view></view></view><view class="newsReportC flex"><image class="icon" src="{{v}}" mode="widthFix"></image><text class="news">{{w}} 条新闻 · </text><text class="report" decode> {{x}} 份研报</text></view><view class="list"><view wx:for="{{y}}" wx:for-item="item" wx:key="c" class="item"><view class="flex"><view class="type news">新闻</view><view class="title flex1">{{item.a}}</view></view><view class="content">{{item.b}}</view></view><view wx:for="{{z}}" wx:for-item="item" wx:key="b" class="item"><view class="flex"><view class="type report">研报</view><view class="title flex1">{{item.a}}</view></view><view class="content">坚定看好锂电材料,建议继续加配坚定六氟、添加剂,关注隔膜更加坚定的看好六氟:下游传导如期</view></view></view></view></view></view>
<view><nav-bar wx:if="{{a}}" u-i="adc20db2-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="timelineTitle fixed" style="{{d}}">{{c}}- 历史时间轴</view><view class="dateStatisticsC fixed" style="{{A}}"><view class="dateC"><view class="yearMonthC flex"><view class="btn" bindtap="{{f}}"><image class="icon" src="{{e}}" mode="widthFix"></image></view><view class="yearMonth flex1"><picker mode="date" fields="month" bindchange="{{h}}">{{g}}</picker></view><view class="btn" bindtap="{{j}}"><image class="icon" src="{{i}}" mode="widthFix"></image></view></view><view class="weekList flex"><view wx:for="{{k}}" wx:for-item="item" wx:key="b" class="item flex1">{{item.a}}</view></view><view class="monthDateList flexWrap"><view wx:for="{{l}}" wx:for-item="item" wx:key="m" class="item flexColumnCenter" bindtap="{{item.n}}"><block wx:if="{{item.a}}"><view class="{{item.e}}">{{item.b}} <view wx:if="{{item.c}}" class="chg">{{item.d}}%</view></view></block><block wx:else><block wx:if="{{item.f}}"><view class="date notCurrentMonth">{{item.g}}</view></block><block wx:else><view class="{{item.l}}">{{item.h}} <view wx:if="{{item.i}}" class="{{item.k}}">{{item.j}}%</view></view></block></block></view></view></view><view class="statisticsC"><view class="date">{{m}}统计</view><view wx:if="{{n}}" class="chgStockNumC flex"><view class="chgC flex flex1"><view class="title">涨跌幅</view><image wx:if="{{o}}" class="icon" src="{{p}}" mode="widthFix"></image><image wx:else class="icon" src="{{q}}" mode="widthFix"></image><view class="{{s}}">{{r}}%</view></view><view class="stockNumC flex flex1"><view class="title">统计股票</view><view class="stockNum">{{t}} 只股票</view></view></view><view class="newsReportC flex"><image class="icon" src="{{v}}" mode="widthFix"></image><text class="news">{{w}} 条新闻 · </text><text class="report" decode> {{x}} 份研报</text></view><view class="list"><view wx:for="{{y}}" wx:for-item="item" wx:key="c" class="item" bindtap="{{item.d}}"><view class="flex"><view class="type news">新闻</view><view class="title flex1">{{item.a}}</view></view><view class="content">{{item.b}}</view></view><view wx:for="{{z}}" wx:for-item="item" wx:key="b" class="item"><view class="flex"><view class="type report">研报</view><view class="title flex1">{{item.a}}</view></view><view class="content">坚定看好锂电材料,建议继续加配坚定六氟、添加剂,关注隔膜更加坚定的看好六氟:下游传导如期</view></view></view></view></view></view>