<template>
  <div class="c_box">
    <div class="choice_box">
      <div class="title" style="display: flex;align-items: center;">
        <span class="g_t_index" style="min-width: fit-content;">{{
          tindex + 1
        }}</span>
        <span>{{ checkJson.title }}</span>
      </div>
      <div
        class="detail"
        v-if="checkJson.detail"
        v-html="checkJson.detail"
        style="color: #00000066;margin-top: 5px;"
      ></div>
			<div
        class="detail"
         v-if="checkJson.answer2 && typeof checkJson.answer2=='string'"
        v-html="checkJson.answer2"
        style="color: #000000;margin-top: 5px;"
      ></div>
			<el-button style="margin-top: 10px;" type="primary" size="mini" @click="sweepBtn">扫一扫</el-button>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    tindex: {
      type: Number
    },
    cJson: {
      type: Object
    },
    checktype: {
      type: Number,
      default: 1
    },
    see: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      option: {
        1: { name: "附件" }
      },
      userid: this.$route.query.userid,
      checkJson: undefined,
      courseDetail: [],
    };
  },
  computed: {},
  watch: {
    checkJson: {
      handler(newValue) {
        this.$emit("update:cJson", newValue);
      },
      deep: true
    }
  },
  methods: {
    depthCopy(s) {
      return JSON.parse(JSON.stringify(s));
    },
		sweepBtn(){
			this.$message.error("请到手机端内扫码")
		}
  },
  mounted() {
    this.checkJson = this.cJson ? this.depthCopy(this.cJson) : undefined;
  }
};
</script>

<style scoped>
.c_box {
  width: 100%;
  position: relative;
  padding-left: 45px;
  overflow: visible;
}

/* .mask {
    position: absolute;
    height: 100%;
    width: 100%;
    z-index: 2;
} */

.choice_box {
  white-space: pre-line;
}

.choice_box > .title {
  font-weight: bold;
  width: 100%;
  word-break: break-all;
}

.choice_box > .choices {
  margin-top: 10px;
}

.choices > .page {
  margin-top: 10px;
  display: flex;
  align-items: center;
}

.p_page {
  margin: 0 10px;
}

.course {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.course + .course {
  margin-top: 10px;
}

.course > .banner {
  width: 200px;
  height: 120px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #3896fc;
  box-sizing: border-box;
  padding: 5px;
  margin-right: 15px;
}
.course > .banner > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.course > .content {
}
.course > .content > .c_c {
}
.course > .content > .c_c + .c_c {
  margin-top: 5px;
}
.course > .content > .c_c span:nth-child(1) {
}
.course > .content > .c_c span:nth-child(2) {
}

.g_t_index {
  color: #3681fc;
  font-size: 28px;
  font-weight: bold;
  position: relative;
  margin-right: 30px;
  margin-left: -40px;
}

.g_t_index + span {
  font-weight: bold;
  font-size: 18px;
}

.g_t_index::after {
  content: "";
  width: 18px;
  height: 2px;
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  background: #3681fc;
}

.g_t_index::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid #3681fc;
  border-top: 2px solid #3681fc;
  position: absolute;
  right: -15px;
  top: 50%;
  transform: rotate(45deg) translateY(-5px);
}

.c_list {
  width: calc(100% - 10px);
  min-height: 200px;
  height: auto;
  border: 1px solid #e7e7e7;
  border-radius: 5px;
  box-sizing: border-box;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  /* overflow: auto; */
}

.c_l_add1 {
  width: 100%;
  height: 200px;
  background-color: #F9FAFB;
	border: 1.5px dashed #dfdfdf;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #00000066;
  border-radius: 5px;
  font-size: 18px;
  cursor: pointer;
}

.c_l_add2{
	width: 230px;
  height: 200px;
	background-color: #F9FAFB;
	border: 1.5px dashed #dfdfdf;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #00000066;
  border-radius: 5px;
  font-size: 18px;
  cursor: pointer;
}

.c_l_item {
  width: 230px;
  height: 200px;
  margin-right: 10px;
  box-sizing: border-box;
  border: solid 1px #3896FC;
  border-radius: 5px;
	cursor: pointer;
	box-sizing: border-box;
	padding: 5px;
}

.c_l_item > img {
  width: 100%;
  height: 110px;
  object-fit: cover;
	margin-bottom: 5px;
}

.c_l_item > div {
  width: 210px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px; /* 设置字体大小 */
  color: #333; /* 设置字体颜色 */
	box-sizing: border-box;
}
</style>
