12.12 页面风格改版,增加事件详情相关概念网页跳转,增加绑定手机号功能
This commit is contained in:
788
unpackage/dist/dev/mp-weixin/pages/concept/concept.js
vendored
Normal file
788
unpackage/dist/dev/mp-weixin/pages/concept/concept.js
vendored
Normal file
@@ -0,0 +1,788 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const request_api = require("../../request/api.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"),
|
||||
listTop: "",
|
||||
sortListTop: "",
|
||||
keywords: "",
|
||||
//搜索关键字
|
||||
newestPriceDate: "",
|
||||
//最新价格日期
|
||||
popType: "",
|
||||
//日期弹窗类型1交易日期2排行榜开始日期3排行榜结束日期
|
||||
cycleList: ["3天", "7天", "14天", "自定义"],
|
||||
//统计周期
|
||||
selectCycleIndex: 0,
|
||||
//选中周期下标
|
||||
startDateStr: "",
|
||||
//统计开始日期
|
||||
endDateStr: "",
|
||||
//统计结束日期
|
||||
selectStartDateStr: "",
|
||||
//选择的自定义开始日期
|
||||
selectStartMonthIndex: 0,
|
||||
//开始日期选中月份下标
|
||||
selectStartMonth: "",
|
||||
//结束日期选中年月
|
||||
selectEndDateStr: "",
|
||||
//选择的自定义结束日期
|
||||
selectEndMonthIndex: 0,
|
||||
//结束日期选中月份下标
|
||||
selectEndMonth: "",
|
||||
//结束日期选中年月
|
||||
rankTabList: [
|
||||
{
|
||||
icon: "/static/icon/home/conceptCenter/increaseRate.png",
|
||||
selectIcon: "/static/icon/home/conceptCenter/increaseRate_s.png",
|
||||
title: "涨幅榜"
|
||||
},
|
||||
{
|
||||
icon: "/static/icon/home/conceptCenter/decreaseRate.png",
|
||||
selectIcon: "/static/icon/home/conceptCenter/decreaseRate_s.png",
|
||||
title: "跌幅榜"
|
||||
},
|
||||
{
|
||||
icon: "/static/icon/home/conceptCenter/active.png",
|
||||
selectIcon: "/static/icon/home/conceptCenter/active_s.png",
|
||||
title: "活跃榜"
|
||||
},
|
||||
{
|
||||
icon: "/static/icon/home/conceptCenter/fluctuate.png",
|
||||
selectIcon: "/static/icon/home/conceptCenter/fluctuate_s.png",
|
||||
title: "波动榜"
|
||||
},
|
||||
{
|
||||
icon: "/static/icon/home/conceptCenter/continuousRise.png",
|
||||
selectIcon: "/static/icon/home/conceptCenter/continuousRise_s.png",
|
||||
title: "连涨榜"
|
||||
}
|
||||
],
|
||||
selectTab: 0,
|
||||
rankList: [],
|
||||
//排行榜
|
||||
sortTypeList: [
|
||||
{
|
||||
icon: "/static/icon/home/conceptCenter/chgSort.png",
|
||||
name: "涨跌幅",
|
||||
key: "change_pct"
|
||||
},
|
||||
{
|
||||
icon: "/static/icon/home/conceptCenter/correlationSort.png",
|
||||
name: "相关度",
|
||||
key: "_score"
|
||||
},
|
||||
{
|
||||
icon: "/static/icon/home/conceptCenter/stockNumSort.png",
|
||||
name: "股票数量",
|
||||
key: "stock_count"
|
||||
},
|
||||
{
|
||||
icon: "/static/icon/home/conceptCenter/conceptNameSort.png",
|
||||
name: "概念名称",
|
||||
key: "concept_name"
|
||||
}
|
||||
],
|
||||
sortType: "change_pct",
|
||||
//选择的排序方式
|
||||
weekList: ["一", "二", "三", "四", "五", "六", "日"],
|
||||
monthDateList: [],
|
||||
selectMonthIndex: 0,
|
||||
//选中月份下标
|
||||
selectMonth: "",
|
||||
//选中年月
|
||||
selectDateStr: "",
|
||||
//选中日期
|
||||
selectTradeDateStr: "",
|
||||
//交易日期选中日期
|
||||
selectTradeMonthIndex: 0,
|
||||
//交易日期选中月份下标
|
||||
selectTradeMonth: "",
|
||||
//交易日期选中年月
|
||||
quickTimeList: ["今天", "昨天", "一周前", "一月前"],
|
||||
conceptList: [],
|
||||
page: 1,
|
||||
getRateUpOrDown: utils_util.getRateUpOrDown,
|
||||
getChgRateStr: utils_util.getChgRateStr,
|
||||
memberInfo: null
|
||||
//会员信息
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.listTop = this.navH + (20 + 70 + 20 + 30 + 20) / 750 * common_vendor.inject("windowWidth");
|
||||
this.sortListTop = this.navH + (20 + 70 + 20 + 30 + 20) / 750 * common_vendor.inject("windowWidth");
|
||||
let currentDate = /* @__PURE__ */ new Date();
|
||||
let currentYear = currentDate.getFullYear();
|
||||
let currentMonth = currentDate.getMonth() + 1;
|
||||
let currentDay = currentDate.getDate();
|
||||
this.selectMonthIndex = this.selectTradeMonthIndex = this.selectEndMonthIndex = 20 * 12 + currentMonth - 1;
|
||||
this.selectMonth = this.selectTradeMonth = this.selectEndMonth = currentYear + "年" + currentMonth + "月";
|
||||
this.selectDateStr = this.selectTradeDateStr = this.endDateStr = this.selectEndDateStr = currentYear + "-" + (currentMonth > 9 ? currentMonth : "0" + currentMonth) + "-" + (currentDay > 9 ? currentDay : "0" + currentDay);
|
||||
let startDate = new Date(currentDate);
|
||||
startDate.setDate(startDate.getDate() - 3);
|
||||
let startYear = startDate.getFullYear();
|
||||
let startMonth = startDate.getMonth() + 1;
|
||||
let startDay = startDate.getDate();
|
||||
this.selectStartMonthIndex = (20 + currentYear - startYear) * 12 + startMonth - 1;
|
||||
this.selectStartMonth = startYear + "年" + startMonth + "月";
|
||||
this.startDateStr = this.selectStartDateStr = startYear + "-" + (startMonth > 9 ? startMonth : "0" + startMonth) + "-" + (startDay > 9 ? startDay : "0" + startDay);
|
||||
this.generateMonthDateListData();
|
||||
this.getConceptCenterData();
|
||||
this.getNewestPriceDateData();
|
||||
this.getRankListData();
|
||||
this.getMemberStatusData();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 生成日历数据
|
||||
*/
|
||||
generateMonthDateListData() {
|
||||
let currentDate = /* @__PURE__ */ new Date();
|
||||
let currentYear = currentDate.getFullYear();
|
||||
let currentMonth = currentDate.getMonth() + 1;
|
||||
let currentDay = currentDate.getDate();
|
||||
let monthDateList = [];
|
||||
for (var i = currentYear - 20; i < currentYear + 20; i++) {
|
||||
for (var j = 0; j < 12; j++) {
|
||||
let date = new Date(i, j + 1, 0);
|
||||
let firstDayOfMonth = new Date(i, j + 1, 0);
|
||||
firstDayOfMonth.setDate(1);
|
||||
let currentMonthDay = date.getDate();
|
||||
let firstDayWeek = firstDayOfMonth.getDay() || 7;
|
||||
let daysOfMonth = [];
|
||||
for (var k = 1; k <= currentMonthDay; k++) {
|
||||
let newDate = new Date(i, j + 1, 0);
|
||||
newDate.setDate(k);
|
||||
let newMonth = newDate.getMonth() + 1;
|
||||
let newDay = newDate.getDate();
|
||||
let time = newDate.getTime();
|
||||
let date2 = i + "-" + (newMonth > 9 ? newMonth : "0" + newMonth) + "-" + (newDay > 9 ? newDay : "0" + newDay);
|
||||
daysOfMonth.push({ date: date2, year: i, month: newMonth, day: newDay, isToday: i == currentYear && newMonth == currentMonth && newDay == currentDay ? true : false, isCurrentMonth: true, timestamp: time });
|
||||
}
|
||||
for (var k = 0; k < firstDayWeek - 1; k++) {
|
||||
let year = i;
|
||||
let month = j;
|
||||
if (j < 1) {
|
||||
year = i - 1;
|
||||
month = 12;
|
||||
}
|
||||
let lastMonthDay = new Date(year, month, 0).getDate();
|
||||
let newDate = new Date(year, month - 1, lastMonthDay - k);
|
||||
let newMonth = newDate.getMonth() + 1;
|
||||
let newDay = newDate.getDate();
|
||||
let time = newDate.getTime();
|
||||
let date2 = year + "-" + (newMonth > 9 ? newMonth : "0" + newMonth) + "-" + (newDay > 9 ? newDay : "0" + newDay);
|
||||
daysOfMonth.unshift({ date: date2, year, month: newMonth, day: newDay, isToday: false, isCurrentMonth: false, timestamp: time });
|
||||
}
|
||||
let nextMonthFirstDay = new Date(i, j + 1, 1);
|
||||
let lastDayOfMonth = new Date(nextMonthFirstDay - 24 * 60 * 60 * 1e3);
|
||||
let lastDayWeek = lastDayOfMonth.getDay() || 7;
|
||||
for (var k = 1; k < 8 - lastDayWeek; k++) {
|
||||
let year = i;
|
||||
let month = j;
|
||||
if (month > 11) {
|
||||
month = 0;
|
||||
year++;
|
||||
}
|
||||
let newDate = new Date(year, month + 1, k);
|
||||
let newMonth = newDate.getMonth() + 1;
|
||||
let newDay = newDate.getDate();
|
||||
let time = newDate.getTime();
|
||||
let date2 = year + "-" + (newMonth > 9 ? newMonth : "0" + newMonth) + "-" + (newDay > 9 ? newDay : "0" + newDay);
|
||||
daysOfMonth.push({ date: date2, year, month: newMonth, day: newDay, isToday: false, isCurrentMonth: false, timestamp: time });
|
||||
}
|
||||
monthDateList.push(daysOfMonth);
|
||||
}
|
||||
}
|
||||
this.monthDateList = monthDateList;
|
||||
},
|
||||
/**
|
||||
* 点击搜索
|
||||
*/
|
||||
clickSearch() {
|
||||
this.page = 1;
|
||||
this.getConceptCenterData();
|
||||
},
|
||||
/**
|
||||
* 点击排行榜
|
||||
*/
|
||||
clickRank() {
|
||||
this.$refs["rankPopup"].open();
|
||||
},
|
||||
/**
|
||||
* 点击关闭排行榜弹窗
|
||||
*/
|
||||
clickRankClose() {
|
||||
this.$refs["rankPopup"].close();
|
||||
},
|
||||
/**
|
||||
* 点击切换统计周期
|
||||
*/
|
||||
clickRankCycleListItem(index) {
|
||||
if (this.selectCycleIndex != index) {
|
||||
this.selectCycleIndex = index;
|
||||
if (index == 3)
|
||||
;
|
||||
else {
|
||||
let currentDate = /* @__PURE__ */ new Date();
|
||||
let currentYear = currentDate.getFullYear();
|
||||
let currentMonth = currentDate.getMonth() + 1;
|
||||
let currentDay = currentDate.getDate();
|
||||
let selectDate = new Date(currentDate);
|
||||
if (index == 0) {
|
||||
selectDate.setDate(selectDate.getDate() - 3);
|
||||
} else if (index == 1) {
|
||||
selectDate.setDate(selectDate.getDate() - 7);
|
||||
} else if (index == 2) {
|
||||
selectDate.setDate(selectDate.getDate() - 14);
|
||||
}
|
||||
let startYear = selectDate.getFullYear();
|
||||
let startMonth = selectDate.getMonth() + 1;
|
||||
let startDay = selectDate.getDate();
|
||||
this.endDateStr = this.selectEndDateStr = currentYear + "-" + (currentMonth > 9 ? currentMonth : "0" + currentMonth) + "-" + (currentDay > 9 ? currentDay : "0" + currentDay);
|
||||
this.startDateStr = this.selectStartdateStr = startYear + "-" + (startMonth > 9 ? startMonth : "0" + startMonth) + "-" + (startDay > 9 ? startDay : "0" + startDay);
|
||||
this.getRankListData();
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击自定义周期日期
|
||||
* @param {Object} type
|
||||
*/
|
||||
clickCustomDateCycle(type) {
|
||||
this.popType = type;
|
||||
if (type == 2) {
|
||||
this.selectDateStr = this.selectStartDateStr;
|
||||
this.selectMonth = this.selectStartMonth;
|
||||
this.selectMonthIndex = this.selectStartMonthIndex;
|
||||
} else {
|
||||
this.selectDateStr = this.selectEndDateStr;
|
||||
this.selectMonth = this.selectEndMonth;
|
||||
this.selectMonthIndex = this.selectEndMonthIndex;
|
||||
}
|
||||
this.$refs["transactionDatePopup"].open();
|
||||
},
|
||||
/**
|
||||
* 点击应用最新日期
|
||||
*/
|
||||
clickApply() {
|
||||
let startTimeStamp = new Date(this.selectStartDateStr);
|
||||
let endTimeStamp = new Date(this.selectEndDateStr);
|
||||
if (startTimeStamp > endTimeStamp) {
|
||||
common_vendor.index.showToast({
|
||||
title: "开始日期不能晚于结束日期",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.startDateStr = this.selectStartDateStr;
|
||||
this.endDateStr = this.endDateStr;
|
||||
this.getRankListData();
|
||||
},
|
||||
/**
|
||||
* 点击切换排行榜分类
|
||||
* @param {Object} index
|
||||
*/
|
||||
clickRankTabItem(index) {
|
||||
if (this.selectTab != index) {
|
||||
this.selectTab = index;
|
||||
this.getRankListData();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击切换排序方式
|
||||
*/
|
||||
clickSortType() {
|
||||
this.$refs["sortTypePopup"].open();
|
||||
},
|
||||
/**
|
||||
* 点击切换排序方式
|
||||
* @param {Object} item
|
||||
*/
|
||||
clickSortListItem(item) {
|
||||
this.sortType = item.key;
|
||||
this.clickSearch();
|
||||
this.$refs["sortTypePopup"].close();
|
||||
},
|
||||
/**
|
||||
* 点击交易日期
|
||||
*/
|
||||
clickTransactionDate() {
|
||||
this.popType = 1;
|
||||
this.selectDateStr = this.selectTradeDateStr;
|
||||
this.selectMonth = this.selectTradeMonth;
|
||||
this.selectMonthIndex = this.selectTradeMonthIndex;
|
||||
this.$refs["transactionDatePopup"].open();
|
||||
},
|
||||
/**
|
||||
* 点击取消
|
||||
*/
|
||||
clickCancel() {
|
||||
this.$refs["transactionDatePopup"].close();
|
||||
},
|
||||
/**
|
||||
* 点击确认
|
||||
*/
|
||||
clickConfirm() {
|
||||
this.clickCancel();
|
||||
if (this.popType == 1) {
|
||||
this.selectTradeDateStr = this.selectDateStr;
|
||||
this.selectTradeMonth = this.selectMonth;
|
||||
this.selectTradeMonthIndex = this.selectMonthIndex;
|
||||
this.getConceptCenterData();
|
||||
} else if (this.popType == 2) {
|
||||
this.selectStartDateStr = this.selectDateStr;
|
||||
this.selectStartMonth = this.selectMonth;
|
||||
this.selectStartMonthIndex = this.selectMonthIndex;
|
||||
} else {
|
||||
this.selectEndDateStr = this.selectDateStr;
|
||||
this.selectEndMonth = this.selectMonth;
|
||||
this.selectEndMonthIndex = this.selectMonthIndex;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击上个月
|
||||
*/
|
||||
clickPreMonth() {
|
||||
if (this.selectMonthIndex > 0) {
|
||||
this.selectMonthIndex--;
|
||||
let monthList = this.monthDateList[this.selectMonthIndex];
|
||||
let year = "";
|
||||
let month = "";
|
||||
for (let item of monthList) {
|
||||
if (item.isCurrentMonth) {
|
||||
year = item.year;
|
||||
month = item.month;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.selectMonth = year + "年" + month + "月";
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击下个月
|
||||
*/
|
||||
clickNextMonth() {
|
||||
if (this.selectMonthIndex < this.monthDateList.length - 1) {
|
||||
this.selectMonthIndex++;
|
||||
let monthList = this.monthDateList[this.selectMonthIndex];
|
||||
let year = "";
|
||||
let month = "";
|
||||
for (let item of monthList) {
|
||||
if (item.isCurrentMonth) {
|
||||
year = item.year;
|
||||
month = item.month;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.selectMonth = year + "年" + month + "月";
|
||||
}
|
||||
},
|
||||
monthChange(e) {
|
||||
let currentDate = /* @__PURE__ */ new Date();
|
||||
let currentYear = currentDate.getFullYear();
|
||||
let yearMonth = e.detail.value;
|
||||
let selectYear = parseInt(yearMonth.split("-")[0]);
|
||||
let selectMonth = parseInt(yearMonth.split("-")[1]);
|
||||
this.selectMonthIndex = (selectYear - (currentYear - 20)) * 12 + selectMonth - 1;
|
||||
this.selectMonth = selectYear + "年" + selectMonth + "月";
|
||||
},
|
||||
/**
|
||||
* 点击选择交易日期
|
||||
* @param {Object} item
|
||||
*/
|
||||
clickSelectDate(item) {
|
||||
if (this.selectDateStr != item.date) {
|
||||
this.selectDateStr = item.date;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击快捷时间选择
|
||||
*/
|
||||
clickQuickTimeItem(index) {
|
||||
let currentDate = /* @__PURE__ */ new Date();
|
||||
let currentYear = currentDate.getFullYear();
|
||||
if (index == 0) {
|
||||
let currentMonth = currentDate.getMonth() + 1;
|
||||
let currentDay = currentDate.getDate();
|
||||
this.selectMonthIndex = 20 * 12 + currentMonth - 1;
|
||||
this.selectMonth = currentYear + "年" + currentMonth + "月";
|
||||
this.selectDateStr = currentYear + "-" + (currentMonth > 9 ? currentMonth : "0" + currentMonth) + "-" + (currentDay > 9 ? currentDay : "0" + currentDay);
|
||||
} else if (index == 1) {
|
||||
let yesterday = new Date(currentDate);
|
||||
yesterday.setDate(yesterday.getDate() - 1);
|
||||
let yesterdayYear = yesterday.getFullYear();
|
||||
let yesterdayMonth = yesterday.getMonth() + 1;
|
||||
let yesterdayDay = yesterday.getDate();
|
||||
this.selectMonthIndex = (20 - (currentYear - yesterdayYear)) * 12 + yesterdayMonth - 1;
|
||||
this.selectMonth = yesterdayYear + "年" + yesterdayMonth + "月";
|
||||
this.selectDateStr = yesterdayYear + "-" + (yesterdayMonth > 9 ? yesterdayMonth : "0" + yesterdayMonth) + "-" + (yesterdayDay > 9 ? yesterdayDay : "0" + yesterdayDay);
|
||||
} else if (index == 2) {
|
||||
let weekAgo = new Date(currentDate);
|
||||
weekAgo.setDate(weekAgo.getDate() - 7);
|
||||
let weekAgoYear = weekAgo.getFullYear();
|
||||
let weekAgoMonth = weekAgo.getMonth() + 1;
|
||||
let weekAgoDay = weekAgo.getDate();
|
||||
this.selectMonthIndex = (20 - (currentYear - weekAgoYear)) * 12 + weekAgoMonth - 1;
|
||||
this.selectMonth = weekAgoYear + "年" + weekAgoMonth + "月";
|
||||
this.selectDateStr = weekAgoYear + "-" + (weekAgoMonth > 9 ? weekAgoMonth : "0" + weekAgoMonth) + "-" + (weekAgoDay > 9 ? weekAgoDay : "0" + weekAgoDay);
|
||||
} else {
|
||||
let monthAgo = new Date(currentDate);
|
||||
monthAgo.setDate(monthAgo.getDate() - 30);
|
||||
let monthAgoYear = monthAgo.getFullYear();
|
||||
let monthAgoMonth = monthAgo.getMonth() + 1;
|
||||
let monthAgoDay = monthAgo.getDate();
|
||||
this.selectMonthIndex = (20 - (currentYear - monthAgoYear)) * 12 + monthAgoMonth - 1;
|
||||
this.selectMonth = monthAgoYear + "年" + monthAgoMonth + "月";
|
||||
this.selectDateStr = monthAgoYear + "-" + (monthAgoMonth > 9 ? monthAgoMonth : "0" + monthAgoMonth) + "-" + (monthAgoDay > 9 ? monthAgoDay : "0" + monthAgoDay);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 非vip点击
|
||||
*/
|
||||
clickNotVip() {
|
||||
this.$refs["vipPopup"].open();
|
||||
},
|
||||
/**
|
||||
* 点击稍后再说
|
||||
*/
|
||||
clickLater() {
|
||||
this.$refs["vipPopup"].close();
|
||||
},
|
||||
/**
|
||||
* 点击立即升级
|
||||
*/
|
||||
clickUpgradeAtOnce() {
|
||||
this.clickLater();
|
||||
},
|
||||
/**
|
||||
* 点击查看更多个股
|
||||
*/
|
||||
clickStockMore(item) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/concept/hotStock/hotStock?id=" + item.concept_id
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 点击查看历史时间轴
|
||||
*/
|
||||
clickHistoricalTimeline(item) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/concept/historicalTimeline/historicalTimeline?id=" + item.concept_id
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取概念中心数据
|
||||
*/
|
||||
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;
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取最新价格数据
|
||||
*/
|
||||
getNewestPriceDateData() {
|
||||
request_api.newestPriceDate().then((res) => {
|
||||
this.newestPriceDate = res.latest_trade_date;
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取会员状态
|
||||
*/
|
||||
getMemberStatusData() {
|
||||
request_api.membershipStatus().then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.memberInfo = res.data;
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取排行榜数据
|
||||
*/
|
||||
getRankListData() {
|
||||
var params = {};
|
||||
if (this.selectCycleIndex == 3) {
|
||||
params.start_date = this.startDateStr;
|
||||
params.end_date = this.endDateStr;
|
||||
} else {
|
||||
params.day = 3;
|
||||
if (this.selectCycleIndex == 1) {
|
||||
params.day = 7;
|
||||
} else if (this.selectCycleIndex == 2) {
|
||||
params.day = 14;
|
||||
}
|
||||
}
|
||||
request_api.conceptRankList(params).then((res) => {
|
||||
if (this.selectTab == 0) {
|
||||
this.rankList = res.data.hot_concepts;
|
||||
} else if (this.selectTab == 1) {
|
||||
this.rankList = res.data.cold_concepts;
|
||||
} else if (this.selectTab == 2) {
|
||||
this.rankList = res.data.active_concepts;
|
||||
} else if (this.selectTab == 3) {
|
||||
this.rankList = res.data.volatile_concepts;
|
||||
} else {
|
||||
this.rankList = res.data.momentum_concepts;
|
||||
}
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_navBar2 = common_vendor.resolveComponent("navBar");
|
||||
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
|
||||
(_easycom_navBar2 + _easycom_uni_popup2)();
|
||||
}
|
||||
const _easycom_navBar = () => "../../components/navBar/navBar.js";
|
||||
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
|
||||
if (!Math) {
|
||||
(_easycom_navBar + _easycom_uni_popup)();
|
||||
}
|
||||
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: common_assets._imports_1,
|
||||
d: common_vendor.o(($event) => $options.clickSearch()),
|
||||
e: $data.keywords,
|
||||
f: common_vendor.o(($event) => $data.keywords = $event.detail.value),
|
||||
g: common_vendor.o(($event) => $options.clickRank()),
|
||||
h: common_vendor.t($data.newestPriceDate),
|
||||
i: common_assets._imports_2$3,
|
||||
j: common_assets._imports_3,
|
||||
k: common_vendor.o(($event) => $options.clickSortType()),
|
||||
l: common_assets._imports_4$3,
|
||||
m: common_assets._imports_3,
|
||||
n: common_vendor.o(($event) => $options.clickTransactionDate()),
|
||||
o: common_vendor.s("top: " + $data.navH + "px;"),
|
||||
p: common_vendor.f($data.conceptList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item.concept),
|
||||
b: item.price_info
|
||||
}, item.price_info ? {
|
||||
c: common_vendor.t($data.getChgRateStr(item.price_info.avg_change_pct)),
|
||||
d: common_vendor.n("chg " + ($data.getRateUpOrDown(item.price_info.avg_change_pct) ? "down" : "up"))
|
||||
} : {}, {
|
||||
e: item.price_info
|
||||
}, item.price_info ? {
|
||||
f: common_vendor.t(item.stock_count),
|
||||
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" ? {
|
||||
i: common_vendor.f(item.stocks.slice(0, 3), (sitem, sindex, i1) => {
|
||||
return {
|
||||
a: common_vendor.t(sitem.stock_name),
|
||||
b: sindex
|
||||
};
|
||||
}),
|
||||
j: common_vendor.t(item.stock_count - 3),
|
||||
k: common_vendor.o(($event) => $options.clickStockMore(item), index)
|
||||
} : {
|
||||
l: common_assets._imports_1$3,
|
||||
m: common_vendor.t(item.stock_count),
|
||||
n: common_vendor.o(($event) => $options.clickNotVip(), index)
|
||||
}, {
|
||||
o: common_vendor.t(item.price_info ? item.price_info.trade_date : ""),
|
||||
p: common_vendor.o(($event) => $options.clickHistoricalTimeline(item), index),
|
||||
q: index
|
||||
});
|
||||
}),
|
||||
q: $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) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: common_vendor.n("item " + ($data.selectCycleIndex == index ? "select" : "")),
|
||||
c: index,
|
||||
d: common_vendor.o(($event) => $options.clickRankCycleListItem(index), index)
|
||||
};
|
||||
}),
|
||||
A: $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())
|
||||
} : {}, {
|
||||
G: common_vendor.f($data.rankTabList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: $data.selectTab == index
|
||||
}, $data.selectTab == index ? {
|
||||
b: item.selectIcon
|
||||
} : {
|
||||
c: item.icon
|
||||
}, {
|
||||
d: common_vendor.t(item.title),
|
||||
e: common_vendor.n("item flex1 flexCenter " + ($data.selectTab == index ? "select" : "")),
|
||||
f: index,
|
||||
g: common_vendor.o(($event) => $options.clickRankTabItem(index), index)
|
||||
});
|
||||
}),
|
||||
H: common_vendor.f($data.rankList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: index == 0
|
||||
}, index == 0 ? {
|
||||
b: common_assets._imports_9$1
|
||||
} : {}, {
|
||||
c: index == 1
|
||||
}, index == 1 ? {
|
||||
d: common_assets._imports_10$2
|
||||
} : {}, {
|
||||
e: index == 2
|
||||
}, index == 2 ? {
|
||||
f: common_assets._imports_11$2
|
||||
} : {}, {
|
||||
g: index > 2
|
||||
}, index > 2 ? {
|
||||
h: common_vendor.t(index + 1)
|
||||
} : {}, {
|
||||
i: common_vendor.t(item.name)
|
||||
}, $data.selectTab == 3 || $data.selectTab == 4 ? common_vendor.e({
|
||||
j: $data.selectTab == 3
|
||||
}, $data.selectTab == 3 ? {
|
||||
k: common_vendor.t(item.avg_change)
|
||||
} : {}, {
|
||||
l: $data.selectTab == 4
|
||||
}, $data.selectTab == 4 ? {
|
||||
m: common_vendor.t(item.total_change)
|
||||
} : {}) : common_vendor.e({
|
||||
n: $data.selectTab == 0 || $data.selectTab == 1
|
||||
}, $data.selectTab == 0 || $data.selectTab == 1 ? {
|
||||
o: common_assets._imports_12$1,
|
||||
p: common_vendor.t(item.news_count)
|
||||
} : {}, {
|
||||
q: common_assets._imports_13$2,
|
||||
r: common_vendor.t(item.news_count),
|
||||
s: $data.selectTab == 2
|
||||
}, $data.selectTab == 2 ? {
|
||||
t: common_assets._imports_14$1,
|
||||
v: common_vendor.t(item.report_count)
|
||||
} : {}), $data.selectTab == 0 ? {
|
||||
w: common_vendor.t(item.change_pct)
|
||||
} : {}, $data.selectTab == 1 ? {
|
||||
x: common_vendor.t(item.change_pct)
|
||||
} : {}, $data.selectTab == 2 ? {
|
||||
y: common_vendor.t(item.total_mentions)
|
||||
} : {}, $data.selectTab == 3 ? {
|
||||
z: common_vendor.t(item.volatility)
|
||||
} : {}, $data.selectTab == 4 ? {
|
||||
A: common_vendor.t(item.consecutive_days)
|
||||
} : {}, {
|
||||
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({
|
||||
type: "bottom",
|
||||
safeArea: false
|
||||
}),
|
||||
S: common_assets._imports_13$1,
|
||||
T: common_vendor.f($data.sortTypeList, (item, index, i0) => {
|
||||
return {
|
||||
a: item.icon,
|
||||
b: common_vendor.t(item.name),
|
||||
c: index,
|
||||
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({
|
||||
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(() => {
|
||||
}),
|
||||
ad: common_assets._imports_5$1,
|
||||
ae: common_vendor.o(($event) => $options.clickNextMonth()),
|
||||
af: 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) => {
|
||||
return common_vendor.e({
|
||||
a: item.date == $data.selectDateStr
|
||||
}, item.date == $data.selectDateStr ? {
|
||||
b: common_vendor.t(item.day)
|
||||
} : common_vendor.e({
|
||||
c: !item.isCurrentMonth
|
||||
}, !item.isCurrentMonth ? {
|
||||
d: common_vendor.t(item.day)
|
||||
} : {
|
||||
e: common_vendor.t(item.day)
|
||||
}), {
|
||||
f: index,
|
||||
g: common_vendor.o(($event) => $options.clickSelectDate(item), index)
|
||||
});
|
||||
}),
|
||||
ah: 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({
|
||||
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({
|
||||
type: "center"
|
||||
})
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/concept/concept.js.map
|
||||
Reference in New Issue
Block a user