12.4 概念模块功能完善
This commit is contained in:
779
unpackage/dist/dev/mp-weixin/pages/index/conceptCenter/conceptCenter.js
vendored
Normal file
779
unpackage/dist/dev/mp-weixin/pages/index/conceptCenter/conceptCenter.js
vendored
Normal file
@@ -0,0 +1,779 @@
|
||||
"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
|
||||
};
|
||||
},
|
||||
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;
|
||||
common_vendor.index.__f__("log", "at pages/index/conceptCenter/conceptCenter.vue:511", this.selectStartMonthIndex, 333, this.selectStartDateStr);
|
||||
} else {
|
||||
this.selectDateStr = this.selectEndDateStr;
|
||||
this.selectMonth = this.selectEndMonth;
|
||||
this.selectMonthIndex = this.selectEndMonthIndex;
|
||||
common_vendor.index.__f__("log", "at pages/index/conceptCenter/conceptCenter.vue:517", this.selectEndMonthIndex, 222, this.selectEndDateStr);
|
||||
}
|
||||
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.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/index/hotStock/hotStock?id=" + item.concept_id
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 点击查看历史时间轴
|
||||
*/
|
||||
clickHistoricalTimeline(item) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/index/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$2,
|
||||
c: common_assets._imports_1$7,
|
||||
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$8,
|
||||
j: common_assets._imports_3$6,
|
||||
k: common_vendor.o(($event) => $options.clickSortType()),
|
||||
l: common_assets._imports_4$6,
|
||||
m: common_assets._imports_3$6,
|
||||
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),
|
||||
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_vendor.t(item.price_info ? item.price_info.trade_date : ""),
|
||||
m: common_vendor.o(($event) => $options.clickHistoricalTimeline(item), index),
|
||||
n: index
|
||||
});
|
||||
}),
|
||||
q: common_assets._imports_5$4,
|
||||
r: common_vendor.s("top: " + $data.listTop + "px;"),
|
||||
s: common_assets._imports_6$1,
|
||||
t: common_vendor.o(($event) => $options.clickRankClose()),
|
||||
v: common_assets._imports_7,
|
||||
w: common_vendor.t($data.startDateStr),
|
||||
x: common_vendor.t($data.endDateStr),
|
||||
y: 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)
|
||||
};
|
||||
}),
|
||||
z: $data.selectCycleIndex == 3
|
||||
}, $data.selectCycleIndex == 3 ? {
|
||||
A: common_vendor.t($data.selectStartDateStr),
|
||||
B: common_vendor.o(($event) => $options.clickCustomDateCycle(2)),
|
||||
C: common_vendor.t($data.selectEndDateStr),
|
||||
D: common_vendor.o(($event) => $options.clickCustomDateCycle(3)),
|
||||
E: common_vendor.o(($event) => $options.clickApply())
|
||||
} : {}, {
|
||||
F: 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)
|
||||
});
|
||||
}),
|
||||
G: common_vendor.f($data.rankList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: index == 0
|
||||
}, index == 0 ? {
|
||||
b: common_assets._imports_8
|
||||
} : {}, {
|
||||
c: index == 1
|
||||
}, index == 1 ? {
|
||||
d: common_assets._imports_9
|
||||
} : {}, {
|
||||
e: index == 2
|
||||
}, index == 2 ? {
|
||||
f: common_assets._imports_10$1
|
||||
} : {}, {
|
||||
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_11,
|
||||
p: common_vendor.t(item.news_count)
|
||||
} : {}, {
|
||||
q: common_assets._imports_12$1,
|
||||
r: common_vendor.t(item.news_count),
|
||||
s: $data.selectTab == 2
|
||||
}, $data.selectTab == 2 ? {
|
||||
t: common_assets._imports_13$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
|
||||
});
|
||||
}),
|
||||
H: $data.selectTab == 3 || $data.selectTab == 4,
|
||||
I: common_vendor.n("icon " + ($data.selectTab == 4 ? "continuousRise" : "")),
|
||||
J: $data.rankTabList[$data.selectTab].selectIcon,
|
||||
K: $data.selectTab == 0,
|
||||
L: $data.selectTab == 1,
|
||||
M: $data.selectTab == 2,
|
||||
N: $data.selectTab == 3,
|
||||
O: $data.selectTab == 4,
|
||||
P: common_vendor.sr("rankPopup", "260dfc26-1"),
|
||||
Q: common_vendor.p({
|
||||
type: "bottom",
|
||||
safeArea: false
|
||||
}),
|
||||
R: common_assets._imports_14,
|
||||
S: 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)
|
||||
};
|
||||
}),
|
||||
T: common_vendor.s("margin-top:" + $data.sortListTop + "px;"),
|
||||
U: common_vendor.sr("sortTypePopup", "260dfc26-2"),
|
||||
V: common_vendor.p({
|
||||
type: "top",
|
||||
["mask-background-color"]: "transparent",
|
||||
animation: false
|
||||
}),
|
||||
W: common_vendor.o(($event) => $options.clickCancel()),
|
||||
X: common_vendor.o(($event) => $options.clickConfirm()),
|
||||
Y: common_assets._imports_4$5,
|
||||
Z: common_vendor.o(($event) => $options.clickPreMonth()),
|
||||
aa: common_vendor.t($data.selectMonth),
|
||||
ab: common_vendor.o(() => {
|
||||
}),
|
||||
ac: common_assets._imports_5$3,
|
||||
ad: common_vendor.o(($event) => $options.clickNextMonth()),
|
||||
ae: common_vendor.f($data.weekList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: index
|
||||
};
|
||||
}),
|
||||
af: 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)
|
||||
});
|
||||
}),
|
||||
ag: 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)
|
||||
};
|
||||
}),
|
||||
ah: common_vendor.sr("transactionDatePopup", "260dfc26-3"),
|
||||
ai: common_vendor.p({
|
||||
type: "bottom",
|
||||
safeArea: false
|
||||
}),
|
||||
aj: common_assets._imports_17,
|
||||
ak: common_assets._imports_18,
|
||||
al: common_assets._imports_19,
|
||||
am: common_assets._imports_19,
|
||||
an: common_assets._imports_20,
|
||||
ao: common_assets._imports_20,
|
||||
ap: common_assets._imports_20,
|
||||
aq: common_vendor.o(($event) => $options.clickLater()),
|
||||
ar: common_vendor.o(($event) => $options.clickUpgradeAtOnce()),
|
||||
as: common_vendor.sr("vipPopup", "260dfc26-4"),
|
||||
at: 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/index/conceptCenter/conceptCenter.js.map
|
||||
7
unpackage/dist/dev/mp-weixin/pages/index/conceptCenter/conceptCenter.json
vendored
Normal file
7
unpackage/dist/dev/mp-weixin/pages/index/conceptCenter/conceptCenter.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"nav-bar": "../../../components/navBar/navBar",
|
||||
"uni-popup": "../../../uni_modules/uni-popup/components/uni-popup/uni-popup"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/index/conceptCenter/conceptCenter.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/index/conceptCenter/conceptCenter.wxml
vendored
Normal file
File diff suppressed because one or more lines are too long
606
unpackage/dist/dev/mp-weixin/pages/index/conceptCenter/conceptCenter.wxss
vendored
Normal file
606
unpackage/dist/dev/mp-weixin/pages/index/conceptCenter/conceptCenter.wxss
vendored
Normal file
@@ -0,0 +1,606 @@
|
||||
page {
|
||||
background-color: #070707;
|
||||
}
|
||||
.topBg {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.topC {
|
||||
margin-top: 20rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
.topC .searchRankC {
|
||||
padding: 0 25rpx;
|
||||
}
|
||||
.topC .searchRankC .searchC {
|
||||
background-color: #292929B3;
|
||||
padding: 0 25rpx;
|
||||
height: 70rpx;
|
||||
border-radius: 35rpx;
|
||||
border: solid 1rpx #363636;
|
||||
}
|
||||
.topC .searchRankC .searchC .icon {
|
||||
margin-right: 12rpx;
|
||||
width: 25rpx;
|
||||
height: auto;
|
||||
}
|
||||
.topC .searchRankC .searchC input {
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.topC .searchRankC .rank {
|
||||
padding: 0 14rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #B5B6B6;
|
||||
}
|
||||
.topC .dateScreenC {
|
||||
padding: 20rpx 0 20rpx 27rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #CCCDD1;
|
||||
}
|
||||
.topC .dateScreenC .sortTypeC {
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
.topC .dateScreenC .sortTypeC .icon {
|
||||
margin-right: 14rpx;
|
||||
width: 30rpx;
|
||||
height: auto;
|
||||
}
|
||||
.topC .dateScreenC .line {
|
||||
background-color: #CCCDD1;
|
||||
width: 1rpx;
|
||||
height: 25rpx;
|
||||
}
|
||||
.topC .dateScreenC .transactionDateC {
|
||||
padding: 0 17rpx;
|
||||
}
|
||||
.topC .dateScreenC .transactionDateC .icon {
|
||||
margin-right: 10rpx;
|
||||
width: 23rpx;
|
||||
height: auto;
|
||||
}
|
||||
.topC .dateScreenC .arrow {
|
||||
margin-left: 7rpx;
|
||||
width: 11rpx;
|
||||
height: auto;
|
||||
}
|
||||
.conceptList {
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.conceptList .list {
|
||||
padding: 0 25rpx;
|
||||
}
|
||||
.conceptList .list .item {
|
||||
background: linear-gradient(-30deg, #FFF6F0 0%, #FEFEFE 100%);
|
||||
margin-bottom: 24rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.conceptList .list .item .titleChgStockNumC {
|
||||
padding: 24rpx 18rpx 0;
|
||||
}
|
||||
.conceptList .list .item .titleChgStockNumC .title {
|
||||
margin-right: 20rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.conceptList .list .item .titleChgStockNumC .chg {
|
||||
margin-right: 20rpx;
|
||||
padding: 0 13rpx;
|
||||
line-height: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
}
|
||||
.conceptList .list .item .titleChgStockNumC .chg.up {
|
||||
background-color: #EC3440;
|
||||
}
|
||||
.conceptList .list .item .titleChgStockNumC .chg.down {
|
||||
background-color: #355422;
|
||||
}
|
||||
.conceptList .list .item .titleChgStockNumC .stockNum {
|
||||
padding: 0 16rpx;
|
||||
line-height: 36rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.conceptList .list .item .titleChgStockNumC .stockNum.up {
|
||||
color: #EC3440;
|
||||
border: solid 2rpx #EC3440;
|
||||
}
|
||||
.conceptList .list .item .titleChgStockNumC .stockNum.down {
|
||||
color: #355422;
|
||||
border: solid 2rpx #355422;
|
||||
}
|
||||
.conceptList .list .item .content {
|
||||
margin-top: 26rpx;
|
||||
padding: 0 22rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #71675D;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.conceptList .list .item .hotStockC {
|
||||
margin-top: 30rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.conceptList .list .item .hotStockC .title {
|
||||
margin-right: 10rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #936E5C;
|
||||
}
|
||||
.conceptList .list .item .hotStockC .stockList {
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.conceptList .list .item .hotStockC .stockList .stockItem {
|
||||
background-color: #3D3D3D;
|
||||
margin-right: 10rpx;
|
||||
padding: 0 8rpx;
|
||||
line-height: 36rpx;
|
||||
border-radius: 5rpx 20rpx 5rpx 20rpx;
|
||||
color: #EFDDD1;
|
||||
}
|
||||
.conceptList .list .item .hotStockC .stockList .more {
|
||||
color: #936E5C;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
.conceptList .list .item .hotStockC .notVipC {
|
||||
background-color: #3D3D3D;
|
||||
padding: 0 21rpx 0 16rpx;
|
||||
line-height: 36rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 22rpx;
|
||||
color: #F3C368;
|
||||
}
|
||||
.conceptList .list .item .hotStockC .notVipC .icon {
|
||||
margin-right: 9rpx;
|
||||
width: 15rpx;
|
||||
height: auto;
|
||||
}
|
||||
.conceptList .list .item .transactionDateHistoryTimeC {
|
||||
padding: 20rpx 22rpx 30rpx;
|
||||
}
|
||||
.conceptList .list .item .transactionDateHistoryTimeC .transactionDate {
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
.conceptList .list .item .transactionDateHistoryTimeC .historyTimeC {
|
||||
background-color: #F3C368;
|
||||
padding: 0 10rpx 0 15rpx;
|
||||
line-height: 36rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #101213;
|
||||
}
|
||||
.conceptList .list .item .transactionDateHistoryTimeC .historyTimeC .icon {
|
||||
margin-right: 7rpx;
|
||||
width: 20rpx;
|
||||
height: auto;
|
||||
}
|
||||
.rankPopup {
|
||||
background-color: white;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
.rankPopup .popTitle {
|
||||
padding-top: 30rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
}
|
||||
.rankPopup .closeC {
|
||||
padding: 26rpx;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
.rankPopup .closeC .icon {
|
||||
width: 20rpx;
|
||||
height: auto;
|
||||
}
|
||||
.rankPopup .statisticsC {
|
||||
background: linear-gradient(-30deg, #F3C368 0%, #FAD590 100%);
|
||||
margin: 20rpx 25rpx 0;
|
||||
padding: 24rpx 30rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.rankPopup .statisticsC .titleRangeC .icon {
|
||||
margin-right: 21rpx;
|
||||
width: 80rpx;
|
||||
height: auto;
|
||||
}
|
||||
.rankPopup .statisticsC .titleRangeC .title {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.rankPopup .statisticsC .titleRangeC .range {
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #232323;
|
||||
}
|
||||
.rankPopup .statisticsC .cycleC {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.rankPopup .statisticsC .cycleC .title {
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.rankPopup .statisticsC .cycleC .list .item {
|
||||
background-color: #ffffff4D;
|
||||
margin-right: 15rpx;
|
||||
padding: 0 15rpx;
|
||||
line-height: 50rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.rankPopup .statisticsC .cycleC .list .item.select {
|
||||
background-color: #ffffff99;
|
||||
}
|
||||
.rankPopup .statisticsC .rangeC {
|
||||
margin-top: 10rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.rankPopup .statisticsC .rangeC .startDateC {
|
||||
padding: 0 10rpx;
|
||||
border: solid 2rpx white;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.rankPopup .statisticsC .rangeC .and {
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
.rankPopup .statisticsC .rangeC .endDateC {
|
||||
padding: 0 10rpx;
|
||||
border: solid 2rpx white;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.rankPopup .statisticsC .rangeC .apply {
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
.rankPopup .tabC {
|
||||
background-color: #FFF3DD;
|
||||
margin: 20rpx 25rpx 0;
|
||||
border-radius: 10rpx 10rpx 0 0;
|
||||
}
|
||||
.rankPopup .tabC .item {
|
||||
height: 60rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #070707;
|
||||
}
|
||||
.rankPopup .tabC .item .icon {
|
||||
margin-right: 7rpx;
|
||||
width: 11rpx;
|
||||
height: auto;
|
||||
}
|
||||
.rankPopup .tabC .item.select {
|
||||
background-color: #FF7722;
|
||||
color: white;
|
||||
}
|
||||
.rankPopup .tabC .item:last-child .icon {
|
||||
width: 15rpx;
|
||||
height: auto;
|
||||
}
|
||||
.rankPopup .rankList {
|
||||
margin-top: 22rpx;
|
||||
padding: 0 25rpx;
|
||||
}
|
||||
.rankPopup .rankList .item {
|
||||
margin-bottom: 20rpx;
|
||||
padding: 20rpx 22rpx;
|
||||
border-radius: 10rpx;
|
||||
border: solid 1rpx #FCE2B2;
|
||||
}
|
||||
.rankPopup .rankList .item .rankIcon {
|
||||
margin-right: 34rpx;
|
||||
width: 35rpx;
|
||||
height: auto;
|
||||
}
|
||||
.rankPopup .rankList .item .rankIndex {
|
||||
background-color: #898989;
|
||||
margin-right: 34rpx;
|
||||
width: 36rpx;
|
||||
line-height: 41rpx;
|
||||
-webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
|
||||
clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
|
||||
font-size: 24rpx;
|
||||
color: #F7FAFC;
|
||||
text-align: center;
|
||||
}
|
||||
.rankPopup .rankList .item .title {
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.rankPopup .rankList .item .calendarBrowseC {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #936E5C;
|
||||
}
|
||||
.rankPopup .rankList .item .calendarBrowseC .chgC {
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.rankPopup .rankList .item .calendarBrowseC .chgC .icon {
|
||||
margin-right: 6rpx;
|
||||
width: 15rpx;
|
||||
height: auto;
|
||||
}
|
||||
.rankPopup .rankList .item .calendarBrowseC .calendarC {
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.rankPopup .rankList .item .calendarBrowseC .calendarC .icon {
|
||||
margin-right: 6rpx;
|
||||
width: 16rpx;
|
||||
height: auto;
|
||||
}
|
||||
.rankPopup .rankList .item .calendarBrowseC .browseC .icon {
|
||||
margin-right: 6rpx;
|
||||
width: 17rpx;
|
||||
height: auto;
|
||||
}
|
||||
.rankPopup .rankList .item .valueC {
|
||||
background-color: #FF7722;
|
||||
padding: 0 24rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: white;
|
||||
}
|
||||
.rankPopup .rankList .item .valueC .icon {
|
||||
margin-right: 6rpx;
|
||||
width: 11rpx;
|
||||
height: auto;
|
||||
}
|
||||
.rankPopup .rankList .item .valueC .icon.continuousRise {
|
||||
width: 15rpx;
|
||||
height: auto;
|
||||
}
|
||||
.sortTypePopup {
|
||||
background-color: white;
|
||||
margin-left: calc(100% - (170rpx + 120rpx));
|
||||
width: 170rpx;
|
||||
box-shadow: 0 5rpx 10px 0 rgba(7, 7, 7, 0.15);
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.sortTypePopup .arrow {
|
||||
top: -13rpx;
|
||||
left: 38rpx;
|
||||
width: 26rpx;
|
||||
height: auto;
|
||||
}
|
||||
.sortTypePopup .list .item {
|
||||
padding: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #444;
|
||||
}
|
||||
.sortTypePopup .list .item .icon {
|
||||
margin-right: 11rpx;
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
.transactionDatePopup {
|
||||
background-color: white;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
.transactionDatePopup .btnTitleC .btn {
|
||||
padding: 20rpx 26rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.transactionDatePopup .btnTitleC .btn.cancel {
|
||||
color: #727A8E;
|
||||
}
|
||||
.transactionDatePopup .btnTitleC .btn.confirm {
|
||||
color: #D79412;
|
||||
}
|
||||
.transactionDatePopup .btnTitleC .title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.transactionDatePopup .yearMonthC {
|
||||
background-color: #F7F7F7;
|
||||
margin: 0 25rpx;
|
||||
height: 70rpx;
|
||||
border-radius: 35rpx;
|
||||
}
|
||||
.transactionDatePopup .yearMonthC .btn {
|
||||
padding: 0 52rpx;
|
||||
}
|
||||
.transactionDatePopup .yearMonthC .btn .icon {
|
||||
width: 13rpx;
|
||||
height: auto;
|
||||
}
|
||||
.transactionDatePopup .yearMonthC .yearMonth {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #070707;
|
||||
text-align: center;
|
||||
}
|
||||
.transactionDatePopup .weekList {
|
||||
padding: 0 38rpx;
|
||||
}
|
||||
.transactionDatePopup .weekList .item {
|
||||
margin-right: 13rpx;
|
||||
line-height: 72rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #A7A7A7;
|
||||
text-align: center;
|
||||
}
|
||||
.transactionDatePopup .monthDateList {
|
||||
padding: 0 38rpx;
|
||||
}
|
||||
.transactionDatePopup .monthDateList .item {
|
||||
margin-bottom: 12rpx;
|
||||
width: calc(100%/7);
|
||||
}
|
||||
.transactionDatePopup .monthDateList .item .date {
|
||||
background-color: #f8f8f8;
|
||||
width: calc(100% - 10rpx);
|
||||
line-height: 64rpx;
|
||||
border-radius: 15rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #2A2A2A;
|
||||
text-align: center;
|
||||
}
|
||||
.transactionDatePopup .monthDateList .item .date.select {
|
||||
background-color: #F2C367;
|
||||
color: white;
|
||||
}
|
||||
.transactionDatePopup .monthDateList .item .date.notCurrentMonth {
|
||||
background-color: #FCFCFC;
|
||||
color: #999;
|
||||
}
|
||||
.transactionDatePopup .quickTimeC {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
.transactionDatePopup .quickTimeC .item {
|
||||
margin-right: 25rpx;
|
||||
width: 120rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 30rpx;
|
||||
border: solid 2rpx #4E4E4E;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #4E4E4E;
|
||||
text-align: center;
|
||||
}
|
||||
.transactionDatePopup .quickTimeC .item:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
.vipPopup {
|
||||
background: linear-gradient(-30deg, #FFF6F0 0%, #FEFEFE 100%);
|
||||
margin: 0 95rpx;
|
||||
padding-bottom: 34rpx;
|
||||
width: 560rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.vipPopup .topIcon {
|
||||
margin: -60rpx 0 0 calc((100% - 143rpx)/2);
|
||||
width: 143rpx;
|
||||
height: auto;
|
||||
}
|
||||
.vipPopup .popTitle {
|
||||
margin-top: 28rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
color: #101213;
|
||||
text-align: center;
|
||||
}
|
||||
.vipPopup .popSubtitle {
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #493F2B;
|
||||
text-align: center;
|
||||
}
|
||||
.vipPopup .moduleC {
|
||||
background-color: white;
|
||||
margin: 0 30rpx 20rpx;
|
||||
padding-top: 25rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.vipPopup .moduleC .section {
|
||||
padding: 0 25rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
.vipPopup .moduleC .section .version {
|
||||
margin-left: 18rpx;
|
||||
padding: 0 15rpx;
|
||||
line-height: 32rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.vipPopup .moduleC .section .version.free {
|
||||
background-color: #3D3D3D;
|
||||
color: #FEFCFB;
|
||||
}
|
||||
.vipPopup .moduleC .section .version.pro {
|
||||
background-color: #F2C367;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.vipPopup .moduleC .visitC {
|
||||
margin: 18rpx 24rpx 0;
|
||||
height: 60rpx;
|
||||
}
|
||||
.vipPopup .moduleC .visitC .line {
|
||||
background-color: #F2C367;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 44rpx;
|
||||
height: 100%;
|
||||
border-radius: 7rpx 0 0 7rpx;
|
||||
}
|
||||
.vipPopup .moduleC .visitC .contentC {
|
||||
background-color: #F7F7F7;
|
||||
margin-left: 6rpx;
|
||||
padding: 0 15rpx;
|
||||
height: 100%;
|
||||
border-radius: 10rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.vipPopup .moduleC .visitC .contentC .icon {
|
||||
margin-right: 14rpx;
|
||||
width: 25rpx;
|
||||
height: auto;
|
||||
}
|
||||
.vipPopup .moduleC .list {
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
.vipPopup .moduleC .list .item {
|
||||
padding: 10rpx 25rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
.vipPopup .moduleC .list .item .icon {
|
||||
margin-right: 13rpx;
|
||||
width: 27rpx;
|
||||
height: auto;
|
||||
}
|
||||
.vipPopup .moduleC.visit {
|
||||
margin-top: 20rpx;
|
||||
padding-bottom: 25rpx;
|
||||
}
|
||||
.vipPopup .btnC {
|
||||
margin: 28rpx 92rpx 0;
|
||||
}
|
||||
.vipPopup .btnC .btn {
|
||||
line-height: 60rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.vipPopup .btnC .btn.later {
|
||||
background-color: #EDEDED;
|
||||
margin-right: 56rpx;
|
||||
}
|
||||
.vipPopup .btnC .btn.upgrade {
|
||||
background-color: #F2C367;
|
||||
}
|
||||
24
unpackage/dist/dev/mp-weixin/pages/index/conceptNewsDetails/conceptNewsDetails.js
vendored
Normal file
24
unpackage/dist/dev/mp-weixin/pages/index/conceptNewsDetails/conceptNewsDetails.js
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {};
|
||||
if (!Array) {
|
||||
const _easycom_navBar2 = common_vendor.resolveComponent("navBar");
|
||||
_easycom_navBar2();
|
||||
}
|
||||
const _easycom_navBar = () => "../../../components/navBar/navBar.js";
|
||||
if (!Math) {
|
||||
_easycom_navBar();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache) {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
leftText: "历史时间轴",
|
||||
hideNavBg: true
|
||||
}),
|
||||
b: common_assets._imports_0$2
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/index/conceptNewsDetails/conceptNewsDetails.js.map
|
||||
6
unpackage/dist/dev/mp-weixin/pages/index/conceptNewsDetails/conceptNewsDetails.json
vendored
Normal file
6
unpackage/dist/dev/mp-weixin/pages/index/conceptNewsDetails/conceptNewsDetails.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"nav-bar": "../../../components/navBar/navBar"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/index/conceptNewsDetails/conceptNewsDetails.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/index/conceptNewsDetails/conceptNewsDetails.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="5b93cf51-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image></view>
|
||||
9
unpackage/dist/dev/mp-weixin/pages/index/conceptNewsDetails/conceptNewsDetails.wxss
vendored
Normal file
9
unpackage/dist/dev/mp-weixin/pages/index/conceptNewsDetails/conceptNewsDetails.wxss
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
page {
|
||||
background-color: #070707;
|
||||
}
|
||||
.topBg {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
@@ -401,11 +401,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.t(item.stock_name),
|
||||
b: common_vendor.t(item.stock_code),
|
||||
c: common_vendor.sr("chartRef" + index, "52d9c4e6-1-" + i0, {
|
||||
c: common_vendor.sr("chartRef" + index, "6e1a61f1-1-" + i0, {
|
||||
"f": 1
|
||||
}),
|
||||
d: "chartRef" + index,
|
||||
e: "52d9c4e6-1-" + i0,
|
||||
e: "6e1a61f1-1-" + i0,
|
||||
f: common_vendor.t(item.trade_data ? item.trade_data.open_price : ""),
|
||||
g: common_vendor.t(item.trade_data ? item.trade_data.latest_price : ""),
|
||||
h: common_vendor.t(item.trade_data ? item.trade_data.change_pct : ""),
|
||||
@@ -447,7 +447,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
} : {}, {
|
||||
p: $data.selectCategory == 2
|
||||
}, $data.selectCategory == 2 ? {
|
||||
q: common_assets._imports_4$2,
|
||||
q: common_assets._imports_4$3,
|
||||
r: common_vendor.t($data.expectScore),
|
||||
s: common_assets._imports_5$1,
|
||||
t: common_vendor.o(($event) => $options.clickExpectScore($event)),
|
||||
@@ -477,7 +477,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
p: index
|
||||
});
|
||||
}),
|
||||
w: common_assets._imports_4$2
|
||||
w: common_assets._imports_4$3
|
||||
} : {}, {
|
||||
x: common_vendor.s("top:" + $data.navH + "px;")
|
||||
}) : {}, {
|
||||
@@ -495,7 +495,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
I: common_vendor.t($data.eventDetails.follower_count),
|
||||
J: common_vendor.o(($event) => $options.clickFollow())
|
||||
} : {}, {
|
||||
K: common_assets._imports_11,
|
||||
K: common_assets._imports_6$1,
|
||||
L: common_vendor.o(($event) => $options.closeCommentPopup()),
|
||||
M: common_vendor.f($data.commentList, (item, index, i0) => {
|
||||
return {
|
||||
@@ -514,18 +514,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
P: common_vendor.o(($event) => $options.sendReplyComment()),
|
||||
Q: $data.replyComment,
|
||||
R: common_vendor.o(($event) => $data.replyComment = $event.detail.value),
|
||||
S: common_vendor.sr("popup", "52d9c4e6-2"),
|
||||
S: common_vendor.sr("popup", "6e1a61f1-2"),
|
||||
T: common_vendor.p({
|
||||
type: "bottom"
|
||||
}),
|
||||
U: common_assets._imports_13$1,
|
||||
U: common_assets._imports_14,
|
||||
V: common_vendor.s("margin-top:" + $data.scoreTop + "px;"),
|
||||
W: common_vendor.sr("expectScorePopup", "52d9c4e6-3"),
|
||||
W: common_vendor.sr("expectScorePopup", "6e1a61f1-3"),
|
||||
X: common_vendor.p({
|
||||
type: "top",
|
||||
["mask-background-color"]: "transparent"
|
||||
}),
|
||||
Y: common_assets._imports_11,
|
||||
Y: common_assets._imports_6$1,
|
||||
Z: common_vendor.o(($event) => $options.closeRelatedStockPopup()),
|
||||
aa: common_vendor.f($data.historyEventRelatedStockList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
@@ -545,7 +545,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
k: common_vendor.o(($event) => $options.clickStockItem(item.stock_code), index)
|
||||
});
|
||||
}),
|
||||
ab: common_vendor.sr("stockPopup", "52d9c4e6-4"),
|
||||
ab: common_vendor.sr("stockPopup", "6e1a61f1-4"),
|
||||
ac: common_vendor.p({
|
||||
type: "bottom"
|
||||
})
|
||||
|
||||
File diff suppressed because one or more lines are too long
350
unpackage/dist/dev/mp-weixin/pages/index/historicalTimeline/historicalTimeline.js
vendored
Normal file
350
unpackage/dist/dev/mp-weixin/pages/index/historicalTimeline/historicalTimeline.js
vendored
Normal file
@@ -0,0 +1,350 @@
|
||||
"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"),
|
||||
contentTop: "",
|
||||
conceptId: "",
|
||||
//概念id
|
||||
conceptName: "",
|
||||
weekList: ["一", "二", "三", "四", "五", "六", "日"],
|
||||
monthDateList: [],
|
||||
selectMonthIndex: 0,
|
||||
//选中月份下标
|
||||
selectMonth: "",
|
||||
//选中年月
|
||||
selectDateStr: "",
|
||||
//选中日期
|
||||
startDateStr: "",
|
||||
//开始日期
|
||||
endDateStr: "",
|
||||
//结束日期
|
||||
chgStockData: null,
|
||||
//涨跌幅和股票数据
|
||||
newsList: [],
|
||||
//新闻数据
|
||||
reportList: [],
|
||||
//研报数据
|
||||
getRateUpOrDown: utils_util.getRateUpOrDown,
|
||||
getChgRateStr: utils_util.getChgRateStr
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.contentTop = this.navH + 70 / 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 = 20 * 12 + currentMonth - 1;
|
||||
this.selectMonth = currentYear + "年" + currentMonth + "月";
|
||||
this.startDateStr = currentYear + "-" + currentMonth + "-01";
|
||||
this.endDateStr = this.selectDateStr = currentYear + "-" + currentMonth + "-" + (currentDay > 9 ? currentDay : "0" + currentDay);
|
||||
this.generateMonthDateListData();
|
||||
if (e.id) {
|
||||
this.conceptId = e.id;
|
||||
this.getTimelineData();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取当前时间前一天的数据
|
||||
*/
|
||||
getYesterdayDateData() {
|
||||
let currentDate = /* @__PURE__ */ new Date();
|
||||
let selectDate = new Date(currentDate);
|
||||
selectDate.setDate(selectDate.getDate() - 1);
|
||||
let selectYear = selectDate.getFullYear();
|
||||
let selectMonth = selectDate.getMonth() + 1;
|
||||
let selectDay = selectDate.getDate();
|
||||
this.selectDateStr = selectYear + "-" + (selectMonth > 9 ? selectMonth : "0" + selectMonth) + "-" + (selectDay > 9 ? selectDay : "0" + selectDay);
|
||||
},
|
||||
/**
|
||||
* 生成日期数组
|
||||
*/
|
||||
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, isLastDay: newDay == currentMonthDay ? true : false, 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, isLastDay: 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, isLastDay: false, timestamp: time });
|
||||
}
|
||||
monthDateList.push(daysOfMonth);
|
||||
}
|
||||
}
|
||||
this.monthDateList = monthDateList;
|
||||
},
|
||||
/**
|
||||
* 点击上个月
|
||||
*/
|
||||
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;
|
||||
}
|
||||
}
|
||||
let lastDay = "";
|
||||
for (let item of monthList) {
|
||||
if (item.isLastDay) {
|
||||
lastDay = item.day;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.selectMonth = year + "年" + month + "月";
|
||||
this.startDateStr = year + "-" + (month > 9 ? month : "0" + month) + "-01";
|
||||
this.endDateStr = year + "-" + (month > 9 ? month : "0" + month) + "-" + lastDay;
|
||||
this.getTimelineData();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击下个月
|
||||
*/
|
||||
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;
|
||||
}
|
||||
}
|
||||
let lastDay = "";
|
||||
for (let item of monthList) {
|
||||
if (item.isLastDay) {
|
||||
lastDay = item.day;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.selectMonth = year + "年" + month + "月";
|
||||
this.startDateStr = year + "-" + (month > 9 ? month : "0" + month) + "-01";
|
||||
this.endDateStr = year + "-" + (month > 9 ? month : "0" + month) + "-" + lastDay;
|
||||
this.getTimelineData();
|
||||
}
|
||||
},
|
||||
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 + "月";
|
||||
this.startDateStr = selectYear + "-" + (selectMonth > 9 ? selectMonth : "0" + selectMonth) + "-01";
|
||||
let lastDayOfMonth = new Date(selectYear, selectMonth, 0);
|
||||
this.endDateStr = selectYear + "-" + (selectMonth > 9 ? selectMonth : "0" + selectMonth) + "-" + lastDayOfMonth.getDate();
|
||||
this.getTimelineData();
|
||||
},
|
||||
/**
|
||||
* 点击选择开始日期和结束日期
|
||||
* @param {Object} item
|
||||
*/
|
||||
clickSelectDate(item) {
|
||||
if (this.selectDateStr != item.date) {
|
||||
this.selectDateStr = item.date;
|
||||
this.chgStockData = item;
|
||||
this.getNewsData();
|
||||
this.getReportData();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取时间序列数据
|
||||
*/
|
||||
getTimelineData() {
|
||||
let param = { start_date: this.startDateStr, end_date: this.endDateStr };
|
||||
request_api.priceTimeline(this.conceptId, param).then((res) => {
|
||||
if (res.timeseries) {
|
||||
this.conceptName = res.concept_name;
|
||||
let timeseries = res.timeseries;
|
||||
let monthList = this.monthDateList[this.selectMonthIndex];
|
||||
for (let item of monthList) {
|
||||
for (let item1 of timeseries) {
|
||||
if (item.date == item1.trade_date) {
|
||||
item.avg_change_pct = item1.avg_change_pct;
|
||||
item.stock_count = item1.stock_count;
|
||||
if (item.date == this.selectDateStr) {
|
||||
this.chgStockData = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.getNewsData();
|
||||
this.getReportData();
|
||||
}
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取新闻数据
|
||||
*/
|
||||
getNewsData() {
|
||||
let param = { query: this.conceptName, end_date: this.selectDateStr, exact_match: 1, top_k: 100 };
|
||||
request_api.conceptNews(param).then((res) => {
|
||||
this.newsList = res;
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取时间序列数据
|
||||
*/
|
||||
getReportData() {
|
||||
let param = { query: this.conceptName, start_date: this.selectDateStr, mode: "text", exact_match: 1 };
|
||||
request_api.conceptReport(param).then((res) => {
|
||||
this.reportList = res.data.results;
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_navBar2 = common_vendor.resolveComponent("navBar");
|
||||
_easycom_navBar2();
|
||||
}
|
||||
const _easycom_navBar = () => "../../../components/navBar/navBar.js";
|
||||
if (!Math) {
|
||||
_easycom_navBar();
|
||||
}
|
||||
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$2,
|
||||
c: common_vendor.t($data.conceptName),
|
||||
d: common_vendor.s("top: " + $data.navH + "px;"),
|
||||
e: common_assets._imports_4$5,
|
||||
f: common_vendor.o(($event) => $options.clickPreMonth()),
|
||||
g: common_vendor.t($data.selectMonth),
|
||||
h: common_vendor.o((...args) => $options.monthChange && $options.monthChange(...args)),
|
||||
i: common_assets._imports_5$3,
|
||||
j: common_vendor.o(($event) => $options.clickNextMonth()),
|
||||
k: common_vendor.f($data.weekList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: index
|
||||
};
|
||||
}),
|
||||
l: common_vendor.f($data.monthDateList[$data.selectMonthIndex], (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: item.date == $data.selectDateStr
|
||||
}, item.date == $data.selectDateStr ? common_vendor.e({
|
||||
b: common_vendor.t(item.day),
|
||||
c: item.avg_change_pct
|
||||
}, item.avg_change_pct ? {
|
||||
d: common_vendor.t($data.getChgRateStr(item.avg_change_pct))
|
||||
} : {}, {
|
||||
e: common_vendor.n("date select " + (item.avg_change_pct ? $data.getRateUpOrDown(item.avg_change_pct) ? "down" : "up" : ""))
|
||||
}) : common_vendor.e({
|
||||
f: !item.isCurrentMonth
|
||||
}, !item.isCurrentMonth ? {
|
||||
g: common_vendor.t(item.day)
|
||||
} : common_vendor.e({
|
||||
h: common_vendor.t(item.day),
|
||||
i: item.avg_change_pct
|
||||
}, item.avg_change_pct ? {
|
||||
j: common_vendor.t($data.getChgRateStr(item.avg_change_pct)),
|
||||
k: common_vendor.n("chg " + ($data.getRateUpOrDown(item.avg_change_pct) ? "down" : "up"))
|
||||
} : {}, {
|
||||
l: common_vendor.n("date " + (item.avg_change_pct ? $data.getRateUpOrDown(item.avg_change_pct) ? "down" : "up" : ""))
|
||||
})), {
|
||||
m: index,
|
||||
n: common_vendor.o(($event) => $options.clickSelectDate(item), index)
|
||||
});
|
||||
}),
|
||||
m: common_vendor.t($data.selectDateStr),
|
||||
n: $data.chgStockData && $data.chgStockData.avg_change_pct
|
||||
}, $data.chgStockData && $data.chgStockData.avg_change_pct ? common_vendor.e({
|
||||
o: $data.getRateUpOrDown($data.chgStockData.avg_change_pct)
|
||||
}, $data.getRateUpOrDown($data.chgStockData.avg_change_pct) ? {
|
||||
p: common_assets._imports_3$7
|
||||
} : {
|
||||
q: common_assets._imports_4$7
|
||||
}, {
|
||||
r: common_vendor.t($data.getChgRateStr($data.chgStockData.avg_change_pct)),
|
||||
s: common_vendor.n("chg " + ($data.getRateUpOrDown($data.chgStockData.avg_change_pct) ? "down" : "up")),
|
||||
t: common_vendor.t($data.chgStockData.stock_count)
|
||||
}) : {}, {
|
||||
v: common_assets._imports_5$5,
|
||||
w: common_vendor.t($data.newsList.length),
|
||||
x: common_vendor.t($data.reportList.length),
|
||||
y: common_vendor.f($data.newsList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.title),
|
||||
b: common_vendor.t(item.detail),
|
||||
c: index
|
||||
};
|
||||
}),
|
||||
z: common_vendor.f($data.reportList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.report_title),
|
||||
b: index
|
||||
};
|
||||
}),
|
||||
A: common_vendor.s("top: " + $data.contentTop + "px;")
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/index/historicalTimeline/historicalTimeline.js.map
|
||||
6
unpackage/dist/dev/mp-weixin/pages/index/historicalTimeline/historicalTimeline.json
vendored
Normal file
6
unpackage/dist/dev/mp-weixin/pages/index/historicalTimeline/historicalTimeline.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"nav-bar": "../../../components/navBar/navBar"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/index/historicalTimeline/historicalTimeline.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/index/historicalTimeline/historicalTimeline.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="1881f0d1-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>
|
||||
202
unpackage/dist/dev/mp-weixin/pages/index/historicalTimeline/historicalTimeline.wxss
vendored
Normal file
202
unpackage/dist/dev/mp-weixin/pages/index/historicalTimeline/historicalTimeline.wxss
vendored
Normal file
@@ -0,0 +1,202 @@
|
||||
page {
|
||||
background-color: #070707;
|
||||
}
|
||||
.topBg {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.timelineTitle {
|
||||
background-color: #FFF9F5;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: 0 25rpx;
|
||||
padding: 30rpx 27rpx 0;
|
||||
border-radius: 10rpx 10rpx 0 0;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #2B2B2B;
|
||||
}
|
||||
.dateStatisticsC {
|
||||
background-color: #FFF9F5;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 86rpx;
|
||||
margin: 0 25rpx;
|
||||
padding: 24rpx 25rpx 0;
|
||||
border-radius: 0 0 10rpx 10rpx;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.dateStatisticsC .dateC {
|
||||
background-color: white;
|
||||
box-shadow: 0 5rpx 10rpx 0 rgba(127, 127, 127, 0.1);
|
||||
border-radius: 10rpx;
|
||||
padding: 30rpx 25rpx 0;
|
||||
}
|
||||
.dateStatisticsC .dateC .yearMonthC {
|
||||
background-color: #F7F7F7;
|
||||
height: 70rpx;
|
||||
border-radius: 35rpx;
|
||||
}
|
||||
.dateStatisticsC .dateC .yearMonthC .btn {
|
||||
padding: 0 52rpx;
|
||||
}
|
||||
.dateStatisticsC .dateC .yearMonthC .btn .icon {
|
||||
width: 13rpx;
|
||||
height: auto;
|
||||
}
|
||||
.dateStatisticsC .dateC .yearMonthC .yearMonth {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #070707;
|
||||
text-align: center;
|
||||
}
|
||||
.dateStatisticsC .dateC .weekList .item {
|
||||
margin-right: 13rpx;
|
||||
line-height: 72rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #A7A7A7;
|
||||
text-align: center;
|
||||
}
|
||||
.dateStatisticsC .dateC .monthDateList .item {
|
||||
margin-bottom: 12rpx;
|
||||
width: calc(100%/7);
|
||||
}
|
||||
.dateStatisticsC .dateC .monthDateList .item .date {
|
||||
background-color: #f8f8f8;
|
||||
padding: 4rpx 0;
|
||||
width: calc(100% - 10rpx);
|
||||
height: 72rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #2A2A2A;
|
||||
text-align: center;
|
||||
}
|
||||
.dateStatisticsC .dateC .monthDateList .item .date .chg {
|
||||
font-size: 18rpx;
|
||||
}
|
||||
.dateStatisticsC .dateC .monthDateList .item .date .chg.up {
|
||||
color: #EC3440;
|
||||
}
|
||||
.dateStatisticsC .dateC .monthDateList .item .date .chg.down {
|
||||
color: #38A169;
|
||||
}
|
||||
.dateStatisticsC .dateC .monthDateList .item .date.up {
|
||||
background-color: #FFD6D9;
|
||||
}
|
||||
.dateStatisticsC .dateC .monthDateList .item .date.down {
|
||||
background-color: #CEF1DE;
|
||||
}
|
||||
.dateStatisticsC .dateC .monthDateList .item .date.select.up {
|
||||
background-color: #EC3440;
|
||||
color: white;
|
||||
}
|
||||
.dateStatisticsC .dateC .monthDateList .item .date.select.up .chg {
|
||||
color: white;
|
||||
}
|
||||
.dateStatisticsC .dateC .monthDateList .item .date.select.down {
|
||||
background-color: #38A169;
|
||||
color: white;
|
||||
}
|
||||
.dateStatisticsC .dateC .monthDateList .item .date.select.down .chg {
|
||||
color: white;
|
||||
}
|
||||
.dateStatisticsC .dateC .monthDateList .item .date.notCurrentMonth {
|
||||
background-color: #FCFCFC;
|
||||
color: #999;
|
||||
}
|
||||
.dateStatisticsC .statisticsC {
|
||||
background-color: white;
|
||||
margin-top: 20rpx;
|
||||
padding: 28rpx 20rpx 0;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .date {
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .chgStockNumC {
|
||||
margin-top: 36rpx;
|
||||
padding: 0 13rpx 28rpx;
|
||||
border-bottom: solid 1rpx #EDEDED;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .chgStockNumC .title {
|
||||
margin-right: 18rpx;
|
||||
font-weight: 500;
|
||||
color: #94979C;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .chgStockNumC .chgC .icon {
|
||||
margin-right: 9rpx;
|
||||
width: 17rpx;
|
||||
height: auto;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .chgStockNumC .chgC .chg {
|
||||
font-weight: bold;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .chgStockNumC .chgC .chg.up {
|
||||
color: #EC3440;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .chgStockNumC .chgC .chg.down {
|
||||
color: #38A169;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .chgStockNumC .stockNum {
|
||||
font-weight: bold;
|
||||
color: #070707;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .newsReportC {
|
||||
padding-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .newsReportC .icon {
|
||||
margin-right: 20rpx;
|
||||
width: 24rpx;
|
||||
height: auto;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .newsReportC .news {
|
||||
color: #FF7723;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .newsReportC .report {
|
||||
color: #333;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .list .item {
|
||||
padding: 30rpx 0;
|
||||
border-bottom: solid 1rpx #EDEDED;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .list .item .type {
|
||||
margin-right: 18rpx;
|
||||
padding: 0 9rpx;
|
||||
line-height: 40rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .list .item .type.news {
|
||||
background-color: #F2C367;
|
||||
color: #070707;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .list .item .type.report {
|
||||
background-color: #3D3F3C;
|
||||
color: #F2C367;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .list .item .title {
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #070707;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .list .item .content {
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
328
unpackage/dist/dev/mp-weixin/pages/index/hotStock/hotStock.js
vendored
Normal file
328
unpackage/dist/dev/mp-weixin/pages/index/hotStock/hotStock.js
vendored
Normal file
@@ -0,0 +1,328 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const request_api = require("../../../request/api.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
navH: common_vendor.inject("navHeight"),
|
||||
listTop: "",
|
||||
conceptId: "",
|
||||
//概念id
|
||||
conceptName: "",
|
||||
//概念名称
|
||||
weekList: ["一", "二", "三", "四", "五", "六", "日"],
|
||||
monthDateList: [],
|
||||
selectMonthIndex: 0,
|
||||
//选中月份下标
|
||||
selectMonth: "",
|
||||
//选中年月
|
||||
selectDateStr: "",
|
||||
//交易日期选中日期
|
||||
quickTimeList: ["今天", "昨天", "一周前", "一月前"],
|
||||
stockList: []
|
||||
//个股列表
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.listTop = this.navH + (46 + 22) / 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 = 20 * 12 + currentMonth - 1;
|
||||
this.selectMonth = currentYear + "年" + currentMonth + "月";
|
||||
this.selectDateStr = currentYear + "-" + (currentMonth > 9 ? currentMonth : "0" + currentMonth) + "-" + (currentDay > 9 ? currentDay : "0" + currentDay);
|
||||
this.generateMonthDateListData();
|
||||
if (e.id) {
|
||||
this.conceptId = e.id;
|
||||
this.getConceptHotStockData();
|
||||
}
|
||||
},
|
||||
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;
|
||||
},
|
||||
/**
|
||||
* 点击时间筛选
|
||||
*/
|
||||
clickDateScreen() {
|
||||
this.$refs["datePopup"].open();
|
||||
},
|
||||
/**
|
||||
* 点击展开或收起
|
||||
* @param {Object} index
|
||||
*/
|
||||
clickExpandOrRetract(index) {
|
||||
this.stockList[index].isExpand = !this.stockList[index].isExpand;
|
||||
},
|
||||
/**
|
||||
* 点击取消
|
||||
*/
|
||||
clickCancel() {
|
||||
this.$refs["datePopup"].close();
|
||||
},
|
||||
/**
|
||||
* 点击确认
|
||||
*/
|
||||
clickConfirm() {
|
||||
this.clickCancel();
|
||||
this.getConceptHotStockData();
|
||||
},
|
||||
/**
|
||||
* 点击上个月
|
||||
*/
|
||||
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);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取概念相关个股数据
|
||||
*/
|
||||
getConceptHotStockData() {
|
||||
let params = { trade_date: this.selectDateStr };
|
||||
request_api.conceptDetails(this.conceptId, params).then((res) => {
|
||||
this.conceptName = res.concept;
|
||||
this.stockList = res.stocks;
|
||||
}).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 {
|
||||
a: common_vendor.p({
|
||||
leftText: "热门个股",
|
||||
hideNavBg: true
|
||||
}),
|
||||
b: common_assets._imports_0$2,
|
||||
c: common_vendor.t($data.conceptName),
|
||||
d: common_assets._imports_1$8,
|
||||
e: common_vendor.o(($event) => $options.clickDateScreen()),
|
||||
f: common_vendor.s("top:" + $data.navH + "px;"),
|
||||
g: common_vendor.f($data.stockList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item.stock_name),
|
||||
b: common_vendor.t(item.stock_code),
|
||||
c: item.isExpand
|
||||
}, item.isExpand ? {
|
||||
d: common_assets._imports_2$9
|
||||
} : {
|
||||
e: common_assets._imports_3$8
|
||||
}, {
|
||||
f: common_vendor.o(($event) => $options.clickExpandOrRetract(index), index),
|
||||
g: item.isExpand
|
||||
}, item.isExpand ? {
|
||||
h: common_vendor.t(item.reason)
|
||||
} : {}, {
|
||||
i: index
|
||||
});
|
||||
}),
|
||||
h: common_vendor.s("top:" + $data.listTop + "px;"),
|
||||
i: common_vendor.o(($event) => $options.clickCancel()),
|
||||
j: common_vendor.o(($event) => $options.clickConfirm()),
|
||||
k: common_assets._imports_4$5,
|
||||
l: common_vendor.o(($event) => $options.clickPreMonth()),
|
||||
m: common_vendor.t($data.selectMonth),
|
||||
n: common_vendor.o((...args) => $options.monthChange && $options.monthChange(...args)),
|
||||
o: common_assets._imports_5$3,
|
||||
p: common_vendor.o(($event) => $options.clickNextMonth()),
|
||||
q: common_vendor.f($data.weekList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: index
|
||||
};
|
||||
}),
|
||||
r: 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)
|
||||
});
|
||||
}),
|
||||
s: 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)
|
||||
};
|
||||
}),
|
||||
t: common_vendor.sr("datePopup", "59b0aede-1"),
|
||||
v: common_vendor.p({
|
||||
type: "bottom",
|
||||
safeArea: false
|
||||
})
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/index/hotStock/hotStock.js.map
|
||||
7
unpackage/dist/dev/mp-weixin/pages/index/hotStock/hotStock.json
vendored
Normal file
7
unpackage/dist/dev/mp-weixin/pages/index/hotStock/hotStock.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"nav-bar": "../../../components/navBar/navBar",
|
||||
"uni-popup": "../../../uni_modules/uni-popup/components/uni-popup/uni-popup"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/index/hotStock/hotStock.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/index/hotStock/hotStock.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="59b0aede-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="titleScreenC fixed flex" style="{{f}}"><view class="title flex1">{{c}} - 相关个股</view><view class="screenC flex" bindtap="{{e}}"><view>时间筛选</view><image class="arrow" src="{{d}}" mode="widthFix"></image></view></view><scroll-view direction="vertical" class="stockList fixed" style="{{h}}"><view class="list"><view wx:for="{{g}}" wx:for-item="item" wx:key="i" class="item"><view class="stockInfoC flex" bindtap="{{item.f}}"><view class="titleCodeC"><view class="title">{{item.a}}</view><view class="code">{{item.b}}</view></view><view class="chg flex1">+4.04%</view><view class="industry flex1">食品行业</view><view class="reasonProjectC flex"><view>REASON/项目</view><image wx:if="{{item.c}}" class="arrow expand" src="{{item.d}}" mode="widthFix"></image><image wx:else class="arrow" src="{{item.e}}" mode="widthFix"></image></view></view><view wx:if="{{item.g}}" class="reasonProjectContentC"><view class="reasonC"><text class="title">REASON:</text><text>{{item.h}}</text></view><view class="projectC"><text class="title">项目:</text><text>已进入芥末味夏威夷果仁/黑金蒜香茉莉翡翠豆两款产品</text></view></view></view></view></scroll-view><uni-popup wx:if="{{v}}" class="r" u-s="{{['d']}}" u-r="datePopup" u-i="59b0aede-1" bind:__l="__l" u-p="{{v}}"><view class="datePopup"><view class="btnTitleC flex"><view class="btn cancel" bindtap="{{i}}">取消</view><view class="title flex1">交易日期</view><view class="btn confirm" bindtap="{{j}}">确认</view></view><view class="yearMonthC flex"><view class="btn" bindtap="{{l}}"><image class="icon" src="{{k}}" mode="widthFix"></image></view><view class="yearMonth flex1"><picker mode="date" fields="month" bindchange="{{n}}"><view>{{m}}</view></picker></view><view class="btn" bindtap="{{p}}"><image class="icon" src="{{o}}" mode="widthFix"></image></view></view><view class="weekList flex"><view wx:for="{{q}}" wx:for-item="item" wx:key="b" class="item flex1">{{item.a}}</view></view><view class="monthDateList flexWrap"><view wx:for="{{r}}" wx:for-item="item" wx:key="f" class="item flexColumnCenter" bindtap="{{item.g}}"><block wx:if="{{item.a}}"><view class="date select">{{item.b}}</view></block><block wx:else><block wx:if="{{item.c}}"><view class="date notCurrentMonth">{{item.d}}</view></block><block wx:else><view class="date">{{item.e}}</view></block></block></view></view><view class="quickTimeC flexCenter"><view wx:for="{{s}}" wx:for-item="item" wx:key="b" class="item" bindtap="{{item.c}}">{{item.a}}</view></view></view></uni-popup></view>
|
||||
205
unpackage/dist/dev/mp-weixin/pages/index/hotStock/hotStock.wxss
vendored
Normal file
205
unpackage/dist/dev/mp-weixin/pages/index/hotStock/hotStock.wxss
vendored
Normal file
@@ -0,0 +1,205 @@
|
||||
page {
|
||||
background-color: #070707;
|
||||
}
|
||||
.topBg {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.titleScreenC {
|
||||
background-color: #FFF9F5;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: 0 25rpx;
|
||||
padding: 22rpx 25rpx 0;
|
||||
border-radius: 10rpx 10rpx 0 0;
|
||||
}
|
||||
.titleScreenC .title {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #2B2B2B;
|
||||
}
|
||||
.titleScreenC .screenC {
|
||||
padding: 0 20rpx;
|
||||
line-height: 42rpx;
|
||||
border-radius: 23rpx;
|
||||
border: solid 2rpx #F3C368;
|
||||
font-size: 22rpx;
|
||||
color: #E3AA3D;
|
||||
}
|
||||
.titleScreenC .screenC .arrow {
|
||||
margin-left: 7rpx;
|
||||
width: 12rpx;
|
||||
height: auto;
|
||||
}
|
||||
.stockList {
|
||||
background-color: #FFF9F5;
|
||||
left: 0;
|
||||
width: calc(100% - 50rpx);
|
||||
bottom: 62rpx;
|
||||
margin: 0 25rpx;
|
||||
border-radius: 0 0 10rpx 10rpx ;
|
||||
}
|
||||
.stockList .list {
|
||||
padding: 16rpx 25rpx;
|
||||
}
|
||||
.stockList .list .item {
|
||||
background-color: white;
|
||||
box-shadow: 0 5rpx 10rpx 0 rgba(127, 127, 127, 0.08);
|
||||
margin-bottom: 20rpx;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.stockList .list .item .stockInfoC {
|
||||
padding: 16rpx 0;
|
||||
}
|
||||
.stockList .list .item .stockInfoC .titleCodeC .title {
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #222;
|
||||
}
|
||||
.stockList .list .item .stockInfoC .titleCodeC .code {
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: #888;
|
||||
}
|
||||
.stockList .list .item .stockInfoC .chg {
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.stockList .list .item .stockInfoC .chg.up {
|
||||
color: #EC3440;
|
||||
}
|
||||
.stockList .list .item .stockInfoC .chg.down {
|
||||
color: #38A169;
|
||||
}
|
||||
.stockList .list .item .stockInfoC .industry {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
}
|
||||
.stockList .list .item .stockInfoC .reasonProjectC {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #DA9000;
|
||||
}
|
||||
.stockList .list .item .stockInfoC .reasonProjectC .arrow {
|
||||
margin-left: 10rpx;
|
||||
width: 10rpx;
|
||||
height: auto;
|
||||
}
|
||||
.stockList .list .item .stockInfoC .reasonProjectC .arrow.expand {
|
||||
margin-left: 6rpx;
|
||||
width: 14rpx;
|
||||
height: auto;
|
||||
}
|
||||
.stockList .list .item .reasonProjectContentC {
|
||||
margin: 0 5rpx;
|
||||
border-top: solid 1rpx #F0F0F0;
|
||||
padding: 12rpx 9rpx 22rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
.stockList .list .item .reasonProjectContentC .title {
|
||||
color: #DA9000;
|
||||
}
|
||||
.stockList .list .item .reasonProjectContentC .projectC {
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
.datePopup {
|
||||
background-color: white;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
.datePopup .btnTitleC .btn {
|
||||
padding: 20rpx 26rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.datePopup .btnTitleC .btn.cancel {
|
||||
color: #727A8E;
|
||||
}
|
||||
.datePopup .btnTitleC .btn.confirm {
|
||||
color: #D79412;
|
||||
}
|
||||
.datePopup .btnTitleC .title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.datePopup .yearMonthC {
|
||||
background-color: #F7F7F7;
|
||||
margin: 0 25rpx;
|
||||
height: 70rpx;
|
||||
border-radius: 35rpx;
|
||||
}
|
||||
.datePopup .yearMonthC .btn {
|
||||
padding: 0 52rpx;
|
||||
}
|
||||
.datePopup .yearMonthC .btn .icon {
|
||||
width: 13rpx;
|
||||
height: auto;
|
||||
}
|
||||
.datePopup .yearMonthC .yearMonth {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #070707;
|
||||
text-align: center;
|
||||
}
|
||||
.datePopup .weekList {
|
||||
padding: 0 38rpx;
|
||||
}
|
||||
.datePopup .weekList .item {
|
||||
margin-right: 13rpx;
|
||||
line-height: 72rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #A7A7A7;
|
||||
text-align: center;
|
||||
}
|
||||
.datePopup .monthDateList {
|
||||
padding: 0 38rpx;
|
||||
}
|
||||
.datePopup .monthDateList .item {
|
||||
margin-bottom: 12rpx;
|
||||
width: calc(100%/7);
|
||||
}
|
||||
.datePopup .monthDateList .item .date {
|
||||
background-color: #f8f8f8;
|
||||
width: calc(100% - 10rpx);
|
||||
line-height: 64rpx;
|
||||
border-radius: 15rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #2A2A2A;
|
||||
text-align: center;
|
||||
}
|
||||
.datePopup .monthDateList .item .date.select {
|
||||
background-color: #F2C367;
|
||||
color: white;
|
||||
}
|
||||
.datePopup .monthDateList .item .date.notCurrentMonth {
|
||||
background-color: #FCFCFC;
|
||||
color: #999;
|
||||
}
|
||||
.datePopup .quickTimeC {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
.datePopup .quickTimeC .item {
|
||||
margin-right: 25rpx;
|
||||
width: 120rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 30rpx;
|
||||
border: solid 2rpx #4E4E4E;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #4E4E4E;
|
||||
text-align: center;
|
||||
}
|
||||
.datePopup .quickTimeC .item:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const request_api = require("../../request/api.js");
|
||||
const utils_util = require("../../utils/util.js");
|
||||
const utils_posthog = require("../../utils/posthog.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const echarts = require("../../uni_modules/lime-echart/static/echarts.min.js");
|
||||
const _sfc_main = {
|
||||
@@ -200,7 +199,6 @@ const _sfc_main = {
|
||||
}
|
||||
}
|
||||
this.monthDateList = monthDateList;
|
||||
utils_posthog.posthog.capture("首页");
|
||||
},
|
||||
onReady() {
|
||||
common_vendor.index.createSelectorQuery().select("#topCategory").boundingClientRect((rect) => {
|
||||
@@ -346,14 +344,16 @@ const _sfc_main = {
|
||||
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 = this.monthDateList[this.selectMonthIndex][0].year + "-" + (month > 9 ? month : "0" + month);
|
||||
this.selectMonth = year + "-" + (month > 9 ? month : "0" + month);
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -363,14 +363,16 @@ const _sfc_main = {
|
||||
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 = this.monthDateList[this.selectMonthIndex][0].year + "-" + (month > 9 ? month : "0" + month);
|
||||
this.selectMonth = year + "-" + (month > 9 ? month : "0" + month);
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -838,7 +840,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
y: $data.isRefreshing,
|
||||
z: common_vendor.o(($event) => $options.pullDownRefresh()),
|
||||
A: common_vendor.o(($event) => $options.loadMoreData()),
|
||||
B: common_assets._imports_13$1,
|
||||
B: common_assets._imports_14,
|
||||
C: common_vendor.f($data.sortList, (item, index, i0) => {
|
||||
return {
|
||||
a: item.icon,
|
||||
@@ -848,7 +850,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
};
|
||||
}),
|
||||
D: common_vendor.s("margin-top:" + $data.sortListTop + "px;"),
|
||||
E: common_vendor.sr("sortPopup", "eb4215a0-0"),
|
||||
E: common_vendor.sr("sortPopup", "9dfd58d8-0"),
|
||||
F: common_vendor.p({
|
||||
type: "top",
|
||||
["mask-background-color"]: "transparent",
|
||||
@@ -992,7 +994,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
a: common_vendor.t(fitem.level3_sector),
|
||||
b: $data.selectIndustrySecondCategory == sindex && $data.selectIndustryThirdCategory == tindex && $data.selectIndustryForthCategory == findex
|
||||
}, $data.selectIndustrySecondCategory == sindex && $data.selectIndustryThirdCategory == tindex && $data.selectIndustryForthCategory == findex ? {
|
||||
c: common_assets._imports_14
|
||||
c: common_assets._imports_14$1
|
||||
} : {}, {
|
||||
d: common_vendor.n("categoryC flex " + ($data.selectIndustrySecondCategory == sindex && $data.selectIndustryThirdCategory == tindex && $data.selectIndustryForthCategory == findex ? "select" : "")),
|
||||
e: common_vendor.o(($event) => $options.clickIndustryForthCategoryItem(sindex, tindex, findex), findex),
|
||||
@@ -1022,7 +1024,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
ar: common_vendor.o(($event) => $options.clickCancel()),
|
||||
as: common_vendor.o(($event) => $options.clickCertain()),
|
||||
at: common_vendor.s("padding-top:" + $data.menuTop + "px;"),
|
||||
av: common_vendor.sr("screenPopup", "eb4215a0-1"),
|
||||
av: common_vendor.sr("screenPopup", "9dfd58d8-1"),
|
||||
aw: common_vendor.p({
|
||||
type: "top"
|
||||
})
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -98,13 +98,13 @@ const _sfc_main = {
|
||||
},
|
||||
tooltip: {
|
||||
position: function(pos, params, dom, rect, size) {
|
||||
var obj = { top: "5%" };
|
||||
var obj = { top: "3%" };
|
||||
obj[["left", "right"][+(pos[0] < size.viewSize[0] / 2)]] = 5;
|
||||
return obj;
|
||||
},
|
||||
trigger: "axis",
|
||||
formatter: function(params) {
|
||||
let res = "时间:" + params[0].name + "\n高:" + params[0].data[2] + "\n开:" + params[0].data[3] + "\n低:" + params[0].data[4] + "\n收:" + params[0].data[1] + "\n涨幅:" + params[0].data[5] + "%\n量:" + params[0].data[6] + "\n金额:" + params[0].data[7];
|
||||
let res = "时间:" + params[0].name + "\n高:" + params[0].data[2] + "\n开:" + params[0].data[3] + "\n低:" + params[0].data[4] + "\n收:" + params[0].data[1] + "\n涨幅:" + params[0].data[5] + "%";
|
||||
return res;
|
||||
}
|
||||
},
|
||||
@@ -360,14 +360,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
}),
|
||||
e: common_vendor.s("top:" + $data.navH + "px;")
|
||||
} : {}, {
|
||||
f: $data.type == 1
|
||||
}, $data.type == 1 ? {
|
||||
g: common_vendor.sr("chartRef", "ab03f7e6-1")
|
||||
f: $data.type == 1 && $data.tradeData
|
||||
}, $data.type == 1 && $data.tradeData ? {
|
||||
g: common_vendor.t($data.tradeData.volume),
|
||||
h: common_vendor.t($data.tradeData.amount)
|
||||
} : {}, {
|
||||
h: common_vendor.t($data.relatedDesc),
|
||||
i: $data.type == 1 && $data.sourceList.length > 0
|
||||
i: $data.type == 1
|
||||
}, $data.type == 1 ? {
|
||||
j: common_vendor.sr("chartRef", "42054871-1")
|
||||
} : {}, {
|
||||
k: common_vendor.t($data.relatedDesc),
|
||||
l: $data.type == 1 && $data.sourceList.length > 0
|
||||
}, $data.type == 1 && $data.sourceList.length > 0 ? {} : {}, {
|
||||
j: common_vendor.f($data.sourceList, (item, index, i0) => {
|
||||
m: common_vendor.f($data.sourceList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.sentences),
|
||||
b: common_vendor.t(item.report_title),
|
||||
@@ -376,8 +381,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
e: index
|
||||
};
|
||||
}),
|
||||
k: common_vendor.n("contentC fixed " + ($data.type == 2 ? "radius" : "")),
|
||||
l: common_vendor.s("top:" + $data.contentTop + "px;")
|
||||
n: common_vendor.n("contentC fixed " + ($data.type == 2 ? "radius" : "")),
|
||||
o: common_vendor.s("top:" + $data.contentTop + "px;")
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="ab03f7e6-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view wx:if="{{c}}" class="tabC fixed" style="{{e}}"><view wx:for="{{d}}" wx:for-item="item" wx:key="d" class="{{item.c}}" bindtap="{{item.e}}">{{item.a}} <view wx:if="{{item.b}}" class="line absolute"></view></view></view><view class="{{k}}" style="{{l}}"><view wx:if="{{f}}" style="width:750rpx;height:400rpx"><l-echart class="r" u-r="chartRef" u-i="ab03f7e6-1" bind:__l="__l"></l-echart></view><view class="section">关联描述</view><view class="des">{{h}}<text class="ai">(AI合成)</text></view><view class="riskTips"> 【风险提示:解析内容由价值前沿人工采集整理自新闻、公告、研报等公开信息,团队辛苦编写,未经许可严禁转载。本产品内容内容均不构成投资建议,请投资者注意风险,独立审慎决策。】 </view><view wx:if="{{i}}" class="section">信息来源</view><view class="list"><view wx:for="{{j}}" wx:for-item="item" wx:key="e" class="item"><view class="content">{{item.a}}</view><view class="article">——《{{item.b}}》</view><view class="authorDateC flex"><view class="author flex1">{{item.c}}</view><view class="date">{{item.d}}</view></view></view></view></view></view>
|
||||
<view><nav-bar wx:if="{{a}}" u-i="42054871-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view wx:if="{{c}}" class="tabC fixed" style="{{e}}"><view wx:for="{{d}}" wx:for-item="item" wx:key="d" class="{{item.c}}" bindtap="{{item.e}}">{{item.a}} <view wx:if="{{item.b}}" class="line absolute"></view></view></view><view class="{{n}}" style="{{o}}"><view wx:if="{{f}}" class="volumeAmountC flex"><text class="volume">成交量:{{g}}</text><text class="amount">成交金额:{{h}}</text></view><view wx:if="{{i}}" style="width:750rpx;height:400rpx"><l-echart class="r" u-r="chartRef" u-i="42054871-1" bind:__l="__l"></l-echart></view><view class="section">关联描述</view><view class="des">{{k}}<text class="ai">(AI合成)</text></view><view class="riskTips"> 【风险提示:解析内容由价值前沿人工采集整理自新闻、公告、研报等公开信息,团队辛苦编写,未经许可严禁转载。本产品内容内容均不构成投资建议,请投资者注意风险,独立审慎决策。】 </view><view wx:if="{{l}}" class="section">信息来源</view><view class="list"><view wx:for="{{m}}" wx:for-item="item" wx:key="e" class="item"><view class="content">{{item.a}}</view><view class="article">——《{{item.b}}》</view><view class="authorDateC flex"><view class="author flex1">{{item.c}}</view><view class="date">{{item.d}}</view></view></view></view></view></view>
|
||||
Reference in New Issue
Block a user