<template>
  <view class="container-activity-item" @click="goDetail(list)">
    <image v-if="list.IsResearchPoints" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/research_points.png" class="content-img"></image>
    <block v-else>
      <image v-if="list.TripStatus == 2" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/trip_icon.png" class="content-img"></image>
      <image v-if="list.TripStatus == 1" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/Ybm.png" class="content-img"></image>
    </block>
    <view class="content-sign">
      <view :class="[list.ActivityType === 0 ? 'is-down' : 'is-up', 'is-up-down', 'global_content_center']">{{ list.ActivityType === 0 ? "线下" : "线上" }}</view>
      <image
        v-if="list.ActiveState == 1 || list.ActiveState == 2"
        :src="
          list.ActiveState == 1 ? 'https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/not_started_activity.png' : 'https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/in_progress_activity.png'
        "
      ></image>
      <block v-else>
        <image v-if="list.TripStatus != 1" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/end_activity.png"></image>
      </block>
    </view>
    <view class="content-type global_title">
      <view>
        {{ list.ActivityTypeName || "专项产业调研" }}
      </view>
      <view v-if="list.ResearchTheme && list.City" class="content-city">
        <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/position.png"></image>
        {{ list.City }}
      </view>
    </view>

    <view class="content-title" v-if="list.ActivityName || list.ResearchTheme">
      <mp-html :content="richTextClamp(3) + (list.ActivityName || list.ResearchTheme) + '</div>'" />
    </view>

    <view style="display: flex" class="global_content content-text text_twoLine" v-if="list.ActivityTimeText && list.SourceType !== 1">
      <text> 活动时间：{{ list.ActivityTimeText }}</text>
    </view>

    <view class="global_content content-text text-Line" v-else>
      {{ list.Host ? "主持人:" : list.Expert ? "专家背景:" : list.Speaker ? "主讲人:" : list.DistinguishedGuest ? "嘉宾:" : "" }}
      {{ list.Host ? list.Host : list.Expert ? list.Expert : list.Speaker ? list.Speaker : list.DistinguishedGuest ? list.DistinguishedGuest : "" }}
    </view>
    <view class="content-time" v-if="list.SourceType == 1">
      {{ list.ActivityTimeText }}
    </view>
    <view v-if="list.City && !list.ResearchTheme" class="content-city">
      <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/position.png"></image>
      {{ list.City }}
    </view>
    <view :class="['content-btn', isEndBtnSlide(list) > 2 && 'content-btn-end']" v-if="isUserBindingPhoneNumber">
      <block v-if="list.SourceType === 1">
        <block v-if="list.ActiveState == 1">
          <text class="item-btn btn-solid" v-if="list.IsShowOutboundCall && list.ActivityTypeId == 1" @click.stop="signupIsAddOfCancel(list, 1)">{{
            list.IsSignup == 1 ? "取消外呼" : "预约外呼"
          }}</text>
          <text class="item-btn" v-if="list.IsShowAppointment" @click.stop="summaryIsHandel(list)">{{ list.IsAppointment == 1 ? "取消纪要" : "预约纪要" }}</text>
          <text class="item-btn" v-if="list.IsShowMeetingReminder" @click.stop="meetingReminderAdd(list, list.IsCancelMeetingReminder)">
            {{ list.IsCancelMeetingReminder == 0 ? "消息提醒" : "取消提醒" }}
          </text>
          <text class="item-btn" v-if="list.IsShowHelpSsk" @click.stop="askingGo(list)">帮我带问</text>
          <text class="item-btn btn-solid" v-if="list.IsShowOutboundCall && list.ActivityTypeId != 1" @click.stop="signupIsAddOfCancel(list, 1)">{{
            list.IsSignup == 1 ? "取消外呼" : "预约外呼"
          }}</text>
          <text class="item-btn" v-if="list.IsShowDetails" @click.stop="goDetail(list)">查看详情</text>
          <block v-if="list.IsShowSignup">
            <block v-if="list.IsCClassMeeting && !list.IsYidongConduct">
              <text class="item-btn btn-solid" @click.stop="signupIsAddOfCancel(list, 3, 'CClass')">{{ list.IsSignup == 1 ? "取消报名" : "我要报名" }}</text>
            </block>
            <block v-else>
              <text class="item-btn btn-solid" v-if="list.IsSignup !== 1" @click.stop="wanttosignup(list)">我要报名</text>
              <text class="item-btn btn-solid" v-else @click.stop="signupIsAddOfCancel(list, 2)">{{ list.SignupType == 1 ? "取消外呼" : "取消报名" }}</text>
            </block>
          </block>
        </block>
        <text v-if="list.IsShowHelpSsk && list.ActiveState == 2" class="item-btn" @click.stop="askingGo(list, '提问')">实时提问</text>
      </block>
      <view class="bottom-box real-time" v-else>
        <view class="bottom-box">
          <view class="" style="width: 130rpx"> </view>
          <text class="item-btn" @click.stop="lookImg(list)">行程安排</text>
          <block v-if="list.TripStatus == 2">
            <text v-if="list.ActiveState == 1" class="item-btn btn-solid" @click.stop="applyOfcancel(list)">{{ list.IsTrip == 0 ? "我要报名" : "取消报名" }}</text>
          </block>
          <block v-else>
            <text class="item-btn btn-solid" v-if="list.IsSignup !== 1" @click.stop="interest(list)">感兴趣</text>
            <text class="item-btn btn-solid" @click.stop="beNotInterested(list)" v-else>已预报名</text>
          </block>
        </view>
      </view>
    </view>
    <!-- 所有自定义弹框 -->
    <modalDialog
      :isShow="isShow"
      :signupType="signupType"
      :goFollow="goFollow"
      :hasPermission="hasPermission"
      :jurisdictionList="jurisdictionList"
      :editIsShow="editIsShow"
      :isCancelShow="isCancelShow"
      :idTypeCancel="idTypeCancel"
      :countryCode="countryCode"
      :mobileEdit="mobileEdit"
      :goOnNextStep="goOnNextStep"
      :isShowhasPermission="isShowhasPermission"
      :applyForIsShow="applyForIsShow"
      :mailboxBinding="mailboxBinding"
    />
    <u-modal
      v-model="specialGoFollowShow"
      :content-style="{ fontSize: '32rpx' }"
      :show-cancel-button="show_cancel_button"
      confirm-text="知道了"
      :show-confirm-button="show_confirm_button"
      :show-title="false"
      :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
      :confirm-style="{ fontWeight: '700' }"
      :mask-close-able="specialIsHintShow"
      @confirm="ininModalHandler"
      @cancel="ininModalHandler"
    >
      <view class="slot-content">
        <block v-if="specialPopupMsg">
          <text>{{ specialAccounts }}</text>
          <text class="light-hint">{{ specialPopupMsg }}</text>
        </block>
        <rich-text v-else :nodes="specialAccounts"></rich-text>
      </view>
    </u-modal>
    <SelectPopup :selectShow.sync="selectShow" @signupIsAddOfCancel="signupIsAddOfCancel" :selectYdong="selectYdong" />
    <ShowResearchDlg :isResearchModalShow.sync="isResearchModalShow" :jurisdictionList="jurisdictionList" :checkResearchList.sync="checkResearchList" />
  </view>
</template>

<script>
import modalDialog from "../modalDialog.vue";
import { activity, User } from "@/config/api.js";
import SelectPopup from "@/components/activity/selectPopup";
import ShowResearchDlg from "@/components/activity/showResearchDlg.vue";
import { isTimeGreaterThanCurrent, isWithinOneHour } from "@/config/util.js";

export default {
  name: "",
  components: { modalDialog, SelectPopup, ShowResearchDlg },
  props: {
    list: {
      type: Object,
      default: {},
      required: true,
    },
    componentsPage: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      /**/
      tabsActive: 0,
      /**/
      /*  共用的弹框  */
      isShow: false, //弹框
      signupType: "", //关注类型
      goFollow: false, //是否关注公众号
      hasPermission: "", //是否有权限
      jurisdictionList: {},
      editIsShow: false, //外呼莫泰框
      isCancelShow: false,
      idTypeCancel: {
        id: "",
        type: 1,
        cutId: "",
        state: "",
        isNum: false,
      },
      countryCode: "", //外呼区号
      mobileEdit: "", //外呼手机号
      goOnNextStep: "", //设置外呼号后弹出哪个
      isShowhasPermission: false, //拨打销售电话
      applyForIsShow: false, //潜在用户
      mailboxBinding: false, //是否绑定邮箱
      selectShow: false, //是否显示弹框
      selectYdong: false, // 参会方式展示的文案
      specialIsHintShow: false, // 按钮的显示
      specialGoFollowShow: false, // 弹框的隐藏显示
      specialAccounts: `您已开启【专项调研】新活动通知<br/><br/>请关注【查研观向小助手】公众号，及时获取微信消息提醒`,
      specialIsFollow: false, // 是否关注
      specialPopupMsg: "", // 消息的文案
      show_cancel_button: false, // 取消按钮的隐藏显示
      show_confirm_button: false, // 确定按钮的隐藏显示
      itemData: {},
      isResearchModalShow: false,
      checkResearchList: {},
      addItemData: {},
    };
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    isEndBtnSlide(item) {
      let isKey = ["IsShowOutboundCall", "IsShowAppointment", "IsShowMeetingReminder", "IsShowHelpSsk", "IsShowDetails", "IsShowSignup"];
      let arr = [];
      Object.keys(item).forEach((key) => {
        if (isKey.includes(key)) {
          item[key] && arr.push(item[key]);
        }
      });
      return arr.length;
    },
    // 我要报名
    wanttosignup(item) {
      this.activityIdAdd = item.ActivityId;
      this.itemData = item;
      if (item.YidongActivityId) {
        this.goDetail(item);
        return;
      } else if (
        (!item.IsResearchPoints && item.ActivityTypeId == 3 && !item.IsYidongConduct && item.IsLimitPeople == 1) ||
        (item.IsYidongConduct && item.IsCanOutboundCall) ||
        (!item.IsYidongConduct && item.IsLimitPeople == 1 && [1, 2].includes(item.ActivityTypeId))
      ) {
        this.selectShow = true;
        this.selectYdong = item.IsYidongConduct;
      } else {
        this.activityIdAdd = "";
        this.signupIsAddOfCancel(item, 3);
      }
    },

    //报名 取消报名 预约外呼/取消预约外呼报名
    signupIsAddOfCancel(item, type, valName = "") {
      let id = this.activityIdAdd || item.ActivityId;
      this.addItemData = item || this.itemData;
      if (item && item.IsSignup == 1) {
        if (item.IsResearchPoints) {
          if (isTimeGreaterThanCurrent(item.CancelDeadline)) {
            uni.showModal({
              confirmText: "知道了",
              showCancel: false,
              confirmColor: "#376cbb",
              content: "当前时间点已无法取消报名，若想取消，请联系对口销售",
            });
            return;
          }
        }
        if (isWithinOneHour(item.ActivityTime, 3600000)) {
          uni.showModal({
            confirmText: "知道了",
            showCancel: false,
            confirmColor: "#376cbb",
            content: type == 1 ? "活动开始前1小时内无法取消预约外呼，请联系对口销售处理" : "活动开始前1小时内无法取消报名，请联系对口销售处理",
          });
          return;
        }
        uni.showModal({
          content: type == 1 ? "您要取消此次活动预约外呼吗？" : "您要取消此次活动的报名吗？",
          confirmColor: "#376cbb",
          cancelColor: "#606266",
          success: async (res) => {
            if (res.confirm) {
              const res = await activity.signupCancel({
                ActivityId: item.ActivityId,
                SignupType: type,
                PageRouter: this.$store.state.pageRouterActivity,
              });
              if (res.Ret === 200) {
                this.parentDataEmit(this.addItemData, "IsSignup", 0);
                this.init();
                type == 1
                  ? uni.showToast({
                      title: "预约外呼已取消",
                      duration: 2000,
                    })
                  : uni.showToast({
                      title: "已取消报名",
                      duration: 2000,
                    });
                if (valName === "我的") {
                  this.getActivityList();
                }
              }
            }
          },
        });
      } else {
        let timer = null;
        if (this.flag) return;
        clearTimeout(timer);
        this.flag = true;
        this.selectShow = false;
        if (this.addItemData.IsResearchPoints) {
          this.researchPointsHandler(id, type, this.addItemData);
        } else {
          this.myIsApplyHandler(id, type, valName);
        }
        timer = setTimeout(() => {
          this.flag = false;
        }, 500);
      }
    },
    // 弹框的初始化
    init() {
      this.signupType = "";
      this.goFollow = false;
      this.isShow = false;
      this.isCancelShow = false;
    },
    //添加消息提醒接口
    meetingReminderAdd(item, type) {
      if (type != 0) {
        this.meetingReminderCancel(item);
        return;
      }
      activity
        .meetingReminderAdd({
          ActivityId: item.ActivityId,
          PageRouter: this.$store.state.pageRouterActivity,
        })
        .then((res) => {
          if (res.Ret == 200) {
            this.hasPermission = res.Data.HasPermission;
            this.jurisdictionList = res.Data;
            if (this.hasPermission == 1) {
              if ((res.Data.GoFollow && res.Data.SignupStatus !== "Success") || !res.Data.GoFollow) this.isShow = true;
              else this.goFollow = res.Data.GoFollow;
              this.signupType = 999;
              this.idTypeCancel = {
                cutId: res.Data.ActivityId,
                state: 1,
                name: "conference",
              };
              res.Data.SignupStatus == "Success" && this.parentDataEmit(item, "IsCancelMeetingReminder", 1);
            } else if (this.hasPermission == 2) {
              this.isShowhasPermission = true;
            } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
              this.applyForIsShow = true;
            }
          }
        });
    },
    //取消消息提醒接口
    meetingReminderCancel(item) {
      activity
        .meetingReminderCancel({
          ActivityId: item.ActivityId,
          PageRouter: this.$store.state.pageRouterActivity,
        })
        .then((res) => {
          if (res.Ret == 200) {
            uni.showModal({
              confirmText: "知道了",
              confirmColor: "#376cbb",
              content: res.Msg,
              showCancel: false,
              success: (res) => {
                if (this.isrefresh) return this.getActivityList();
                if (res.confirm) {
                  this.parentDataEmit(item, "IsCancelMeetingReminder", 0);
                }
              },
            });
          }
        });
    },

    //帮我带问
    async askingGo(item, type = "") {
      const res = await activity.checkAskActivity({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
      if (res.Ret == 200) {
        this.hasPermission = res.Data.HasPermission;
        this.jurisdictionList = res.Data;
        if (this.hasPermission == 1) {
          if (res.Data.SignupStatus === "Success") {
            uni.navigateTo({
              url: "/activityPages/generationAsk/generationAsk?id=" + item.ActivityId + "&type=" + type,
            });
          } else {
            uni.showModal({
              confirmText: "知道了",
              confirmColor: "#376cbb",
              content: res.Msg || res.Data.PopupMsg,
              showCancel: false,
              success: (res) => {
                if (res.confirm) {
                  this.getActivityDetail();
                }
              },
            });
          }
        } else if (this.hasPermission == 2) {
          this.isShowhasPermission = true;
        } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
          this.applyForIsShow = true;
        }
      }
    },
    // 弹框的初始化
    init() {
      this.signupType = "";
      this.goFollow = false;
      this.isShow = false;
      this.isCancelShow = false;
    },
    //预约纪要、取消预约纪要
    async summaryIsHandel(item, type = "") {
      if (item.IsAppointment == 0) {
        const res = await activity.postAppointmentAdd({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
        if (res.Ret == 200) {
          this.hasPermission = res.Data.HasPermission;
          this.jurisdictionList = res.Data;
          if (this.hasPermission == 1) {
            this.signupType = "summaryIsHandel";
            this.goOnNextStep = res.Data.GoFollow;
            if (res.Data.SignupStatus !== "Success") {
              this.isShow = true;
            } else {
              if (res.Data.GoFollow) this.goFollow = res.Data.GoFollow;
              else if (res.Data.SignupStatus == "Success") this.isShow = true;
              this.parentDataEmit(item, "IsAppointment", 1);
            }
          } else if (this.hasPermission == 2) {
            this.isShowhasPermission = true;
          } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
            this.applyForIsShow = true;
          }
        }
      } else {
        uni.showModal({
          content: "确定要取消预约本场调研的纪要吗?",
          confirmColor: "#376cbb",
          cancelColor: "#606266",
          success: async (res) => {
            if (res.confirm) {
              const res = await activity.postAppointmentCancel({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
              if (res.Ret === 200) {
                this.parentDataEmit(item, "IsAppointment", 0);
                this.init();
                if (type === "我的") {
                  this.getActivityList();
                }
              }
            }
          },
        });
      }
    },
    //去往详情页面
    goDetail(item) {
      if (item.SourceType !== 1) {
        uni.navigateTo({ url: "/activityPages/specialDetail/specialDetail?id=" + item.ActivityId });
      } else {
        uni.navigateTo({ url: "/activityPages/activityDetail/activityDetail?id=" + item.ActivityId });
      }
    },
    // 查看行程的事件
    lookImg(item) {
      this.getRecordTracking(this.$store.state.pageRouterActivity, { ActivityId: item.ActivityId, Source: "查看行程" });
      uni.previewImage({
        urls: [item.TripImgLink], //查看图片的数组
      });
    },
    // 点击感兴趣
    async interest(item) {
      const res = await activity.postSpecialSignupAdd({
        ActivityId: item.ActivityId,
        PageRouter: this.$store.state.pageRouterActivity,
      });
      if (res.Ret === 200) {
        this.modalShow(res);
        if (res.Data.SignupStatus == 1) {
          this.parentDataEmit(item, "IsSignup", 1);
        }
      }
    },
    // 报名或者取消报名
    async applyOfcancel(item, type = "") {
      this.show_confirm_button = true;
      if ((type != "back" && item.IsTrip == 1) || (type == "back" && item.IsSignup == 1)) {
        // 取消报名
        const str = item.ActivityTime.replace(/-/g, "/");
        const date = new Date(str);
        const times = date.getTime();
        const num = new Date().getTime();
        let twoDays = times - num <= 3600000 * 48;
        uni.showModal({
          content: twoDays ? "活动开始前48小时内，取消报名仍会维持扣点，确定要取消报名吗？" : "您要取消此次专项调研的预报名吗？",
          confirmColor: "#376cbb",
          cancelColor: "#606266",
          success: async (res) => {
            if (res.confirm) {
              const res = await activity.activityApecialCancel({
                ActivityId: item.ActivityId,
                PageRouter: this.$store.state.pageRouterActivity,
              });
              if (res.Ret === 200) {
                uni.showToast({
                  title: "已取消",
                  duration: 2000,
                });
                item.TripNum > 0 && (item.TripNum -= 1);
                type == "back" ? this.parentDataEmit(item, "IsSignup", 0) : this.parentDataEmit(item, "IsTrip", 0);
              }
            }
          },
        });
      } else {
        // 报名
        const res = await activity.activityApecialAdd({ ActivityId: item.ActivityId, PageRouter: this.$store.state.pageRouterActivity });
        if (res.Ret == 200) {
          this.modalShow(res);
          if (res.Data.SignupStatus == 1) {
            type == "back" ? this.parentDataEmit(item, "IsSignup", 1) : this.parentDataEmit(item, "IsTrip", 1);
          }
        }
      }
    },

    // 弹框的数据重置
    ininModalHandler() {
      this.show_cancel_button = false;
      this.show_confirm_button = false;
      this.specialIsHintShow = false;
      this.specialGoFollowShow = false;
      this.isCancelBtn = false;
    },

    // 显示弹框
    modalShow(res) {
      this.show_confirm_button = true;
      this.specialGoFollowShow = true;
      this.specialAccounts = res.Data.PopupMsg;
      this.specialPopupMsg = res.Data.PopupMsg2;
    },
    // 已预报名、就是不感兴趣
    beNotInterested(item) {
      uni.showModal({
        content: "您要取消此次专研调研的预报名吗？",
        confirmColor: "#376cbb",
        cancelColor: "#606266",
        success: async (res) => {
          if (res.confirm) {
            const res = await activity.postSpecialSignupAdd({
              ActivityId: item.ActivityId,
              PageRouter: this.$store.state.pageRouterActivity,
            });
            if (res.Ret === 200) {
              this.parentDataEmit(item, "IsSignup", 0);
            }
          }
        },
      });
    },

    // 新调研通知
    async specialFollow() {
      this.show_confirm_button = true;
      if (this.specialIsFollow) {
        uni.showModal({
          content: "您要取消【专项调研】新活动通知吗？",
          confirmColor: "#376cbb",
          cancelColor: "#606266",
          success: async (res) => {
            if (res.confirm) {
              const res = await activity.postSpecialFollow();
              if (res.Ret === 200) {
                this.specialIsFollow = !this.specialIsFollow;
              }
            }
          },
        });
      } else {
        const res = await activity.postSpecialFollow();
        if (res.Ret === 200) {
          this.show_cancel_button = true;
          this.specialIsFollow = !this.specialIsFollow;
          this.specialGoFollowShow = true;
        }
      }
    },
    parentDataEmit(item, value, num) {
      let index = this.$parent.newDataList.findIndex((key) => key.Activity && key.Activity.ActivityId === item.ActivityId);
      this.$parent.newDataList[index].Activity[value] = num;
    },
    richTextClamp(val) {
      return `<div style="${
        val == 7 ? "min-height: 50px;" : ""
      }line-clamp: ${val};-webkit-line-clamp: ${val};text-overflow: -o-ellipsis-lastline;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;word-wrap: break-word;word-break: break-all;">`;
    },
    // 我要报名的请求拆分出来了
    async myIsApplyHandler(id, type, valName = "") {
      const res = await activity.signupAdd({
        ActivityId: id,
        SignupType: type,
        PageRouter: this.$store.state.pageRouterActivity,
      });
      if (res.Ret == 200) {
        this.hasPermission = res.Data.HasPermission;
        this.jurisdictionList = res.Data;
        if (this.hasPermission == 1) {
          this.signupType = valName == "CClass" ? "CClass" : res.Data.SignupType;
          this.countryCode = res.Data.CountryCode;
          this.mobileEdit = res.Data.Mobile;
          this.goOnNextStep = res.Data.GoFollow;
          this.idTypeCancel = {
            cutId: res.Data.ActivityId,
            state: 1,
          };
          if (res.Data.GoBindEmail) {
            this.mailboxBinding = true;
            return;
          }
          if (res.Data.SignupStatus !== "Success") {
            this.isShow = true;
          } else {
            if (res.Data.GoOutboundMobile) this.editIsShow = true;
            else if (res.Data.GoFollow) this.goFollow = res.Data.GoFollow;
            else if (res.Data.SignupStatus == "Success") this.isShow = true;
            this.parentDataEmit(this.addItemData, "IsSignup", 1);
            this.parentDataEmit(this.addItemData, "SignupType", type);
          }
        } else if (this.hasPermission == 2) {
          this.isShowhasPermission = true;
        } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
          this.applyForIsShow = true;
        }
      }
    },
    // 研选扣点的事件
    async researchPointsHandler(id, type, item) {
      const res = await activity.activityCheck({
        ActivityId: id,
      });
      if (res.Ret === 200) {
        let { Data } = res;
        this.checkResearchList = Data;
        this.checkResearchList.childrenType = type;
        this.jurisdictionList = item;
        this.isResearchModalShow = true;
      }
    },
  },
};
</script>
<style scoped lang="scss">
.container-activity-item {
  position: relative;
  width: 100%;
  background: #ffffff;
  box-shadow: 0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16);
  border-radius: 8rpx;
  padding: 0 12rpx 12rpx;
  margin-bottom: 20rpx;
  font-size: 24rpx;
  overflow: hidden;
  .content-sign {
    margin-top: 12rpx;
    display: flex;
    align-items: center;
    justify-content: space-between;
    image {
      display: block;
      width: 122rpx;
      height: 42rpx;
    }
    .is-up-down {
      width: 110rpx;
      font-size: 24rpx;
      font-weight: 500;
      height: 40rpx;
      text-align: center;
      border-radius: 4rpx;
      color: #333333;
    }
    .is-up {
      background-color: #e5efff;
    }
    .is-down {
      background-color: #f2e8cc;
    }
    .is-end {
      color: #c0c0c0;
      background-color: #edf2f5;
    }
    .state {
      border-radius: 4rpx 0 4rpx 0;
      margin-left: 10rpx;
    }
  }
  .content-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24rpx 0;
  }
  .content-title {
    font-size: 24rpx;
    font-weight: 400;
    color: #333333;
    line-height: 36rpx;
  }

  .content-text {
    font-size: 22rpx;
    font-weight: 400;
    color: #999999;
    line-height: 30rpx;
    margin: 10rpx 0;
  }

  .content-time {
    font-size: 22rpx;
    font-weight: 400;
    color: #999999;
    line-height: 30rpx;
    margin-bottom: 15rpx;
  }
  .content-city {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    color: $uni-color-new;
    font-size: 26rpx;
    image {
      width: 32rpx;
      height: 32rpx;
      margin-right: 8rpx;
    }
  }
  .content-img {
    width: 186rpx;
    height: 48rpx;
    margin-left: -12rpx;
  }

  .content-btn {
    display: flex;
    overflow: hidden;
    overflow-x: auto;
    margin-top: 20rpx;
    justify-content: flex-end;
    .item-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 12rpx;
      height: 42rpx;
      border-radius: 4rpx;
      color: $uni-color-new;
      border: 1rpx solid $uni-color-new;
      margin-left: 20rpx;
      flex-shrink: 0;
      margin-bottom: 2rpx;
    }
    .btn-solid {
      background: $uni-color-new;
      border: none;
      color: #fff;
    }
  }
  .content-btn-end {
    justify-content: flex-start;
  }
  .bottom-box {
    display: flex;
  }
  .text-Line {
    text-overflow: -o-ellipsis-lastline;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    word-break: break-all;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .select-box {
    width: 100%;

    view {
      height: 95prx;
      line-height: 95rpx;
      text-align: center;
      font-size: 32rpx;
      border-bottom: 1rpx solid #ebebeb;
    }
  }
}
</style>
