zhongshujie
2024-12-05 b00acb907054a7119862de9c037e600b3818e266
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<!--pages/bookServices/examination/questionOptions/index.wxml-->
<view
  class="page-bottom"
  style="color: {{isNight ? '#fff' : '#000'}}; background-color:{{isNight ? '#202020' : '#fff'}}"
>
  <view
    class="li-option"
    bind:tap="handlePopup"
    style="color: {{isNight ? '#fff' : '#000'}};"
  >
    <image
      src="{{isNight ? '/static/images/bookService/examination/datika-w.png' : '/static/images/bookService/examination/questionCard.png'}}"
    />
    答题卡
  </view>
  <view
    class="li-option"
    bind:tap="setUpBtn"
    style="color: {{isNight ? '#fff' : '#000'}};"
  >
    <image
      src="{{isNight ? '/static/images/bookService/examination/setting-w.png' : '/static/images/bookService/examination/setting.png'}}"
    />
    设置
  </view>
  <view class="bottom-submit">
    <t-button
      theme="primary"
      size="large"
      style="{{btnStyle}}"
      bind:tap="submitBtn"
      >{{!submitStatus ? '提交' : '退出'}}</t-button
    >
  </view>
</view>
 
<!-- 答题卡 -->
<t-popup
  visible="{{questionCardState}}"
  bind:visible-change="onVisibleChange"
  placement="bottom"
>
  <view class="popup-block">
    <view class="popup-header">
      <view class="popup-title">答题卡</view>
    </view>
    <view class="question-explain">
      <view class="explain-answered">
        <text class="answered explain-color-box"></text>
        <text>已答</text>
      </view>
      <view class="explain-un-answered" wx:if="{{!submitStatus}}">
        <text class="un-answered explain-color-box"></text>
        <text>未答</text>
      </view>
    </view>
    <scroll-view scroll-y="{{true}}" class="question-card-list">
      <view class="question-list">
        <view
          bind:tap="goQuestion"
          data-id="{{citem.id}}"
          wx:for="{{questionDataList}}"
          wx:for-item="citem"
          wx:for-index="cindex"
          wx:key="cindex"
          style="border: {{showId == citem.id ? '1px solid #ff6c00' : ''}}"
          class="question-box {{ citem.isUserAnswer ? 'answered' : 'un-answered' }}"
        >
          {{cindex+1}}
        </view>
      </view>
    </scroll-view>
  </view>
</t-popup>
 
<!-- 设置 -->
<t-popup
  visible="{{setUpPopup}}"
  bind:visible-change="onSetUpChange"
  placement="bottom"
>
  <view class="popup-block set-up-popup">
    <view class="popup-header">
      <view class="popup-title">设置</view>
    </view>
    <!-- 亮度 -->
    <view class="brightness">
      <text>A-</text>
      <view class="brightness-slider">
        <!-- <t-slider
          value="{{sliderValue}}"
          theme="capsule"
          min="{{24}}"
          max="{{100}}"
          step="{{7}}"
          bind:change="onChangeSlider"
        /> -->
        <slider
          value="{{sliderValue}}"
          min="{{28}}"
          max="{{48}}"
          step="{{7}}"
          activeColor="#ff6c00"
          bind:change="onChangeSlider"
        />
      </view>
 
      <text>A+</text>
    </view>
    <!-- 模式 -->
    <view>
      <t-radio-group
        class="test-radio"
        t-class="horizontal-box"
        value="{{radioItem}}"
        bind:change="onRadioChange"
        style="margin: 0px"
      >
        <view class="card {{radioItem == 'daytime' ? 'card--active' : ''}}">
          <t-radio value="daytime" icon="none" borderless style="height: 100%">
            <view class="radio-content" slot="content">
              <image
                src="{{ radioItem == 'daytime' ? '/static/images/bookService/examination/rijian-click.png' : '/static/images/bookService/examination/rijian.png'}}"
              />
              <text style="color: {{radioItem == 'daytime' ? '#fff':''}};"
                >日间模式</text
              >
            </view>
          </t-radio>
        </view>
        <view class="card {{radioItem == 'night' ? 'card--active' : ''}}">
          <t-radio value="night" icon="none" borderless style="height: 100%">
            <view class="radio-content" slot="content">
              <image
                src="{{ radioItem == 'night' ? '/static/images/bookService/examination/yejian-click.png' : '/static/images/bookService/examination/yejian.png'}}"
              />
              <text style="color: {{radioItem == 'night' ? '#fff':''}};"
                >夜间模式</text
              >
            </view>
          </t-radio>
        </view>
      </t-radio-group>
    </view>
  </view>
</t-popup>
 
<!-- 测试报告 -->
 
<t-dialog
  class="test-report"
  visible="{{testReportState}}"
  confirm-btn="{{null}}"
  title="测试报告"
  bind:close="closeTestReportDialog"
>
  <view slot="content" class="test-report">
    <view class="report-content-top">
      <view class="report-li">
        <view class="report-li-left">题目总数:</view>
        <view class="report-li-right">{{questionDataList.length}}道</view>
      </view>
      <view
        wx:for="{{scoreData}}"
        wx:for-item="ditem"
        wx:for-index="dindex"
        wx:key="dindex"
      >
        <view class="report-li">
          <view class="report-li-left">{{ditem.name}}:</view>
          <view class="report-li-right"
            ><text class="score-color">{{ditem.score}}</text> 分</view
          >
        </view>
        <view class="report-li">
          <view class="report-li-left" style="white-space: nowrap">结果:</view>
          <view class="report-li-right"
            ><text class="score-color">{{ditem.dispatch}}</text></view
          >
        </view>
      </view>
    </view>
  </view>
</t-dialog>