question.wxml 3.37 KB
<view class="page">
  <view class="app__bgc bgc"></view>
  <view class="app__bg bg"></view>
  <view class="decoration">
    <image class="d1" src="../../image/oss/question/question-c1.png" mode="widthFix" />
  </view>
  <view class="app__content main">
    <view class="top-space"></view>
    <view class="content">
      <!-- 标题 -->
      <view class="tit">· 欢迎来到丸美小课堂 ·</view>
      <!-- 问题 -->
      <view class="question">
        <view data-data="{{item}}" data-index="{{index}}" wx:for="{{questionList}}" wx:key="{{index}}" class="question-item">
          <view class="ques">
            <image class="light" mode="widthFix" src="../../image/oss/question/question-light.png" />
            {{item.question}}
          </view>
          <view class="answer">
            <view bindtap="onSelectAnswerHandler" data-pdata="{{item}}" data-pindex="{{index}}" data-data="{{item2}}" data-index="{{index2}}" wx:for="{{item.answers}}" wx:key="index2" wx:for-index="index2" wx:for-item="item2" class="answer-item {{item2.selected ? 'selected':''}}">
              {{questionNumList[index2]}}.{{item2.answer}}
            </view>
          </view>
        </view>
      </view>
      <!-- 提交 -->
      <view bindtap="onSubmitQuestionResultHandler" wx:if="{{questionResult.status != 1}}" class="submit-btn">
        确认提交
      </view>
      <!-- 结果 -->
      <view wx:else class="result">
        <image class="d1" mode="widthFix" src="../../image/oss/question/question-d1.png" />
        <image class="bg" mode="widthFix" src="../../image/oss/question/result-border.png" />
        <image class="d2" mode="widthFix" src="../../image/oss/question/question-d2.png" />
        <view class="cont">
          <view class="space1"></view>
          <view class="tit">测验结果:答对1题,答错2题</view>
          <view class="ball">
            <view class="t1">获得</view>
            <view class="score">{{questionResult.elasticValue}}</view>
            <view class="t1">弹力值</view>
          </view>
          <view class="tips">还凭您的盛世美颜获得更多惊喜</view>
          <view class="coupon">
            <view wx:for="{{questionResult.coupons}}" wx:key="{{index}}" class="coupon-item {{item.type==4?'coupon-item2':''}}">
              <image class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-1.png" />
              <view class="cont">
                <view class="name">{{item.name}}</view>
                <!-- <view class="detail">查看详情</view> -->
                <view class="card-info card-no">劵码:{{item.couponCode}}</view>
                <view class="card-info card-date">有效期:即日起至{{item.endDateStr}}</view>
              </view>
            </view>
            <!-- <view class="coupon-item coupon-item2">
              <image class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-2.png" />
              <view class="cont">
                <view class="name">眼部保养劵</view>
                <view class="detail">查看详情</view>
                <view class="card-info card-no">劵码:ABCD 1234</view>
                <view class="card-info card-date">有效期:即日起至19.10.31</view>
              </view>
            </view> -->
          </view>
        </view>
        <view bindtap="onCreateWishHandler" class="create-wish-btn">去创建心愿单</view>
      </view>
    </view>
  </view>
</view>