2.4 组件结构调整,调整会员权限判断
This commit is contained in:
@@ -114,6 +114,9 @@ const _sfc_main = {
|
||||
this.getEventCommentListData();
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getMemberStatusData();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 复制标题
|
||||
@@ -194,6 +197,18 @@ const _sfc_main = {
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击股票名称查看个股详情
|
||||
* @param {Object} code
|
||||
*/
|
||||
clickStockName(code) {
|
||||
if (code.indexOf(".") > -1) {
|
||||
code = code.split(".")[0];
|
||||
}
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pagesStock/stockCenterDetails/stockCenterDetails?code=" + code
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 点击查看股票详情
|
||||
*/
|
||||
@@ -421,6 +436,25 @@ const _sfc_main = {
|
||||
this.commentList = res.data.posts;
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取会员状态
|
||||
*/
|
||||
getMemberStatusData() {
|
||||
let token = common_vendor.index.getStorageSync("token");
|
||||
if (!token) {
|
||||
return;
|
||||
}
|
||||
request_api.membershipStatus().then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.memberInfo = res.data;
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -475,18 +509,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.t(item.stock_name),
|
||||
b: common_vendor.t(item.stock_code),
|
||||
c: common_vendor.sr("chartRef" + index, "6e1a61f1-1-" + i0, {
|
||||
c: common_vendor.o(($event) => $options.clickStockName(item.stock_code), index),
|
||||
d: 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)
|
||||
e: "chartRef" + index,
|
||||
f: "6e1a61f1-1-" + i0,
|
||||
g: common_vendor.t(item.trade_data ? item.trade_data.open_price : ""),
|
||||
h: common_vendor.t(item.trade_data ? item.trade_data.latest_price : ""),
|
||||
i: common_vendor.t(item.trade_data ? item.trade_data.change_pct : ""),
|
||||
j: common_vendor.n("chg flex1 " + ($data.getRateUpOrDown(item.trade_data ? item.trade_data.change_pct : "") ? "down" : "up")),
|
||||
k: common_vendor.t(item.relation_desc),
|
||||
l: index,
|
||||
m: common_vendor.o(($event) => $options.clickStockItem(item.stock_code), index)
|
||||
};
|
||||
})
|
||||
} : {}, {
|
||||
@@ -506,7 +541,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
g: common_vendor.n("stockNum " + ($data.getRateUpOrDown(item.price_info.avg_change_pct) ? "down" : "up"))
|
||||
} : {}, {
|
||||
h: common_vendor.t(item.description)
|
||||
}, $data.memberInfo && $data.memberInfo.is_member && $data.memberInfo.subscription_type == "pro" ? {
|
||||
}, $data.memberInfo && $data.memberInfo.is_member && ($data.memberInfo.subscription_type == "pro" || $data.memberInfo.subscription_type == "max") ? {
|
||||
i: common_vendor.f(item.stocks.slice(0, 3), (sitem, sindex, i1) => {
|
||||
return {
|
||||
a: common_vendor.t(sitem.name),
|
||||
@@ -516,7 +551,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
j: common_vendor.t(item.stock_count - 3),
|
||||
k: common_vendor.o(($event) => $options.clickStockMore(item), index)
|
||||
} : {
|
||||
l: common_assets._imports_1$6,
|
||||
l: common_assets._imports_1$3,
|
||||
m: common_vendor.t(item.stock_count),
|
||||
n: common_vendor.o(($event) => $options.clickNotVip(), index)
|
||||
}, {
|
||||
@@ -526,8 +561,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
r: common_vendor.o(($event) => $options.clickConceptItem(item.concept), index)
|
||||
});
|
||||
}),
|
||||
p: $data.memberInfo && $data.memberInfo.is_member && $data.memberInfo.subscription_type == "pro",
|
||||
q: common_assets._imports_1$3
|
||||
p: $data.memberInfo && $data.memberInfo.is_member && ($data.memberInfo.subscription_type == "pro" || $data.memberInfo.subscription_type == "max"),
|
||||
q: common_assets._imports_1$2
|
||||
} : {}, {
|
||||
r: $data.selectCategory == 2
|
||||
}, $data.selectCategory == 2 ? {
|
||||
@@ -569,13 +604,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
}) : {}, {
|
||||
C: $data.eventDetails
|
||||
}, $data.eventDetails ? {
|
||||
D: common_assets._imports_8$2,
|
||||
D: common_assets._imports_8$1,
|
||||
E: common_vendor.t($data.eventDetails.view_count),
|
||||
F: common_assets._imports_9$2,
|
||||
G: common_vendor.t($data.eventDetails.follower_count),
|
||||
H: common_vendor.o(($event) => $options.clickFollow())
|
||||
} : {}, {
|
||||
I: common_assets._imports_8,
|
||||
I: common_assets._imports_6$1,
|
||||
J: common_vendor.o(($event) => $options.closeCommentPopup()),
|
||||
K: common_vendor.f($data.commentList, (item, index, i0) => {
|
||||
return {
|
||||
@@ -602,7 +637,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
["mask-background-color"]: "transparent",
|
||||
animation: false
|
||||
}),
|
||||
S: common_assets._imports_8,
|
||||
S: common_assets._imports_6$1,
|
||||
T: common_vendor.o(($event) => $options.closeRelatedStockPopup()),
|
||||
U: common_vendor.f($data.historyEventRelatedStockList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
|
||||
Reference in New Issue
Block a user