question.wxml
3.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<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':''}} {{item2.rightAnswer == 1 && hadAnswer ? 'right' :''}} ">
{{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">测验结果:答对{{questionResult.right}}题,答错{{questionResult.wrong}}题</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 wx:if="{{item.type==4}}" class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-2.png" />
<image wx:else 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>
</view>
<view bindtap="onCreateWishHandler" class="create-wish-btn">去创建心愿单</view>
</view>
</view>
</view>
</view>