8.28 修改事件详情相关概念模块样式,增加股票详情信息来源展示

This commit is contained in:
尚政杰
2025-08-28 17:42:22 +08:00
parent 58b3414bdd
commit bf2388c3ec
403 changed files with 19843 additions and 1602 deletions

View File

@@ -1,29 +1,22 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
const common_assets = require("../../../common/assets.js");
const _sfc_main = {
data() {
return {
navH: common_vendor.inject("navHeight")
navH: common_vendor.inject("navHeight"),
url: ""
};
},
onLoad(e) {
if (e.name) {
this.url = "https://valuefrontier.cn/htmls/" + e.name + ".html";
}
},
methods: {}
};
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 {
a: common_vendor.p({
leftText: "相关概念详情"
}),
b: common_assets._imports_0,
c: common_vendor.s("top:" + $data.navH + "px;")
a: $data.url
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);

View File

@@ -1,6 +1,6 @@
{
"navigationBarTitleText": "",
"usingComponents": {
"nav-bar": "../../../components/navBar/navBar"
}
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black",
"usingComponents": {}
}

View File

@@ -1 +1 @@
<view><nav-bar wx:if="{{a}}" u-i="5d0be61e-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="conceptDetailsC fixed" style="{{c}}"><view class="title">外骨骼机器人(250501)</view><view class="time">2025-05-08 08:43</view><view class="content">四部门联合启动的人力资源服务业与制造业融合发展试点,主要目的是推动人力资源服务向高端制造渗透,促进产业升级。而外骨骼机器人属于高端制造领域的重要创新产品之一,其发展需要人力资源服务业的支持,例如技术人才的输送、产业工人培训等。同时,外骨骼机器人在消费级市场的推广和应用也符合制造业与服务业融合发展的方向。因此,该政策试点对外骨骼机器人行业具有潜在利好影响。</view></view></view>
<view><web-view src="{{a}}"></web-view></view>

View File

@@ -3,6 +3,7 @@ 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 echarts = require("../../../uni_modules/lime-echart/static/echarts.min.js");
const _sfc_main = {
data() {
return {
@@ -12,7 +13,7 @@ const _sfc_main = {
//事件id
eventDetails: null,
//事件详情
categoryList: ["相关标的", "相关概念", "历史事件", "时间传导链分析", "关联数据"],
categoryList: ["相关标的", "相关概念", "历史事件"],
targetList: [],
//相关标的
conceptList: [],
@@ -23,14 +24,81 @@ const _sfc_main = {
//历史事件相关股票
selectCategory: 0,
headingList: ["名称代码", "分时图", "开盘价", "最新价", "涨跌幅"],
getLocaleHourMinute: utils_util.getLocaleHourMinute,
getLocaleTime: utils_util.getLocaleTime,
getRateUpOrDown: utils_util.getRateUpOrDown,
getRateStr: utils_util.getRateStr,
scoreTop: "",
eventComment: "",
//事件评论
expectScore: 0
expectScore: 0,
//预期得分
commentList: [],
//评价列表
eventComment: "",
//事件评论内容
replyId: "",
//回复评论id
replyPid: "",
//回复评论父级id
isFocus: false,
//是否获取焦点
replyComment: "",
//评论回复内容
option: {
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow"
},
confine: true
},
grid: {
left: "0%",
right: "0%",
top: "0%",
bottom: "20%"
},
xAxis: [
{
type: "category",
data: [],
axisTick: {
show: false
},
axisLine: {
show: false
}
}
],
yAxis: [
{
type: "value",
show: false,
axisTick: { show: false },
scale: true
}
],
series: {
name: "分时图",
type: "line",
label: {
show: true,
position: "top",
fontSize: 12
},
data: [],
itemStyle: {
color: ""
},
markLine: {
symbol: ["none", "none"],
lineStyle: {
color: "#AAAAAA",
type: "dashed"
},
data: []
}
}
}
};
},
onLoad(e) {
@@ -41,6 +109,30 @@ const _sfc_main = {
}
},
methods: {
async init() {
let that = this;
setTimeout(function() {
that.targetList.map(function(item, index) {
const chartDom = that.$refs["chartRef" + index][0];
chartDom.init(echarts).then((res) => {
let option = { ...that.option };
let valueData = [];
for (let item1 of item.minute_chart_data) {
valueData.push(item1.close);
}
option.series.data = valueData;
let firstOpen = item.minute_chart_data[0].open;
option.series.markLine.data = [{ yAxis: firstOpen }];
let lastClose = item.minute_chart_data.slice(-1)[0].close;
if (lastClose >= firstOpen) {
option.series.itemStyle.color = "#EF5350";
} else
option.series.itemStyle.color = "#26A69A";
res.setOption(option);
});
});
}, 300);
},
/**
* 点击切换分类
*/
@@ -61,15 +153,15 @@ const _sfc_main = {
*/
clickStockItem(code) {
common_vendor.index.navigateTo({
url: "/pages/index/stockDetails/stockDetails?code=" + code
url: "/pages/index/stockDetails/stockDetails?type=1&code=" + code + "&id=" + this.eventId
});
},
/**
* 点击查看相关概念
*/
clickConceptItem() {
clickConceptItem(name) {
common_vendor.index.navigateTo({
url: "/pages/index/conceptDetails/conceptDetails"
url: "/pages/index/conceptDetails/conceptDetails?name=" + name
});
},
/**
@@ -106,6 +198,14 @@ const _sfc_main = {
let eventId = this.eventId;
let param = { content: this.eventComment };
request_api.commentEvent(eventId, param).then((res) => {
common_vendor.index.showToast({
title: res.message,
icon: "none"
});
let that = this;
setTimeout(function() {
that.getEventCommentListData();
}, 1e3);
}).catch((error) => {
});
},
@@ -126,7 +226,7 @@ const _sfc_main = {
*/
clickFollow() {
let eventId = this.eventId;
followEvent(eventId).then((res) => {
request_api.followEvent(eventId).then((res) => {
common_vendor.index.showToast({
title: res.message,
icon: "none"
@@ -134,6 +234,47 @@ const _sfc_main = {
}).catch((error) => {
});
},
/**
* 点击回复评论
*/
clickReplyComment(id, pid) {
this.replyId = id;
if (pid) {
this.replyPid = pid;
}
this.isFocus = true;
},
sendReplyComment() {
if (!this.replyComment) {
common_vendor.index.showToast({
title: "请输入评论内容",
icon: "none"
});
return;
}
let param = { content: this.replyComment };
if (this.replyPid) {
param.parent_id = this.replyPid;
}
request_api.replyComment(this.replyId, param).then((res) => {
}).catch((error) => {
});
},
/**
* 点赞评论
*/
clickLikeComment(id, index, cindex) {
request_api.likeEventComment(id).then((res) => {
common_vendor.index.showToast({
title: res.message,
icon: "none"
});
if (cindex == -1) {
this.commentList[index].likes_count = res.likes_count;
}
}).catch((error) => {
});
},
/**
* 获取事件相关标的数据
*/
@@ -143,6 +284,7 @@ const _sfc_main = {
if (res.code == 200) {
this.eventDetails = res.data;
this.targetList = res.data.related_stocks;
this.init();
} else
common_vendor.index.showToast({
title: res.message,
@@ -155,15 +297,10 @@ const _sfc_main = {
* 获取事件相关概念数据
*/
getEventRelatedConceptData() {
let eventId = this.eventId;
request_api.eventRelatedConcept(eventId).then((res) => {
if (res.code == 200) {
this.conceptList = res.data.related_concepts;
} else
common_vendor.index.showToast({
title: res.message,
icon: "none"
});
let eventDetails = this.eventDetails;
let param = { query: eventDetails.event_title, size: 4, page: 1, sort_by: "_score", isJson: 1 };
request_api.eventRelatedConcept(param).then((res) => {
this.conceptList = res.results;
}).catch((error) => {
});
},
@@ -190,7 +327,7 @@ const _sfc_main = {
getEventCommentListData() {
let eventId = this.eventId;
request_api.eventCommentList(eventId).then((res) => {
this.commentList = res.data.comments;
this.commentList = res.data.posts;
}).catch((error) => {
});
}
@@ -198,13 +335,15 @@ const _sfc_main = {
};
if (!Array) {
const _easycom_navBar2 = common_vendor.resolveComponent("navBar");
const _easycom_l_echart2 = common_vendor.resolveComponent("l-echart");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
(_easycom_navBar2 + _easycom_uni_popup2)();
(_easycom_navBar2 + _easycom_l_echart2 + _easycom_uni_popup2)();
}
const _easycom_navBar = () => "../../../components/navBar/navBar.js";
const _easycom_l_echart = () => "../../../uni_modules/lime-echart/components/l-echart/l-echart.js";
const _easycom_uni_popup = () => "../../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
(_easycom_navBar + _easycom_uni_popup)();
(_easycom_navBar + _easycom_l_echart + _easycom_uni_popup)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
@@ -243,96 +382,133 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.t(item.stock_name),
b: common_vendor.t(item.stock_code),
c: common_vendor.t(item.trade_data.open_price),
d: common_vendor.t(item.trade_data.latest_price),
e: common_vendor.t(item.trade_data.change_pct),
f: common_vendor.n("chg flex1 " + ($data.getRateUpOrDown(item.trade_data.change_pct) ? "down" : "up")),
g: common_vendor.t(item.relation_desc),
h: index,
i: common_vendor.o(($event) => $options.clickStockItem(item.stock_code), index)
c: common_vendor.sr("chartRef" + index, "6e1a61f1-1-" + i0, {
"f": 1
}),
d: "chartRef" + index,
e: "6e1a61f1-1-" + i0,
f: common_vendor.t(item.trade_data ? item.trade_data.open_price : ""),
g: common_vendor.t(item.trade_data ? item.trade_data.latest_price : ""),
h: common_vendor.t(item.trade_data ? item.trade_data.change_pct : ""),
i: common_vendor.n("chg flex1 " + ($data.getRateUpOrDown(item.trade_data ? item.trade_data.change_pct : "") ? "down" : "up")),
j: common_vendor.t(item.relation_desc),
k: index,
l: common_vendor.o(($event) => $options.clickStockItem(item.stock_code), index)
};
})
} : {}, {
m: $data.selectCategory == 1
}, $data.selectCategory == 1 ? {
n: common_vendor.f($data.conceptList, (item, index, i0) => {
return {
a: item.first_image,
b: common_vendor.t(item.concept),
c: common_vendor.t(item.reason),
d: index,
e: common_vendor.o(($event) => $options.clickConceptItem(), index)
};
})
} : {}, {
o: $data.selectCategory == 2
}, $data.selectCategory == 2 ? {
p: common_assets._imports_1$4,
q: common_vendor.t($data.expectScore),
r: common_assets._imports_2$6,
s: common_vendor.o(($event) => $options.clickExpectScore($event)),
t: common_vendor.f($data.historyEventList, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.title),
b: common_vendor.t(item.content),
c: $data.getRateUpOrDown(item.related_avg_chg)
}, $data.getRateUpOrDown(item.related_avg_chg) ? {
d: common_assets._imports_1$1
a: $data.getRateUpOrDown(item.price_info.avg_change_pct)
}, $data.getRateUpOrDown(item.price_info.avg_change_pct) ? {
b: common_assets._imports_1$4
} : {
e: common_assets._imports_2$2
c: common_assets._imports_2$6
}, {
f: common_vendor.t($data.getRateStr(item.related_avg_chg)),
g: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_avg_chg) ? "down" : "up")),
h: $data.getRateUpOrDown(item.related_max_chg)
}, $data.getRateUpOrDown(item.related_max_chg) ? {
i: common_assets._imports_1$1
} : {
j: common_assets._imports_2$2
}, {
k: common_vendor.t($data.getRateStr(item.related_max_chg)),
l: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_max_chg) ? "down" : "up")),
m: common_vendor.o(($event) => $options.clickLookHistoricalEventRelatedStock(item), index),
n: common_vendor.t($data.getLocaleTime(item.event_date)),
o: index
d: common_vendor.t($data.getRateStr(item.price_info.avg_change_pct)),
e: common_vendor.n("rateC absolute " + ($data.getRateUpOrDown(item.price_info.avg_change_pct) ? "down" : "up")),
f: common_vendor.t(item.stock_count),
g: common_vendor.t(item.concept),
h: common_vendor.t(item.description),
i: common_vendor.t(item.price_info.trade_date),
j: common_vendor.f(item.stocks, (item2, index2, i1) => {
return {
a: common_vendor.t(item2.stock_name),
b: index2
};
}),
k: common_vendor.t(item.happened_times[0] + (item.happened_times.length > 1 ? "(共" + item.happened_times.length + "次)" : "")),
l: index,
m: common_vendor.o(($event) => $options.clickConceptItem(item.concept), index)
});
}),
v: common_assets._imports_1$4
o: common_assets._imports_3$4
} : {}, {
w: common_vendor.s("top:" + $data.navH + "px;")
p: $data.selectCategory == 2
}, $data.selectCategory == 2 ? {
q: common_assets._imports_4$2,
r: common_vendor.t($data.expectScore),
s: common_assets._imports_5$1,
t: common_vendor.o(($event) => $options.clickExpectScore($event)),
v: common_vendor.f($data.historyEventList, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.title),
b: common_vendor.t(item.relevance * 10),
c: common_vendor.t(item.content),
d: $data.getRateUpOrDown(item.related_avg_chg)
}, $data.getRateUpOrDown(item.related_avg_chg) ? {
e: common_assets._imports_1$1
} : {
f: common_assets._imports_2$2
}, {
g: common_vendor.t($data.getRateStr(item.related_avg_chg)),
h: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_avg_chg) ? "down" : "up")),
i: $data.getRateUpOrDown(item.related_max_chg)
}, $data.getRateUpOrDown(item.related_max_chg) ? {
j: common_assets._imports_1$1
} : {
k: common_assets._imports_2$2
}, {
l: common_vendor.t($data.getRateStr(item.related_max_chg)),
m: common_vendor.n("rateItem " + ($data.getRateUpOrDown(item.related_max_chg) ? "down" : "up")),
n: common_vendor.o(($event) => $options.clickLookHistoricalEventRelatedStock(item), index),
o: common_vendor.t($data.getLocaleTime(item.event_date)),
p: index
});
}),
w: common_assets._imports_4$2
} : {}, {
x: common_vendor.s("top:" + $data.navH + "px;")
}) : {}, {
x: $data.eventDetails
y: $data.eventDetails
}, $data.eventDetails ? {
y: common_vendor.o(($event) => $options.sendEventComment()),
z: $data.eventComment,
A: common_vendor.o(($event) => $data.eventComment = $event.detail.value),
B: common_assets._imports_3,
C: common_vendor.t($data.eventDetails.view_count),
D: common_assets._imports_4,
E: common_vendor.t($data.eventDetails.post_count),
F: common_vendor.o(($event) => $options.clickComment()),
G: common_assets._imports_7,
H: common_vendor.t($data.eventDetails.follower_count),
I: common_vendor.o(($event) => $options.clickFollow())
z: common_vendor.o(($event) => $options.sendEventComment()),
A: $data.eventComment,
B: common_vendor.o(($event) => $data.eventComment = $event.detail.value),
C: common_assets._imports_3,
D: common_vendor.t($data.eventDetails.view_count),
E: common_assets._imports_4,
F: common_vendor.t($data.eventDetails.post_count),
G: common_vendor.o(($event) => $options.clickComment()),
H: common_assets._imports_10,
I: common_vendor.t($data.eventDetails.follower_count),
J: common_vendor.o(($event) => $options.clickFollow())
} : {}, {
J: common_assets._imports_8,
K: common_vendor.o(($event) => $options.closeCommentPopup()),
L: common_assets._imports_9,
M: common_assets._imports_10,
N: common_assets._imports_9,
O: common_vendor.sr("popup", "6e1a61f1-1"),
P: common_vendor.p({
K: common_assets._imports_11,
L: common_vendor.o(($event) => $options.closeCommentPopup()),
M: common_vendor.f($data.commentList, (item, index, i0) => {
return {
a: item.user.avatar_url,
b: common_vendor.t(item.user.username),
c: common_vendor.t(item.content),
d: common_vendor.t($data.getLocaleHourMinute(item.created_at)),
e: common_vendor.o(($event) => $options.clickReplyComment(item.post_id), index),
f: common_vendor.t(item.likes_count),
g: common_vendor.o(($event) => $options.clickLikeComment(item.post_id, index, -1), index),
h: index
};
}),
N: common_assets._imports_12,
O: $data.isFocus,
P: common_vendor.o(($event) => $options.sendReplyComment()),
Q: $data.replyComment,
R: common_vendor.o(($event) => $data.replyComment = $event.detail.value),
S: common_vendor.sr("popup", "6e1a61f1-2"),
T: common_vendor.p({
type: "bottom"
}),
Q: common_assets._imports_11$1,
R: common_vendor.s("margin-top:" + $data.scoreTop + "px;"),
S: common_vendor.sr("expectScorePopup", "6e1a61f1-2"),
T: common_vendor.p({
U: common_assets._imports_13$1,
V: common_vendor.s("margin-top:" + $data.scoreTop + "px;"),
W: common_vendor.sr("expectScorePopup", "6e1a61f1-3"),
X: common_vendor.p({
type: "top",
["mask-background-color"]: "transparent"
}),
U: common_assets._imports_8,
V: common_vendor.o(($event) => $options.closeRelatedStockPopup()),
W: common_vendor.f($data.historyEventRelatedStockList, (item, index, i0) => {
Y: common_assets._imports_11,
Z: common_vendor.o(($event) => $options.closeRelatedStockPopup()),
aa: common_vendor.f($data.historyEventRelatedStockList, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.stock_name + "(" + item.stock_code + ")"),
b: common_vendor.t(item.correlation * 100),
@@ -344,13 +520,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
f: common_assets._imports_2$2
}, {
g: common_vendor.t($data.getRateStr(item.daily_change)),
h: common_vendor.t(item.relation_desc),
i: index,
j: common_vendor.o(($event) => $options.clickStockItem(item.stock_code), index)
h: common_vendor.n("rateC " + ($data.getRateUpOrDown(item.daily_change) ? "down" : "up")),
i: common_vendor.t(item.relation_desc),
j: index,
k: common_vendor.o(($event) => $options.clickStockItem(item.stock_code), index)
});
}),
X: common_vendor.sr("stockPopup", "6e1a61f1-3"),
Y: common_vendor.p({
ab: common_vendor.sr("stockPopup", "6e1a61f1-4"),
ac: common_vendor.p({
type: "bottom"
})
});

View File

@@ -2,6 +2,7 @@
"navigationBarTitleText": "",
"usingComponents": {
"nav-bar": "../../../components/navBar/navBar",
"l-echart": "../../../uni_modules/lime-echart/components/l-echart/l-echart",
"uni-popup": "../../../uni_modules/uni-popup/components/uni-popup/uni-popup"
}
}

File diff suppressed because one or more lines are too long

View File

@@ -118,42 +118,119 @@
.eventDetailsC .conceptList {
padding: 30rpx 25rpx;
}
.eventDetailsC .conceptList .item {
margin-bottom: 20rpx;
}
.eventDetailsC .conceptList .item .cover {
display: block;
width: 100%;
height: 350rpx;
.eventDetailsC .conceptList .conceptItem {
box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.05);
margin: 0 30rpx 30rpx 0;
width: calc((100% - 30rpx)/2);
border-radius: 10rpx;
}
.eventDetailsC .conceptList .item .infoC {
background: linear-gradient(to bottom, #00000080, #000);
padding: 20rpx 23rpx;
left: 0;
.eventDetailsC .conceptList .conceptItem .coverC .cover {
display: block;
width: 100%;
bottom: 0;
border-radius: ;
height: 220rpx;
}
.eventDetailsC .conceptList .conceptItem .coverC .rateC {
top: 12rpx;
left: 12rpx;
padding: 0 10rpx;
line-height: 40rpx;
border-radius: 20rpx;
font-size: 18rpx;
font-weight: 500;
color: white;
}
.eventDetailsC .conceptList .item .infoC .title {
.eventDetailsC .conceptList .conceptItem .coverC .rateC .icon {
width: 11rpx;
height: auto;
}
.eventDetailsC .conceptList .conceptItem .coverC .rateC.up {
background-color: #E53E3E;
}
.eventDetailsC .conceptList .conceptItem .coverC .rateC.down {
background-color: #38A169;
}
.eventDetailsC .conceptList .conceptItem .coverC .totalC {
background: linear-gradient(-90deg, #FAC915 0%, #F18D10 100%);
top: 12rpx;
right: 12rpx;
padding: 0 9rpx;
line-height: 40rpx;
border-radius: 20rpx;
font-size: 20rpx;
color: white;
}
.eventDetailsC .conceptList .conceptItem .infoC {
padding: 20rpx 23rpx;
}
.eventDetailsC .conceptList .conceptItem .infoC .title {
font-size: 26rpx;
font-weight: bold;
color: #222;
}
.eventDetailsC .conceptList .item .infoC .content {
.eventDetailsC .conceptList .conceptItem .infoC .content {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
margin-top: 10rpx;
line-height: 1.2rem;
font-size: 20rpx;
font-weight: 500;
line-height: 1.2rem;
color: #666;
}
.eventDetailsC .conceptList .item .infoC .content .lookDetails {
right: 0;
.eventDetailsC .conceptList .conceptItem .infoC .transactionDate {
margin-top: 12rpx;
font-size: 22rpx;
font-weight: 500;
color: #AAA;
}
.eventDetailsC .conceptList .conceptItem .infoC .hotStockC {
background-color: #F7FAFC;
margin-top: 16rpx;
padding: 10rpx 13rpx;
border-radius: 5rpx;
}
.eventDetailsC .conceptList .conceptItem .infoC .hotStockC .titleC {
font-size: 20rpx;
font-weight: 500;
color: #666;
}
.eventDetailsC .conceptList .conceptItem .infoC .hotStockC .titleC .arrow {
width: 6rpx;
height: auto;
}
.eventDetailsC .conceptList .conceptItem .infoC .hotStockC .stockList {
margin-top: 10rpx;
height: 35rpx;
overflow: hidden;
}
.eventDetailsC .conceptList .conceptItem .infoC .hotStockC .stockList .item {
background-color: #FFEADC;
margin: 0 5rpx 5rpx 0;
padding: 0 9rpx;
line-height: 30rpx;
border-radius: 5rpx;
font-size: 18rpx;
font-weight: 500;
color: #F97316;
}
.eventDetailsC .conceptList .conceptItem .infoC .dateHistoryTimeC {
margin-top: 10rpx;
font-size: 20rpx;
}
.eventDetailsC .conceptList .conceptItem .infoC .dateHistoryTimeC .date {
color: #666;
}
.eventDetailsC .conceptList .conceptItem .infoC .dateHistoryTimeC .historyTimeC {
background-color: #F97316;
padding: 0 6rpx;
line-height: 38rpx;
border-radius: 5rpx;
color: white;
}
.eventDetailsC .conceptList .conceptItem:nth-child(2n) {
margin-right: 0;
}
.eventDetailsC .historyEventList {
padding: 34rpx 25rpx;
}
@@ -545,7 +622,6 @@
color: #F6604A;
}
.stockPopup .list .item .sectorRateC .rateC {
background-color: #C00000;
display: inline-block;
padding: 0 10rpx;
height: 30rpx;
@@ -558,6 +634,12 @@
width: 15rpx;
height: auto;
}
.stockPopup .list .item .sectorRateC .rateC.up {
background-color: #C00000;
}
.stockPopup .list .item .sectorRateC .rateC.down {
background-color: #355422;
}
.stockPopup .list .item .content {
margin-top: 16rpx;
font-size: 24rpx;

View File

@@ -45,10 +45,20 @@ const _sfc_main = {
//选中月份下标
selectMonth: "",
//选中年月
industryTopCategoryList: [],
//行业一级分类
industryCategoryList: [],
//行业分类数组
industryKeywords: "",
//行业分类搜索关键词
searchResultList: [],
//行业分类搜索结果数组
selectIndustryTopCategory: 0,
//
//选中行业一级分类
selectIndustrySecondCategory: -1,
//选中行业二级分类
selectIndustryThirdCategory: -1,
//选中行业三级分类
selectIndustryForthCategory: -1,
//选中行业四级分类
selectScreenCategory: 0,
importanceList: [],
//重要性数组
@@ -65,7 +75,7 @@ const _sfc_main = {
grid: {
left: "0%",
right: "0%",
top: "0%",
top: "10%",
bottom: "20%"
},
xAxis: [
@@ -105,71 +115,10 @@ const _sfc_main = {
position: "top",
fontSize: 12
},
data: [
{
value: 0,
itemStyle: { color: "#355422" },
label: {
textStyle: { color: "#355422" }
}
},
{
value: 44,
itemStyle: { color: "#35542299" },
label: {
textStyle: { color: "#355422" }
}
},
{
value: 315,
itemStyle: { color: "#355422CC" },
label: {
textStyle: { color: "#355422" }
}
},
{
value: 1264,
itemStyle: { color: "#355422" },
label: {
textStyle: { color: "#355422" }
}
},
{
value: 1064,
itemStyle: { color: "#ACB0C0" },
label: {
textStyle: { color: "#666" }
}
},
{
value: 1809,
itemStyle: { color: "#C00000" },
label: {
textStyle: { color: "#C00000" }
}
},
{
value: 602,
itemStyle: { color: "#C00000CC" },
label: {
textStyle: { color: "#C00000" }
}
},
{
value: 44,
itemStyle: { color: "#C0000099" },
label: {
textStyle: { color: "#C00000" }
}
},
{
value: 0,
itemStyle: { color: "#C00000" },
label: {
textStyle: { color: "#C00000" }
}
}
]
itemStyle: {
borderRadius: [5, 5, 0, 0]
},
data: []
}
]
},
@@ -182,13 +131,13 @@ const _sfc_main = {
};
},
onLoad() {
this.contentTop = this.navH + (75 + 20) / 750 * this.windowWidth;
this.contentTop = this.navH + (74 + 20) / 750 * this.windowWidth;
this.listTop = this.contentTop + (22 + 80 + 72) / 750 * this.windowWidth;
this.sortListTop = this.navH + (22 + 80 + 80) / 750 * this.windowWidth;
this.getEventFilterListData();
this.getEventListData();
this.getIndustryCategoryListData();
this.getStockCategoryListData();
Promise.all([this.getEventFilterListData(), this.getIndustryCategoryListData(), this.getStockCategoryListData()]).then((res) => {
this.getEventListData();
}).catch((error) => {
});
let currentDate = /* @__PURE__ */ new Date();
let currentYear = currentDate.getFullYear();
let currentMonth = currentDate.getMonth() + 1;
@@ -347,12 +296,17 @@ const _sfc_main = {
clickTopCategoryItem(event, index) {
if (this.selectTopCategory != index) {
this.selectTopCategory = index;
this.selectSecondCategory = 0;
let offsetLeft = event.currentTarget.offsetLeft;
this.topScrollLeft = offsetLeft - this.topScrollWidth / 2;
if (index == 0) {
this.listTop = this.contentTop + (22 + 80 + 72) / 750 * this.windowWidth;
} else
this.listTop = this.contentTop + (22 + 80 + 72 + 44 + 44) / 750 * this.windowWidth;
this.listTop = this.contentTop + (22 + 80 + 72 + 42 + 42) / 750 * this.windowWidth;
if (this.selectTimeCategory == 0) {
this.getEventListData();
} else
this.getHotEventListData();
}
},
/**
@@ -364,6 +318,10 @@ const _sfc_main = {
this.selectSecondCategory = index;
let offsetLeft = event.currentTarget.offsetLeft;
this.secondScrollLeft = offsetLeft - this.secondScrollWidth / 2;
if (this.selectTimeCategory == 0) {
this.getEventListData();
} else
this.getHotEventListData();
}
},
/**
@@ -425,11 +383,121 @@ const _sfc_main = {
/**
* 选择行业分类一级分类
*/
clickSelectIndustryTopCategoryItem(index) {
clickIndustryTopCategoryItem(index) {
if (this.selectIndustryTopCategory != index) {
this.selectIndustryTopCategory = index;
}
},
/**
* 行业分类搜索
*/
industrySearch(e) {
let keywords = e.detail.value;
this.industryKeywords = keywords;
let arr = [];
for (let item of this.industryCategoryList) {
let index = this.industryCategoryList.indexOf(item);
for (let item1 of item.hierarchy) {
let index1 = item.hierarchy.indexOf(item1);
let arr1 = [];
if (item1.level1_sector.indexOf(keywords) > -1) {
arr1.push(item1);
arr.push({ classification_name: item.classification_name, hierarchy: arr1 });
}
for (let item2 of item1.level2_sectors) {
let index2 = item1.level2_sectors.indexOf(item2);
let arr2 = [];
if (item2.level2_sector.indexOf(keywords) > -1) {
arr2.push(item2);
arr1.push({ level1_sector: item1.level1_sector, level2_sectors: arr2 });
arr.push({ classification_name: item.classification_name, hierarchy: arr1 });
}
for (let item3 of item2.level3_sectors) {
let index3 = item2.level3_sectors.indexOf(item3);
let arr3 = [];
if (item3.level3_sector.indexOf(keywords) > -1) {
item3.index = index;
item3.index1 = index1;
item3.index2 = index2;
item3.index3 = index3;
arr3.push(item3);
arr2.push({ level2_sector: item2.level2_sector, level3_sectors: arr3 });
arr1.push({ level1_sector: item1.level1_sector, level2_sectors: arr2 });
arr.push({ classification_name: item.classification_name, hierarchy: arr1 });
}
}
}
}
}
this.searchResultList = arr;
},
/**
* 点击选择搜索结果
* @param {Object} item
*/
clickIndustrySearchItem(item) {
this.industryKeywords = "";
this.selectIndustryTopCategory = item.index;
this.selectIndustrySecondCategory = item.index1;
this.selectIndustryThirdCategory = item.index2;
this.selectIndustryForthCategory = item.index3;
},
/**
* 选择行业分类二级分类
*/
clickIndustrySecondCategoryItem(index) {
if (this.selectIndustrySecondCategory != index) {
this.selectIndustrySecondCategory = index;
}
this.industryCategoryList[this.selectIndustryTopCategory].hierarchy[index].isSpread = !this.industryCategoryList[this.selectIndustryTopCategory].hierarchy[index].isSpread;
},
/**
* 选择行业分类三级分类
*/
clickIndustryThirdCategoryItem(sindex, index) {
if (this.selectIndustrySecondCategory != sindex) {
this.selectIndustrySecondCategory = sindex;
}
if (this.selectIndustryThirdCategory != index) {
this.selectIndustryThirdCategory = index;
}
this.industryCategoryList[this.selectIndustryTopCategory].hierarchy[sindex].level2_sectors[index].isSpread = !this.industryCategoryList[this.selectIndustryTopCategory].hierarchy[sindex].level2_sectors[index].isSpread;
},
/**
* 选择行业分类四级分类
*/
clickIndustryForthCategoryItem(sindex, tindex, index) {
if (this.selectIndustrySecondCategory != sindex) {
this.selectIndustrySecondCategory = sindex;
}
if (this.selectIndustryThirdCategory != tindex) {
this.selectIndustryThirdCategory = tindex;
}
if (this.selectIndustryForthCategory != index) {
this.selectIndustryForthCategory = index;
}
},
/**
* 删除选中的行业二级分类
*/
deleteIndustrySecondCategoryItem() {
this.selectIndustrySecondCategory = -1;
this.selectIndustryThirdCategory = -1;
this.selectIndustryForthCategory = -1;
},
/**
* 删除选中的行业三级分类
*/
deleteIndustryThirdCategoryItem() {
this.selectIndustryThirdCategory = -1;
this.selectIndustryForthCategory = -1;
},
/**
* 删除选中的行业四级分类
*/
deleteIndustryForthCategoryItem() {
this.selectIndustryForthCategory = -1;
},
/**
* 点击选择重要性
*/
@@ -447,11 +515,12 @@ const _sfc_main = {
},
/**
* 点击相关股票
* @param {Object} code
* @param {Object} id 事件id
* @param {Object} code 股票代码
*/
clickLookRelatedStockItem(code) {
clickLookRelatedStockItem(id, code) {
common_vendor.index.navigateTo({
url: "/pages/index/stockDetails/stockDetails?code=" + code
url: "/pages/index/stockDetails/stockDetails?type=1&code=" + code + "&id=" + id
});
},
/**
@@ -479,66 +548,88 @@ const _sfc_main = {
* 获取事件筛选项
*/
getEventFilterListData() {
request_api.filterOptions().then((res) => {
if (res.code == 200) {
let timeList = [...res.data.sort_options];
this.timeCategoryList = timeList.splice(0, 2);
let sortList = [...res.data.sort_options];
for (let item of sortList) {
if (item.name == "最新") {
item.icon = "/static/icon/home/new.png";
}
if (item.name == "热门") {
item.icon = "/static/icon/home/hot.png";
}
if (item.name == "收益率") {
item.icon = "/static/icon/home/yield.png";
return new Promise((resolve, reject) => {
request_api.filterOptions().then((res) => {
if (res.code == 200) {
resolve(1);
let timeList = [...res.data.sort_options];
this.timeCategoryList = timeList.splice(0, 2);
let sortList = [...res.data.sort_options];
for (let item of sortList) {
if (item.name == "最新") {
item.icon = "/static/icon/home/new.png";
}
if (item.name == "热门") {
item.icon = "/static/icon/home/hot.png";
}
if (item.name == "收益率") {
item.icon = "/static/icon/home/yield.png";
}
}
this.sortList = res.data.sort_options.splice(0, 3);
this.importanceList = res.data.importance_options;
this.importanceList.unshift({ desc: "全部", key: "all", name: "全部" });
} else {
reject(1);
common_vendor.index.showToast({
title: res.message,
icon: "none"
});
}
this.sortList = res.data.sort_options.splice(0, 3);
this.importanceList = res.data.importance_options;
this.importanceList.unshift({ desc: "全部", key: "all", name: "全部" });
} else
common_vendor.index.showToast({
title: res.message,
icon: "none"
});
}).catch((error) => {
}).catch((error) => {
reject(1);
});
});
},
/**
* 获取行业分类
*/
getIndustryCategoryListData() {
request_api.industryCategoryList().then((res) => {
this.industryTopCategoryList = res.data;
}).catch((error) => {
return new Promise((resolve, reject) => {
request_api.industryCategoryList().then((res) => {
this.industryCategoryList = res.data;
resolve(1);
}).catch((error) => {
reject(1);
});
});
},
/**
* 获取股票分类
*/
getStockCategoryListData() {
request_api.stockCategoryList().then((res) => {
if (res.code == 200) {
for (let item of res.data) {
item.sub_sectors.unshift("全部");
return new Promise((resolve, reject) => {
request_api.stockCategoryList().then((res) => {
if (res.code == 200) {
for (let item of res.data) {
item.sub_sectors.unshift("全部");
}
res.data.unshift({ primary_sector: "全部", sub_sectors: [] });
this.stockCategoryList = res.data;
resolve(1);
} else {
common_vendor.index.showToast({
title: res.message,
icon: "none"
});
reject(1);
}
res.data.unshift({ primary_sector: "全部", sub_sectors: [] });
this.stockCategoryList = res.data;
} else
common_vendor.index.showToast({
title: res.message,
icon: "none"
});
}).catch((error) => {
}).catch((error) => {
reject(1);
});
});
},
/**
* 获取事件列表数据
*/
getEventListData() {
let param = { page: this.page, keywords: this.keywords };
let param = { page: this.page, q: this.keywords };
if (this.selectTopCategory > 0) {
param.stock_sector = this.stockCategoryList[this.selectTopCategory].primary_sector;
}
if (this.selectSecondCategory > 0) {
param.secondary_sector = this.stockCategoryList[this.selectTopCategory].sub_sectors[this.selectSecondCategory];
}
if (this.startDate) {
param.start_date = this.startDate;
}
@@ -551,35 +642,125 @@ const _sfc_main = {
if (this.selectSortKey) {
param.sort = this.selectSortKey;
}
if (this.selectIndustryForthCategory > -1) {
param.industry_level = 4;
param.industry_classification = this.industryCategoryList[this.selectIndustryTopCategory].hierarchy[this.selectIndustrySecondCategory].level2_sectors[this.selectIndustryThirdCategory].level3_sectors[this.selectIndustryForthCategory].level3_sector;
} else {
if (this.selectIndustryThirdCategory > -1) {
param.industry_level = 3;
param.industry_classification = this.industryCategoryList[this.selectIndustryTopCategory].hierarchy[this.selectIndustrySecondCategory].level2_sectors[this.selectIndustryThirdCategory].level2_sector;
} else {
if (this.selectIndustrySecondCategory > -1) {
param.industry_level = 2;
param.industry_classification = this.industryCategoryList[this.selectIndustryTopCategory].hierarchy[this.selectIndustrySecondCategory].level1_sector;
} else {
param.industry_level = 1;
param.industry_classification = this.industryCategoryList[this.selectIndustryTopCategory].classification_name;
}
}
}
request_api.eventList(param).then((res) => {
if (res.success) {
let valueData = [];
let data = res.data.overall_stats.change_distribution;
valueData.push({
value: data.limit_down,
itemStyle: { color: "#35542266" },
label: {
textStyle: { color: "#35542266" }
}
});
valueData.push({
value: data.down_over_5,
itemStyle: { color: "#35542299" },
label: {
textStyle: { color: "#355422" }
}
});
valueData.push({
value: data.down_5_to_1,
itemStyle: { color: "#355422CC" },
label: {
textStyle: { color: "#355422" }
}
});
valueData.push({
value: data.down_within_1,
itemStyle: { color: "#355422" },
label: {
textStyle: { color: "#355422" }
}
});
valueData.push({
value: data.flat,
itemStyle: { color: "#ACB0C0" },
label: {
textStyle: { color: "#666" }
}
});
valueData.push({
value: data.up_within_1,
itemStyle: { color: "#C00000" },
label: {
textStyle: { color: "#C00000" }
}
});
valueData.push({
value: data.up_1_to_5,
itemStyle: { color: "#C00000CC" },
label: {
textStyle: { color: "#C00000" }
}
});
valueData.push({
value: data.up_over_5,
itemStyle: { color: "#C0000099" },
label: {
textStyle: { color: "#C00000" }
}
});
valueData.push({
value: data.limit_up,
itemStyle: { color: "#C0000066" },
label: {
textStyle: { color: "#C0000066" }
}
});
this.option.series[0].data = valueData;
this.init();
if (this.page == 1) {
this.eventList = res.data.events;
} else
this.eventList = this.eventList.concat(res.data.events);
this.loadAll = !res.data.pagination.has_next;
}
}).catch((error) => {
});
let token = common_vendor.index.getStorageSync("token");
if (!token) {
let param1 = { email: "1198731706@qq.com", password: "Aa123456", isJson: 1 };
request_api.loginByEmail(param1).then((res) => {
if (res.code == 200) {
common_vendor.index.setStorageSync("token", res.data.token);
} else
common_vendor.index.showToast({
title: res.message,
icon: "none"
});
}).catch((error) => {
});
}
},
/**
* 获取热门事件数据
*/
getHotEventListData() {
request_api.homeData().then((res) => {
let param = { page: this.page, q: this.keywords };
if (this.selectTopCategory > 0) {
param.stock_sector = this.stockCategoryList[this.selectTopCategory].primary_sector;
}
if (this.selectSecondCategory > 0) {
param.secondary_sector = this.stockCategoryList[this.selectTopCategory].sub_sectors[this.selectSecondCategory];
}
if (this.startDate) {
param.start_date = this.startDate;
}
if (this.endDate) {
param.end_date = this.endDate;
}
if (this.selectImportanceIndex > 0) {
param.importance = this.importanceList[this.selectImportanceIndex].key;
}
if (this.selectSortKey) {
param.sort = this.selectSortKey;
}
request_api.homeData(param).then((res) => {
if (res.code == 200) {
if (this.page == 1) {
this.eventList = res.data.events;
@@ -596,12 +777,14 @@ const _sfc_main = {
}
};
if (!Array) {
const _easycom_l_echart2 = common_vendor.resolveComponent("l-echart");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
_easycom_uni_popup2();
(_easycom_l_echart2 + _easycom_uni_popup2)();
}
const _easycom_l_echart = () => "../../uni_modules/lime-echart/components/l-echart/l-echart.js";
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
_easycom_uni_popup();
(_easycom_l_echart + _easycom_uni_popup)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
@@ -646,7 +829,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
q: $data.secondScrollLeft
} : {}, {
r: common_vendor.s("top:" + $data.contentTop + "px"),
s: common_vendor.f($data.eventList, (item, index, i0) => {
s: common_vendor.sr("chartRef", "9dfd58d8-0"),
t: common_vendor.f($data.eventList, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.importance),
b: common_vendor.n("level " + item.importance),
@@ -683,7 +867,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
a: common_vendor.t(sitem.stock_name),
b: common_vendor.t(($data.getRateUpOrDown(sitem.daily_change) ? "" : "+") + sitem.daily_change),
c: sindex,
d: common_vendor.o(($event) => $options.clickLookRelatedStockItem(sitem.stock_code), sindex)
d: common_vendor.o(($event) => $options.clickLookRelatedStockItem(item.id, sitem.stock_code), sindex)
};
}),
x: common_vendor.t($data.getLocaleTime(item.created_at)),
@@ -695,13 +879,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
D: index
});
}),
t: common_assets._imports_3,
v: common_assets._imports_4,
w: common_assets._imports_7,
x: common_vendor.s("top:" + $data.listTop + "px"),
y: common_vendor.o(($event) => $options.loadMoreData()),
z: common_assets._imports_11$1,
A: common_vendor.f($data.sortList, (item, index, i0) => {
v: common_assets._imports_3,
w: common_assets._imports_4,
x: common_assets._imports_10,
y: common_vendor.s("top:" + $data.listTop + "px"),
z: common_vendor.o(($event) => $options.loadMoreData()),
A: common_assets._imports_13$1,
B: common_vendor.f($data.sortList, (item, index, i0) => {
return {
a: item.icon,
b: common_vendor.t(item.name),
@@ -709,15 +893,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
d: common_vendor.o(($event) => $options.clickSortListItem(item), index)
};
}),
B: common_vendor.s("margin-top:" + $data.sortListTop + "px;"),
C: common_vendor.sr("sortPopup", "9dfd58d8-0"),
D: common_vendor.p({
C: common_vendor.s("margin-top:" + $data.sortListTop + "px;"),
D: common_vendor.sr("sortPopup", "9dfd58d8-1"),
E: common_vendor.p({
type: "top",
["mask-background-color"]: "transparent"
}),
E: common_assets._imports_2,
F: common_vendor.s("height:" + $data.menuH + "px;"),
G: common_vendor.f($data.screenCategoryList, (item, index, i0) => {
F: common_assets._imports_2,
G: common_vendor.s("height:" + $data.menuH + "px;"),
H: common_vendor.f($data.screenCategoryList, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item),
b: $data.selectScreenCategory == index
@@ -727,22 +911,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
e: common_vendor.o(($event) => $options.clickScreenCategoryItem(index), index)
});
}),
H: $data.selectScreenCategory == 0
I: $data.selectScreenCategory == 0
}, $data.selectScreenCategory == 0 ? {
I: common_vendor.t($data.startDate),
J: common_vendor.t($data.endDate),
K: common_assets._imports_11,
L: common_vendor.o(($event) => $options.clickPreMonth()),
M: common_vendor.t($data.selectMonth),
N: common_assets._imports_12,
O: common_vendor.o(($event) => $options.clickNextMonth()),
P: common_vendor.f($data.weekList, (item, index, i0) => {
J: common_vendor.t($data.startDate),
K: common_vendor.t($data.endDate),
L: common_assets._imports_5,
M: common_vendor.o(($event) => $options.clickPreMonth()),
N: common_vendor.t($data.selectMonth),
O: common_assets._imports_6,
P: common_vendor.o(($event) => $options.clickNextMonth()),
Q: common_vendor.f($data.weekList, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: index
};
}),
Q: common_vendor.f($data.monthDateList[$data.selectMonthIndex], (item, index, i0) => {
R: common_vendor.f($data.monthDateList[$data.selectMonthIndex], (item, index, i0) => {
return common_vendor.e({
a: item.isToday || item.date == $data.startDate || item.date == $data.endDate
}, item.isToday || item.date == $data.startDate || item.date == $data.endDate ? {
@@ -763,22 +947,111 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
});
})
} : {}, {
R: $data.selectScreenCategory == 1
}, $data.selectScreenCategory == 1 ? {
S: common_vendor.f($data.industryTopCategoryList, (item, index, i0) => {
S: $data.selectScreenCategory == 1
}, $data.selectScreenCategory == 1 ? common_vendor.e({
T: common_vendor.f($data.industryCategoryList, (item, index, i0) => {
return {
a: common_vendor.t(item.classification_name),
b: common_vendor.n("item " + ($data.selectIndustryTopCategory == index ? "select" : "")),
c: index,
d: common_vendor.o(($event) => $options.clickSelectIndustryTopCategoryItem(index), index)
d: common_vendor.o(($event) => $options.clickIndustryTopCategoryItem(index), index)
};
}),
T: common_assets._imports_1,
U: common_vendor.t($data.industryTopCategoryList[$data.selectIndustryTopCategory].classification_name)
U: common_assets._imports_1,
V: common_vendor.o([($event) => $data.industryKeywords = $event.detail.value, (...args) => $options.industrySearch && $options.industrySearch(...args)]),
W: $data.industryKeywords,
X: $data.industryKeywords.length > 0
}, $data.industryKeywords.length > 0 ? {
Y: common_vendor.f($data.searchResultList, (item, index, i0) => {
return {
a: common_vendor.f(item.hierarchy, (sitem, sindex, i1) => {
return {
a: common_vendor.f(sitem.level2_sectors, (titem, tindex, i2) => {
return {
a: common_vendor.f(titem.level3_sectors, (fitem, findex, i3) => {
return {
a: common_vendor.f(fitem.level3_sector + "/" + titem.level2_sector + "/" + sitem.level1_sector, (citem, cindex, i4) => {
return {
a: common_vendor.t(citem),
b: common_vendor.n($data.industryKeywords.indexOf(citem) > -1 ? "key" : ""),
c: cindex
};
}),
b: common_vendor.o(($event) => $options.clickIndustrySearchItem(fitem), findex),
c: findex
};
}),
b: tindex
};
}),
b: sindex
};
}),
b: index
};
})
} : common_vendor.e({
Z: $data.selectIndustrySecondCategory > -1
}, $data.selectIndustrySecondCategory > -1 ? common_vendor.e({
aa: $data.selectIndustrySecondCategory > -1
}, $data.selectIndustrySecondCategory > -1 ? {
ab: common_vendor.t($data.industryCategoryList[$data.selectIndustryTopCategory].hierarchy[$data.selectIndustrySecondCategory].level1_sector),
ac: common_assets._imports_13,
ad: common_vendor.o(($event) => $options.deleteIndustrySecondCategoryItem())
} : {}, {
V: $data.selectScreenCategory == 2
ae: $data.selectIndustryThirdCategory > -1
}, $data.selectIndustryThirdCategory > -1 ? {
af: common_vendor.t($data.industryCategoryList[$data.selectIndustryTopCategory].hierarchy[$data.selectIndustrySecondCategory].level2_sectors[$data.selectIndustryThirdCategory].level2_sector),
ag: common_assets._imports_13,
ah: common_vendor.o(($event) => $options.deleteIndustryThirdCategoryItem())
} : {}, {
ai: $data.selectIndustryForthCategory > -1
}, $data.selectIndustryForthCategory > -1 ? {
aj: common_vendor.t($data.industryCategoryList[$data.selectIndustryTopCategory].hierarchy[$data.selectIndustrySecondCategory].level2_sectors[$data.selectIndustryThirdCategory].level3_sectors[$data.selectIndustryForthCategory].level3_sector),
ak: common_assets._imports_13,
al: common_vendor.o(($event) => $options.deleteIndustryForthCategoryItem())
} : {}) : {}, {
am: common_vendor.t($data.industryCategoryList[$data.selectIndustryTopCategory].classification_name),
an: common_vendor.f($data.industryCategoryList[$data.selectIndustryTopCategory].hierarchy, (sitem, sindex, i0) => {
return common_vendor.e({
a: common_vendor.t($data.selectIndustrySecondCategory == sindex && sitem.isSpread ? "-" : "+"),
b: common_vendor.t(sitem.level1_sector),
c: common_vendor.n("categoryC flex " + ($data.selectIndustrySecondCategory == sindex ? "select" : "")),
d: common_vendor.o(($event) => $options.clickIndustrySecondCategoryItem(sindex), sindex),
e: sitem.isSpread
}, sitem.isSpread ? {
f: common_vendor.f($data.industryCategoryList[$data.selectIndustryTopCategory].hierarchy[sindex].level2_sectors, (titem, tindex, i1) => {
return common_vendor.e({
a: common_vendor.t($data.selectIndustrySecondCategory == sindex && $data.selectIndustryThirdCategory == tindex && titem.isSpread ? "-" : "+"),
b: common_vendor.t(titem.level2_sector),
c: common_vendor.n("categoryC flex " + ($data.selectIndustrySecondCategory == sindex && $data.selectIndustryThirdCategory == tindex ? "select" : "")),
d: common_vendor.o(($event) => $options.clickIndustryThirdCategoryItem(sindex, tindex), tindex),
e: titem.isSpread
}, titem.isSpread ? {
f: common_vendor.f($data.industryCategoryList[$data.selectIndustryTopCategory].hierarchy[sindex].level2_sectors[tindex].level3_sectors, (fitem, findex, i2) => {
return common_vendor.e({
a: common_vendor.t(fitem.level3_sector),
b: $data.selectIndustrySecondCategory == sindex && $data.selectIndustryThirdCategory == tindex && $data.selectIndustryForthCategory == findex
}, $data.selectIndustrySecondCategory == sindex && $data.selectIndustryThirdCategory == tindex && $data.selectIndustryForthCategory == findex ? {
c: common_assets._imports_14
} : {}, {
d: common_vendor.n("categoryC flex " + ($data.selectIndustrySecondCategory == sindex && $data.selectIndustryThirdCategory == tindex && $data.selectIndustryForthCategory == findex ? "select" : "")),
e: common_vendor.o(($event) => $options.clickIndustryForthCategoryItem(sindex, tindex, findex), findex),
f: findex
});
})
} : {}, {
g: tindex
});
})
} : {}, {
g: sindex
});
})
})) : {}, {
ao: $data.selectScreenCategory == 2
}, $data.selectScreenCategory == 2 ? {
W: common_vendor.f($data.importanceList, (item, index, i0) => {
ap: common_vendor.f($data.importanceList, (item, index, i0) => {
return {
a: common_vendor.t(item.name),
b: common_vendor.n("item " + ($data.selectImportanceIndex == index ? "select" : "")),
@@ -787,11 +1060,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
};
})
} : {}, {
X: common_vendor.o(($event) => $options.clickCancel()),
Y: common_vendor.o(($event) => $options.clickCertain()),
Z: common_vendor.s("padding-top:" + $data.menuTop + "px;"),
aa: common_vendor.sr("screenPopup", "9dfd58d8-1"),
ab: common_vendor.p({
aq: common_vendor.o(($event) => $options.clickCancel()),
ar: common_vendor.o(($event) => $options.clickCertain()),
as: common_vendor.s("padding-top:" + $data.menuTop + "px;"),
at: common_vendor.sr("screenPopup", "9dfd58d8-2"),
av: common_vendor.p({
type: "top"
})
});

View File

@@ -2,6 +2,7 @@
"navigationBarTitleText": "uni-app",
"enablePullDownRefresh": true,
"usingComponents": {
"l-echart": "../../uni_modules/lime-echart/components/l-echart/l-echart",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
}
}

File diff suppressed because one or more lines are too long

View File

@@ -437,15 +437,94 @@
width: 30rpx;
height: auto;
}
.screenPopup .screenContentC .searchResultList .item {
padding: 10rpx 44rpx;
font-size: 26rpx;
font-weight: 500;
color: #444;
}
.screenPopup .screenContentC .searchResultList .item .key {
color: #F97316;
}
.screenPopup .screenContentC .industryList {
margin-top: 24rpx;
}
.screenPopup .screenContentC .industryList .selectCategoryList {
padding: 0 22rpx;
}
.screenPopup .screenContentC .industryList .selectCategoryList .item {
background-color: #FFF1E7;
margin-right: 15rpx;
padding-left: 16rpx;
line-height: 38rpx;
border-radius: 10rpx;
border: solid 0.5px #F97316;
font-size: 22rpx;
font-weight: 500;
color: #F97316;
}
.screenPopup .screenContentC .industryList .selectCategoryList .item .deleteC {
padding: 0 11rpx;
}
.screenPopup .screenContentC .industryList .selectCategoryList .item .deleteC .icon {
width: 15rpx;
height: 15rpx;
}
.screenPopup .screenContentC .industryList .list {
margin-top: 20rpx;
}
.screenPopup .screenContentC .industryList .list .topCategory {
padding: 0 30rpx;
padding: 0 22rpx;
font-size: 28rpx;
font-weight: bold;
color: #F97316;
}
.screenPopup .screenContentC .industryList .list .secondItem {
padding: 0 22rpx;
}
.screenPopup .screenContentC .industryList .list .thirdItem {
padding-left: 36rpx;
}
.screenPopup .screenContentC .industryList .list .forthItem {
padding-left: 36rpx;
}
.screenPopup .screenContentC .industryList .list .forthItem .categoryC.select {
border-bottom: solid 0.5px #F97316;
}
.screenPopup .screenContentC .industryList .list .categoryC {
height: 50rpx;
}
.screenPopup .screenContentC .industryList .list .categoryC .spread {
margin-right: 12rpx;
width: 24rpx;
line-height: 22rpx;
border: solid 0.5px #8C8C8C;
font-size: 22rpx;
color: #8C8C8C;
text-align: center;
}
.screenPopup .screenContentC .industryList .list .categoryC .category {
font-size: 24rpx;
font-weight: 500;
color: #444;
}
.screenPopup .screenContentC .industryList .list .categoryC.select .spread {
color: #F97316;
border: solid 0.5px #F97316;
}
.screenPopup .screenContentC .industryList .list .categoryC.select .category {
color: #F97316;
}
.screenPopup .screenContentC .industryList .list .categoryC.select .selectC {
width: 24rpx;
height: 24rpx;
border: solid 0.5px #F97316;
}
.screenPopup .screenContentC .industryList .list .categoryC.select .selectC .icon {
display: block;
width: 20rpx;
height: auto;
}
.screenPopup .screenContentC .importanceList {
margin-top: 16rpx;
padding: 0 20rpx;

View File

@@ -1,6 +1,7 @@
"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 echarts = require("../../../uni_modules/lime-echart/static/echarts.min.js");
const _sfc_main = {
@@ -9,18 +10,33 @@ const _sfc_main = {
navH: common_vendor.inject("navHeight"),
contentTop: "",
navTitle: "",
type: "",
//1事件详情2投资详情
eventId: "",
//事件id
stockCode: "",
//股票code
categoryList: ["分钟线", "分时图", "日K线"],
categoryList: ["分时图", "日K线"],
selectCategory: 0,
option: {
title: {
show: false
},
tooltip: {
position: function(pos, params, dom, rect, size) {
var obj = { top: "10%" };
obj[["left", "right"][+(pos[0] < size.viewSize[0] / 2)]] = 5;
return obj;
},
trigger: "axis",
axisPointer: {
type: "cross"
},
formatter: function(params) {
common_vendor.index.__f__("log", "at pages/index/stockDetails/stockDetails.vue:66", params);
let res = "日期:" + params[0].name + "\n开盘价" + params[0].data[1] + "\n收盘价" + params[0].data[2] + "\n最低价" + params[0].data[3] + "\n最高价" + params[0].data[4];
common_vendor.index.__f__("log", "at pages/index/stockDetails/stockDetails.vue:68", res);
return res;
}
},
legend: {
@@ -70,107 +86,76 @@ const _sfc_main = {
color0: "#8A0000",
borderColor: "#00da3c",
borderColor0: "#008F28"
},
markPoint: {
label: {
formatter: function(param) {
return param != null ? Math.round(param.value) + "" : "";
}
},
data: [
{
name: "Mark",
coord: ["2013/5/31", 2300],
value: 2300,
itemStyle: {
color: "rgb(41,60,85)"
}
},
{
name: "highest value",
type: "max",
valueDim: "highest"
},
{
name: "lowest value",
type: "min",
valueDim: "lowest"
},
{
name: "average value on close",
type: "average",
valueDim: "close"
}
],
tooltip: {
formatter: function(param) {
return param.name + "<br>" + (param.data.coord || "");
}
}
},
markLine: {
symbol: ["none", "none"],
data: [
[
{
name: "from lowest to highest",
type: "min",
valueDim: "lowest",
symbol: "circle",
symbolSize: 10,
label: {
show: false
},
emphasis: {
label: {
show: false
}
}
},
{
type: "max",
valueDim: "highest",
symbol: "circle",
symbolSize: 10,
label: {
show: false
},
emphasis: {
label: {
show: false
}
}
}
],
{
name: "min line on close",
type: "min",
valueDim: "close"
},
{
name: "max line on close",
type: "max",
valueDim: "close"
}
]
}
}
]
}
},
option1: {
title: {
show: false
},
tooltip: {
trigger: "axis"
},
grid: {
left: "10%",
right: "12%",
bottom: "10%"
},
xAxis: {
type: "category"
},
yAxis: {
scale: true
},
dataZoom: [
{
type: "inside"
}
],
series: {
name: "分时图",
type: "line",
markLine: {
silent: true,
symbol: ["none", "none"],
lineStyle: {
width: 2,
color: "#AAA"
},
data: []
}
}
},
relatedDesc: "",
//关联描述
sourceList: [],
//来源列表
getLocalDate: utils_util.getLocalDate
};
},
onLoad(e) {
this.contentTop = this.navH + (60 + 10) / 750 * common_vendor.inject("windowWidth");
if (e.code) {
this.stockCode = e.code;
this.getStockDetailsData();
this.getStockCandlestickChartData();
this.type = e.type;
if (e.type == 1) {
this.contentTop = this.navH + (60 + 8) / 750 * common_vendor.inject("windowWidth");
this.eventId = e.id;
this.stockCode = e.code;
this.getStockDetailsData();
} else {
this.contentTop = this.navH;
this.navTitle = e.name + "(" + e.code + ")";
this.relatedDesc = e.des;
}
}
},
methods: {
async init() {
const chart = await this.$refs.chartRef.init(echarts);
chart.setOption(this.option);
if (this.selectCategory == 0) {
chart.setOption(this.option1);
} else
chart.setOption(this.option);
},
/**
* 点击切换分类
@@ -179,9 +164,10 @@ const _sfc_main = {
clickCategoryItem(index) {
if (this.selectCategory != index) {
this.selectCategory = index;
if (index == 0 || index == 2) {
if (index == 1) {
this.getStockCandlestickChartData();
}
} else
this.init();
}
},
/**
@@ -189,9 +175,47 @@ const _sfc_main = {
*/
getStockDetailsData() {
let stockCode = this.stockCode;
request_api.stockDetails(stockCode).then((res) => {
let eventId = this.eventId;
request_api.stockDetails(eventId, stockCode).then((res) => {
if (res.code == 200) {
this.navTitle = res.data.basic_info.stock_name + "(" + res.data.basic_info.stock_code + ")";
let data = res.data.minute_chart_data;
let categoryData = [];
let valueData = [];
for (let item of data) {
categoryData.push(item.time);
valueData.push(item.close);
}
this.option1.xAxis.data = categoryData;
this.option1.series.data = valueData;
this.option1.series.markLine.data = [
{
yAxis: data[0].open,
label: {
show: true,
position: "start",
// formatter:'111',
color: "#333"
}
},
{
yAxis: data[0].open,
label: {
show: true,
position: "end",
formatter: "0.00%",
color: "#333"
}
}
];
let relatedDesc = res.data.related_desc;
if (relatedDesc) {
this.relatedDesc = relatedDesc.relation_desc;
if (relatedDesc.retrieved_sources) {
this.sourceList = relatedDesc.retrieved_sources;
}
}
this.init();
} else
common_vendor.index.showToast({
title: res.message,
@@ -206,16 +230,19 @@ const _sfc_main = {
getStockCandlestickChartData() {
let stockCode = this.stockCode;
let param = { chart_type: "minute" };
if (this.selectCategory == 2) {
if (this.selectCategory == 1) {
param.chart_type = "daily";
}
request_api.stockCandlestickChartData(stockCode, param).then((res) => {
let data = res.data;
let categoryData = [];
let valueData = [];
for (let item of data) {
categoryData.push(item.time);
valueData.push([item.open, item.close, item.low, item.high]);
}
this.option.xAxis.data = categoryData;
this.option.series[0].data = valueData;
this.init();
}).catch((error) => {
});
@@ -233,12 +260,14 @@ if (!Math) {
(_easycom_navBar + _easycom_l_echart)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
return common_vendor.e({
a: common_vendor.p({
leftText: $data.navTitle
}),
b: common_assets._imports_0,
c: common_vendor.f($data.categoryList, (item, index, i0) => {
c: $data.type == 1
}, $data.type == 1 ? {
d: common_vendor.f($data.categoryList, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item),
b: $data.selectCategory == index
@@ -248,10 +277,27 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
e: common_vendor.o(($event) => $options.clickCategoryItem(index), index)
});
}),
d: common_vendor.s("top:" + $data.navH + "px;"),
e: common_vendor.sr("chartRef", "42054871-1"),
f: common_vendor.s("top:" + $data.contentTop + "px;")
};
e: common_vendor.s("top:" + $data.navH + "px;")
} : {}, {
f: $data.type == 1
}, $data.type == 1 ? {
g: common_vendor.sr("chartRef", "42054871-1")
} : {}, {
h: common_vendor.t($data.relatedDesc),
i: $data.type == 1 && $data.sourceList.length > 0
}, $data.type == 1 && $data.sourceList.length > 0 ? {} : {}, {
j: common_vendor.f($data.sourceList, (item, index, i0) => {
return {
a: common_vendor.t(item.sentences),
b: common_vendor.t(item.report_title),
c: common_vendor.t(item.author),
d: common_vendor.t($data.getLocalDate(item.declare_date)),
e: index
};
}),
k: common_vendor.n("contentC fixed " + ($data.type == 2 ? "radius" : "")),
l: common_vendor.s("top:" + $data.contentTop + "px;")
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);

View File

@@ -1 +1 @@
<view><nav-bar wx:if="{{a}}" u-i="42054871-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="tabC fixed" style="{{d}}"><view wx:for="{{c}}" wx:for-item="item" wx:key="d" class="{{item.c}}" bindtap="{{item.e}}">{{item.a}} <view wx:if="{{item.b}}" class="line absolute"></view></view></view><view class="contentC fixed" style="{{f}}"><view style="width:750rpx;height:400rpx"><l-echart class="r" u-r="chartRef" u-i="42054871-1" bind:__l="__l"></l-echart></view><view class="section">关联描述</view><view class="des">全球原油运输巨头VLCC运力规模全球第一直接受益于霍尔木兹海峡地缘风险带来的运价上涨及风险溢价。</view></view></view>
<view><nav-bar wx:if="{{a}}" u-i="42054871-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view wx:if="{{c}}" class="tabC fixed" style="{{e}}"><view wx:for="{{d}}" wx:for-item="item" wx:key="d" class="{{item.c}}" bindtap="{{item.e}}">{{item.a}} <view wx:if="{{item.b}}" class="line absolute"></view></view></view><view class="{{k}}" style="{{l}}"><view wx:if="{{f}}" style="width:750rpx;height:400rpx"><l-echart class="r" u-r="chartRef" u-i="42054871-1" bind:__l="__l"></l-echart></view><view class="section">关联描述</view><view class="des">{{h}}</view><view wx:if="{{i}}" class="section">信息来源</view><view class="list"><view wx:for="{{j}}" wx:for-item="item" wx:key="e" class="item"><view class="content">{{item.a}}</view><view class="article">——《{{item.b}}》</view><view class="authorDateC flex"><view class="author flex1">{{item.c}}</view><view class="date">{{item.d}}</view></view></view></view></view></view>

View File

@@ -35,6 +35,7 @@
left: 0;
right: 0;
bottom: 0;
overflow-y: scroll;
}
.contentC .section {
padding: 0 28rpx;
@@ -44,8 +45,45 @@
color: #222;
}
.contentC .des {
padding: 0 30rpx;
padding: 0 0 30rpx;
margin: 0 25rpx;
border-bottom: solid 1rpx #E4E4E4;
line-height: 1.4rem;
font-size: 24rpx;
font-weight: 500;
color: #666;
}
.contentC .list {
padding: 0 25rpx;
}
.contentC .list .item {
background-color: #F8F8F8;
margin-bottom: 20rpx;
padding: 30rpx 26rpx;
border-radius: 10rpx;
}
.contentC .list .item .content {
font-size: 24rpx;
font-weight: 500;
color: #222;
}
.contentC .list .item .article {
margin-top: 10rpx;
font-size: 22rpx;
font-weight: 500;
color: #666;
text-align: right;
}
.contentC .list .item .authorDateC {
margin-top: 30rpx;
font-size: 22rpx;
font-weight: 500;
color: #AAA;
}
.contentC .list .item .authorDateC .author {
margin-right: 10rpx;
}
.contentC.radius {
margin-top: 10rpx;
border-radius: 20rpx 20rpx 0 0;
}

View File

@@ -11,8 +11,16 @@ const _sfc_main = {
navH: common_vendor.inject("navHeight"),
windowWidth: common_vendor.inject("windowWidth"),
contentTop: "",
keywords: "",
//搜索关键字
todayDate: "",
//今日日期
calendarDateList: [],
//日历日期
selectMonth: "",
//选中月份
selectMonthIndex: 0,
//选中月份下标
weekList: ["一", "二", "三", "四", "五", "六", "日"],
weekDateList: [],
//当前周日期
@@ -34,66 +42,95 @@ const _sfc_main = {
//事件列表
dataList: [],
//数据列表
getLocaleHourMinute: utils_util.getLocaleHourMinute
page: 1,
loadAll: false,
getLocaleHourMinute: utils_util.getLocaleHourMinute,
replaceAnswerLabel: utils_util.replaceAnswerLabel
};
},
onLoad() {
let date = /* @__PURE__ */ new Date();
this.contentTop = this.navH + (75 + 20) / 750 * common_vendor.inject("windowWidth");
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
this.todayDate = this.selectDate = date.getFullYear() + "-" + (month > 9 ? month : "0" + month) + "-" + (day > 9 ? day : "0" + day);
let currentYear = date.getFullYear();
let currentMonth = date.getMonth() + 1;
let currentDay = date.getDate();
this.todayDate = this.selectDate = currentYear + "-" + (currentMonth > 9 ? currentMonth : "0" + currentMonth) + "-" + (currentDay > 9 ? currentDay : "0" + currentDay);
let week = date.getDay() || 7;
let diff = week - 1;
let daysOfWeek = [];
for (var i = 0; i < 7; i++) {
let newDate = /* @__PURE__ */ new Date();
newDate.setDate(day - diff + i);
newDate.setDate(currentDay - diff + i);
let newDay = newDate.getDate();
let date2 = year + "-" + (month > 9 ? month : "0" + month) + "-" + (newDay > 9 ? newDay : "0" + newDay);
daysOfWeek.push({ date: date2, day: newDay, isToday: newDay == day ? true : false });
let date2 = currentYear + "-" + (currentMonth > 9 ? currentMonth : "0" + currentMonth) + "-" + (newDay > 9 ? newDay : "0" + newDay);
daysOfWeek.push({ date: date2, day: newDay, isToday: newDay == currentDay ? true : false });
}
this.weekDateList = daysOfWeek;
let firstDayOfMonth = /* @__PURE__ */ new Date();
firstDayOfMonth.setDate(1);
let currentMonthDay = new Date(year, month, 0).getDate();
let firstDayWeek = firstDayOfMonth.getDay() || 7;
let daysOfMonth = [];
for (var i = 1; i <= currentMonthDay; i++) {
let newDate = /* @__PURE__ */ new Date();
newDate.setDate(i);
let newDay = newDate.getDate();
let date2 = year + "-" + (month > 9 ? month : "0" + month) + "-" + (newDay > 9 ? newDay : "0" + newDay);
daysOfMonth.push({ date: date2, day: newDay, isToday: newDay == day ? true : false, isCurrentMonth: true });
}
for (var i = 0; i < firstDayWeek - 1; i++) {
let lastMonthDay = new Date(year, month - 1, 0).getDate();
let newDate = new Date(year, month - 2, lastMonthDay - i);
let newMonth = newDate.getMonth() + 1;
let newDay = newDate.getDate();
let date2 = year + "-" + (newMonth > 9 ? newMonth : "0" + newMonth) + "-" + (newDay > 9 ? newDay : "0" + newDay);
daysOfMonth.unshift({ date: date2, day: newDay, isToday: false, isCurrentMonth: false });
}
let nextMonthFirstDay = new Date(year, month, 1);
let lastDayOfMonth = new Date(nextMonthFirstDay - 24 * 60 * 60 * 1e3);
let lastDayWeek = lastDayOfMonth.getDay() || 7;
for (var i = 1; i < 8 - lastDayWeek; i++) {
if (month > 11) {
month = -1;
year++;
let calendarDateList = [];
this.selectMonthIndex = 20 * 12 + currentMonth - 1;
this.selectMonth = currentYear + "-" + (currentMonth > 9 ? currentMonth : "0" + currentMonth);
for (var i = currentYear - 20; i < currentYear + 20; i++) {
for (var j = 0; j < 12; j++) {
let date2 = new Date(i, j + 1, 0);
let firstDayOfMonth = new Date(i, j + 1, 0);
firstDayOfMonth.setDate(1);
let currentMonthDay = date2.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 date3 = i + "-" + (newMonth > 9 ? newMonth : "0" + newMonth) + "-" + (newDay > 9 ? newDay : "0" + newDay);
daysOfMonth.push({ date: date3, 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 date3 = year + "-" + (newMonth > 9 ? newMonth : "0" + newMonth) + "-" + (newDay > 9 ? newDay : "0" + newDay);
daysOfMonth.unshift({ date: date3, 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 date3 = year + "-" + (newMonth > 9 ? newMonth : "0" + newMonth) + "-" + (newDay > 9 ? newDay : "0" + newDay);
daysOfMonth.push({ date: date3, year, month: newMonth, day: newDay, isToday: false, isCurrentMonth: false, timestamp: time });
}
calendarDateList.push(daysOfMonth);
}
let newDate = new Date(year, month + 1, i);
let newMonth = newDate.getMonth() + 1;
let newDay = newDate.getDate();
let date2 = year + "-" + (newMonth > 9 ? newMonth : "0" + newMonth) + "-" + (newDay > 9 ? newDay : "0" + newDay);
daysOfMonth.push({ date: date2, day: newDay, isToday: false, isCurrentMonth: false });
}
this.monthDateList = daysOfMonth;
this.calendarDateList = calendarDateList;
this.monthDateList = calendarDateList[this.selectMonthIndex];
this.listTop = this.contentTop + (68 + 40 + 96 + 74 + 70 + 74 + 22) / 750 * common_vendor.inject("windowWidth");
this.getStockCategoryListData();
this.getEventListData();
this.getCurrentMonthEventCountData();
Promise.all([this.getStockCategoryListData(), this.getCurrentMonthEventCountData()]).then((res) => {
this.getEventListData();
}).catch((error) => {
});
},
onPullDownRefresh() {
this.reloadData();
},
computed: {
circumference() {
@@ -101,16 +138,45 @@ const _sfc_main = {
}
},
methods: {
reloadData() {
this.page = 1;
this.loadAll = false;
if (this.selectTab == 0) {
this.getEventListData();
} else
this.getDataListData();
},
loadMoreData() {
if (!this.loadAll) {
this.page++;
if (this.selectTab == 0) {
this.getEventListData();
} else
this.getDataListData();
}
},
/**
* 点击搜索
*/
clickSearch() {
this.reloadData();
},
/**
* 点击选择月份
*/
clickSelectMonth() {
this.$refs["popup"].open();
},
/**
* 点击今日日期
*/
clickTodayDate() {
if (this.selectDate != this.todayDate) {
this.selectDate = this.todayDate;
if (this.selectTab == 0) {
this.getEventListData();
} else
this.getDataListData();
let date = /* @__PURE__ */ new Date();
let currentMonth = date.getMonth() + 1;
this.selectMonthIndex = 20 * 12 + currentMonth - 1;
this.reloadData();
}
},
/**
@@ -123,6 +189,40 @@ const _sfc_main = {
} else
this.listTop = this.contentTop + (68 + 40 + 96 + 74 + 70 + 74 + 22) / 750 * this.windowWidth;
},
/**
* 点击上个月
*/
clickPreMonth() {
if (this.selectMonthIndex > 0) {
this.selectMonthIndex--;
let monthList = this.calendarDateList[this.selectMonthIndex];
let month = "";
for (let item of monthList) {
if (item.isCurrentMonth) {
month = item.month;
break;
}
}
this.selectMonth = this.calendarDateList[this.selectMonthIndex][0].year + "-" + (month > 9 ? month : "0" + month);
}
},
/**
* 点击下个月
*/
clickNextMonth() {
if (this.selectMonthIndex < this.calendarDateList.length - 1) {
this.selectMonthIndex++;
let monthList = this.calendarDateList[this.selectMonthIndex];
let month = "";
for (let item of monthList) {
if (item.isCurrentMonth) {
month = item.month;
break;
}
}
this.selectMonth = this.calendarDateList[this.selectMonthIndex][0].year + "-" + (month > 9 ? month : "0" + month);
}
},
/**
* 选中日期
* @param {Object} item
@@ -130,10 +230,7 @@ const _sfc_main = {
clickSelectDate(item) {
if (this.selectDate != item.date) {
this.selectDate = item.date;
if (this.selectTab == 0) {
this.getEventListData();
} else
this.getDataListData();
this.reloadData();
}
},
/**
@@ -142,10 +239,7 @@ const _sfc_main = {
clickTabItem(index) {
if (this.selectTab != index) {
this.selectTab = index;
if (this.selectTab == 0) {
this.getEventListData();
} else
this.getDataListData();
this.reloadData();
}
},
/**
@@ -154,10 +248,7 @@ const _sfc_main = {
clickTopCategoryItem(index) {
if (this.selectTopCategory != index) {
this.selectTopCategory = index;
if (this.selectTab == 0) {
this.getEventListData();
} else
this.getDataListData();
this.reloadData();
}
},
/**
@@ -172,42 +263,59 @@ const _sfc_main = {
* 获取股票分类
*/
getStockCategoryListData() {
request_api.stockCategoryList().then((res) => {
if (res.code == 200) {
res.data.unshift({ primary_sector: "全部", sub_sectors: [] });
this.stockCategoryList = res.data;
} else
common_vendor.index.showToast({
title: res.message,
icon: "none"
});
}).catch((error) => {
return new Promise((resolve, reject) => {
request_api.stockCategoryList().then((res) => {
if (res.code == 200) {
res.data.unshift({ primary_sector: "全部", sub_sectors: [] });
this.stockCategoryList = res.data;
resolve(1);
} else {
common_vendor.index.showToast({
title: res.message,
icon: "none"
});
reject(1);
}
}).catch((error) => {
reject(1);
});
});
},
/**
* 获取事件列表数据
*/
getEventListData() {
let param = { start: this.selectDate };
let param = { start: this.selectDate, q: this.keywords, page: this.page };
if (this.selectTopCategory > 0) {
param.category = this.stockCategoryList[this.selectTopCategory].primary_sector;
}
request_api.calendarEventList(param).then((res) => {
common_vendor.index.stopPullDownRefresh();
if (res.code == 200) {
this.eventList = res.data.events;
if (res.data.page == 1) {
this.eventList = res.data.events;
} else
this.eventList = this.eventList.concat(res.data.events);
if (res.data.page == res.data.total_pages) {
this.loadAll = true;
}
} else
common_vendor.index.showToast({
title: res.message,
icon: "none"
});
}).catch((error) => {
common_vendor.index.stopPullDownRefresh();
});
},
/**
* 获取事件列表数据
*/
getDataListData() {
let param = { start: this.selectDate };
let param = { start: this.selectDate, q: this.keywords, page: this.page };
if (this.selectTopCategory > 0) {
param.category = this.stockCategoryList[this.selectTopCategory].primary_sector;
}
request_api.calendarDataList(param).then((res) => {
if (res.code == 200) {
this.dataList = res.data.data_list;
@@ -217,60 +325,72 @@ const _sfc_main = {
icon: "none"
});
}).catch((error) => {
common_vendor.index.stopPullDownRefresh();
});
},
/**
* 获取当前月份每一天的事件数量
*/
getCurrentMonthEventCountData() {
request_api.calendarEventCount().then((res) => {
for (let item of res) {
let date = item.start;
for (let s of this.weekDateList) {
if (s.date == date) {
s.eventCount = item.title;
s.className = item.className;
return new Promise((resolve, reject) => {
request_api.calendarEventCount().then((res) => {
for (let item of res) {
let date = item.start;
for (let s of this.weekDateList) {
if (s.date == date) {
s.eventCount = item.title;
s.className = item.className;
}
}
for (let s of this.monthDateList) {
if (s.date == date) {
s.eventCount = item.title;
s.className = item.className;
}
}
}
for (let s of this.monthDateList) {
if (s.date == date) {
s.eventCount = item.title;
s.className = item.className;
}
}
}
}).catch((error) => {
resolve(1);
}).catch((error) => {
reject(1);
});
});
}
}
};
if (!Array) {
const _easycom_ua_markdown2 = common_vendor.resolveComponent("ua-markdown");
const _easycom_zui_progress_circle2 = common_vendor.resolveComponent("zui-progress-circle");
_easycom_zui_progress_circle2();
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
(_easycom_ua_markdown2 + _easycom_zui_progress_circle2 + _easycom_uni_popup2)();
}
const _easycom_ua_markdown = () => "../../components/ua-markdown/ua-markdown.js";
const _easycom_zui_progress_circle = () => "../../uni_modules/zui-progress-circle/components/zui-progress-circle/zui-progress-circle.js";
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
_easycom_zui_progress_circle();
(_easycom_ua_markdown + _easycom_zui_progress_circle + _easycom_uni_popup)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_assets._imports_0,
b: common_vendor.s("top:" + $data.menuTop + "px;line-height:" + $data.menuH + "px;"),
c: common_assets._imports_1,
d: common_vendor.s("top:" + $data.navH + "px;"),
e: common_vendor.t($data.selectDate),
f: common_assets._imports_2$3,
g: common_vendor.o(($event) => $options.clickExpandOrRetract()),
h: common_vendor.o(($event) => $options.clickTodayDate()),
i: common_vendor.f($data.weekList, (item, index, i0) => {
d: $data.keywords,
e: common_vendor.o(($event) => $data.keywords = $event.detail.value),
f: common_vendor.o(($event) => $options.clickSearch()),
g: common_vendor.s("top:" + $data.navH + "px;"),
h: common_vendor.t($data.selectDate),
i: common_assets._imports_2$3,
j: common_vendor.o(($event) => $options.clickSelectMonth()),
k: common_vendor.o(($event) => $options.clickTodayDate()),
l: common_vendor.f($data.weekList, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: index
};
}),
j: $data.isExpand
m: $data.isExpand
}, $data.isExpand ? {
k: common_vendor.f($data.monthDateList, (item, index, i0) => {
n: common_vendor.f($data.monthDateList, (item, index, i0) => {
return common_vendor.e($data.selectDate != $data.todayDate ? common_vendor.e({
a: $data.selectDate == item.date
}, $data.selectDate == item.date ? {
@@ -304,9 +424,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
q: common_vendor.o(($event) => $options.clickSelectDate(item), index)
});
}),
l: $data.selectDate != $data.todayDate
o: $data.selectDate != $data.todayDate
} : {
m: common_vendor.f($data.weekDateList, (item, index, i0) => {
p: common_vendor.f($data.weekDateList, (item, index, i0) => {
return common_vendor.e($data.selectDate != $data.todayDate ? common_vendor.e({
a: $data.selectDate == item.date
}, $data.selectDate == item.date ? {
@@ -340,12 +460,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
q: index
});
}),
n: $data.selectDate != $data.todayDate
q: $data.selectDate != $data.todayDate
}, {
o: common_vendor.t($data.isExpand ? "收起" : "展开"),
p: common_assets._imports_3$2,
q: common_vendor.o(($event) => $options.clickExpandOrRetract()),
r: common_vendor.f($data.tabList, (item, index, i0) => {
r: common_vendor.t($data.isExpand ? "收起" : "展开"),
s: $data.isExpand
}, $data.isExpand ? {
t: common_assets._imports_3$2
} : {
v: common_assets._imports_4$1
}, {
w: common_vendor.o(($event) => $options.clickExpandOrRetract()),
x: common_vendor.f($data.tabList, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: common_vendor.n("item " + ($data.selectTab == index ? "select" : "")),
@@ -353,7 +478,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
d: common_vendor.o(($event) => $options.clickTabItem(index), index)
};
}),
s: common_vendor.f($data.stockCategoryList, (item, index, i0) => {
y: common_vendor.f($data.stockCategoryList, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.primary_sector),
b: $data.selectTopCategory == index
@@ -363,29 +488,38 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
e: common_vendor.o(($event) => $options.clickTopCategoryItem(index), index)
});
}),
t: $data.selectTab == 0
z: $data.selectTab == 0
}, $data.selectTab == 0 ? {
v: common_vendor.f($data.eventList, (item, index, i0) => {
A: common_vendor.f($data.eventList, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t($data.getLocaleHourMinute(item.start_time)),
b: common_vendor.f(5, (sitem, sindex, i1) => {
return {
a: sindex < item.star ? "/static/icon/invest/star_s.png" : "/static/icon/invest/star.png"
a: sindex < item.category.star_rating ? "/static/icon/invest/star_s.png" : "/static/icon/invest/star.png"
};
}),
c: index,
d: common_vendor.t(item.category.event_type),
e: common_vendor.t(item.title),
f: common_vendor.t(item.description),
g: item.concepts
}, item.concepts ? {
h: common_vendor.f(JSON.parse(item.concepts), (citem, cindex, i1) => {
f: common_vendor.f(item.tags, (titem, tindex, i1) => {
return {
a: common_vendor.t(citem[0]),
b: common_vendor.t(citem[2] * 100),
c: "2cf1ca64-0-" + i0 + "-" + i1,
a: common_vendor.t(titem),
b: tindex
};
}),
g: "2cf1ca64-0-" + i0,
h: common_vendor.p({
source: $data.replaceAnswerLabel(item.description)
}),
i: item.related_concepts
}, item.related_concepts ? {
j: common_vendor.f(item.related_concepts, (citem, cindex, i1) => {
return {
a: common_vendor.t(citem.name),
b: common_vendor.t(citem.score * 100),
c: "2cf1ca64-1-" + i0 + "-" + i1,
d: common_vendor.p({
position: citem[2],
position: citem.score,
range: [270, 630],
size: 26,
["ring-width"]: 2,
@@ -395,34 +529,64 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
};
})
} : {}, {
i: index,
j: common_vendor.o(($event) => $options.clickEventItem(item.id), index)
k: index,
l: common_vendor.o(($event) => $options.clickEventItem(item.id), index)
});
})
} : {}, {
w: $data.selectTab == 1
B: $data.selectTab == 1
}, $data.selectTab == 1 ? {
x: common_vendor.f($data.dataList, (item, index, i0) => {
C: common_vendor.f($data.dataList, (item, index, i0) => {
return {
a: common_vendor.t($data.getLocaleHourMinute(item.created_at)),
b: common_vendor.f(5, (item2, index2, i1) => {
b: common_vendor.f(5, (sitem, sindex, i1) => {
return {
a: index2
};
}),
c: common_vendor.f(5, (item2, index2, i1) => {
return {
a: index2
a: sindex < item.star ? "/static/icon/invest/star_s.png" : "/static/icon/invest/star.png"
};
}),
c: index,
d: common_vendor.t(item.title),
e: index
e: common_vendor.t(item.former),
f: common_vendor.t(item.forecast ? item.forecast : "--"),
g: common_vendor.t(item.fact ? item.fact : "--"),
h: index
};
})
} : {}, {
D: common_vendor.s("top:" + $data.contentTop + "px;"),
E: common_vendor.o(($event) => $options.loadMoreData()),
F: common_assets._imports_5,
G: common_vendor.o(($event) => $options.clickPreMonth()),
H: common_vendor.t($data.selectMonth),
I: common_assets._imports_6,
J: common_vendor.o(($event) => $options.clickNextMonth()),
K: common_vendor.f($data.weekList, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: index
};
}),
y: common_assets._imports_4$1,
z: common_assets._imports_5
} : {}, {
A: common_vendor.s("top:" + $data.contentTop + "px;")
L: common_vendor.f($data.calendarDateList[$data.selectMonthIndex], (item, index, i0) => {
return common_vendor.e({
a: item.isToday || item.date == $data.selectDate
}, item.isToday || item.date == $data.selectDate ? {
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)
});
}),
M: common_vendor.s("margin-top:" + $data.navH + "px;"),
N: common_vendor.sr("popup", "2cf1ca64-2"),
O: common_vendor.p({
type: "top"
})
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);

View File

@@ -1,6 +1,9 @@
{
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"usingComponents": {
"zui-progress-circle": "../../uni_modules/zui-progress-circle/components/zui-progress-circle/zui-progress-circle"
"ua-markdown": "../../components/ua-markdown/ua-markdown",
"zui-progress-circle": "../../uni_modules/zui-progress-circle/components/zui-progress-circle/zui-progress-circle",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
}
}

File diff suppressed because one or more lines are too long

View File

@@ -248,12 +248,20 @@
color: #222;
}
.eventList .item .labelC {
display: inline-block;
margin-top: 12rpx;
}
.eventList .item .labelC .label {
display: inline-block;
margin-right: 10rpx;
padding: 0 10rpx;
line-height: 30rpx;
font-size: 20rpx;
font-weight: 500;
border-radius: 5rpx;
border: solid 1rpx #333;
}
.eventList .item .content {
margin-top: 20rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
@@ -329,3 +337,74 @@
font-weight: 500;
color: #666;
}
.popup {
background-color: white;
padding: 30rpx 0;
}
.popup .yearMonthC {
padding: 0 30rpx;
}
.popup .yearMonthC .yearMonth {
text-align: center;
font-size: 24rpx;
}
.popup .yearMonthC .btn {
background-color: #f8f8f8;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
}
.popup .yearMonthC .btn .icon {
display: block;
width: 24rpx;
height: auto;
}
.popup .weekList {
margin-top: 20rpx;
padding: 0 30rpx;
}
.popup .weekList .item {
line-height: 40rpx;
font-size: 24rpx;
color: #a1a1a1;
text-align: center;
}
.popup .monthDateList {
padding: 0 30rpx;
}
.popup .monthDateList .item {
margin-bottom: 10rpx;
width: calc(100%/7);
}
.popup .monthDateList .item .date {
background-color: #f8f8f8;
width: calc(100% - 10rpx);
line-height: 64rpx;
border-radius: 15rpx;
font-size: 24rpx;
font-weight: bold;
color: #333;
text-align: center;
}
.popup .monthDateList .item .date.today {
background-color: #FF7E1A;
color: white;
}
.popup .monthDateList .item .date.inRange {
background-color: #FFF2EB;
}
.popup .monthDateList .item .date.notCurrentMonth {
background-color: #fdfdfd;
color: #c3c3c3;
}
.popup .monthDateList .item .eventNum {
margin-top: 12rpx;
width: 80rpx;
height: 30rpx;
line-height: 30rpx;
border-radius: 5rpx;
font-size: 16rpx;
font-weight: 500;
color: white;
text-align: center;
}

View File

@@ -1,6 +1,7 @@
"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() {
@@ -9,41 +10,51 @@ const _sfc_main = {
eventId: "",
//事件id
contentTop: "",
categoryList: ["背景", "推演", "实际", "相关股票", "相关概念"],
investDetails: null,
former: "",
//背景
categoryList: ["背景", "推演", "相关股票"],
selectCategory: 0,
stockCategoryList: [
{
title: "全部股票",
num: 0,
bgColor: "#C00000",
color: "white"
},
{
title: "大周期",
num: 0,
bgColor: "#305496",
color: "white"
},
{
title: "TMT板块",
num: 0,
bgColor: "#FFBF00",
color: "white"
},
{
title: "大金融地产",
num: 0,
bgColor: "#FFF4D3"
},
{
title: "大消费",
num: 0,
bgColor: "#CDEEEE"
},
{
title: "公共产业板块",
num: 0,
bgColor: "#DEEBF7"
}
]
],
accMul: utils_util.accMul
};
},
onLoad(e) {
this.contentTop = this.navH + (30 + 74) / 750 * common_vendor.inject("windowWidth");
this.contentTop = this.navH + (30 + 72) / 750 * common_vendor.inject("windowWidth");
if (e.id) {
this.eventId = e.id;
this.getEventDetailsData();
@@ -58,11 +69,32 @@ const _sfc_main = {
this.selectCategory = index;
}
},
/**
* 点击相关股票
* @param {Object} item 股票数据
*/
clickLookRelatedStockItem(item) {
common_vendor.index.navigateTo({
url: "/pages/index/stockDetails/stockDetails?type=2&code=" + item.code + "&des=" + item.description + "&name=" + item.name
});
},
/**
* 获取事件详情数据
*/
getEventDetailsData() {
request_api.investEventDetails(this.eventId).then((res) => {
if (res.code == 200) {
let detail = res.data.detail;
for (let item of this.stockCategoryList) {
item.num = detail.sector_stats[item.title];
}
this.investDetails = detail;
this.former = detail.former.replace("<answer>", "").replace("</answer>", "");
} else
common_vendor.index.showToast({
title: res.message,
icon: "none"
});
}).catch((error) => {
});
}
@@ -70,11 +102,13 @@ const _sfc_main = {
};
if (!Array) {
const _easycom_navBar2 = common_vendor.resolveComponent("navBar");
_easycom_navBar2();
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_navBar + _easycom_ua_markdown)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
@@ -93,18 +127,58 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
});
}),
d: common_vendor.s("top:" + $data.navH + "px;"),
e: $data.selectCategory == 3
}, $data.selectCategory == 3 ? {
f: common_vendor.f($data.stockCategoryList, (item, index, i0) => {
e: $data.investDetails
}, $data.investDetails ? common_vendor.e({
f: $data.selectCategory == 0
}, $data.selectCategory == 0 ? {
g: common_vendor.p({
source: $data.former
})
} : {}, {
h: $data.selectCategory == 1
}, $data.selectCategory == 1 ? {
i: common_vendor.p({
source: $data.investDetails.forecast
})
} : {}, {
j: $data.selectCategory == 2
}, $data.selectCategory == 2 ? {
k: common_vendor.f($data.stockCategoryList, (item, index, i0) => {
return {
a: common_vendor.t(item.title),
b: common_vendor.s("background-color:" + item.bgColor + ";color:" + item.color + ";"),
c: index
a: common_vendor.t(item.num),
b: common_vendor.t(item.title),
c: common_vendor.s("background-color:" + item.bgColor + ";color:" + item.color + ";"),
d: index
};
}),
l: common_vendor.f($data.investDetails.related_stocks, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.code + " " + item.name),
b: common_vendor.t($data.accMul(item.score, 100)),
c: item.sw_primary_sector
}, item.sw_primary_sector ? {
d: common_vendor.t(item.sw_primary_sector)
} : {}, {
e: common_vendor.t(item.description),
f: index,
g: common_vendor.o(($event) => $options.clickLookRelatedStockItem(item), index)
});
})
} : {}, {
m: $data.selectCategory == 4
}, $data.selectCategory == 4 ? {
n: common_vendor.f($data.investDetails.extracted_concepts, (item, index, i0) => {
return {
a: item.first_image,
b: common_vendor.t(item.name),
c: common_vendor.t(item.reason),
d: index,
e: common_vendor.o(($event) => _ctx.clickConceptItem(), index)
};
})
} : {}, {
g: common_vendor.s("top:" + $data.contentTop + "px;")
});
o: common_vendor.s("top:" + $data.contentTop + "px;")
}) : {});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);

View File

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

View File

@@ -1 +1 @@
<view><nav-bar wx:if="{{a}}" u-i="b7e6c0fc-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="categoryC fixed" style="{{d}}"><view wx:for="{{c}}" wx:for-item="item" wx:key="d" class="{{item.c}}" bindtap="{{item.e}}">{{item.a}} <view wx:if="{{item.b}}" class="line absolute"></view></view></view><view class="contentC fixed" style="{{g}}"><view wx:if="{{e}}" class="stockC"><view class="stockCategoryList flexWrap"><view wx:for="{{f}}" wx:for-item="item" wx:key="c" class="item flexColumnCenter" style="{{item.b}}"><view class="num">23</view><view class="title">{{item.a}}</view></view></view><view class="stockList"><view class="item"><view class="titleCorrelationC flex"><view class="title flex1">000065.SZ 北方国际</view><view class="correlation">相关度: 98%</view></view><view class="category">石油石化</view><view class="content"> 海外订单占比70%-80%,在俄语区矿产资源开发(蒙古矿山)、电力运营经验丰富,是乌克兰重建核心受益标的。公司在俄语区的深厚积累使其直接获益于区域经济复苏和能源合作深化。 </view></view></view></view></view></view>
<view><nav-bar wx:if="{{a}}" u-i="b7e6c0fc-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="categoryC fixed" style="{{d}}"><view wx:for="{{c}}" wx:for-item="item" wx:key="d" class="{{item.c}}" bindtap="{{item.e}}">{{item.a}} <view wx:if="{{item.b}}" class="line absolute"></view></view></view><view wx:if="{{e}}" class="contentC fixed" style="{{o}}"><view wx:if="{{f}}" class="former"><ua-markdown wx:if="{{g}}" u-i="b7e6c0fc-1" bind:__l="__l" u-p="{{g}}"/></view><view wx:if="{{h}}" class="former"><ua-markdown wx:if="{{i}}" u-i="b7e6c0fc-2" bind:__l="__l" u-p="{{i}}"/></view><view wx:if="{{j}}" class="stockC"><view class="stockCategoryList flexWrap"><view wx:for="{{k}}" wx:for-item="item" wx:key="d" class="item flexColumnCenter" style="{{item.c}}"><view class="num">{{item.a}}</view><view class="title">{{item.b}}</view></view></view><view class="stockList"><view wx:for="{{l}}" wx:for-item="item" wx:key="f" class="item" bindtap="{{item.g}}"><view class="titleCorrelationC flex"><view class="title flex1">{{item.a}}</view><view class="correlation">相关度: {{item.b}}%</view></view><view wx:if="{{item.c}}" class="category">{{item.d}}</view><view class="content">{{item.e}}</view></view></view></view><view wx:if="{{m}}" class=""><view class="conceptList"><view wx:for="{{n}}" wx:for-item="item" wx:key="d" class="item relative" bindtap="{{item.e}}"><image class="cover" src="{{item.a}}" mode="aspectFill"></image><view class="infoC absolute"><view class="title">{{item.b}}</view><view class="content relative">{{item.c}} <text class="lookDetails absolute">查看详情</text></view></view></view></view></view></view></view>

View File

@@ -38,6 +38,9 @@
bottom: 0;
overflow-y: scroll;
}
.contentC .former {
padding: 40rpx 25rpx;
}
.contentC .stockCategoryList {
margin-top: 18rpx;
padding: 0 24rpx;
@@ -61,6 +64,9 @@
}
.contentC .stockList {
padding: 22rpx 25rpx 30rpx;
}
.contentC .stockList .item {
padding: 22rpx 0 30rpx;
border-bottom: solid 1rpx #E4E4E4;
}
.contentC .stockList .item .title {
@@ -94,3 +100,42 @@
color: #666;
line-height: 1.2rem;
}
.contentC .conceptList {
padding: 30rpx 25rpx;
}
.contentC .conceptList .item {
margin-bottom: 20rpx;
}
.contentC .conceptList .item .cover {
display: block;
width: 100%;
height: 350rpx;
border-radius: 10rpx;
}
.contentC .conceptList .item .infoC {
background: linear-gradient(to bottom, #00000080, #000);
padding: 20rpx 23rpx;
left: 0;
width: 100%;
bottom: 0;
border-radius: ;
color: white;
}
.contentC .conceptList .item .infoC .title {
font-size: 26rpx;
font-weight: bold;
}
.contentC .conceptList .item .infoC .content {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
margin-top: 10rpx;
font-size: 20rpx;
font-weight: 500;
line-height: 1.2rem;
}
.contentC .conceptList .item .infoC .content .lookDetails {
right: 0;
color: #F97316;
}

View File

@@ -2,14 +2,22 @@
const common_vendor = require("../../../common/vendor.js");
const request_api = require("../../../request/api.js");
const common_assets = require("../../../common/assets.js");
const app = getApp();
const _sfc_main = {
data() {
return {
contentTop: "",
mobile: "",
//手机号
code: ""
code: "",
//验证码
isAgree: false,
countdown: 0,
//验证码倒计时
getCode: false,
//是否已经获取过验证码
timer: null
//定时器
};
},
onLoad() {
@@ -20,6 +28,48 @@ const _sfc_main = {
* 点击获取验证码
*/
clickGetCode() {
let mobile = this.mobile;
if (!mobile) {
common_vendor.index.showToast({
title: "请输入手机号",
icon: "none"
});
return;
}
if (!app.globalData.mobileReg.test(mobile)) {
common_vendor.index.showToast({
title: "请输入正确格式的手机号",
icon: "none"
});
return;
}
if (this.isSubmiting) {
return;
}
if (this.countdown > 0) {
return;
}
this.isSubmiting = true;
let param = { phone: this.mobile, isJson: 1 };
let that = this;
request_api.sendSMS(param).then((res) => {
common_vendor.index.showToast({
title: res.message,
icon: "none"
});
let time = 60;
this.timer = setInterval(() => {
that.isSubmiting = false;
time--;
if (time == 0) {
clearInterval(that.timer);
}
that.getCode = true;
that.countdown = time;
}, 1e3);
}).catch((error) => {
this.isSubmiting = false;
});
},
/**
* 点击立即登录
@@ -39,11 +89,26 @@ const _sfc_main = {
});
return;
}
if (!this.isAgree) {
common_vendor.index.showToast({
title: "请阅读并同意我们的《用户服务协议》和《隐私政策》",
icon: "none"
});
return;
}
let param = { phone: this.mobile, code: this.code, isJson: 1 };
request_api.loginByPhone(param).then((res) => {
if (res.code == 200)
;
else
if (res.code == 0) {
common_vendor.index.showToast({
title: res.message
});
common_vendor.index.setStorageSync("token", res.token);
setTimeout(function() {
common_vendor.index.switchTab({
url: "/pages/index/index"
});
}, 1e3);
} else
common_vendor.index.showToast({
title: res.message,
icon: "none"
@@ -56,6 +121,20 @@ const _sfc_main = {
*/
clickOneClickLogin() {
common_vendor.index.navigateBack();
},
/**
* 点击同意
*/
clickAgree() {
this.isAgree = !this.isAgree;
},
/**
* 点击查看协议
*/
clickProtocol(type) {
common_vendor.index.navigateTo({
url: "/pages/mine/web/web?type=" + type
});
}
}
};
@@ -68,7 +147,7 @@ if (!Math) {
_easycom_navBar();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
return common_vendor.e({
a: common_vendor.p({
leftText: "登录",
hideNavBg: true,
@@ -76,16 +155,24 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
}),
b: common_vendor.s("margin-top:" + $data.contentTop + "px;"),
c: common_assets._imports_0$1,
d: common_assets._imports_1$7,
d: common_assets._imports_1$6,
e: $data.mobile,
f: common_vendor.o(($event) => $data.mobile = $event.detail.value),
g: common_assets._imports_2$8,
g: common_assets._imports_2$7,
h: $data.code,
i: common_vendor.o(($event) => $data.code = $event.detail.value),
j: common_vendor.o(($event) => $options.clickGetCode()),
k: common_vendor.o(($event) => $options.clickLoginAtOnce()),
l: common_vendor.o(($event) => $options.clickOneClickLogin())
};
j: common_vendor.t($data.getCode ? $data.countdown > 0 ? $data.countdown + "s" : "重新获取验证码" : "获取验证码"),
k: common_vendor.o(($event) => $options.clickGetCode()),
l: common_vendor.o(($event) => $options.clickLoginAtOnce()),
m: common_vendor.o(($event) => $options.clickOneClickLogin()),
n: $data.isAgree
}, $data.isAgree ? {
o: common_assets._imports_3$5
} : {
p: common_assets._imports_4$3
}, {
q: common_vendor.o(($event) => $options.clickAgree())
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);

View File

@@ -1 +1 @@
<view><nav-bar wx:if="{{a}}" u-i="426e5c02-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="logo" style="{{b}}" src="{{c}}" mode="widthFix"></image><view class="loginTitle">欢迎登录价值前沿平台</view><view class="inputC mobile flex"><image class="icon" src="{{d}}" mode="widthFix"></image><input class="flex1" type="number" placeholder="请输入手机号" placeholder-style="color: #aaa" value="{{e}}" bindinput="{{f}}"/></view><view class="inputC code flex"><image class="icon" src="{{g}}" mode="widthFix"></image><input class="flex1" type="number" placeholder="请输入验证码" placeholder-style="color: #aaa" value="{{h}}" bindinput="{{i}}"/><view class="getCode" bindtap="{{j}}">获取验证码</view></view><view class="btn loginAtOnce" bindtap="{{k}}">立即登录</view><view class="btn oneClickLogin" bindtap="{{l}}">授权手机号一键登录</view><view class="agreeProtocolC fixed flexCenter"><view class="agreeC"><image class="icon" src="{{''}}" mode="widthFix"></image></view> 阅读并同意我们的<text class="protocol">《用户服务协议》</text>和<text class="protocol">《隐私政策》</text></view></view>
<view><nav-bar wx:if="{{a}}" u-i="426e5c02-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="logo" style="{{b}}" src="{{c}}" mode="widthFix"></image><view class="loginTitle">欢迎登录价值前沿平台</view><view class="inputC mobile flex"><image class="icon" src="{{d}}" mode="widthFix"></image><input class="flex1" type="number" placeholder="请输入手机号" placeholder-style="color: #aaa" maxlength="11" value="{{e}}" bindinput="{{f}}"/></view><view class="inputC code flex"><image class="icon" src="{{g}}" mode="widthFix"></image><input class="flex1" type="number" placeholder="请输入验证码" placeholder-style="color: #aaa" value="{{h}}" bindinput="{{i}}"/><view class="getCode" bindtap="{{k}}">{{j}}</view></view><view class="btn loginAtOnce" bindtap="{{l}}">立即登录</view><view class="btn oneClickLogin" bindtap="{{m}}">授权手机号一键登录</view><view class="agreeProtocolC fixed flexCenter"><view class="agreeC" bindtap="{{q}}"><image wx:if="{{n}}" class="icon" src="{{o}}" mode="widthFix"></image><image wx:else class="icon" src="{{p}}" mode="widthFix"></image></view> 阅读并同意我们的<text class="protocol">《用户服务协议》</text>和<text class="protocol">《隐私政策》</text></view></view>

View File

@@ -72,6 +72,7 @@
padding: 14rpx;
}
.agreeProtocolC .agreeC .icon {
display: block;
width: 28rpx;
height: auto;
}

View File

@@ -5,7 +5,8 @@ const common_assets = require("../../common/assets.js");
const _sfc_main = {
data() {
return {
contentTop: ""
contentTop: "",
isAgree: false
};
},
onLoad() {
@@ -16,11 +17,34 @@ const _sfc_main = {
* 点击一键登录
*/
clickOneClickLogin() {
if (!this.isAgree) {
common_vendor.index.showToast({
title: "请阅读并同意我们的《用户服务协议》和《隐私政策》",
icon: "none"
});
return;
}
common_vendor.index.login({
provider: "weixin",
success(res) {
common_vendor.index.__f__("log", "at pages/login/login.vue:49", res.code);
let param = { code: res.code, isJson: 1 };
request_api.loginByWx(param).then((res2) => {
if (res2.code == 200) {
common_vendor.index.showToast({
title: res2.message
});
common_vendor.index.setStorageSync("token", res2.data.token);
setTimeout(function() {
common_vendor.index.switchTab({
url: "/pages/index/index"
});
}, 1e3);
} else
common_vendor.index.showToast({
title: res2.message,
icon: "none"
});
}).catch((error) => {
});
},
@@ -40,11 +64,15 @@ const _sfc_main = {
* 点击同意
*/
clickAgree() {
this.isAgree = !this.isAgree;
},
/**
* 点击查看协议
*/
clickProtocol() {
clickProtocol(type) {
common_vendor.index.navigateTo({
url: "/pages/mine/web/web?type=" + type
});
}
}
};
@@ -57,7 +85,7 @@ if (!Math) {
_easycom_navBar();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
return common_vendor.e({
a: common_vendor.p({
leftText: "登录",
hideNavBg: true,
@@ -67,10 +95,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
c: common_assets._imports_0$1,
d: common_vendor.o(($event) => $options.clickOneClickLogin()),
e: common_vendor.o(($event) => $options.clickCodeLogin()),
f: common_vendor.o(($event) => $options.clickAgree()),
g: common_vendor.o(($event) => $options.clickProtocol()),
h: common_vendor.o(($event) => $options.clickProtocol())
};
f: $data.isAgree
}, $data.isAgree ? {
g: common_assets._imports_3$5
} : {
h: common_assets._imports_4$3
}, {
i: common_vendor.o(($event) => $options.clickAgree()),
j: common_vendor.o(($event) => $options.clickProtocol(2)),
k: common_vendor.o(($event) => $options.clickProtocol(3))
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);

View File

@@ -1 +1 @@
<view><nav-bar wx:if="{{a}}" u-i="f90ca6fc-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="logo" style="{{b}}" src="{{c}}" mode="widthFix"></image><view class="loginTitle">欢迎登录价值前沿平台</view><view class="btn oneClickLogin" bindtap="{{d}}">授权手机号一键登录</view><view class="btn codeLogin" bindtap="{{e}}">使用短信验证登录</view><view class="agreeProtocolC fixed flexCenter"><view class="agreeC" bindtap="{{f}}"><image class="icon" src="{{''}}" mode="widthFix"></image></view> 阅读并同意我们的<text class="protocol" bindtap="{{g}}">《用户服务协议》</text>和<text class="protocol" bindtap="{{h}}">《隐私政策》</text></view></view>
<view><nav-bar wx:if="{{a}}" u-i="f90ca6fc-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="logo" style="{{b}}" src="{{c}}" mode="widthFix"></image><view class="loginTitle">欢迎登录价值前沿平台</view><view class="btn oneClickLogin" bindtap="{{d}}">授权手机号一键登录</view><view class="btn codeLogin" bindtap="{{e}}">使用短信验证登录</view><view class="agreeProtocolC fixed flexCenter"><view class="agreeC" bindtap="{{i}}"><image wx:if="{{f}}" class="icon" src="{{g}}" mode="widthFix"></image><image wx:else class="icon" src="{{h}}" mode="widthFix"></image></view> 阅读并同意我们的<text class="protocol" bindtap="{{j}}">《用户服务协议》</text>和<text class="protocol" bindtap="{{k}}">《隐私政策》</text></view></view>

View File

@@ -38,6 +38,7 @@
padding: 14rpx;
}
.agreeProtocolC .agreeC .icon {
display: block;
width: 28rpx;
height: auto;
}

View File

@@ -82,6 +82,7 @@ const _sfc_main = {
avatar: this.avatar,
nickname: this.nickname,
gender: this.sex == "男" ? "male" : "female",
phone: this.mobile,
bio: this.profile,
isFile: 1
};
@@ -95,6 +96,7 @@ const _sfc_main = {
let param = {
nickname: this.nickname,
gender: this.sex == "男" ? "male" : "female",
phone: this.mobile,
bio: this.profile
};
request_api.updateBasicInfo(param).then((res) => {

View File

@@ -1 +1 @@
<view><nav-bar wx:if="{{a}}" u-i="8b6eb184-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="avatarC fixed" style="{{f}}"><image class="avatar" src="{{c}}" mode="aspectFill"></image><image class="icon absolute" src="{{d}}" mode="widthFix"></image><button class="absolute" open-type="chooseAvatar" bindchooseavatar="{{e}}"></button></view><view class="basicInfoC fixed" style="{{p}}"><view class="title">基本信息</view><view class="section">昵称</view><view class="inputC"><input type="nickname" value="{{g}}" bindinput="{{h}}"/></view><view class="section">手机号</view><view class="inputC">{{i}}</view><view class="section">性别</view><picker mode="selector" range="{{l}}" bindchange="{{m}}"><view class="selectC flex"><view class="flex1">{{j}}</view><image class="arrow" src="{{k}}" mode="widthFix"></image></view></picker><view class="section">个人简介</view><view class="textareaC"><block wx:if="{{r0}}"><textarea placeholder="简单介绍一下自己吧" placeholder-style="color:#AAA" value="{{n}}" bindinput="{{o}}"></textarea></block></view></view><view class="next fixed" bindtap="{{q}}">下一步</view></view>
<view><nav-bar wx:if="{{a}}" u-i="8b6eb184-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="avatarC fixed" style="{{f}}"><image class="avatar" src="{{c}}" mode="aspectFill"></image><image class="icon absolute" src="{{d}}" mode="widthFix"></image><button class="absolute" open-type="chooseAvatar" bindchooseavatar="{{e}}"></button></view><view class="basicInfoC fixed" style="{{p}}"><view class="title">基本信息</view><view class="section">昵称</view><view class="inputC"><input type="nickname" value="{{g}}" bindinput="{{h}}"/></view><view class="section">手机号</view><view class="selectC flex">{{i}}</view><view class="section">性别</view><picker mode="selector" range="{{l}}" bindchange="{{m}}"><view class="selectC flex"><view class="flex1">{{j}}</view><image class="arrow" src="{{k}}" mode="widthFix"></image></view></picker><view class="section">个人简介</view><view class="textareaC"><block wx:if="{{r0}}"><textarea placeholder="简单介绍一下自己吧" placeholder-style="color:#AAA" value="{{n}}" bindinput="{{o}}"></textarea></block></view></view><view class="next fixed" bindtap="{{q}}">下一步</view></view>

View File

@@ -13,7 +13,7 @@ const _sfc_main = {
commentList: [],
page: 1,
loadAll: false,
getLocaleDate: utils_util.getLocaleDate
getLocaleMonthDayHourMinte: utils_util.getLocaleMonthDayHourMinte
};
},
onLoad() {
@@ -41,6 +41,15 @@ const _sfc_main = {
this.getCommentListData();
}
},
/**
* 点击查看事件详情
* @param {Object} id
*/
clickEventItem(id) {
common_vendor.index.navigateTo({
url: "/pages/index/eventDetails/eventDetails?id=" + id
});
},
/**
* 获取评论列表数据
*/
@@ -94,16 +103,23 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
}, $data.selectTab == 0 ? {
f: common_vendor.f($data.commentList, (item, index, i0) => {
return {
a: index
a: common_vendor.t(item.event.importance),
b: common_vendor.t(item.event.title),
c: index
};
})
} : {
g: common_vendor.f($data.commentList, (item, index, i0) => {
return {
a: common_vendor.t($data.getLocaleDate(item.created_at)),
b: common_vendor.t(item.content),
c: common_vendor.t(item.event_title),
d: index
a: item.commenter.avatar_url,
b: common_vendor.t(item.commenter.nickname),
c: common_vendor.t($data.getLocaleMonthDayHourMinte(item.created_at)),
d: common_vendor.t(item.content),
e: common_vendor.t(item.event.importance),
f: common_vendor.t(item.event.title),
g: common_vendor.t(item.event.description),
h: common_vendor.o(($event) => $options.clickEventItem(item.event.id), index),
i: index
};
})
}, {

View File

@@ -1 +1 @@
<view><nav-bar wx:if="{{a}}" u-i="dc49bf38-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="tabC fixed flex" style="{{d}}"><view wx:for="{{c}}" wx:for-item="item" wx:key="d" class="{{item.c}}" bindtap="{{item.e}}">{{item.a}} <view wx:if="{{item.b}}" class="line absolute"></view></view></view><view class="list fixed" style="{{h}}"><block wx:if="{{e}}"><view wx:for="{{f}}" wx:for-item="item" wx:key="a" class="commentMeItem"><view class="replyContentC"><view class="flex"><view class="flex1 flex"><image class="avatar" src="{{''}}" mode="aspectFill"></image><view class="flex1"><view class="replyNickname">逸尘破晓</view><view class="time">2-15 15:37</view></view></view><view class="reply">回复</view></view><view class="content"> 回复<text class="originNickname">永不落的梦想</text><text>:四部门联合启动的人力资源服务业与制造业融合发展点。</text></view></view><view class="originalTextC"><view class="originReply"><text class="originNickname">永不落的梦想</text><text>:四部门联合启动的人力资源服务业与制造业融合发展点。</text></view><view class="originEventC"><view class="levelTitleC flex"><view class="level">C</view><view class="title">四部门联合启动人力资源服务业与制造业...</view></view><view class="eventContent">人社部、工信部等四部门印发通知明确在30个城市开展3年期试点培育人力资源服务与制造业协同机构...</view></view></view></view></block><block wx:else><view wx:for="{{g}}" wx:for-item="item" wx:key="d" class="myCommentItem"><view class="replyContentC"><view class="flex"><image class="avatar" src="{{''}}" mode="aspectFill"></image><view class="flex1"><view class="nickname">逸尘破晓</view><view class="time">{{item.a}}</view></view></view><view class="content">{{item.b}}</view></view><view class="originEventC"><view class="levelTitleC flex"><view class="level">C</view><view class="title">{{item.c}}</view></view><view class="eventContent">人社部、工信部等四部门印发通知明确在30个城市开展3年期试点培育人力资源服务与制造业协同机构...</view></view></view></block></view></view>
<view><nav-bar wx:if="{{a}}" u-i="dc49bf38-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="tabC fixed flex" style="{{d}}"><view wx:for="{{c}}" wx:for-item="item" wx:key="d" class="{{item.c}}" bindtap="{{item.e}}">{{item.a}} <view wx:if="{{item.b}}" class="line absolute"></view></view></view><view class="list fixed" style="{{h}}"><block wx:if="{{e}}"><view wx:for="{{f}}" wx:for-item="item" wx:key="c" class="commentMeItem"><view class="replyContentC"><view class="flex"><view class="flex1 flex"><image class="avatar" src="{{''}}" mode="aspectFill"></image><view class="flex1"><view class="replyNickname">逸尘破晓</view><view class="time">2-15 15:37</view></view></view><view class="reply">回复</view></view><view class="content"> 回复<text class="originNickname">永不落的梦想</text><text>:四部门联合启动的人力资源服务业与制造业融合发展点。</text></view></view><view class="originalTextC"><view class="originReply"><text class="originNickname">永不落的梦想</text><text>:四部门联合启动的人力资源服务业与制造业融合发展点。</text></view><view class="originEventC"><view class="levelTitleC flex"><view class="level">{{item.a}}</view><view class="title">{{item.b}}</view></view><view class="eventContent">人社部、工信部等四部门印发通知明确在30个城市开展3年期试点培育人力资源服务与制造业协同机构...</view></view></view></view></block><block wx:else><view wx:for="{{g}}" wx:for-item="item" wx:key="i" class="myCommentItem"><view class="replyContentC"><view class="flex"><image class="avatar" src="{{item.a}}" mode="aspectFill"></image><view class="flex1"><view class="nickname">{{item.b}}</view><view class="time">{{item.c}}</view></view></view><view class="content">{{item.d}}</view></view><view class="originEventC" catchtap="{{item.h}}"><view class="levelTitleC flex"><view class="level">{{item.e}}</view><view class="title">{{item.f}}</view></view><view class="eventContent">{{item.g}}</view></view></view></block></view></view>

View File

@@ -33,9 +33,9 @@ const _sfc_main = {
* 点击相关股票
* @param {Object} code
*/
clickLookRelatedStockItem(code) {
clickLookRelatedStockItem(id, code) {
common_vendor.index.navigateTo({
url: "/pages/index/stockDetails/stockDetails?code=" + code
url: "/pages/index/stockDetails/stockDetails?type=1&code=" + code + "&id=" + id
});
},
/**
@@ -133,7 +133,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
a: common_vendor.t(sitem.stock_name),
b: common_vendor.t(($data.getRateUpOrDown(sitem.daily_change) ? "" : "+") + sitem.daily_change),
c: sindex,
d: common_vendor.o(($event) => $options.clickLookRelatedStockItem(sitem.stock_code), sindex)
d: common_vendor.o(($event) => $options.clickLookRelatedStockItem(item.event_id, sitem.stock_code), sindex)
};
}),
v: common_vendor.t($data.getLocaleTime(item.created_at)),

View File

@@ -116,13 +116,13 @@ const _sfc_main = {
});
return;
}
let arr2 = [];
let arr = [];
for (let item of this.preferredMarketList) {
if (item.select) {
arr2.push(item.title);
arr.push(item.title);
}
}
if (arr2.length == 0) {
if (arr.length == 0) {
common_vendor.index.showToast({
title: "请选择偏好市场",
icon: "none"
@@ -142,6 +142,12 @@ const _sfc_main = {
* 更新投资偏好设置
*/
uploadInvestPreferenceData() {
let arr = [];
for (let item of this.preferredMarketList) {
if (item.select) {
arr.push(item.title);
}
}
let param = {
trading_experience: this.selectYearIndex,
investment_style: this.investPreferenceList[this.selectInvestIndex],
@@ -162,6 +168,7 @@ const _sfc_main = {
getUserInfoData() {
request_api.userInfo().then((res) => {
if (res.code == 200) {
this.avatarUrl = res.data.basic_info.avatar_url;
let data = res.data.investment_preferences;
for (var i = 0; i < this.investPreferenceList.length; i++) {
let item = this.investPreferenceList[i];
@@ -186,8 +193,8 @@ const _sfc_main = {
}
}
for (let item of this.preferredMarketList) {
let arr2 = JSON.parse(data.preferred_markets);
let arr1 = arr2[0].split(",");
let arr = JSON.parse(data.preferred_markets);
let arr1 = arr[0].split(",");
if (arr1.indexOf(item.title) > -1) {
item.select = true;
} else {

View File

@@ -12,28 +12,31 @@ const _sfc_main = {
menuList: [
{
icon: "/static/icon/mine/aboutUs.png",
title: "关于我们"
title: "关于我们",
url: "/pages/mine/web/web?type=1"
},
{
icon: "/static/icon/mine/serviceTerm.png",
title: "服务条款"
title: "服务条款",
url: "/pages/mine/web/web?type=2"
},
{
icon: "/static/icon/mine/privacyProtocol.png",
title: "隐私协议"
title: "隐私协议",
url: "/pages/mine/web/web?type=3"
},
{
icon: "/static/icon/mine/feedback.png",
title: "意见反馈",
url: "/pages/mine/feedback/feedback"
},
{
icon: "/static/icon/mine/accountSetting.png",
title: "账户设置"
},
{
icon: "/static/icon/mine/customerService.png",
title: "联系客服"
},
{
icon: "/static/icon/mine/logout.png",
title: "退出登录"
}
]
};
@@ -58,7 +61,7 @@ const _sfc_main = {
*/
clickVip() {
common_vendor.index.navigateTo({
url: "/pages/mine/vip/vip"
url: "/pagesMine/vip/vip"
});
},
/**
@@ -79,11 +82,23 @@ const _sfc_main = {
url: "/pages/mine/myLike/myLike"
});
},
clickMenuItem(url) {
clickMenuItem(url, index) {
if (url) {
common_vendor.index.navigateTo({
url
});
} else if (index == this.menuList.length - 1) {
common_vendor.index.showModal({
title: "您确定要退出登录么",
success(res) {
if (res.confirm) {
common_vendor.index.removeStorageSync("token");
common_vendor.index.switchTab({
url: "/pages/index/index"
});
}
}
});
}
},
/**
@@ -115,22 +130,28 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
h: common_vendor.s("margin-top:" + $data.infoTop + "px;"),
i: common_vendor.o(($event) => $options.clickPersonalInfo())
} : {}, {
j: common_vendor.o(($event) => $options.clickNumItem(0)),
k: common_vendor.o(($event) => $options.clickNumItem(1)),
l: common_vendor.o(($event) => $options.clickNumItem(2)),
m: common_assets._imports_2$4,
n: common_vendor.o(($event) => $options.clickVip()),
o: common_vendor.f($data.menuList, (item, index, i0) => {
j: $data.userInfo
}, $data.userInfo ? {
k: common_vendor.t($data.userInfo.statistics.total_comments),
l: common_vendor.o(($event) => $options.clickNumItem(0)),
m: common_vendor.t($data.userInfo.statistics.follows_count),
n: common_vendor.o(($event) => $options.clickNumItem(1)),
o: common_vendor.t($data.userInfo.statistics.likes_count),
p: common_vendor.o(($event) => $options.clickNumItem(2))
} : {}, {
q: common_assets._imports_2$4,
r: common_vendor.o(($event) => $options.clickVip()),
s: common_vendor.f($data.menuList, (item, index, i0) => {
return common_vendor.e({
a: item.icon,
b: common_vendor.t(item.title),
c: index == $data.menuList.length - 1
}, index == $data.menuList.length - 1 ? {} : {}, {
c: index == $data.menuList.length - 2
}, index == $data.menuList.length - 2 ? {} : {}, {
d: index,
e: common_vendor.o(($event) => $options.clickMenuItem(item.url), index)
e: common_vendor.o(($event) => $options.clickMenuItem(item.url, index), index)
});
}),
p: common_assets._imports_3$3
t: common_assets._imports_3$3
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);

View File

@@ -1 +1 @@
<view><image class="topBg absolute" src="{{a}}" mode="widthFix"></image><view class="navTitle fixed" style="{{b}}">个人中心</view><view wx:if="{{c}}" class="personalInfoC relative flex" style="{{h}}" bindtap="{{i}}"><image class="avatar" src="{{d}}" mode="aspectFill"></image><view class="flex1"><view class="nickname">{{e}}</view><view class="mobile">手机号:{{f}}</view></view><image class="arrow" src="{{g}}" mode="widthFix"></image></view><view class="numList relative flex"><view class="item flex1 flexColumnCenter" bindtap="{{j}}"><view class="num">1</view><view class="title">评论回复</view></view><view class="item flex1 flexColumnCenter" bindtap="{{k}}"><view class="num">1</view><view class="title">关注收藏</view></view><view class="item flex1 flexColumnCenter" bindtap="{{l}}"><view class="num">1</view><view class="title">我的点赞</view></view></view><view class="vipC relative" bindtap="{{n}}"><image class="icon" src="{{m}}" mode="widthFix"></image></view><view class="menuList relative"><view class="list"><view wx:for="{{o}}" wx:for-item="item" wx:key="d" class="item relative flex" bindtap="{{item.e}}"><image class="icon" src="{{item.a}}" mode="aspectFit"></image><view class="title flex1">{{item.b}}</view><image class="arrow" src="{{p}}" mode="widthFix"></image><button wx:if="{{item.c}}" class="absolute" open-type="contact"></button></view></view></view></view>
<view><image class="topBg absolute" src="{{a}}" mode="widthFix"></image><view class="navTitle fixed" style="{{b}}">个人中心</view><view wx:if="{{c}}" class="personalInfoC relative flex" style="{{h}}" bindtap="{{i}}"><image class="avatar" src="{{d}}" mode="aspectFill"></image><view class="flex1"><view class="nickname">{{e}}</view><view class="mobile">手机号:{{f}}</view></view><image class="arrow" src="{{g}}" mode="widthFix"></image></view><view wx:if="{{j}}" class="numList relative flex"><view class="item flex1 flexColumnCenter" bindtap="{{l}}"><view class="num">{{k}}</view><view class="title">评论回复</view></view><view class="item flex1 flexColumnCenter" bindtap="{{n}}"><view class="num">{{m}}</view><view class="title">关注收藏</view></view><view class="item flex1 flexColumnCenter" bindtap="{{p}}"><view class="num">{{o}}</view><view class="title">我的点赞</view></view></view><view class="vipC relative" bindtap="{{r}}"><image class="icon" src="{{q}}" mode="widthFix"></image></view><view class="menuList relative"><view class="list"><view wx:for="{{s}}" wx:for-item="item" wx:key="d" class="item relative flex" bindtap="{{item.e}}"><image class="icon" src="{{item.a}}" mode="aspectFit"></image><view class="title flex1">{{item.b}}</view><image class="arrow" src="{{t}}" mode="widthFix"></image><button wx:if="{{item.c}}" class="absolute" open-type="contact"></button></view></view></view></view>

View File

@@ -27,6 +27,18 @@ const _sfc_main = {
}
},
methods: {
/**
* 点赞评论
*/
clickLikeComment(id, index) {
request_api.likeEventComment(id).then((res) => {
common_vendor.index.showToast({
title: res.message
});
this.myLikeList.splice(index, 1);
}).catch((error) => {
});
},
/**
* 获取我的点赞列表数据
*/
@@ -67,14 +79,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
b: common_assets._imports_0,
c: common_vendor.f($data.myLikeList, (item, index, i0) => {
return {
a: item.author.avatarurl,
a: item.author.avatar_url,
b: common_vendor.t(item.author.nickname),
c: item.post_content,
d: common_vendor.t($data.getLocaleHourMinute(item.like_time)),
e: index
e: common_vendor.o(($event) => $options.clickLikeComment(item.like_id, index), index),
f: index
};
}),
d: common_assets._imports_1$6,
d: common_assets._imports_1$5,
e: common_vendor.s("top:" + $data.navH + "px;")
};
}

View File

@@ -1 +1 @@
<view><nav-bar wx:if="{{a}}" u-i="005f0838-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="list fixed" style="{{e}}"><view wx:for="{{c}}" wx:for-item="item" wx:key="e" class="item"><image class="avatar" src="{{item.a}}" mode="aspectFill"></image><view class="flex1"><view class="nickname">{{item.b}}</view><rich-text class="content" nodes="{{item.c}}"></rich-text><view class="timeReplyLikeC flex between"><view class="timeReplyC flex"><view class="time">{{item.d}}</view></view><view class="likeC flex"><image class="icon" src="{{d}}" mode="widthFix"></image></view></view></view></view></view></view>
<view><nav-bar wx:if="{{a}}" u-i="005f0838-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="list fixed" style="{{e}}"><view wx:for="{{c}}" wx:for-item="item" wx:key="f" class="item"><image class="avatar" src="{{item.a}}" mode="aspectFill"></image><view class="flex1"><view class="nickname">{{item.b}}</view><rich-text class="content" nodes="{{item.c}}"></rich-text><view class="timeReplyLikeC flex between"><view class="timeReplyC flex"><view class="time">{{item.d}}</view></view><view class="likeC flex" bindtap="{{item.e}}"><image class="icon" src="{{d}}" mode="widthFix"></image></view></view></view></view></view></view>

View File

@@ -1,225 +0,0 @@
"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"),
memberInfo: null,
//会员信息
questionList: ["信息纷杂难辨真伪?", "信息纷杂难辨真伪?", "无法把握宏观趋势与行业动向?"],
privilegeList: [
{
icon: "/static/icon/mine/vip/depthReport.png",
icon_v: "/static/icon/mine/vip/depthReport_v.png",
title: "深度研报",
tips: "行业/公司独家分析"
},
{
icon: "/static/icon/mine/vip/strategicInsight.png",
icon_v: "/static/icon/mine/vip/strategicInsight_v.png",
title: "策略洞察",
tips: "赛道趋势+拐点信号"
},
{
icon: "/static/icon/mine/vip/dataTool.png",
icon_v: "/static/icon/mine/vip/dataTool_v.png",
title: "数据工具",
tips: "行业/公司独家分析"
},
{
icon: "/static/icon/mine/vip/dataTool.png",
icon_v: "/static/icon/mine/vip/intelligentScreening_v.png",
title: "智能筛选",
tips: "按需定制标的列表"
},
{
icon: "/static/icon/mine/vip/decisionSupport.png",
icon_v: "/static/icon/mine/vip/decisionSupport_v.png",
title: "决策辅助",
tips: "关键因子评分系统"
},
{
icon: "/static/icon/mine/vip/expertMeeting.png",
icon_v: "/static/icon/mine/vip/expertMeeting_v.png",
title: "专家闭门会",
tips: "深度交流机会"
},
{
icon: "/static/icon/mine/vip/dailyReport.png",
icon_v: "/static/icon/mine/vip/dailyReport_v.png",
title: "日报周报",
tips: "研判速递、节奏掌控"
},
{
icon: "/static/icon/mine/vip/specialColumn.png",
icon_v: "/static/icon/mine/vip/specialColumn_v.png",
title: "专题专栏",
tips: "核心团队观点集结"
},
{
icon: "/static/icon/mine/vip/continuouslyUnlock.png",
icon_v: "/static/icon/mine/vip/continuouslyUnlock_v.png",
title: "持续解锁",
tips: "不定期上线新功能"
}
]
};
},
onLoad() {
this.getMemberStatus();
},
methods: {
/**
* 点击查看vip套餐
*/
clickVipMeal() {
common_vendor.index.navigateTo({
url: "/pages/mine/vipMeal/vipMeal"
});
},
/**
* 获取会员状态
*/
getMemberStatus() {
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) => {
});
}
}
};
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: "会员中心"
}),
b: common_assets._imports_0,
c: $data.memberInfo
}, $data.memberInfo ? common_vendor.e({
d: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
e: common_assets._imports_1$5
} : {
f: common_assets._imports_2$7
}, {
g: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
h: common_vendor.t($data.memberInfo.member_expire_date)
} : {}, {
i: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
j: common_assets._imports_3$4
} : {
k: common_assets._imports_4$2
}, {
l: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
m: common_assets._imports_5$1
} : {
n: common_assets._imports_6
}, {
o: common_vendor.n("impormant " + ($data.memberInfo.is_member ? "vip" : "")),
p: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
q: common_assets._imports_7$1
} : {
r: common_assets._imports_8$1
}, {
s: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
t: common_assets._imports_9$1
} : {
v: common_assets._imports_10$1
}, {
w: common_vendor.n("impormant " + ($data.memberInfo.is_member ? "vip" : "")),
x: common_vendor.n("impormant " + ($data.memberInfo.is_member ? "vip" : "")),
y: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
z: common_assets._imports_11$2
} : {
A: common_assets._imports_12$1
}, {
B: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
C: common_assets._imports_13
} : {
D: common_assets._imports_14
}, {
E: common_assets._imports_15,
F: common_vendor.f($data.questionList, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: index
};
}),
G: common_vendor.n("item " + ($data.memberInfo.is_member ? "vip" : "")),
H: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
I: common_assets._imports_3$4
} : {
J: common_assets._imports_4$2
}, {
K: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
L: common_assets._imports_5$1
} : {
M: common_assets._imports_6
}, {
N: common_assets._imports_16,
O: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
P: common_assets._imports_3$4
} : {
Q: common_assets._imports_4$2
}, {
R: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
S: common_assets._imports_5$1
} : {}, {
T: common_assets._imports_6,
U: common_assets._imports_17,
V: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
W: common_assets._imports_3$4
} : {
X: common_assets._imports_4$2
}, {
Y: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
Z: common_assets._imports_5$1
} : {
aa: common_assets._imports_6
}, {
ab: common_vendor.f($data.privilegeList, (item, index, i0) => {
return {
a: $data.memberInfo.is_member ? item.icon_v : item.icon,
b: common_vendor.t(item.title),
c: common_vendor.t(item.tips),
d: index
};
}),
ac: common_vendor.n("privilegeList flexWrap " + ($data.memberInfo.is_member ? "vip" : "")),
ad: common_vendor.s("margin-top:" + $data.navH + "px;")
}) : {}, {
ae: common_vendor.o(($event) => $options.clickVipMeal())
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/mine/vip/vip.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,211 +0,0 @@
.topBg {
top: 0;
left: 0;
width: 100%;
height: auto;
}
.vipC {
padding-bottom: calc(180rpx + env(safe-area-inset-bottom));
}
.vipC .vipInfoC {
margin: 0 25rpx;
}
.vipC .vipInfoC .bg {
width: 100%;
height: auto;
}
.vipC .vipInfoC .infoC {
top: 130rpx;
left: 38rpx;
}
.vipC .vipInfoC .infoC .title {
font-size: 40rpx;
font-weight: bold;
color: #556B87;
}
.vipC .vipInfoC .infoC .tips {
font-size: 28rpx;
font-weight: 500;
color: #65758A;
}
.vipC .vipInfoC .infoC.vip .title {
color: #AB3D1A;
}
.vipC .vipInfoC .infoC.vip .tips {
color: #AB3D1A;
}
.vipC .vipProfitIntroC {
background-color: white;
margin-top: -70rpx;
padding-top: 40rpx;
border-radius: 20rpx 20rpx 0 0;
}
.vipC .vipProfitIntroC .titleC .icon {
width: 54rpx;
height: auto;
}
.vipC .vipProfitIntroC .titleC .title {
margin: 0 20rpx;
font-size: 50rpx;
font-weight: bold;
color: #222;
}
.vipC .vipProfitIntroC .titleC.research {
margin-top: 50rpx;
}
.vipC .vipProfitIntroC .titleC.decision {
margin-top: 30rpx;
}
.vipC .vipProfitIntroC .titleC.privilege {
margin-top: 40rpx;
}
.vipC .vipProfitIntroC .subtitle {
font-size: 24rpx;
color: #888;
text-align: center;
}
.vipC .vipProfitIntroC .stepC {
margin: 16rpx 25rpx 0;
}
.vipC .vipProfitIntroC .stepC .num {
background-color: #EDEEF1;
margin-right: 25rpx;
width: 50rpx;
line-height: 50rpx;
border-radius: 50%;
font-size: 24rpx;
font-weight: bold;
color: #5C6473;
text-align: center;
}
.vipC .vipProfitIntroC .stepC .step {
font-size: 24rpx;
color: #5C6473;
}
.vipC .vipProfitIntroC .stepC .step .impormant {
font-weight: bold;
}
.vipC .vipProfitIntroC .stepC .step .impormant.vip {
color: #F97316;
}
.vipC .vipProfitIntroC .picList {
padding: 0 25rpx;
margin-top: 34rpx;
}
.vipC .vipProfitIntroC .picList .pic {
margin-right: 20rpx;
}
.vipC .vipProfitIntroC .picList .pic .icon {
width: 100%;
height: auto;
}
.vipC .vipProfitIntroC .picList .pic:last-child {
margin-right: 0;
}
.vipC .vipProfitIntroC .questionC {
margin-top: 40rpx;
}
.vipC .vipProfitIntroC .questionC .title {
font-size: 45rpx;
font-weight: bold;
color: #222;
text-align: center;
}
.vipC .vipProfitIntroC .questionC .iconListC {
margin-top: 46rpx;
padding: 0 23rpx 0 59rpx;
}
.vipC .vipProfitIntroC .questionC .iconListC .icon {
margin-right: 56rpx;
width: 235rpx;
height: auto;
}
.vipC .vipProfitIntroC .questionC .iconListC .list .item {
background-color: #EDEDED;
margin-bottom: 15rpx;
line-height: 70rpx;
border-radius: 35rpx;
font-size: 24rpx;
color: #555;
text-align: center;
}
.vipC .vipProfitIntroC .questionC .iconListC .list .item.vip {
background-color: #FFEBDB;
color: #F97316;
}
.vipC .vipProfitIntroC .introC {
display: flex;
box-shadow: 0px 0px 9rpx 0px rgba(0, 0, 0, 0.1);
margin: 24rpx 25rpx 0;
padding: 40rpx 20rpx 20rpx 33rpx;
line-height: 1.5rem;
border-radius: 10rpx;
font-size: 24rpx;
color: #555;
}
.vipC .vipProfitIntroC .introC .icon {
margin-top: 92rpx;
width: 251rpx;
height: auto;
}
.vipC .vipProfitIntroC .introC.operatingDecision {
padding-bottom: 11rpx;
}
.vipC .vipProfitIntroC .introC.operatingDecision .icon {
margin-top: 116rpx;
width: 249rpx;
height: auto;
}
.vipC .vipProfitIntroC .privilegeList {
margin: 24rpx 25rpx 0;
padding: 20rpx 0;
box-shadow: 0px 0px 9rpx 0px rgba(0, 0, 0, 0.1);
border-radius: 10rpx;
}
.vipC .vipProfitIntroC .privilegeList .item {
padding: 20rpx 0;
width: calc(100%/3);
}
.vipC .vipProfitIntroC .privilegeList .item .icon {
margin-bottom: 10rpx;
width: 91rpx;
height: auto;
}
.vipC .vipProfitIntroC .privilegeList .item .title {
font-size: 26rpx;
font-weight: bold;
color: #242323;
}
.vipC .vipProfitIntroC .privilegeList .item .tips {
margin-top: 6rpx;
font-size: 22rpx;
color: #555;
}
.vipC .vipProfitIntroC .privilegeList.vip {
box-shadow: 0px 0px 9px 0px rgba(249, 115, 22, 0.4);
}
.vipC .vipProfitIntroC .bottomTitle {
margin-top: 80rpx;
font-size: 45rpx;
font-weight: bold;
color: #222;
text-align: center;
}
.vipC .vipProfitIntroC .bottomTips {
font-size: 24rpx;
color: #888;
text-align: center;
}
.lookMealC {
background-color: #F97316;
margin: 0 25rpx;
left: 0;
right: 0;
bottom: calc(20rpx + env(safe-area-inset-bottom));
line-height: 80rpx;
border-radius: 20rpx;
font-size: 26rpx;
font-weight: 500;
color: white;
text-align: center;
}

View File

@@ -1,110 +0,0 @@
"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"),
memberInfo: null,
//会员信息
privilegeList: ["高效选股工具", "股票基金明星榜单", "定期专属晨报、股票动态", "独家产业研报", "个股产业分析", "股票、基金基础指标", "7x24 财经直播"]
};
},
onLoad() {
this.getMemberStatus();
},
methods: {
/**
* 点击加入vip
*/
clickJoinVip() {
},
/**
* 获取会员状态
*/
getMemberStatus() {
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) => {
});
}
}
};
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: "会员中心"
}),
b: common_assets._imports_0,
c: $data.memberInfo
}, $data.memberInfo ? common_vendor.e({
d: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
e: common_assets._imports_1$5
} : {
f: common_assets._imports_2$7
}, {
g: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
h: common_vendor.t($data.memberInfo.member_expire_date)
} : {}, {
i: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
j: common_assets._imports_3$4
} : {
k: common_assets._imports_4$2
}, {
l: $data.memberInfo.is_member
}, $data.memberInfo.is_member ? {
m: common_assets._imports_5$1
} : {
n: common_assets._imports_6
}, {
o: common_vendor.f($data.privilegeList, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item),
b: index == 0 || index == 1 || index == 2
}, index == 0 || index == 1 || index == 2 ? {
c: common_assets._imports_7$2
} : {}, {
d: index == 3 || index == 4
}, index == 3 || index == 4 ? common_vendor.e({
e: index == 3
}, index == 3 ? {} : {}, {
f: index == 4
}, index == 4 ? {} : {}) : {}, {
g: index == 5 || index == 6
}, index == 5 || index == 6 ? {
h: common_assets._imports_8$2
} : {}, {
i: index
});
}),
p: common_assets._imports_8$2,
q: common_vendor.n("privilegeList " + ($data.memberInfo.is_member ? "vip" : "")),
r: common_vendor.s("margin-top:" + $data.navH + "px;")
}) : {}, {
s: $data.memberInfo
}, $data.memberInfo ? {
t: common_vendor.t($data.memberInfo.is_member ? "您已是年度VIP" : "立即加入年度VIP"),
v: common_vendor.o(($event) => $options.clickJoinVip())
} : {});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/mine/vipMeal/vipMeal.js.map

View File

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

View File

@@ -1 +0,0 @@
<view><nav-bar wx:if="{{a}}" u-i="667ff406-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view wx:if="{{c}}" class="vipC" style="{{r}}"><view class="vipInfoC relative"><image wx:if="{{d}}" class="bg" src="{{e}}" mode="widthFix"></image><image wx:else class="bg" src="{{f}}" mode="widthFix"></image><view wx:if="{{g}}" class="infoC vip absolute"><view class="title">尊贵的VIP会员</view><view class="tips">会员有效期至:{{h}}</view></view><view wx:else class="infoC absolute"><view class="title">价值前沿</view><view class="tips">您还不是会员 加入尊享N项服务</view></view></view><view class="privilegeCompareC relative"><view class="titleC flexCenter"><image wx:if="{{i}}" class="icon" src="{{j}}" mode="widthFix"></image><image wx:else class="icon" src="{{k}}" mode="widthFix"></image><view class="title">特权对比</view><image wx:if="{{l}}" class="icon" src="{{m}}" mode="widthFix"></image><image wx:else class="icon" src="{{n}}" mode="widthFix"></image></view><view class="{{q}}"><view class="header flex"><view class="privilege item">专属特权</view><view class="item free">普通免费</view><view class="item vip">VIP会员</view></view><view class="list"><view wx:for="{{o}}" wx:for-item="item" wx:key="i" class="item flex"><view class="optionItem privilege flex">{{item.a}}</view><view class="optionItem free flexCenter"><block wx:if="{{item.b}}"><image class="notContain" src="{{item.c}}" mode="widthFix"></image></block><block wx:if="{{item.d}}"><block wx:if="{{item.e}}">限制查看数量</block><block wx:if="{{item.f}}">每日查看2只</block></block><block wx:if="{{item.g}}"><image class="contain" src="{{item.h}}" mode="widthFix"></image></block></view><view class="optionItem vip flexCenter"><image class="contain" src="{{p}}" mode="widthFix"></image></view></view></view></view></view></view><view wx:if="{{s}}" class="joinVipC fixed" bindtap="{{v}}">{{t}}</view></view>

View File

@@ -1,124 +0,0 @@
.topBg {
top: 0;
left: 0;
width: 100%;
height: auto;
}
.vipC {
padding-bottom: calc(180rpx + env(safe-area-inset-bottom));
}
.vipC .vipInfoC {
margin: 0 25rpx;
}
.vipC .vipInfoC .bg {
width: 100%;
height: auto;
}
.vipC .vipInfoC .infoC {
top: 130rpx;
left: 38rpx;
}
.vipC .vipInfoC .infoC .title {
font-size: 40rpx;
font-weight: bold;
color: #556B87;
}
.vipC .vipInfoC .infoC .tips {
font-size: 28rpx;
font-weight: 500;
color: #65758A;
}
.vipC .vipInfoC .infoC.vip .title {
color: #AB3D1A;
}
.vipC .vipInfoC .infoC.vip .tips {
color: #AB3D1A;
}
.vipC .privilegeCompareC {
background-color: white;
margin-top: -70rpx;
padding-top: 40rpx;
border-radius: 20rpx 20rpx 0 0;
}
.vipC .privilegeCompareC .titleC .icon {
width: 54rpx;
height: auto;
}
.vipC .privilegeCompareC .titleC .title {
margin: 0 20rpx;
font-size: 50rpx;
font-weight: bold;
color: #222;
}
.vipC .privilegeCompareC .privilegeList {
margin: 0 25rpx;
padding: 0 30rpx;
box-shadow: 0px 0px 9px 0px rgba(0, 0, 0, 0.1);
border-radius: 10rpx;
}
.vipC .privilegeCompareC .privilegeList .header {
margin-top: 50rpx;
padding-top: 14rpx;
border-bottom: solid 1rpx #F3F4F6;
}
.vipC .privilegeCompareC .privilegeList .header .item {
line-height: 90rpx;
font-size: 30rpx;
font-weight: bold;
color: #555;
}
.vipC .privilegeCompareC .privilegeList .header .item.privilege {
padding-left: 24rpx;
width: 300rpx;
}
.vipC .privilegeCompareC .privilegeList .header .item.free {
width: 174rpx;
text-align: center;
}
.vipC .privilegeCompareC .privilegeList .header .item.vip {
width: 160rpx;
text-align: center;
}
.vipC .privilegeCompareC .privilegeList .list .item .optionItem {
height: 90rpx;
border-bottom: solid 1rpx #F3F4F6;
}
.vipC .privilegeCompareC .privilegeList .list .item .optionItem .contain {
width: 21rpx;
height: auto;
}
.vipC .privilegeCompareC .privilegeList .list .item .optionItem .notContain {
width: 17rpx;
height: auto;
}
.vipC .privilegeCompareC .privilegeList .list .optionItem.privilege {
width: 300rpx;
font-size: 24rpx;
font-weight: 500;
color: #222;
}
.vipC .privilegeCompareC .privilegeList .list .optionItem.free {
width: 174rpx;
font-size: 20rpx;
color: #555;
text-align: center;
}
.vipC .privilegeCompareC .privilegeList .list .optionItem.vip {
width: 160rpx;
}
.vipC .privilegeCompareC .privilegeList.vip {
box-shadow: 0px 0px 9px 0px rgba(249, 115, 22, 0.4);
}
.joinVipC {
background-color: #F97316;
margin: 0 25rpx;
left: 0;
right: 0;
bottom: calc(20rpx + env(safe-area-inset-bottom));
line-height: 80rpx;
border-radius: 20rpx;
font-size: 26rpx;
font-weight: 500;
color: white;
text-align: center;
}

View File

@@ -0,0 +1,71 @@
"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"),
navTitle: "",
type: "",
//1.关于我们2.服务条款3.隐私协议
webContent: ""
};
},
onLoad(e) {
if (e.type) {
this.type = e.type;
this.getUserInfoData();
if (e.type == 1) {
this.navTitle = "关于我们";
} else if (e.type == 2) {
this.navTitle = "服务条款";
} else if (e.type == 3) {
this.navTitle = "隐私协议";
}
}
},
methods: {
/**
* 获取用户信息数据
*/
getUserInfoData() {
request_api.agreements().then((res) => {
if (res.code == 200) {
if (this.type == 1) {
this.webContent = res.data.agreements.about_us.content;
} else if (this.type == 2) {
this.webContent = res.data.agreements.service_terms.content;
} else if (this.type == 3) {
this.webContent = res.data.agreements.privacy_policy.content;
}
} else
common_vendor.wx$1.showToast({
title: res.message
});
}).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 {
a: common_vendor.p({
leftText: $data.navTitle
}),
b: common_assets._imports_0,
c: common_vendor.t($data.webContent),
d: 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/mine/web/web.js.map

View File

@@ -0,0 +1 @@
<view><nav-bar wx:if="{{a}}" u-i="0a02672e-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="contentC fixed" style="{{d}}"><text>{{c}}</text></view></view>

View File

@@ -0,0 +1,15 @@
.topBg {
top: 0;
left: 0;
width: 100%;
height: auto;
}
.contentC {
background-color: white;
left: 0;
right: 0;
bottom: 0;
margin-top: 10rpx;
padding: 50rpx 25rpx;
overflow-y: scroll;
}