12.17 事件详情相关概念,概念中心增加下拉刷新,分页加载,增加新闻详情展示
This commit is contained in:
@@ -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"
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user