|
@@ -49,6 +49,7 @@
|
|
|
<view class="lable-row" v-for="(item, index) in lableIsRows" :key="index">
|
|
|
<view :class="['lable-item', lable.isAct && 'item-active']" v-for="lable in item" :key="lable.TagId" @click="lableKeysHandler(lable)">
|
|
|
{{ lable.TagName }}
|
|
|
+ <image v-if="lable.TagName == '问答'" class="item-image" lazy-load src="https://hzstatic.hzinsights.com/cygx/icon/new_report.png"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -176,20 +177,20 @@ export default {
|
|
|
},
|
|
|
lableIsRows() {
|
|
|
//处理标签的样式
|
|
|
- const numTags = this.dataListLable.length;
|
|
|
- const rows = [];
|
|
|
+ // const numTags =.length;
|
|
|
+ const rows = [this.dataListLable];
|
|
|
|
|
|
- if (numTags <= 4) {
|
|
|
- rows.push(this.dataListLable);
|
|
|
- } else if (numTags > 4 && numTags <= 8) {
|
|
|
- const firstRow = this.dataListLable.slice(0, 4);
|
|
|
- const secondRow = this.dataListLable.slice(4);
|
|
|
- rows.push(firstRow, secondRow);
|
|
|
- } else if (numTags >= 9) {
|
|
|
- const firstRow = this.dataListLable.filter((_, index) => index % 2 === 0);
|
|
|
- const secondRow = this.dataListLable.filter((_, index) => index % 2 !== 0);
|
|
|
- rows.push(firstRow, secondRow);
|
|
|
- }
|
|
|
+ // if (numTags <= 4) {
|
|
|
+ // rows.push(this.dataListLable);
|
|
|
+ // } else if (numTags > 4 && numTags <= 8) {
|
|
|
+ // const firstRow = this.dataListLable.slice(0, 4);
|
|
|
+ // const secondRow = this.dataListLable.slice(4);
|
|
|
+ // rows.push(firstRow, secondRow);
|
|
|
+ // } else if (numTags >= 9) {
|
|
|
+ // const firstRow = this.dataListLable.filter((_, index) => index % 2 === 0);
|
|
|
+ // const secondRow = this.dataListLable.filter((_, index) => index % 2 !== 0);
|
|
|
+ // rows.push(firstRow, secondRow);
|
|
|
+ // }
|
|
|
|
|
|
return rows;
|
|
|
},
|
|
@@ -276,7 +277,7 @@ export default {
|
|
|
uni.navigateTo({
|
|
|
url: "/pageMy/login/login",
|
|
|
});
|
|
|
- }
|
|
|
+ }
|
|
|
},
|
|
|
});
|
|
|
},
|
|
@@ -409,6 +410,15 @@ export default {
|
|
|
const res = await Home.homeTagListCustom();
|
|
|
if (res.Ret === 200) {
|
|
|
this.dataListLable = res.Data.List || [];
|
|
|
+ let arr = [];
|
|
|
+ if (this.actIdLable) {
|
|
|
+ arr = this.actIdLable.split(",").map((_) => Number(_));
|
|
|
+ }
|
|
|
+ this.dataListLable.forEach((item) => {
|
|
|
+ if (arr.includes(item.TagId)) {
|
|
|
+ item.isAct = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
this.industryTablList = res.Data.ListPermission || [];
|
|
|
}
|
|
|
},
|
|
@@ -429,7 +439,10 @@ export default {
|
|
|
this.getNewList();
|
|
|
});
|
|
|
},
|
|
|
- onLoad() {
|
|
|
+ onLoad(options) {
|
|
|
+ console.log(options);
|
|
|
+ this.industrytabActId = options.industrytabActId ? Number(options.industrytabActId) : 0;
|
|
|
+ this.actIdLable = options.findIndexId;
|
|
|
this.getBannerList();
|
|
|
this.getNewList();
|
|
|
this.homeTagListCustom();
|
|
@@ -454,6 +467,7 @@ export default {
|
|
|
this.page_no = 1;
|
|
|
this.refresh = true;
|
|
|
this.getNewList();
|
|
|
+ this.homeTagListCustom();
|
|
|
},
|
|
|
onPageScroll(val) {
|
|
|
this.isScrollNumber = val.scrollTop;
|
|
@@ -474,9 +488,10 @@ export default {
|
|
|
imageUrl: item.AudioShareImg || item.ShareImg,
|
|
|
};
|
|
|
} else {
|
|
|
+ console.log(this.actIdLable);
|
|
|
return {
|
|
|
title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : "弘则研究—聚焦·前瞻·客观·深度",
|
|
|
- path: "/pages/index/index",
|
|
|
+ path: "/pages/index/index?industrytabActId=" + this.industrytabActId + "&findIndexId=" + this.actIdLable,
|
|
|
success: (res) => {},
|
|
|
fail: (err) => {},
|
|
|
};
|
|
@@ -574,7 +589,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.content-ul {
|
|
|
- padding: 20rpx 10rpx;
|
|
|
+ padding: 0rpx 10rpx 20rpx;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
.item-ul {
|
|
@@ -608,21 +623,30 @@ export default {
|
|
|
overflow-x: auto;
|
|
|
width: 100%;
|
|
|
background-color: #fff;
|
|
|
- padding: 10rpx 0 20rpx 20rpx;
|
|
|
+ padding: 18rpx 0 18rpx 20rpx;
|
|
|
.lable-row {
|
|
|
display: flex;
|
|
|
font-size: 24rpx;
|
|
|
}
|
|
|
.lable-item {
|
|
|
+ position: relative;
|
|
|
flex-shrink: 0;
|
|
|
- padding: 8rpx 40rpx;
|
|
|
+ padding: 6rpx 35rpx;
|
|
|
background: #ffffff;
|
|
|
border: 1rpx solid #dcdfe6;
|
|
|
border-radius: 39rpx;
|
|
|
margin-right: 20rpx;
|
|
|
white-space: nowrap;
|
|
|
- margin-top: 20rpx;
|
|
|
+ // padding-top: 20rpx;
|
|
|
color: #999999;
|
|
|
+ .item-image {
|
|
|
+ position: absolute;
|
|
|
+ top: -16rpx;
|
|
|
+ right: -18rpx;
|
|
|
+ width: 60rpx;
|
|
|
+ height: 30rpx;
|
|
|
+ border-radius: 4rpx;
|
|
|
+ }
|
|
|
}
|
|
|
.item-active {
|
|
|
border: none;
|