83 lines
2.7 KiB
JavaScript
83 lines
2.7 KiB
JavaScript
"use strict";
|
|
const utils_util = require("../../utils/util.js");
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const common_assets = require("../../common/assets.js");
|
|
const _sfc_main = {
|
|
name: "news-view",
|
|
data() {
|
|
return {
|
|
showType: 0,
|
|
getChgRateStr: utils_util.getChgRateStr,
|
|
getRateUpOrDown: utils_util.getRateUpOrDown
|
|
};
|
|
},
|
|
props: {
|
|
// 0 新闻动态 1 公司公告
|
|
type: Number,
|
|
newsList: Array,
|
|
//新闻动态数组
|
|
announcementList: Array
|
|
//公司公告数组
|
|
},
|
|
watch: {
|
|
type: {
|
|
handler(newVal, oldVal) {
|
|
this.showType = newVal;
|
|
}
|
|
}
|
|
},
|
|
methods: {}
|
|
};
|
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return common_vendor.e({
|
|
a: $data.showType == 0
|
|
}, $data.showType == 0 ? {
|
|
b: common_assets._imports_0$6,
|
|
c: common_vendor.f($props.newsList, (item, index, i0) => {
|
|
return common_vendor.e({
|
|
a: common_vendor.t(item.title),
|
|
b: common_vendor.t(item.view_count),
|
|
c: common_vendor.t(item.hot_score),
|
|
d: common_vendor.t(item.event_type),
|
|
e: common_vendor.t(item.invest_score),
|
|
f: common_vendor.f(["C级", "金融监管", "资管行业", "自律管理"], (item2, index2, i1) => {
|
|
return {
|
|
a: common_vendor.t(item2)
|
|
};
|
|
}),
|
|
g: common_vendor.t(item.description),
|
|
h: item.related_avg_chg
|
|
}, item.related_avg_chg ? {} : {}, {
|
|
i: item.related_avg_chg
|
|
}, item.related_avg_chg ? {
|
|
j: common_vendor.t($data.getChgRateStr(item.related_avg_chg)),
|
|
k: common_vendor.n("chg " + ($data.getRateUpOrDown(item.related_avg_chg) ? "down" : "up")),
|
|
l: common_vendor.t($data.getChgRateStr(item.related_max_chg)),
|
|
m: common_vendor.n("chg " + ($data.getRateUpOrDown(item.related_max_chg) ? "down" : "up")),
|
|
n: common_vendor.t($data.getChgRateStr(item.related_week_chg)),
|
|
o: common_vendor.n("chg " + ($data.getRateUpOrDown(item.related_week_chg) ? "down" : "up"))
|
|
} : {}, {
|
|
p: index
|
|
});
|
|
}),
|
|
d: common_assets._imports_1$17,
|
|
e: common_assets._imports_2$14,
|
|
f: common_assets._imports_3$14
|
|
} : {}, {
|
|
g: $data.showType == 1
|
|
}, $data.showType == 1 ? {
|
|
h: common_vendor.f($props.announcementList, (item, index, i0) => {
|
|
return {
|
|
a: common_vendor.t(item.title),
|
|
b: common_vendor.t(item.announce_date),
|
|
c: common_vendor.t(item.format),
|
|
d: common_vendor.t(item.file_size),
|
|
e: index
|
|
};
|
|
})
|
|
} : {});
|
|
}
|
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
wx.createComponent(Component);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/news-view/news-view.js.map
|