123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306 |
- <template>
- <view class="container theme-hot-content">
- <view class="tab-bar-ul">
- <view class="item-content">
- <view @click="tabBarSwitchHandel(item)" :class="['item', tabBarActive === item.value && 'item-act']" v-for="item in tabBarList" :key="item.value">{{ item.name }}</view>
- </view>
- </view>
- <view class="content-ul">
- <view class="global_card_content hot-li" v-for="item in dataList" :key="item.IndustrialManagementId">
- <image class="hot-icon" v-if="item.IsHot" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/hot_report.png" mode=""></image>
- <view class="li-item hot-item" :style="{ 'margin-top': item.IsHot ? '40rpx' : '' }">
- <view style="display: flex" class="text_oneLine hot-new" @click="themeDetails(item, '主题热度榜')">
- <text class="text_oneLine global_title" style="display: inline">{{ item.IndustryName }} </text>
- </view>
- <view class="item-wrap">
- <zb-popover placement="bottom-end" :options="actions" theme="dark" ref="Popover1" @handleClick="() => popoverHandleClick(item)" @select="selectOption($event, item)">
- <view :class="['follw', 'global_content_center']">
- <image class="follw-image" :src="getDisplayImg(item)"></image>
- {{ getDisplayText(item) }}
- </view>
- </zb-popover>
- </view>
- </view>
- <view class="li-item read-more" @click="themeDetails(item, '主题热度榜')">
- <text class="text-box text_oneLine" v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId">
- {{ val.SubjectName }}
- </text>
- </view>
- </view>
- </view>
- <u-loadmore :status="status" :load-text="loadText" v-if="page_no > 1" />
- <u-modal
- v-model="goFollowShow"
- :content-style="{ fontSize: '32rpx' }"
- @confirm="goFollowShowBtn"
- :show-cancel-button="isCancelBtn"
- :confirm-text="confirmText"
- @cancel="isCancelBtn = false"
- :show-title="false"
- :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
- :confirm-style="{ fontWeight: '700' }"
- >
- <view class="slot-content">
- <rich-text :nodes="accounts"></rich-text>
- </view>
- </u-modal>
- <Loading />
- </view>
- </template>
- <script>
- import { Reports, Research, Report } from "@/config/api.js";
- import mixinsAuthorTheme from "../components/mixinsAuthorTheme";
- export default {
- data() {
- return {
- tabBarList: [
- {
- name: "更新时间",
- value: 2,
- },
- {
- name: "主题热度",
- value: 1,
- },
- ],
- actions: [
- { text: "接受推送", imgUrl: "https://hzstatic.hzinsights.com/new_cygx/AcceptBtn.png", key: 0 },
- { text: "重点关注", imgUrl: "https://hzstatic.hzinsights.com/new_cygx/FocusBtn.png", key: 1 },
- { text: "不感兴趣", imgUrl: "https://hzstatic.hzinsights.com/new_cygx/uninterestedBtn.png", key: 3 },
- ], // 动态设置的气泡选项内容
- };
- },
- mixins: [mixinsAuthorTheme],
- methods: {
- //主题热度/近期更新更多
- async getDataList() {
- const res = await Research.researchHotList({
- ChartPermissionId: 31,
- PageSize: this.pageSize,
- CurrentIndex: this.page_no,
- ThemeType: this.tabBarActive,
- });
- if (res.Ret === 200) {
- this.status = res.Data.Paging.IsEnd ? "nomore" : "loadmore";
- if (this.refresh) {
- uni.stopPullDownRefresh();
- this.refresh = false;
- }
- this.dataList = this.page_no === 1 ? res.Data.List || [] : [...this.dataList, ...res.Data.List];
- }
- },
- popoverHandleClick(option) {
- this.actions = [
- { text: "接受推送", imgUrl: "https://hzstatic.hzinsights.com/new_cygx/AcceptBtn.png", key: 0 },
- { text: "重点关注", imgUrl: "https://hzstatic.hzinsights.com/new_cygx/FocusBtn.png", key: 1 },
- { text: "不感兴趣", imgUrl: "https://hzstatic.hzinsights.com/new_cygx/uninterestedBtn.png", key: 3 },
- ].filter((item) => item.key !== option.FollowType);
- },
- async selectOption(e, item) {
- console.log();
- if (!e) return;
- await this.$store.dispatch("showLoginModal");
- const res = await Reports.reportFllow({ IndustrialManagementId: item.IndustrialManagementId, PageRouter: this.$store.state.pageRouterReport, FollowType: e.key });
- if (res.Ret === 200) {
- item.FollowType = res.Data.Status;
- let content =
- res.Data.Status == 1
- ? "请关注【查研观向小助手】公众号及时获取产业内容更新提醒"
- : res.Data.Status == 0
- ? "请关注【查研观向小助手】公众号给您推送产业内容更新"
- : "产业内容更新将不再以公众号消息推送给您";
- uni.showModal({
- title: res.Data.Status == 1 ? "已设置为重点关注产业" : "设置成功",
- content,
- confirmText: "知道了",
- confirmColor: "#376CBB",
- showCancel: false,
- });
- }
- },
- getDisplayText(item) {
- return item.FollowType == 1 ? "重点关注" : item.IsFollow == 0 ? "接受推送" : "不感兴趣";
- },
- getDisplayImg(item) {
- return item.FollowType == 1
- ? "https://hzstatic.hzinsights.com/new_cygx/FocusBtn.png"
- : item.IsFollow == 0
- ? "https://hzstatic.hzinsights.com/new_cygx/AcceptBtn.png"
- : "https://hzstatic.hzinsights.com/new_cygx/uninterestedBtn.png";
- },
- },
- };
- </script>
- <style lang="scss" scope>
- .theme-hot-content {
- background-color: $uni-bg-color;
- padding-bottom: 30rpx;
- .tab-bar-ul {
- position: sticky;
- top: 0;
- left: 0;
- height: 111rpx;
- align-items: center;
- display: flex;
- justify-content: flex-end;
- padding: 10px 20rpx;
- background-color: $uni-bg-color;
- border-bottom: 2rpx solid #f6f6f6;
- z-index: 9;
- .item-content {
- display: flex;
- height: 48rpx;
- background: #dcdfe6;
- width: 288rpx;
- font-size: 24rpx;
- font-weight: 600;
- border-radius: 150rpx;
- color: #666;
- }
- .item {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 144rpx;
- height: 48rpx;
- border-radius: 150rpx;
- }
- .item-act {
- background-color: $uni-color-new;
- color: #fff;
- }
- }
- .content-ul {
- padding: 10rpx 30rpx;
- .hot-li {
- background-color: #fff;
- margin-bottom: 20rpx;
- position: relative;
- }
- .li-item {
- display: flex;
- .title {
- font-size: 28rpx;
- line-height: 39rpx;
- font-weight: 500;
- color: #333;
- }
- .li-industry {
- color: $uni-color-new;
- margin-left: 20rpx;
- display: inline-block;
- font-size: 32rpx;
- font-weight: 600;
- }
- .time-user {
- display: flex;
- align-items: center;
- font-size: 24rpx;
- }
- .li-user {
- display: flex;
- align-items: center;
- flex-shrink: 0;
- width: 170rpx;
- margin-left: 75rpx;
- }
- .li-title {
- display: flex;
- }
- }
- .read-more {
- display: flex;
- flex-wrap: wrap;
- margin-top: 20rpx;
- .text-box {
- margin-top: 30rpx;
- margin-right: 10rpx;
- width: 150rpx;
- height: 48rpx;
- background-color: #f8f8fa;
- color: $uni-color-new;
- line-height: 48rpx;
- border-radius: 200rpx;
- font-weight: 600;
- font-size: 24rpx;
- text-align: center !important;
- text-indent: 0em;
- }
- }
- .hot-item {
- justify-content: space-between;
- align-items: center;
- .hot-new {
- align-items: center;
- flex: 1;
- padding-right: 20rpx;
- }
- }
- .hot-icon {
- position: absolute;
- width: 106rpx !important;
- height: 48rpx !important;
- top: 0 !important;
- left: 0 !important;
- margin: 0 !important;
- padding: 0 !important;
- border-radius: 0 !important;
- }
- .follw {
- color: #fff;
- border-radius: 4rpx;
- font-size: 24rpx;
- height: 42rpx;
- padding: 0 12rpx;
- background-color: $uni-color-new;
- }
- .cancel-follw {
- background-color: #e5efff;
- color: $uni-color-new;
- }
- }
- .bottom-btn-content {
- padding: 15rpx 30px 30rpx;
- .opne-content {
- display: flex;
- align-items: center;
- justify-content: center;
- image {
- width: 24rpx;
- height: 24rpx;
- }
- .content-text {
- color: #376cbb;
- margin: 0 5rpx 0 10rpx;
- }
- margin-bottom: 15rpx;
- }
- .all-setup {
- .content-text {
- text-decoration: underline;
- }
- }
- }
- .follw-image {
- width: 32rpx;
- height: 32rpx;
- margin-right: 10rpx;
- }
- }
- </style>
|