1.24 雷达图,行业排名弹窗UI完善,接口对接,公司公告,新闻动态接口对接
This commit is contained in:
@@ -1,16 +1,23 @@
|
||||
"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
|
||||
showType: 0,
|
||||
getChgRateStr: utils_util.getChgRateStr,
|
||||
getRateUpOrDown: utils_util.getRateUpOrDown
|
||||
};
|
||||
},
|
||||
props: {
|
||||
// 0 新闻动态 1 公司公告
|
||||
type: Number
|
||||
type: Number,
|
||||
newsList: Array,
|
||||
//新闻动态数组
|
||||
announcementList: Array
|
||||
//公司公告数组
|
||||
},
|
||||
watch: {
|
||||
type: {
|
||||
@@ -26,17 +33,49 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
a: $data.showType == 0
|
||||
}, $data.showType == 0 ? {
|
||||
b: common_assets._imports_0$6,
|
||||
c: common_assets._imports_1$15,
|
||||
d: common_assets._imports_2$15,
|
||||
e: common_assets._imports_3$14,
|
||||
f: common_vendor.f(["C级", "行业政策", "投资分72", "金融监管", "资管行业", "自律管理"], (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item)
|
||||
};
|
||||
})
|
||||
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 ? {} : {});
|
||||
}, $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);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view><block wx:if="{{a}}"><view style="padding:20rpx"><view style="background-color:#F3F3F3;display:flex;align-items:center;height:70rpx;border-radius:30rpx;overflow:hidden"><view style="display:flex;align-items:center;justify-content:center;width:62rpx"><image style="width:25rpx;height:24rpx" src="{{b}}" mode="widthFix"></image></view><input style="flex:1;height:100%;font-size:22rpx;color:#999;margin-right:20rpx" type="text" placeholder="搜索相关新闻..."/></view><view style="border:1rpx solid #E7E7E7;border-radius:10rpx;padding:0 27rpx;margin:20rpx 0"><view style="color:#2B2B2B;font-size:26rpx;font-weight:bold;margin-top:20rpx">中央财办明确2026年继续实施适度宽松货币政策...</view><view style="display:flex;align-items:center;color:#999999;font-size:22rpx;font-weight:400"><image style="width:20rpx;height:20rpx;margin-right:5rpx" src="{{c}}" mode="widthFix"></image><text>2025/12/16</text><text style="margin:10rpx">|</text><image style="width:18rpx;height:13rpx;margin-right:5rpx" src="{{d}}" mode="widthFix"></image><text>9</text><text style="margin:10rpx">|</text><image style="width:16rpx;height:19rpx;margin-right:5rpx" src="{{e}}" mode="widthFix"></image><text>3.1</text></view><view style="display:flex;flex-wrap:wrap"><view wx:for="{{f}}" wx:for-item="item" style="background-color:#FFFAF0;border-radius:3rpx;padding:2rpx 10rpx;overflow:hidden;font-size:18rpx;color:#E9AE3E;font-weight:400;margin-right:10rpx;margin-top:10rpx">{{item.a}}</view></view><view style="margin:20rpx 0;font-size:22rpx;color:#71675D;font-weight:500">中央财办有关负责同志表示,2026年继续实施适度宽松的货币政策,把促进经济稳定增长、物价合理回升作为重要考量。</view><view style="height:1rpx;background-color:#E7E7E7"></view><view style="display:flex;align-items:center;color:#71675D;font-size:22rpx;font-weight:500;margin:20rpx 0"><text style="font-weight:bold;color:#2B2B2B">相关涨跌:</text><text>平均 </text><text style="color:#EC3440;font-weight:bold">+2.39%</text><text style="margin:0 20rpx">|</text><text>最大 </text><text style="color:#EC3440;font-weight:bold">+9.28%</text><text style="margin:0 20rpx">|</text><text>周 </text><text style="color:#EC3440;font-weight:bold">+3.22%</text></view></view></view></block><block wx:if="{{g}}"><view style="padding:20rpx"><view style="border:1rpx solid #E7E7E7;border-radius:10rpx;padding:0 27rpx;margin:20rpx 0;display:flex;align-items:center"><view style="flex:1"><view style="color:#2B2B2B;font-size:26rpx;font-weight:bold;margin-top:20rpx">中央财办明确2026年继续实施适度宽松货币政策...</view><view style="display:flex;align-items:center;color:#71675D;font-size:22rpx;font-weight:500;margin:20rpx 0"><text style="color:#E9AE3E;font-size:18rpx;background-color:#FFFAF0;border-radius:3rpx;padding:2rpx 10rpx;margin-right:14rpx">定期报告</text><text>2024-10-28</text><text style="margin:0 20rpx">|</text><text>PDF</text><text style="margin:0 20rpx">|</text><text>132 KB</text></view></view><view style="padding:4rpx 10rpx;background-color:#F2C369;border-radius:10rpx;color:#2B2B2B;font-size:22rpx;margin-left:10rpx">查看</view></view></view></block></view>
|
||||
<view><block wx:if="{{a}}"><view style="padding:20rpx"><view style="background-color:#F3F3F3;display:flex;align-items:center;height:70rpx;border-radius:30rpx;overflow:hidden"><view style="display:flex;align-items:center;justify-content:center;width:62rpx"><image style="width:25rpx;height:24rpx" src="{{b}}" mode="widthFix"></image></view><input style="flex:1;height:100%;font-size:22rpx;color:#999;margin-right:20rpx" type="text" placeholder="搜索相关新闻..."/></view><view class="newsList"><view wx:for="{{c}}" wx:for-item="item" wx:key="p" class="item" style="border:1rpx solid #E7E7E7;border-radius:10rpx;padding:0 27rpx;margin:20rpx 0"><view style="color:#2B2B2B;font-size:26rpx;font-weight:bold;margin-top:20rpx">{{item.a}}</view><view style="display:flex;align-items:center;color:#999999;font-size:22rpx;font-weight:400"><image style="width:20rpx;height:20rpx;margin-right:5rpx" src="{{d}}" mode="widthFix"></image><text>2025/12/16</text><text style="margin:10rpx">|</text><image style="width:18rpx;height:13rpx;margin-right:5rpx" src="{{e}}" mode="widthFix"></image><text>{{item.b}}</text><text style="margin:10rpx">|</text><image style="width:16rpx;height:19rpx;margin-right:5rpx" src="{{f}}" mode="widthFix"></image><text>{{item.c}}</text></view><view class="labelList flexWrap"><view class="label eventType">{{item.d}}</view><view class="label investScore">投资分:{{item.e}}</view><view wx:for="{{item.f}}" wx:for-item="item" style="background-color:#FFFAF0;border-radius:3rpx;padding:2rpx 10rpx;overflow:hidden;font-size:18rpx;color:#E9AE3E;font-weight:400;margin-right:10rpx">{{item.a}}</view></view><view style="margin:20rpx 0;font-size:22rpx;color:#71675D;font-weight:500">{{item.g}}</view><view wx:if="{{item.h}}" style="height:1rpx;background-color:#E7E7E7"></view><view wx:if="{{item.i}}" class="relatedChgC flex"><text style="font-weight:bold;color:#2B2B2B">相关涨跌:</text><text>平均 </text><text class="{{item.k}}">{{item.j}}%</text><text style="margin:0 20rpx">|</text><text>最大 </text><text class="{{item.m}}">{{item.l}}%</text><text style="margin:0 20rpx">|</text><text>周 </text><text class="{{item.o}}">{{item.n}}%</text></view></view></view></view></block><block wx:if="{{g}}"><view wx:for="{{h}}" wx:for-item="item" wx:key="e" style="padding:20rpx"><view style="border:1rpx solid #E7E7E7;border-radius:10rpx;padding:0 27rpx;margin:20rpx 0;display:flex;align-items:center"><view style="flex:1"><view style="color:#2B2B2B;font-size:26rpx;font-weight:bold;margin-top:20rpx">{{item.a}}</view><view style="display:flex;align-items:center;color:#71675D;font-size:22rpx;font-weight:500;margin:20rpx 0"><text style="color:#E9AE3E;font-size:18rpx;background-color:#FFFAF0;border-radius:3rpx;padding:2rpx 10rpx;margin-right:14rpx">公告</text><text>{{item.b}}</text><text style="margin:0 20rpx">|</text><text>{{item.c}}</text><text style="margin:0 20rpx">|</text><text>{{item.d}}KB</text></view></view><view style="padding:4rpx 10rpx;background-color:#F2C369;border-radius:10rpx;color:#2B2B2B;font-size:22rpx;margin-left:10rpx">查看</view></view></view></block></view>
|
||||
28
unpackage/dist/dev/mp-weixin/components/news-view/news-view.wxss
vendored
Normal file
28
unpackage/dist/dev/mp-weixin/components/news-view/news-view.wxss
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
.newsList .item .labelList .label {
|
||||
margin-right: 10rpx;
|
||||
padding: 0 7rpx;
|
||||
line-height: 28rpx;
|
||||
border-radius: 3rpx;
|
||||
font-size: 18rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.newsList .item .labelList .eventType {
|
||||
background-color: #EFF6FF;
|
||||
color: #60A5FA;
|
||||
}
|
||||
.newsList .item .labelList .investScore {
|
||||
background-color: #F2EEFF;
|
||||
color: #A78BFA;
|
||||
}
|
||||
.newsList .item .relatedChgC {
|
||||
margin: 20rpx 0;
|
||||
color: #71675D;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.newsList .item .relatedChgC .chg.up {
|
||||
color: #EC3440;
|
||||
}
|
||||
.newsList .item .relatedChgC .chg.down {
|
||||
color: #1DB26F;
|
||||
}
|
||||
Reference in New Issue
Block a user