feat(图表): 为LineHol组件添加barColor属性并优化页面布局
- 在LineHol和LineHolYellow组件中新增barColor属性,支持自定义柱状图颜色 - 调整indexRelease.vue页面布局,移除部分注释代码 - 修改顶部导航标题为"编辑精选" - 优化搜索跳转逻辑,使用Session替代uni.getStorageSync
This commit is contained in:
parent
28409ef3b2
commit
2a851c74a0
|
|
@ -21,6 +21,10 @@ const props = defineProps({
|
|||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
barColor: {
|
||||
type: String,
|
||||
default: "#3C74F1",
|
||||
},
|
||||
});
|
||||
|
||||
watch(
|
||||
|
|
@ -127,10 +131,10 @@ const initChart = () => {
|
|||
show: true,
|
||||
},
|
||||
itemStyle: {
|
||||
color: "#3C74F1",
|
||||
color: props.barColor,
|
||||
normal: {
|
||||
borderRadius: [0, 4, 4, 0],
|
||||
color: "#3C74F1",
|
||||
color: props.barColor,
|
||||
// color: function (params) {
|
||||
// return colorList[params.dataIndex];
|
||||
// },
|
||||
|
|
|
|||
|
|
@ -19,7 +19,11 @@ const values = ref([]);
|
|||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => { },
|
||||
default: () => {},
|
||||
},
|
||||
barColor: {
|
||||
type: String,
|
||||
default: "#3C74F1",
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -95,7 +99,7 @@ const initChart = () => {
|
|||
color: "#FFCE34",
|
||||
normal: {
|
||||
borderRadius: [0, 4, 4, 0],
|
||||
color: "#3C74F1",
|
||||
color: props.barColor,
|
||||
// color: function (params) {
|
||||
// return colorList[params.dataIndex];
|
||||
// },
|
||||
|
|
@ -129,7 +133,6 @@ onMounted(async () => {
|
|||
// await getData();
|
||||
// initChart();
|
||||
// }, 5000);
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
</view>
|
||||
<!-- banner end -->
|
||||
|
||||
<view class="">
|
||||
<view class="tag">
|
||||
<view>
|
||||
<!-- <view class="tag">
|
||||
<view class="r_tag_img">
|
||||
<img :src="tagicon_1_bg" class="tag_bk" />
|
||||
<view class="tag_content">
|
||||
|
|
@ -20,7 +20,6 @@
|
|||
<text class="tag_title">行业分类贴标</text>
|
||||
|
||||
<view style="display: flex; margin-top: 15rpx">
|
||||
<!-- <text class="tag_num">{{ topNum.leftNum }}</text> -->
|
||||
<countTo :startVal="lastLeftNum" :endVal="topNum.leftNum" :duration="5000" class="tag_num"></countTo>
|
||||
|
||||
<text class="tag_status">已处理</text>
|
||||
|
|
@ -39,7 +38,6 @@
|
|||
<view class="tag_item_left">
|
||||
<text class="tag_title">概念标签贴标</text>
|
||||
<view style="display: flex; margin-top: 15rpx">
|
||||
<!-- <text class="tag_num">{{ topNum.rightNum }}</text> -->
|
||||
<countTo :startVal="lastRightNum" :endVal="topNum.rightNum" :duration="5000" class="tag_num"></countTo>
|
||||
|
||||
<text class="tag_status">已处理</text>
|
||||
|
|
@ -51,14 +49,14 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<view style="background-color: white; margin-top: 40rpx">
|
||||
<view style="background-color: white; margin-top: -100rpx; position: relative; z-index: 9999">
|
||||
<indexMenuTitle title="近7天热度统计"></indexMenuTitle>
|
||||
<LineHol v-if="lineTabIndex === 0" :data="lineTopData"></LineHol>
|
||||
<LineHol v-else-if="lineTabIndex === 1" :data="lineTopData"></LineHol>
|
||||
<LineHolYellow v-else-if="lineTabIndex === 2" :data="lineTopData"></LineHolYellow>
|
||||
<LineHol v-if="lineTabIndex === 0" barColor="#3C74F1" :data="lineTopData"></LineHol>
|
||||
<LineHol v-else-if="lineTabIndex === 1" barColor="#FFCC65" :data="lineTopData"></LineHol>
|
||||
<LineHolYellow v-else-if="lineTabIndex === 2" barColor="#8B2DD4" :data="lineTopData"></LineHolYellow>
|
||||
|
||||
<div style="display: flex; justify-content: center; margin-bottom: 20px; margin-top: 20px">
|
||||
<div class="tabs">
|
||||
|
|
@ -69,19 +67,18 @@
|
|||
</div>
|
||||
</view>
|
||||
|
||||
<view style="background-color: white; margin-top: 40rpx">
|
||||
<!-- <view style="background-color: white; margin-top: 40rpx">
|
||||
<indexMenuTitle title="资讯评分分布区间"></indexMenuTitle>
|
||||
<Line style="margin-top: 30rpx" :data="lineData"></Line>
|
||||
|
||||
<view
|
||||
style="display: flex; flex-direction: column; text-align: center; justify-content: center; align-items: center; padding-bottom: 30rpx">
|
||||
<view style="display: flex; flex-direction: column; text-align: center; justify-content: center; align-items: center; padding-bottom: 30rpx">
|
||||
<InfoSummary style="width: 85%" :count="newsNum"></InfoSummary>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view style="background-color: white; padding-top: 40rpx">
|
||||
<view style="width: 100vw; display: flex; justify-content: space-between; align-items: center">
|
||||
<indexMenuTitle title="编辑精选 Top20" style="margin-top: 10rpx"></indexMenuTitle>
|
||||
<indexMenuTitle title="编辑精选" style="margin-top: 10rpx"></indexMenuTitle>
|
||||
<view class="r_sreach">
|
||||
<!-- <image class="top_bk" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/top_bg.png"></image> -->
|
||||
<!-- <image class="logo_text" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/logo_text_icon.png"> </image> -->
|
||||
|
|
@ -101,8 +98,11 @@
|
|||
|
||||
<view class="logout" @click="loginOut" v-if="Session.get('token')">退出登录</view>
|
||||
|
||||
<LoginPopup :show="LoginShow" @handlePopupClose="handlePopupClose"
|
||||
@handlePopupSuccessCallback="handlePopupSuccessCallback" @handlePopupErrorCallback="handlePopupErrorCallback" />
|
||||
<LoginPopup
|
||||
:show="LoginShow"
|
||||
@handlePopupClose="handlePopupClose"
|
||||
@handlePopupSuccessCallback="handlePopupSuccessCallback"
|
||||
@handlePopupErrorCallback="handlePopupErrorCallback" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -291,14 +291,12 @@ async function getLineDataFn() {
|
|||
}
|
||||
|
||||
function goSreach() {
|
||||
if (uni.getStorageSync("token")) {
|
||||
if (Session.get("token")) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/sreachReq/index",
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/indexMini",
|
||||
});
|
||||
LoginShow.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue