1.28 更换echarts文件
This commit is contained in:
841
unpackage/dist/dev/mp-weixin/pages/concept/concept.js
vendored
Normal file
841
unpackage/dist/dev/mp-weixin/pages/concept/concept.js
vendored
Normal file
@@ -0,0 +1,841 @@
|
||||
"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",
|
||||
//选择的排序方式
|
||||
sortTypeStr: "涨跌幅",
|
||||
//选择的排序方式
|
||||
weekList: ["一", "二", "三", "四", "五", "六", "日"],
|
||||
monthDateList: [],
|
||||
selectMonthIndex: 0,
|
||||
//选中月份下标
|
||||
selectMonth: "",
|
||||
//选中年月
|
||||
selectDateStr: "",
|
||||
//选中日期
|
||||
selectTradeDateStr: "",
|
||||
//交易日期选中日期
|
||||
selectTradeMonthIndex: 0,
|
||||
//交易日期选中月份下标
|
||||
selectTradeMonth: "",
|
||||
//交易日期选中年月
|
||||
quickTimeList: ["今天", "昨天", "一周前", "一月前"],
|
||||
conceptList: [],
|
||||
page: 1,
|
||||
isRefreshing: false,
|
||||
//下拉刷新
|
||||
loadAll: false,
|
||||
//是否加载完毕
|
||||
getRateUpOrDown: utils_util.getRateUpOrDown,
|
||||
getChgRateStr: utils_util.getChgRateStr,
|
||||
memberInfo: null
|
||||
//会员信息
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.listTop = this.navH + (20 + 70 + 20 + 30 + 20) / 750 * common_vendor.inject("windowWidth");
|
||||
this.sortListTop = this.navH + (20 + 70 + 20 + 30 + 20) / 750 * common_vendor.inject("windowWidth");
|
||||
let currentDate = /* @__PURE__ */ new Date();
|
||||
let currentYear = currentDate.getFullYear();
|
||||
let currentMonth = currentDate.getMonth() + 1;
|
||||
let currentDay = currentDate.getDate();
|
||||
this.selectMonthIndex = this.selectTradeMonthIndex = this.selectEndMonthIndex = 20 * 12 + currentMonth - 1;
|
||||
this.selectMonth = this.selectTradeMonth = this.selectEndMonth = currentYear + "年" + currentMonth + "月";
|
||||
this.selectDateStr = this.selectTradeDateStr = this.endDateStr = this.selectEndDateStr = currentYear + "-" + (currentMonth > 9 ? currentMonth : "0" + currentMonth) + "-" + (currentDay > 9 ? currentDay : "0" + currentDay);
|
||||
let startDate = new Date(currentDate);
|
||||
startDate.setDate(startDate.getDate() - 3);
|
||||
let startYear = startDate.getFullYear();
|
||||
let startMonth = startDate.getMonth() + 1;
|
||||
let startDay = startDate.getDate();
|
||||
this.selectStartMonthIndex = (20 + currentYear - startYear) * 12 + startMonth - 1;
|
||||
this.selectStartMonth = startYear + "年" + startMonth + "月";
|
||||
this.startDateStr = this.selectStartDateStr = startYear + "-" + (startMonth > 9 ? startMonth : "0" + startMonth) + "-" + (startDay > 9 ? startDay : "0" + startDay);
|
||||
this.generateMonthDateListData();
|
||||
this.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;
|
||||
},
|
||||
/**
|
||||
* 下拉刷新
|
||||
*/
|
||||
pullDownRefresh() {
|
||||
this.isRefreshing = true;
|
||||
this.clickSearch();
|
||||
},
|
||||
/**
|
||||
* 上拉加载
|
||||
*/
|
||||
loadMoreData() {
|
||||
if (!this.loadAll) {
|
||||
this.page++;
|
||||
this.getConceptCenterData();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击搜索
|
||||
*/
|
||||
clickSearch() {
|
||||
this.page = 1;
|
||||
this.getConceptCenterData();
|
||||
},
|
||||
/**
|
||||
* 点击排行榜
|
||||
*/
|
||||
clickRank() {
|
||||
this.$refs["rankPopup"].open();
|
||||
},
|
||||
/**
|
||||
* 点击关闭排行榜弹窗
|
||||
*/
|
||||
clickRankClose() {
|
||||
this.$refs["rankPopup"].close();
|
||||
},
|
||||
/**
|
||||
* 点击切换统计周期
|
||||
*/
|
||||
clickRankCycleListItem(index) {
|
||||
if (this.selectCycleIndex != index) {
|
||||
this.selectCycleIndex = index;
|
||||
if (index == 3)
|
||||
;
|
||||
else {
|
||||
let currentDate = /* @__PURE__ */ new Date();
|
||||
let currentYear = currentDate.getFullYear();
|
||||
let currentMonth = currentDate.getMonth() + 1;
|
||||
let currentDay = currentDate.getDate();
|
||||
let selectDate = new Date(currentDate);
|
||||
if (index == 0) {
|
||||
selectDate.setDate(selectDate.getDate() - 3);
|
||||
} else if (index == 1) {
|
||||
selectDate.setDate(selectDate.getDate() - 7);
|
||||
} else if (index == 2) {
|
||||
selectDate.setDate(selectDate.getDate() - 14);
|
||||
}
|
||||
let startYear = selectDate.getFullYear();
|
||||
let startMonth = selectDate.getMonth() + 1;
|
||||
let startDay = selectDate.getDate();
|
||||
this.endDateStr = this.selectEndDateStr = currentYear + "-" + (currentMonth > 9 ? currentMonth : "0" + currentMonth) + "-" + (currentDay > 9 ? currentDay : "0" + currentDay);
|
||||
this.startDateStr = this.selectStartdateStr = startYear + "-" + (startMonth > 9 ? startMonth : "0" + startMonth) + "-" + (startDay > 9 ? startDay : "0" + startDay);
|
||||
this.getRankListData();
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击自定义周期日期
|
||||
* @param {Object} type
|
||||
*/
|
||||
clickCustomDateCycle(type) {
|
||||
this.popType = type;
|
||||
if (type == 2) {
|
||||
this.selectDateStr = this.selectStartDateStr;
|
||||
this.selectMonth = this.selectStartMonth;
|
||||
this.selectMonthIndex = this.selectStartMonthIndex;
|
||||
} else {
|
||||
this.selectDateStr = this.selectEndDateStr;
|
||||
this.selectMonth = this.selectEndMonth;
|
||||
this.selectMonthIndex = this.selectEndMonthIndex;
|
||||
}
|
||||
this.$refs["transactionDatePopup"].open();
|
||||
},
|
||||
/**
|
||||
* 点击应用最新日期
|
||||
*/
|
||||
clickApply() {
|
||||
let startTimeStamp = new Date(this.selectStartDateStr);
|
||||
let endTimeStamp = new Date(this.selectEndDateStr);
|
||||
if (startTimeStamp > endTimeStamp) {
|
||||
common_vendor.index.showToast({
|
||||
title: "开始日期不能晚于结束日期",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.startDateStr = this.selectStartDateStr;
|
||||
this.endDateStr = this.selectEndDateStr;
|
||||
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.sortTypeStr = item.name;
|
||||
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();
|
||||
},
|
||||
/**
|
||||
* 点击查看相关概念
|
||||
*/
|
||||
clickConceptItem(name) {
|
||||
let md5 = common_vendor.CryptoJS.MD5(name).toString();
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/index/conceptDetails/conceptDetails?name=" + md5
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 点击查看更多个股
|
||||
*/
|
||||
clickStockMore(item) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/concept/hotStock/hotStock?id=" + item.concept_id
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 点击查看历史时间轴
|
||||
*/
|
||||
clickHistoricalTimeline(item) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/concept/historicalTimeline/historicalTimeline?id=" + item.concept_id
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取概念中心数据
|
||||
*/
|
||||
getConceptCenterData() {
|
||||
let dateStr = this.selectDateStr;
|
||||
let selectDateTimestamp = new Date(this.selectDateStr).getTime();
|
||||
let newestTimeStamp = new Date(this.newestPriceDate).getTime();
|
||||
if (selectDateTimestamp > newestTimeStamp) {
|
||||
dateStr = this.newestPriceDate;
|
||||
}
|
||||
let param = { query: this.keywords, size: 10, page: this.page, sort_by: this.sortType, isJson: 1, trade_date: dateStr };
|
||||
request_api.eventRelatedConcept(param).then((res) => {
|
||||
this.isRefreshing = false;
|
||||
if (res.page == 1) {
|
||||
this.conceptList = res.results;
|
||||
} else {
|
||||
this.conceptList = this.conceptList.concat(res.results);
|
||||
}
|
||||
if (res.page == res.total_pages) {
|
||||
this.loadAll = true;
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.isRefreshing = false;
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取最新价格数据
|
||||
*/
|
||||
getNewestPriceDateData() {
|
||||
request_api.newestPriceDate().then((res) => {
|
||||
this.newestPriceDate = res.latest_trade_date;
|
||||
this.getConceptCenterData();
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取会员状态
|
||||
*/
|
||||
getMemberStatusData() {
|
||||
let token = common_vendor.index.getStorageSync("token");
|
||||
if (!token) {
|
||||
return;
|
||||
}
|
||||
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.days = 3;
|
||||
if (this.selectCycleIndex == 1) {
|
||||
params.days = 7;
|
||||
} else if (this.selectCycleIndex == 2) {
|
||||
params.days = 14;
|
||||
}
|
||||
params.min_stock_count = 3;
|
||||
}
|
||||
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,
|
||||
hideBack: true
|
||||
}),
|
||||
b: common_assets._imports_0,
|
||||
c: common_assets._imports_1,
|
||||
d: common_vendor.o(($event) => $options.clickSearch()),
|
||||
e: $data.keywords,
|
||||
f: common_vendor.o(($event) => $data.keywords = $event.detail.value),
|
||||
g: common_vendor.o(($event) => $options.clickRank()),
|
||||
h: common_vendor.t($data.newestPriceDate),
|
||||
i: common_assets._imports_2$3,
|
||||
j: common_vendor.t($data.sortTypeStr),
|
||||
k: common_assets._imports_3,
|
||||
l: common_vendor.o(($event) => $options.clickSortType()),
|
||||
m: common_assets._imports_4$2,
|
||||
n: common_assets._imports_3,
|
||||
o: common_vendor.o(($event) => $options.clickTransactionDate()),
|
||||
p: common_vendor.s("top: " + $data.navH + "px;"),
|
||||
q: common_vendor.f($data.conceptList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item.concept),
|
||||
b: common_vendor.o(($event) => $options.clickConceptItem(item.concept), index),
|
||||
c: item.price_info
|
||||
}, item.price_info ? {
|
||||
d: common_vendor.t($data.getChgRateStr(item.price_info.avg_change_pct)),
|
||||
e: common_vendor.n("chg " + ($data.getRateUpOrDown(item.price_info.avg_change_pct) ? "down" : "up"))
|
||||
} : {}, {
|
||||
f: item.price_info
|
||||
}, item.price_info ? {
|
||||
g: common_vendor.t(item.stock_count),
|
||||
h: common_vendor.n("stockNum " + ($data.getRateUpOrDown(item.price_info.avg_change_pct) ? "down" : "up"))
|
||||
} : {}, {
|
||||
i: common_vendor.t(item.description),
|
||||
j: common_vendor.o(($event) => $options.clickConceptItem(item.concept), index),
|
||||
k: common_vendor.f(item.stocks.slice(0, 3), (sitem, sindex, i1) => {
|
||||
return {
|
||||
a: common_vendor.t(sitem.name),
|
||||
b: sindex
|
||||
};
|
||||
}),
|
||||
l: common_vendor.t(item.stock_count - 3),
|
||||
m: common_vendor.o(($event) => $options.clickStockMore(item), index),
|
||||
n: common_vendor.t(item.price_info ? item.price_info.trade_date : ""),
|
||||
o: common_vendor.o(($event) => $options.clickHistoricalTimeline(item), index),
|
||||
p: index
|
||||
});
|
||||
}),
|
||||
r: common_assets._imports_1$3,
|
||||
s: common_vendor.s("top: " + $data.listTop + "px;"),
|
||||
t: $data.isRefreshing,
|
||||
v: common_vendor.o(($event) => $options.pullDownRefresh()),
|
||||
w: common_vendor.o(($event) => $options.loadMoreData()),
|
||||
x: common_assets._imports_9$1,
|
||||
y: common_vendor.o(($event) => $options.clickRankClose()),
|
||||
z: common_assets._imports_7$1,
|
||||
A: common_vendor.t($data.startDateStr),
|
||||
B: common_vendor.t($data.endDateStr),
|
||||
C: common_vendor.f($data.cycleList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: common_vendor.n("item " + ($data.selectCycleIndex == index ? "select" : "")),
|
||||
c: index,
|
||||
d: common_vendor.o(($event) => $options.clickRankCycleListItem(index), index)
|
||||
};
|
||||
}),
|
||||
D: $data.selectCycleIndex == 3
|
||||
}, $data.selectCycleIndex == 3 ? {
|
||||
E: common_vendor.t($data.selectStartDateStr),
|
||||
F: common_vendor.o(($event) => $options.clickCustomDateCycle(2)),
|
||||
G: common_vendor.t($data.selectEndDateStr),
|
||||
H: common_vendor.o(($event) => $options.clickCustomDateCycle(3)),
|
||||
I: common_vendor.o(($event) => $options.clickApply())
|
||||
} : {}, {
|
||||
J: 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)
|
||||
});
|
||||
}),
|
||||
K: 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$2
|
||||
} : {}, {
|
||||
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),
|
||||
j: common_vendor.o(($event) => $options.clickConceptItem(item.name), index)
|
||||
}, $data.selectTab == 3 || $data.selectTab == 4 ? common_vendor.e({
|
||||
k: $data.selectTab == 3
|
||||
}, $data.selectTab == 3 ? {
|
||||
l: common_vendor.t(item.avg_change)
|
||||
} : {}, {
|
||||
m: $data.selectTab == 4
|
||||
}, $data.selectTab == 4 ? {
|
||||
n: common_vendor.t(item.total_change)
|
||||
} : {}) : common_vendor.e({
|
||||
o: $data.selectTab == 0 || $data.selectTab == 1
|
||||
}, $data.selectTab == 0 || $data.selectTab == 1 ? {
|
||||
p: common_assets._imports_11$2,
|
||||
q: common_vendor.t(item.news_count)
|
||||
} : {}, {
|
||||
r: common_assets._imports_12$2,
|
||||
s: common_vendor.t(item.news_count),
|
||||
t: $data.selectTab == 2
|
||||
}, $data.selectTab == 2 ? {
|
||||
v: common_assets._imports_13$1,
|
||||
w: common_vendor.t(item.report_count)
|
||||
} : {}), $data.selectTab == 0 ? {
|
||||
x: common_vendor.t(item.change_pct)
|
||||
} : {}, $data.selectTab == 1 ? {
|
||||
y: common_vendor.t(item.change_pct)
|
||||
} : {}, $data.selectTab == 2 ? {
|
||||
z: common_vendor.t(item.total_mentions)
|
||||
} : {}, $data.selectTab == 3 ? {
|
||||
A: common_vendor.t(item.volatility)
|
||||
} : {}, $data.selectTab == 4 ? {
|
||||
B: common_vendor.t(item.consecutive_days)
|
||||
} : {}, {
|
||||
C: index
|
||||
});
|
||||
}),
|
||||
L: $data.selectTab == 3 || $data.selectTab == 4,
|
||||
M: common_vendor.n("icon " + ($data.selectTab == 4 ? "continuousRise" : "")),
|
||||
N: $data.rankTabList[$data.selectTab].selectIcon,
|
||||
O: $data.selectTab == 0,
|
||||
P: $data.selectTab == 1,
|
||||
Q: $data.selectTab == 2,
|
||||
R: $data.selectTab == 3,
|
||||
S: $data.selectTab == 4,
|
||||
T: common_vendor.sr("rankPopup", "634c6a80-1"),
|
||||
U: common_vendor.p({
|
||||
type: "bottom",
|
||||
safeArea: false
|
||||
}),
|
||||
V: common_assets._imports_12$1,
|
||||
W: 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)
|
||||
};
|
||||
}),
|
||||
X: common_vendor.s("margin-top:" + $data.sortListTop + "px;"),
|
||||
Y: common_vendor.sr("sortTypePopup", "634c6a80-2"),
|
||||
Z: common_vendor.p({
|
||||
type: "top",
|
||||
["mask-background-color"]: "transparent",
|
||||
animation: false
|
||||
}),
|
||||
aa: common_vendor.o(($event) => $options.clickCancel()),
|
||||
ab: common_vendor.o(($event) => $options.clickConfirm()),
|
||||
ac: common_assets._imports_0$1,
|
||||
ad: common_vendor.o(($event) => $options.clickPreMonth()),
|
||||
ae: common_vendor.t($data.selectMonth),
|
||||
af: common_vendor.o(() => {
|
||||
}),
|
||||
ag: common_assets._imports_1$2,
|
||||
ah: common_vendor.o(($event) => $options.clickNextMonth()),
|
||||
ai: common_vendor.f($data.weekList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: index
|
||||
};
|
||||
}),
|
||||
aj: 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)
|
||||
});
|
||||
}),
|
||||
ak: common_vendor.f($data.quickTimeList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: index,
|
||||
c: common_vendor.o(($event) => $options.clickQuickTimeItem(index), index)
|
||||
};
|
||||
}),
|
||||
al: common_vendor.sr("transactionDatePopup", "634c6a80-3"),
|
||||
am: common_vendor.p({
|
||||
type: "bottom",
|
||||
safeArea: false
|
||||
}),
|
||||
an: common_assets._imports_13,
|
||||
ao: common_assets._imports_14,
|
||||
ap: common_assets._imports_15,
|
||||
aq: common_assets._imports_15,
|
||||
ar: common_assets._imports_16,
|
||||
as: common_assets._imports_16,
|
||||
at: common_assets._imports_16,
|
||||
av: common_vendor.o(($event) => $options.clickLater()),
|
||||
aw: common_vendor.o(($event) => $options.clickUpgradeAtOnce()),
|
||||
ax: common_vendor.sr("vipPopup", "634c6a80-4"),
|
||||
ay: common_vendor.p({
|
||||
type: "center"
|
||||
})
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/concept/concept.js.map
|
||||
7
unpackage/dist/dev/mp-weixin/pages/concept/concept.json
vendored
Normal file
7
unpackage/dist/dev/mp-weixin/pages/concept/concept.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/concept/concept.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/concept/concept.wxml
vendored
Normal file
File diff suppressed because one or more lines are too long
611
unpackage/dist/dev/mp-weixin/pages/concept/concept.wxss
vendored
Normal file
611
unpackage/dist/dev/mp-weixin/pages/concept/concept.wxss
vendored
Normal file
@@ -0,0 +1,611 @@
|
||||
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;
|
||||
color: white;
|
||||
}
|
||||
.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: calc(55px + env(safe-area-inset-bottom));
|
||||
}
|
||||
.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;
|
||||
word-break: break-all;
|
||||
}
|
||||
.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 {
|
||||
flex-shrink: 0;
|
||||
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;
|
||||
max-height: 500rpx;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.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: calc(20rpx + 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;
|
||||
}
|
||||
402
unpackage/dist/dev/mp-weixin/pages/concept/historicalTimeline/historicalTimeline.js
vendored
Normal file
402
unpackage/dist/dev/mp-weixin/pages/concept/historicalTimeline/historicalTimeline.js
vendored
Normal file
@@ -0,0 +1,402 @@
|
||||
"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: [],
|
||||
//研报数据
|
||||
selectNewsOrReport: 0,
|
||||
//0新闻1研报
|
||||
getRateUpOrDown: utils_util.getRateUpOrDown,
|
||||
getChgRateStr: utils_util.getChgRateStr
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.contentTop = this.navH + 64 / 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 > 9 ? currentMonth : "0" + currentMonth) + "-01";
|
||||
this.endDateStr = this.selectDateStr = currentYear + "-" + (currentMonth > 9 ? currentMonth : "0" + currentMonth) + "-" + (currentDay > 9 ? currentDay : "0" + currentDay);
|
||||
this.generateMonthDateListData();
|
||||
if (e.id) {
|
||||
this.conceptId = e.id;
|
||||
this.getTimelineData();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getContent(item) {
|
||||
if (utils_util.isValidJSON(item.content)) {
|
||||
return JSON.parse(item.content).content;
|
||||
} else {
|
||||
return item.content;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取当前时间前一天的数据
|
||||
*/
|
||||
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();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击切换新闻或研报
|
||||
* @param {Object} index
|
||||
*/
|
||||
clickNewsOrReportItem(index) {
|
||||
common_vendor.index.__f__("log", "at pages/concept/historicalTimeline/historicalTimeline.vue:332", this.selectNewsOrReport, index);
|
||||
if (this.selectNewsOrReport != index) {
|
||||
this.selectNewsOrReport = index;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击查看新闻详情
|
||||
* @param {Object} item
|
||||
*/
|
||||
clickNewsItem(item) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/concept/newsDetails/newsDetails?info=" + encodeURIComponent(JSON.stringify(item))
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 点击查看研报详情
|
||||
* @param {Object} item
|
||||
*/
|
||||
clickReportItem(item) {
|
||||
common_vendor.index.__f__("log", "at pages/concept/historicalTimeline/historicalTimeline.vue:351", item);
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/concept/reportDetails/reportDetails?info=" + encodeURIComponent(JSON.stringify(item))
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取时间序列数据
|
||||
*/
|
||||
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) => {
|
||||
for (let item of res.data.results) {
|
||||
item.content = item.content.replace(/'/g, '"');
|
||||
}
|
||||
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,
|
||||
c: common_vendor.t($data.conceptName),
|
||||
d: common_vendor.s("top: " + $data.navH + "px;"),
|
||||
e: common_assets._imports_0$1,
|
||||
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_1$2,
|
||||
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$5
|
||||
} : {
|
||||
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$2,
|
||||
w: common_vendor.t($data.newsList.length),
|
||||
x: common_vendor.n("num " + ($data.selectNewsOrReport == 0 ? "select" : "")),
|
||||
y: common_vendor.o(($event) => $options.clickNewsOrReportItem(0)),
|
||||
z: common_vendor.t($data.reportList.length),
|
||||
A: common_vendor.n("num " + ($data.selectNewsOrReport == 1 ? "select" : "")),
|
||||
B: common_vendor.o(($event) => $options.clickNewsOrReportItem(1)),
|
||||
C: $data.selectNewsOrReport == 0
|
||||
}, $data.selectNewsOrReport == 0 ? {
|
||||
D: common_vendor.f($data.newsList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.title),
|
||||
b: common_vendor.t(item.detail),
|
||||
c: index,
|
||||
d: common_vendor.o(($event) => $options.clickNewsItem(item), index)
|
||||
};
|
||||
})
|
||||
} : {
|
||||
E: common_vendor.f($data.reportList, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.report_title),
|
||||
b: common_vendor.t($options.getContent(item)),
|
||||
c: index,
|
||||
d: common_vendor.o(($event) => $options.clickReportItem(item), index)
|
||||
};
|
||||
})
|
||||
}, {
|
||||
F: 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/concept/historicalTimeline/historicalTimeline.js.map
|
||||
6
unpackage/dist/dev/mp-weixin/pages/concept/historicalTimeline/historicalTimeline.json
vendored
Normal file
6
unpackage/dist/dev/mp-weixin/pages/concept/historicalTimeline/historicalTimeline.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"nav-bar": "../../../components/navBar/navBar"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/concept/historicalTimeline/historicalTimeline.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/concept/historicalTimeline/historicalTimeline.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="adc20db2-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="timelineTitle fixed" style="{{d}}">{{c}}- 历史时间轴</view><view class="dateStatisticsC fixed" style="{{F}}"><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="{{x}}" bindtap="{{y}}">{{w}} 条新闻 · </text><text class="{{A}}" decode bindtap="{{B}}"> {{z}} 份研报</text></view><view class="list"><block wx:if="{{C}}"><view wx:for="{{D}}" wx:for-item="item" wx:key="c" class="item" bindtap="{{item.d}}"><view class="flex"><view class="type news">新闻</view><view class="title flex1">{{item.a}}</view></view><view class="content">{{item.b}}</view></view></block><block wx:else><view wx:for="{{E}}" wx:for-item="item" wx:key="c" class="item" bindtap="{{item.d}}"><view class="flex"><view class="type report">研报</view><view class="title flex1">{{item.a}}</view></view><view class="content">{{item.b}}</view></view></block></view></view></view></view>
|
||||
205
unpackage/dist/dev/mp-weixin/pages/concept/historicalTimeline/historicalTimeline.wxss
vendored
Normal file
205
unpackage/dist/dev/mp-weixin/pages/concept/historicalTimeline/historicalTimeline.wxss
vendored
Normal file
@@ -0,0 +1,205 @@
|
||||
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 .num {
|
||||
color: #333;
|
||||
}
|
||||
.dateStatisticsC .statisticsC .newsReportC .num.select {
|
||||
color: #FF7723;
|
||||
}
|
||||
.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 {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
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;
|
||||
}
|
||||
380
unpackage/dist/dev/mp-weixin/pages/concept/hotStock/hotStock.js
vendored
Normal file
380
unpackage/dist/dev/mp-weixin/pages/concept/hotStock/hotStock.js
vendored
Normal file
@@ -0,0 +1,380 @@
|
||||
"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;
|
||||
let codes = this.stockList.map((item) => {
|
||||
if (item.code != null)
|
||||
return item.code;
|
||||
return "";
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/concept/hotStock/hotStock.vue:383", codes);
|
||||
request_api.conceptOtherDetails(this.conceptId, {
|
||||
days: 1,
|
||||
codes,
|
||||
isJson: 1
|
||||
}).then((data) => {
|
||||
this.stockList = this.stockList.map((item) => {
|
||||
if (item.code != null) {
|
||||
item.change_percent = data.data[item.code].stats.change_percent;
|
||||
}
|
||||
return item;
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/concept/hotStock/hotStock.vue:397", "===============");
|
||||
common_vendor.index.__f__("log", "at pages/concept/hotStock/hotStock.vue:398", this.stockList);
|
||||
}).catch((error) => {
|
||||
common_vendor.index.__f__("log", "at pages/concept/hotStock/hotStock.vue:400", "=-=-=-=-=-=-=-=-=");
|
||||
});
|
||||
}).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,
|
||||
c: common_vendor.t($data.conceptName),
|
||||
d: common_assets._imports_1$9,
|
||||
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.name),
|
||||
b: common_vendor.t(item.code),
|
||||
c: item.change_percent
|
||||
}, item.change_percent ? {
|
||||
d: common_vendor.t(item.change_percent >= 0 ? "+" + item.change_percent : item.change_percent)
|
||||
} : {}, {
|
||||
e: item.isExpand
|
||||
}, item.isExpand ? {
|
||||
f: common_assets._imports_2$7
|
||||
} : {
|
||||
g: common_assets._imports_3$6
|
||||
}, {
|
||||
h: common_vendor.o(($event) => $options.clickExpandOrRetract(index), index),
|
||||
i: item.isExpand
|
||||
}, item.isExpand ? {
|
||||
j: common_vendor.t(item.reason)
|
||||
} : {}, {
|
||||
k: 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_0$1,
|
||||
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_1$2,
|
||||
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", "0dffb7e7-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/concept/hotStock/hotStock.js.map
|
||||
7
unpackage/dist/dev/mp-weixin/pages/concept/hotStock/hotStock.json
vendored
Normal file
7
unpackage/dist/dev/mp-weixin/pages/concept/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/concept/hotStock/hotStock.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/concept/hotStock/hotStock.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="0dffb7e7-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 scroll-y class="stockList fixed" style="{{h}}"><view class="list"><view wx:for="{{g}}" wx:for-item="item" wx:key="k" class="item"><view class="stockInfoC flex" bindtap="{{item.h}}"><view class="titleCodeC"><view class="title">{{item.a}}</view><view class="code">{{item.b}}</view></view><view wx:if="{{item.c}}" class="chg flex1">{{item.d}}%</view><view wx:else class="chg flex1">-</view><view class="reasonProjectC flex"><view>REASON/项目</view><image wx:if="{{item.e}}" class="arrow expand" src="{{item.f}}" mode="widthFix"></image><image wx:else class="arrow" src="{{item.g}}" mode="widthFix"></image></view></view><view wx:if="{{item.i}}" class="reasonProjectContentC"><view class="reasonC"><text class="title">REASON:</text><text>{{item.j}}</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="0dffb7e7-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/concept/hotStock/hotStock.wxss
vendored
Normal file
205
unpackage/dist/dev/mp-weixin/pages/concept/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: calc(20rpx + 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;
|
||||
}
|
||||
46
unpackage/dist/dev/mp-weixin/pages/concept/newsDetails/newsDetails.js
vendored
Normal file
46
unpackage/dist/dev/mp-weixin/pages/concept/newsDetails/newsDetails.js
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const utils_util = require("../../../utils/util.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
navH: common_vendor.inject("navHeight"),
|
||||
newsInfo: null,
|
||||
getLocalTime: utils_util.getLocaleTime
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.newsInfo = JSON.parse(decodeURIComponent(e.info));
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_navBar2 = common_vendor.resolveComponent("navBar");
|
||||
const _easycom_ua_markdown2 = common_vendor.resolveComponent("ua-markdown");
|
||||
(_easycom_navBar2 + _easycom_ua_markdown2)();
|
||||
}
|
||||
const _easycom_navBar = () => "../../../components/navBar/navBar.js";
|
||||
const _easycom_ua_markdown = () => "../../../components/ua-markdown/ua-markdown.js";
|
||||
if (!Math) {
|
||||
(_easycom_navBar + _easycom_ua_markdown)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.p({
|
||||
leftText: "历史时间轴",
|
||||
hideNavBg: true
|
||||
}),
|
||||
b: common_assets._imports_0,
|
||||
c: $data.newsInfo
|
||||
}, $data.newsInfo ? {
|
||||
d: common_vendor.t($data.newsInfo.title),
|
||||
e: common_vendor.t($data.getLocalTime($data.newsInfo.published_time)),
|
||||
f: common_vendor.p({
|
||||
source: $data.newsInfo.detail
|
||||
}),
|
||||
g: common_vendor.s("top: " + $data.navH + "px;")
|
||||
} : {});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/concept/newsDetails/newsDetails.js.map
|
||||
7
unpackage/dist/dev/mp-weixin/pages/concept/newsDetails/newsDetails.json
vendored
Normal file
7
unpackage/dist/dev/mp-weixin/pages/concept/newsDetails/newsDetails.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"nav-bar": "../../../components/navBar/navBar",
|
||||
"ua-markdown": "../../../components/ua-markdown/ua-markdown"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/concept/newsDetails/newsDetails.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/concept/newsDetails/newsDetails.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="07f56b32-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view wx:if="{{c}}" class="contentC fixed" style="{{g}}"><view class="title">{{d}}</view><view class="labelTimeC"><text class="time">{{e}}</text></view><view class="content"><ua-markdown wx:if="{{f}}" u-i="07f56b32-1" bind:__l="__l" u-p="{{f}}"/></view></view></view>
|
||||
36
unpackage/dist/dev/mp-weixin/pages/concept/newsDetails/newsDetails.wxss
vendored
Normal file
36
unpackage/dist/dev/mp-weixin/pages/concept/newsDetails/newsDetails.wxss
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
page {
|
||||
background-color: #070707;
|
||||
}
|
||||
.topBg {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.contentC {
|
||||
background-color: #FFF9F5;
|
||||
margin: 20rpx 25rpx 0;
|
||||
padding: 28rpx 30rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 100rpx;
|
||||
border-radius: 10rpx;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.contentC .title {
|
||||
margin: 0 10rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #2B2B2B;
|
||||
}
|
||||
.contentC .labelTimeC {
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
.contentC .labelTimeC .time {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
.contentC .content {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
46
unpackage/dist/dev/mp-weixin/pages/concept/reportDetails/reportDetails.js
vendored
Normal file
46
unpackage/dist/dev/mp-weixin/pages/concept/reportDetails/reportDetails.js
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const utils_util = require("../../../utils/util.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
navH: common_vendor.inject("navHeight"),
|
||||
reportInfo: null,
|
||||
getLocalTime: utils_util.getLocaleTime,
|
||||
content: ""
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.reportInfo = JSON.parse(decodeURIComponent(e.info));
|
||||
this.reportInfo.content = this.reportInfo.content.replace(/'/g, '"');
|
||||
common_vendor.index.__f__("log", "at pages/concept/reportDetails/reportDetails.vue:34", JSON.parse(this.reportInfo.content));
|
||||
this.content = JSON.parse(this.reportInfo.content).content;
|
||||
}
|
||||
};
|
||||
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,
|
||||
c: $data.reportInfo
|
||||
}, $data.reportInfo ? {
|
||||
d: common_vendor.t($data.reportInfo.report_title),
|
||||
e: common_vendor.t($data.getLocalTime($data.reportInfo.declare_date)),
|
||||
f: common_vendor.t($data.content ? $data.content : $data.reportInfo.content),
|
||||
g: common_vendor.s("top: " + $data.navH + "px;")
|
||||
} : {});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/concept/reportDetails/reportDetails.js.map
|
||||
6
unpackage/dist/dev/mp-weixin/pages/concept/reportDetails/reportDetails.json
vendored
Normal file
6
unpackage/dist/dev/mp-weixin/pages/concept/reportDetails/reportDetails.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"nav-bar": "../../../components/navBar/navBar"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/concept/reportDetails/reportDetails.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/concept/reportDetails/reportDetails.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="d1d5b3b6-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view wx:if="{{c}}" class="contentC fixed" style="{{g}}"><view class="title">{{d}}</view><view class="labelTimeC"><text class="time">{{e}}</text></view><view class="content"><text>{{f}}</text></view></view></view>
|
||||
36
unpackage/dist/dev/mp-weixin/pages/concept/reportDetails/reportDetails.wxss
vendored
Normal file
36
unpackage/dist/dev/mp-weixin/pages/concept/reportDetails/reportDetails.wxss
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
page {
|
||||
background-color: #070707;
|
||||
}
|
||||
.topBg {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.contentC {
|
||||
background-color: #FFF9F5;
|
||||
margin: 20rpx 25rpx 0;
|
||||
padding: 28rpx 30rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 100rpx;
|
||||
border-radius: 10rpx;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.contentC .title {
|
||||
margin: 0 10rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #2B2B2B;
|
||||
}
|
||||
.contentC .labelTimeC {
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
.contentC .labelTimeC .time {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
.contentC .content {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user