<template>
  <view class="container Index-container">
    <view class="top-content-box">
      <search-bar @goSearch="goSearch" :searchTitle="searchPlaceholderList.SummarySearch" :width="70" />
      <view class="top-tabs tabs-content-ul">
        <block v-for="item in topTabBars" :key="item.Id">
          <view v-if="item.IsShow" :class="['item', item.Id == topTabsActive && 'tabs-active']" @click="topTabsChange(item)">
            {{ item.Name }}
            <block v-if="(item.Id === 3 || item.Id === 5) && wholeShowListData.IsShowChart">
              <image class="limit-img tabs-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/limit_icon.png" mode=""></image>
            </block>
            <view class="active" v-if="item.Id == topTabsActive"></view>
          </view>
        </block>
      </view>
      <view class="tabs-content">
        <view class="global_two_tabs" v-if="topTabsActive == '2' || topTabsActive == '3'">
          <view :class="['item', item.ChartPermissionId == secondActive && 'tabs-active']" v-for="(item, index) in secondBars" :key="item.ChartPermissionId" @click="handleClickTopSub(item)">
            {{ item.PermissionName }}
            <block v-if="wholeShowListData.IsShowResearch && index === secondBars.length - 1 && topTabsActive == '2'">
              <image class="limit-img tabs-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/limit_icon.png" mode=""></image>
            </block>
            <view class="active" v-if="item.ChartPermissionId == secondActive"></view>
          </view>
        </view>
        <block v-if="topTabsActive == '3'">
          <view class="children-ul" v-if="chartChildren.length">
            <view :class="['chart-children', chartChildrenActive == item.CtagId ? 'children-active' : '']" v-for="item in chartChildren" :key="item.CtagId" @click="handleChartChildren(item)">{{
              item.Name
            }}</view>
          </view>
          <!-- 我的收藏滚动显示 -->
          <view class="notice" @click="noticeBarHandler" v-if="secondActive==0">
            <van-notice-bar
              custom-class="custom-class-notice"
              color="#E37318"
              background="#FFF1E9"
              text="如何定制自己的图表面板：在上方分栏下选择感兴趣的图表类别，点击标题查看大图，点亮☆收藏就可以在自己的图表首页可见。也可在报告中随时点☆收藏感兴趣的图表。"
            />
          </view>
        </block>
        <view v-if="topTabsActive == '4'" class="medium-ul">
          <view class="global_two_tabs">
            <view @click="mediumClickHandler(item)" :class="['item', item.isSelect && 'tabs-active']" v-for="item in mediumSelect" :key="item.value">
              {{ item.name }}
            </view>
            <!-- 各种状态选择 -->
            <view class="select-conyent" ref="select-conyent" style="margin-left: 20rpx">
              <van-dropdown-menu active-color="#333333">
                <van-dropdown-item id="industry" :title="chartPermissionName">
                  <view class="menu-items">
                    <view class="menu-items-box" v-for="item in listChartPermission" :key="item.ChartPermissionId" @click="overallClick(item)">
                      <view class="items-box">
                        <u-icon v-if="item.IsChoose" name="checkbox-mark" :color="'#376cbb'" size="24"></u-icon>
                      </view>
                      <text>{{ item.PermissionName }}</text>
                    </view>
                  </view>
                  <view class="replacement">
                    <text @click="replacementBtn" class="replacement-box">重置</text>
                    <text @click="replacementConfirm">确定</text>
                  </view>
                </van-dropdown-item>
              </van-dropdown-menu>
            </view>
          </view>
        </view>
      </view>
    </view>
    <block v-if="haveData">
      <view class="content-ul">
        <block v-if="topTabsActive == 4">
          <view style="width: 49%" v-for="item in roadshowPageList" :key="item.Id">
            <RoadshowItem :list="item" @isCollectionHandeler="isCollectionHandeler" />
          </view>
        </block>
        <block v-else>
          <view class="report-ul" style="width: 49%">
            <block v-for="(item, index) in dataList" :key="index">
              <view v-if="index % 2 == 0">
                <ChartItem v-if="topTabsActive == 3" :list="item" :isMyChartCollection="isMyChartCollection" @myChartIsTop="myChartIsTop" @myChartCollect="myChartCollect" />
                <ReportItem v-if="topTabsActive == 2" :list="item" />
              </view>
            </block>
          </view>
          <view class="report-ul" style="width: 49%">
            <block v-for="(item, index) in dataList" :key="index">
              <view v-if="index % 2 !== 0">
                <ChartItem v-if="topTabsActive == 3" :list="item" :isMyChartCollection="isMyChartCollection" @myChartIsTop="myChartIsTop" @myChartCollect="myChartCollect" />
                <ReportItem v-if="topTabsActive == 2" :list="item" />
              </view>
            </block>
          </view>
        </block>
      </view>
      <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="pageNum > 1" />
    </block>
    <view class="nodata" v-else-if="haveData === false" style="padding-top: 400rpx">
      <block class="nodata" v-if="!isBindingMobile && secondActive == 0">
        <text>请先绑定联系方式</text>
        <view class="bind-mobile" @click="bindingMobile">绑定联系方式</view>
      </block>
      <block v-else>
        <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
        <text>{{ topTabsActive == 3 && secondActive == 0 ? "暂无收藏的图表" : "暂时没有数据" }}</text>
      </block>
    </view>
    <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
    <view v-if="showAudioBox">
      <audioModule :showAudioPop.sync="showAudioPop" />
    </view>
    <view class="paly-list-image" v-if="topTabsActive == 4 && playlistData.length > 0" @click="showAudioBoxPlayList">
      <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/Joined_play_list.png"></image>
    </view>
    <Loading />
    <van-popup custom-class="custom-class-popup" :show="isNoticeBarShow" :close-on-click-overlay="false" @close="onCloseHandler">
      <view class="close-iocn">
        <van-icon @click="onCloseHandler" color="#333" name="cross" />
      </view>
      <view class="popup-box">
        如何定制自己的图表面板：在上方分栏下选择感兴趣的图表类别，点击标题查看大图，点亮<van-icon name="star" color="#E37318" />收藏就可以在自己的图表首页可见。也可在报告中随时点<van-icon
          name="star"
          color="#E37318"
        />收藏感兴趣的图表。
      </view>
    </van-popup>
  </view>
</template>

<script>
import { Home, Reports, Chart, activity } from "@/config/api.js";
import { Throttle, deepCopy } from "@/config/util.js";
import freeCharge from "@/components/freeCharge";
import SearchBar from "@/components/search-bar/searchBar.vue";
import audioModule from "@/components/audioModule/index";
import ChartItem from "@/components/ItemComponent/chartItem.vue";
import ReportItem from "@/components/ItemComponent/reportItem.vue";
import RoadshowItem from "@/components/ItemComponent/roadshowItem.vue";
let app = getApp();
export default {
  data() {
    return {
      topTabBars: [],
      topTabsActive: 2, //一级top的tabs
      secondActive: "", //二级的tabs
      secondBars: [], //二级的tabs数组
      chartChildren: [], //二级的tabs下的标签
      chartChildrenActive: 0,
      refresh: false,
      pageSize: 10, //条数
      pageNum: 1, //页码
      haveMore: true, //是否有更多数据
      haveData: null, //是否有数据
      //数据列表
      dataList: [],
      status: "loadmore",
      loadText: {
        loadmore: "上拉加载更多",
        loading: "加载中",
        nomore: "已经到底了",
      },
      showTransition: false, //点击绝密后的隐现
      isBindingMobile: true, //图表我的收藏是否绑定手机号
      videoContext: null,
      shareSourceType: "", //通过分享单个音频点进页面时使用
      shareSourceId: "", //通过分享单个视频点进页面时使用
      roadshowPageList: [], //音频  视频 list
      showAudioPop: false,
      mediumActive: "",
      mediumSelect: [
        { name: "路演回放", value: 1, IsChoose: false },
        { name: "问答系列", value: 2, IsChoose: false },
        { name: "调研反馈", value: 3, IsChoose: false },
      ],
      listChartPermission: [], // 行业
      chartPermissionName: "全行业",
      chartPermissionIds: "",
      isNoticeBarShow: false,
    };
  },
  components: {
    freeCharge,
    ChartItem,
    ReportItem,
    RoadshowItem,
    SearchBar,
    audioModule,
  },
  watch: {},
  onLoad(optios) {
    this.getUserSearchContent();
    this.getHeaderTab();
    if (optios.topTabsActive) {
      this.topTabsActive = optios.topTabsActive;
      this.secondActive = optios.secondActive;
      this.chartChildrenActive = optios.childrenActive;
      this.shareSourceType = optios.SourceType;
      this.shareSourceId = optios.SourceId;
    }
    this.getTabs();
    this.getReportList();
  },
  onShow() {
    this.getRecordTracking("纪要库");
    this.$store.commit("setRouterActivity", "纪要库");
    this.$store.commit("setRouterReport", "纪要库");
    //进入页面的记录
    this.$store.dispatch("statistics", { PageType: "Activit" });
    // #ifdef MP-WEIXIN
    uni.hideHomeButton();
    // #endif
    this.$store.commit("audioBg/parseIntAudio", true);
  },
  computed: {
    curVoiceId() {
      //当前正在播放的音频id
      return this.$store.state.audioBg.indexId;
    },
    curAudioPaused() {
      //当前音频是否暂停状态
      return this.$store.state.audioBg.paused;
    },
    showAudioBox() {
      return this.$store.state.audioBg.parseIntShow;
    },
    isMyChartCollection() {
      return this.topTabsActive == "3" && this.secondActive == 0;
    },
    // 播放列表数据
    playlistData() {
      return this.$store.state.audioJoinPlaylist.playlist;
    },
  },
  methods: {
    //点击顶部一级分类
    topTabsChange(item) {
      if (item.Id == 5) {
        // 精选看板的点击事件
        uni.navigateTo({
          url: "/reportPages/selectedBulletin/selectedBulletin",
        });
        return;
      }
      this.topTabsActive = item.Id;
      this.chartChildren = [];
      this.chartChildrenActive = 0;
      this.secondActive = "";
      this.pageNum = 1;
      this.dataList = [];
      this.shareSourceId = "";
      this.shareSourceType = "";
      uni.pageScrollTo({
        scrollTop: 0,
        duration: 0,
      });
      if (this.topTabsActive == "2" || this.topTabsActive == "3") {
        this.getTabs();
      } else {
        this.initData();
      }
      this.$store.commit("setRouterReport", item.Id === 3 ? "我的收藏" : "纪要库");
    },
    //点击顶部二级分类
    handleClickTopSub(item) {
      this.$store.commit("setRouterReport", item.PermissionName === "我的收藏" ? "我的收藏" : "纪要库");
      this.secondActive = item.ChartPermissionId;
      this.chartChildren = [];
      this.chartChildrenActive = 0;
      this.childrenChartData();
      this.initData();
    },
    //点击图标的二级分类 处理数据
    childrenChartData() {
      if (this.topTabsActive == 3 && this.secondActive != 0) {
        let arr = [];
        this.secondBars &&
          this.secondBars.forEach((item) => {
            if (this.secondActive == item.ChartPermissionId) {
              deepCopy(arr, item.List);
              arr.unshift({
                CtagId: 0,
                Name: "全部",
              });
              this.chartChildren = arr;
            }
          });
        this.chartChildrenActive > 0 ? "" : (this.chartChildrenActive = 0);
      }
    },
    //点击图标的三级分类
    handleChartChildren(item) {
      this.chartChildrenActive = item.CtagId;
      this.initData();
    },
    // 点击为路演的筛选
    mediumClickHandler(item) {
      this.shareSourceType = "";
      this.shareSourceId = "";
      item.isSelect = !item.isSelect;
      let arr = [];
      this.mediumSelect.forEach((key) => {
        if (key.isSelect) {
          arr.push(key.value);
        }
      });
      this.mediumActive = arr.join(",");
      this.initData();
    },
    //点击
    initData() {
      this.pageNum = 1;
      this.dataList = [];
      uni.pageScrollTo({
        scrollTop: 0,
        duration: 0,
      });
      this.getReportList();
    },
    /* 获取tab分类 */
    getTabs() {
      this.secondBars = [];
      this.topTabsActive == "2"
        ? Home.Tab().then((res) => {
            if (res.Ret === 200) {
              this.secondBars = res.Data.List;
              this.secondActive > 0 ? "" : (this.secondActive = this.secondBars[0].ChartPermissionId);
              this.getReportList();
            }
          })
        : this.topTabsActive == "3"
        ? Chart.getChartPatg().then((res) => {
            if (res.Ret === 200) {
              let arr = res.Data;
              arr.unshift({
                ChartPermissionId: 0,
                PermissionName: "我的收藏",
              });
              this.secondBars = arr;
              this.secondActive ? "" : (this.secondActive = 0);
              this.secondActive > 0 && this.childrenChartData();
              this.getReportList();
            }
          })
        : "";
    },
    /* 获取列表 */
    async getReportList() {
      if (this.topTabsActive == "3" && this.secondActive == 0) {
        const res = await Chart.getChartcollection({
          PageSize: this.pageSize,
          CurrentIndex: this.pageNum,
        });
        if (res.Ret === 200) {
          this.status = this.pageNum < res.Data.Paging.Pages ? "loadmore" : "nomore";
          this.isBindingMobile = res.Data.IsBindingMobile;
          if (this.pageNum === 1) {
            this.dataList = res.Data.List || [];
            this.haveData = this.dataList.length > 0 ? true : false;
          } else {
            this.dataList = this.dataList.concat(res.Data.List);
          }
        }
      } else if (this.topTabsActive == 4) {
        const res = await Home.microRoadshowList({
          PageSize: this.pageSize,
          CurrentIndex: this.pageNum,
          SourceId: this.shareSourceId,
          SourceType: this.shareSourceType,
          ChartPermissionIds: this.chartPermissionIds,
          SearchType: this.mediumActive,
        });
        if (res.Ret === 200) {
          this.status = this.pageNum < res.Data.Paging.Pages ? "loadmore" : "nomore";
          if (this.pageNum == 1) {
            this.roadshowPageList = res.Data.List || [];
            this.haveData = this.roadshowPageList.length > 0 ? true : false;
            if (this.refresh) {
              uni.stopPullDownRefresh();
              this.refresh = false;
            }
          } else {
            this.roadshowPageList = this.roadshowPageList.concat(res.Data.List);
          }
        }
      } else {
        const res = await Home.getList({
          PageSize: this.pageSize,
          CurrentIndex: this.pageNum,
          ChartPermissionId: this.secondActive,
          CtagId: this.chartChildrenActive,
          ListType: this.topTabsActive,
        });
        if (res.Ret === 200) {
          this.processingData(res);
        }
      }
    },
    //处理数据
    processingData(res) {
      if (!res.Data.HaveResearch) {
        this.$util.modalShow("", "您暂无查看买方研选权限", "", () => {
          uni.reLaunch({
            url: "/pages/index/index",
          });
        });
      }
      this.status = this.pageNum < res.Data.Paging.Pages ? "loadmore" : "nomore";
      res.Data.List &&
        res.Data.List.forEach((item) => {
          if (item.BodyHtml) {
            item.BodyHtml = item.BodyHtml.replace(/'\'/g, "");
          }
        });
      if (this.topTabsActive == "2") {
        if (this.pageNum === 1) {
          this.dataList = res.Data.List || [];
          this.haveData = this.dataList.length ? true : false;
        } else {
          this.dataList = this.dataList.concat(res.Data.List);
        }
      } else {
        if (this.pageNum === 1) {
          this.haveData = res.Data.List ? true : res.Data.ChartList ? true : false;
        }
        if (!res.Data.List) {
          this.dataList = this.dataList.concat(res.Data.ChartList);
        } else if (!res.Data.ChartList) {
          this.dataList = this.dataList.concat(res.Data.List);
        } else {
          this.dataList.push(res.Data.List.shift());
          let newArr = [];
          let newArrTwo = [];
          for (let i = 0; i < res.Data.List.length; i += 2) {
            newArr.push(res.Data.List.slice(i, i + 2));
          }
          for (let i = 0; i < res.Data.ChartList.length; i += 2) {
            newArrTwo.push(res.Data.ChartList.slice(i, i + 2));
          }
          let arr = [];
          newArr.forEach((item, index) => {
            if (newArrTwo[index]) {
              arr.push(newArrTwo[index], item);
            } else {
              arr.push(item);
            }
          });
          this.dataList = this.dataList.concat(arr.flat(Infinity));
        }
      }

      if (this.refresh) {
        uni.stopPullDownRefresh();
        this.refresh = false;
      }
    },
    //我的收藏的删除
    myChartCollect(id) {
      uni.showModal({
        content: "确认要将该图表移除我的收藏吗？",
        confirmColor: "#376cbb",
        cancelColor: "#606266",
        success: async (res) => {
          if (res.confirm) {
            const res = await Chart.myChartCollect({
              ChartId: id,
            });
            if (res.Ret === 200) {
              this.initData();
              this.$util.toast("已取消收藏");
            }
          }
        },
      });
    },
    //我的收藏 置顶
    async myChartIsTop(id) {
      const res = await Chart.myChartTop({
        ChartId: id,
      });
      if (res.Ret === 200) {
        this.initData();
        this.$util.toast(res.Msg);
      }
    },
    /* 搜索 */
    goSearch() {
      uni.navigateTo({ url: "/pages-search/indedxSearch/indedxSearch?isType=" + this.topTabsActive + "&source=纪要库页面" });
    },
    /* 绑定联系方式 */
    bindingMobile() {
      uni.showModal({
        title: "即将前往登录页面，请确认是否继续",
        content: "为了给您提供更好的使用体验，请登录后再进行查看或操作",
        confirmColor: "#376cbb",
        cancelColor: "#606266",
        success: function (res) {
          if (res.confirm) {
            //已授权未绑定
            uni.navigateTo({
              url: "/pageMy/login/login",
            });
          }
        },
      });
    },
    //获取顶部导航
    async getHeaderTab() {
      const res = await Home.headerTab();
      if (res.Ret === 200) {
        this.topTabBars = res.Data || [];
      }
    },
    // 微路演收藏
    async isCollectionHandeler(item) {
      await this.$store.dispatch("showLoginModal");
      const res = await Home.microRoadshowCollect({
        SourceId: item.SourceId,
        SourceType: item.Type,
        PageRouter: this.$store.state.pageRouterReport,
      });
      if (res.Ret === 200) {
        let index = this.roadshowPageList.findIndex((key) => key.SourceId == item.SourceId && key.Type == item.Type);
        res.Data.Status == 1 ? this.$set(this.roadshowPageList[index], "IsCollect", true) : this.$set(this.roadshowPageList[index], "IsCollect", false);
        uni.showToast({
          title: res.Msg,
          duration: 2000,
        });
      }
    },
    // 选择的选中事件
    overallClick(item) {
      item.IsChoose = !item.IsChoose;
    },
    // 下拉的选择的重置事件
    replacementBtn() {
      this.page_no = 1;
      this.chartPermissionIds = "";
      this.listChartPermission.map((item) => (item.IsChoose = false));
      this.chartPermissionName = "全行业";
      this.initData();
    },
    // 下拉选择的确定事件
    replacementConfirm() {
      this.page_no = 1;
      const arr = [];
      const str = [];
      this.listChartPermission.forEach((key) => {
        if (key.IsChoose) {
          arr.push(key.ChartPermissionId);
          str.push(key.PermissionName);
        }
      });
      if (str.length == this.listChartPermission.length || str.length <= 0) {
        this.chartPermissionName = "全行业";
      } else {
        this.chartPermissionName = str.join(",");
      }
      this.chartPermissionIds = arr.join(",");
      this.initData();
      this.selectComponent("#industry").toggle(false);
    },
    // 获取权限、所有的行业
    async getUserSearchContent() {
      const res = await Reports.permissionNoyx({});
      if (res.Ret === 200) {
        this.listChartPermission =
          res.Data.List.map((item) => {
            return {
              ...item,
              IsChoose: false,
            };
          }) || [];
      }
    },
    showAudioBoxPlayList() {
      this.$store.commit("audioBg/parseIntAudio", true);
      this.showAudioPop = true;
      uni.$emit("play-list-emit", {});
    },
    // 点击了图表下的滚动条
    noticeBarHandler() {
      this.isNoticeBarShow = true;
    },
    // 关闭滚动条的弹框
    onCloseHandler() {
      this.isNoticeBarShow = false;
    },
  },
  onHide() {
    this.$store.commit("audioBg/parseIntAudio", false);
  },
  mounted() {
    uni.$on("updateAudioVideo", (data) => {
      this.$store.dispatch("checkHandle", "noGO");
      this.getReportList();
    });
  },
  /* 下拉刷新 */
  onPullDownRefresh: Throttle(function () {
    this.shareSourceId = "";
    this.shareSourceType = "";
    this.status = "loadmore";
    this.refresh = true;
    this.dataList = [];
    this.pageNum = 1;
    this.getReportList();
  }),
  // 上拉加载
  onReachBottom: Throttle(function () {
    if (this.status === "nomore") return;
    this.status = "loading";
    this.pageNum++;
    this.getReportList();
  }),
  /** 用户点击分享*/
  onShareAppMessage: function ({ from, target }) {
    if (from === "button") {
      let item = target.dataset.item;
      let title_share = item.AudioTitle || item.Title;
      this.getRecordTracking("微路演转发", { SourceId: item.SourceId, SourceType: item.SourceType });
      return {
        title: title_share,
        path: "/pages/material/material?topTabsActive=4" + "&SourceId=" + item.SourceId + "&SourceType=" + item.Type,
        imageUrl: item.AudioShareImg || item.ShareImg,
      };
    } else {
      return {
        title: this.isHorzMobile ? "好友向您推荐此内容，上传名片享查研观向免费月卡！" : "素材库",
        path: "/pages/material/material?topTabsActive=" + this.topTabsActive + "&secondActive=" + this.secondActive + "&childrenActive=" + this.chartChildrenActive,
        success: (res) => {},
        fail: (err) => {},
      };
    }
  },
};
</script>

<style lang="scss">
.Index-container {
  background-color: $uni-bg-color;
  font-size: 30rpx;
  /deep/ .search-box {
    margin-left: 30rpx !important;
  }
  .content-ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 20rpx 15rpx;
  }
  .top-content-box {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9;

    .top-tabs {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 28rpx;
      background-color: #fff;
      padding: 35rpx 0 10rpx;
      &::-webkit-scrollbar {
        width: 0;
        height: 0;
        display: none;
      }
      .item {
        position: relative;
        display: flex;
        justify-content: center;
        padding-bottom: 8rpx;
        flex: 1;
        flex-shrink: 0;
        .limit-img {
          position: absolute;
          top: -20rpx;
          right: -30rpx;
          z-index: 99;
        }
        .active {
          position: absolute;
          left: 50%;
          bottom: 0;
          transform: translateX(-50%);
          width: 32rpx;
          height: 6rpx;
          border-radius: 2rpx;
          background: $uni-color-new;
        }
      }
      .tabs-active {
        color: $uni-color-new;
        font-weight: 500;
      }
    }
  }
  .tabs-content-ul {
    padding: 35rpx 50rpx 10rpx 20rpx !important;
    .item {
      flex: none !important;
      padding: 0 20rpx;
    }
  }
  .tabs-content {
    .children-ul {
      padding: 20rpx 20rpx 0;
      display: flex;
      flex-wrap: wrap;
      background-color: #fff;
      .children-active {
        background-color: $uni-color-new;
        color: #fff;
      }
    }
    .chart-children {
      display: flex;
      align-items: center;
      height: 52rpx;
      padding: 0 30rpx;
      margin: 0rpx 20rpx 20rpx 0;
      background-color: #f8f8fa;
      color: #666666;
      font-size: 24rpx;
      border-radius: 100rpx;
    }
  }

  .tabs-img {
    width: 46rpx;
    height: 26rpx;
  }
  .nodata {
    font-size: 40rpx;
    .bind-mobile {
      width: 244rpx;
      height: 58rpx;
      background: #376cbb;
      border-radius: 8rpx;
      font-size: 28rpx;
      line-height: 58rpx;
      text-align: center;
      color: #fff;
      margin: 50rpx auto;
    }
  }
  .select-conyent {
    .items-box {
      width: 40rpx;
    }

    .menu-items {
      background-color: #f8f8fa;
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      padding: 30rpx 30rpx 0;

      .menu-items-box {
        display: flex;
        width: 50%;
        font-size: 28rpx;
        font-weight: 400;
        margin-bottom: 40rpx;
      }
    }

    .replacement {
      margin: 0rpx 30rpx 20rpx;
      display: flex;
      background-color: $uni-color-new;
      height: 60rpx;
      line-height: 58rpx;
      font-size: 28rpx;
      font-weight: 400;
      color: #ffffff;
      border-radius: 30rpx;

      text {
        flex: 1;
        text-align: center;
        line-height: 60rpx;
      }

      .replacement-box {
        border: 1rpx solid $uni-color-new;
        line-height: 58rpx;
        color: $uni-color-new;
        background: #ffffff;
        border-radius: 28rpx 0rpx 28rpx 28rpx;
      }
    }
  }
  .paly-list-image {
    position: fixed;
    right: 50rpx;
    bottom: 150rpx;
    z-index: 99;
    width: 100rpx;
    height: 100rpx;
    image {
      width: 100rpx;
      height: 100rpx;
    }
  }
  /deep/.van-dropdown-menu {
    background-color: #fff;
    box-shadow: none !important;
    display: flex;
    align-items: center;
  }

  /deep/.van-dropdown-menu__item {
    box-sizing: border-box;
    width: 160rpx;
    // margin-right: 20rpx;
    padding-right: 20rpx;
    height: 51rpx;
    border-radius: 26rpx;
    background: #f8f8fa;
  }

  /deep/.van-dropdown-item {
    margin-top: -10rpx;
  }

  /deep/[data-index="2"] {
    margin-right: 0rpx;
  }

  /deep/ .van-ellipsis {
    font-size: 24rpx;
  }
  .custom-class-popup {
    border-radius: 12rpx;
    .close-iocn {
      padding: 25rpx 35rpx;
      display: flex;
      justify-content: flex-end;
    }
    .popup-box {
      width: 632rpx;
      padding: 0 30rpx 50rpx;
      line-height: 48rpx;
      font-size: 32rpx;
    }
  }
}
</style>
