jiangping
2024-08-09 249a271a867df4802a8d59371e0ff10d3eb54298
h5/pages/answer/answer.vue
@@ -83,14 +83,18 @@
            </view>
            <view
              class="box_list_answer_tips"
              style="margin-bottom: 0rpx"
              v-if="
                item.selAnswer &&
                item.answer !== item.selAnswer &&
                status != '0'
              "
            >
              <view class="line">
              <image src="@/static/ic_wrong@2x.png" />
              <text>回答错误</text>
              </view>
              <view class="line">正确答案:{{ item.answer }}</view>
            </view>
            <view
              class="box_list_answer_tips"
@@ -100,8 +104,10 @@
                status != '0'
              "
            >
              <view class="line">
              <image src="@/static/ic_success@2.png" />
              <text class="success">回答正确</text>
              </view>
            </view>
          </template>
          <template v-if="item.type == 2">
@@ -116,8 +122,7 @@
                src="@/static/checkbo1x_sel@2x.png"
                v-if="
                  (line.checked && status != '2') ||
                  (item.selAnswer === item.answer &&
                    line.checked)
                  (item.selAnswer === item.answer && line.checked)
                "
              />
              <image
@@ -135,8 +140,7 @@
              <text
                v-if="
                  (line.checked && status != '2') ||
                  (item.selAnswer === item.answer &&
                    line.checked)
                  (item.selAnswer === item.answer && line.checked)
                "
                style="color: rgba(77, 153, 168, 1)"
                ><text class="mr24" style="color: rgba(77, 153, 168, 1)">{{
@@ -165,8 +169,11 @@
                status != '0'
              "
            >
              <view class="line">
              <image src="@/static/ic_wrong@2x.png" />
              <text>回答错误</text>
              </view>
              <view class="line">正确答案:{{ item.answer }}</view>
            </view>
            <view
              class="box_list_answer_tips"
@@ -176,8 +183,10 @@
                status != '0'
              "
            >
              <view class="line">
              <image src="@/static/ic_success@2.png" />
              <text class="success">回答正确</text>
              </view>
            </view>
          </template>
        </view>
@@ -295,7 +304,6 @@
              item.status = '0'
              item.selAnswer = null
            })
            console.log(res.data)
            this.list = res.data
          }
          // res.param.problemsDOList.forEach(item => {
@@ -307,7 +315,7 @@
    },
    // 单选选择中题目
    select(line, i) {
      if(this.status === '2') return
      if (this.status != '0') return
      this.list.forEach((item, index) => {
        if (index === i) {
          item.selAnswer = line.code
@@ -316,7 +324,7 @@
      // this.problemIndex = index
    },
    changeBox(index, jeck) {
      if(this.status === '2') return
      if (this.status != '0') return
      this.list.forEach((item, i) => {
        if (index === i) {
          item.options.forEach((item2, j) => {
@@ -468,9 +476,17 @@
        box-sizing: border-box;
        background: #f7f7f7;
        border-radius: 8rpx;
        margin-bottom: 24rpx;
        .line {
        display: flex;
        align-items: center;
        margin-bottom: 24rpx;
          font-size: 28rpx;
          color: #333333;
          margin-bottom: 20rpx;
          &:nth-last-child(1){
            margin-bottom: 0;
          }
        }
        image {
          width: 28rpx;
          height: 28rpx;
@@ -497,7 +513,7 @@
        color: $uni-color-primary;
      }
      .warry{
        color: #ED4545;
        color: #ed4545;
      }
    }
    .list_item {