闫增涛
2024-03-18 b929e9d487632580cc28ac7b8bf9494f25ca8ca3
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
<!--pages/bookServices/detail/components/testResource/testResource.wxml-->
<view class="test-resource">
  <view class="top-btn">
    <t-radio-group
      class="test-radio"
      t-class="horizontal-box"
      value="{{radioItem}}"
      bind:change="onRadioChange"
      style="margin: 0px"
    >
      <view class="card {{radioItem == 'test' ? 'card--active' : ''}}">
        <t-radio value="test" icon="none" borderless style="height: 80rpx">
          <view class="radio-content" slot="content">
            <t-image
              src="{{ radioItem == 'test' ? '/static/images/bookService/detail/practice-icon.png' : '/static/images/bookService/detail/notest.png'}}"
            ></t-image>
            <text style="color: {{radioItem == 'test' ? '#fff':''}};"
              >练习</text
            >
          </view>
        </t-radio>
      </view>
      <view class="card {{radioItem == 'mock' ? 'card--active' : ''}}">
        <t-radio value="mock" icon="none" borderless>
          <view class="radio-content" slot="content">
            <t-image
              src="{{ radioItem == 'mock' ? '/static/images/bookService/detail/checkpaper.png' : '/static/images/bookService/detail/zujuan.png'}}"
            ></t-image>
            <text style="color: {{radioItem == 'mock' ? '#fff':''}};">
              组卷</text
            >
          </view>
        </t-radio>
      </view>
    </t-radio-group>
    <!-- <t-button
      class="  {{selectBtn == 'test' ? 'practice-btn' : 'paper-btn'}}"
      theme="default"
      size="medium"
      style="width: 85px"
      bind:tap="changeBtn"
      data-type="test"
    >
      <view slot="content">
        <t-image
          src="{{ selectBtn == 'test' ? '/static/images/bookService/detail/practice-icon.png' : '/static/images/bookService/detail/notest.png'}}"
        ></t-image>
        <text>练习</text>
      </view>
    </t-button>
    <t-button
      class=" {{selectBtn == 'mock' ? 'practice-btn' : 'paper-btn'}}"
      theme="default"
      size="medium"
      style="width: 85px"
      bind:tap="changeBtn"
      data-type="mock"
    >
      <view slot="content">
        <t-image
          src="{{ selectBtn == 'mock' ? '/static/images/bookService/detail/checkpaper.png' : '/static/images/bookService/detail/zujuan.png'}}"
        ></t-image>
        组卷
      </view>
    </t-button> -->
    <t-button
      class="error-btn"
      theme="default"
      size="medium"
      style="padding: 0 12rpx"
      bind:tap="goMycollect"
      data-answerType="errorQuestion"
    >
      <view slot="content">
        <t-image src="/static/images/bookService/detail/cuoti.png"></t-image>
        我的错题
      </view>
    </t-button>
    <t-button
      class="collect-btn"
      theme="default"
      size="medium"
      style="padding: 0 12rpx"
      bind:tap="goMycollect"
      data-answerType="collectQuestion"
    >
      <view slot="content">
        <t-image
          src="/static/images/bookService/detail/wodeshoucang.png"
        ></t-image>
        我的收藏
      </view>
    </t-button>
  </view>
  <!-- 练习列表 -->
  <view
    class="resource-list"
    wx:for="{{list}}"
    wx:key="item.id"
    wx:if="{{radioItem == 'test'}}"
  >
    <view class="list-title">
      <t-image src="/static/images/bookService/detail/test-icon.png"></t-image>
      <text>{{item.name}}</text>
    </view>
    <view class="practice" bind:tap="goTest" data-value="{{item}}">
      <t-image
        src="/static/images/bookService/detail/lianxi-icon.png"
      ></t-image>
    </view>
  </view>
</view>
 
<!-- 组卷列表 -->
<view class="mock-data" wx:if="{{radioItem == 'mock'}}">
  <view class="mack-num">已组卷{{mockData.mockList.length}}次</view>
  <view class="mock-list">
    <view
      class="mock-list-box"
      wx:for="{{mockData.mockList}}"
      data-item="{{item}}"
      bind:tap="goMackPaper"
    >
      <view class="mock-title">{{item.name}}</view>
      <view class="mock-message">
        <view class="message-box">
          <view class="mack-state">
            <text wx:if="{{item.state == '3'}}" class="complete state-pad"
              >已完成</text
            >
            <text
              wx:elif="{{item.state == '2' || item.state == '1'}}"
              class="Incomplete state-pad"
              >未完成</text
            >
            <text wx:else class="Incomplete state-pad">未开始</text>
          </view>
          <view class="mock-time">{{item.createDate}}</view></view
        >
        <view class="mock-score" wx:if="{{item.report.userScore}}"
          >{{item.report.userScore}}分</view
        >
      </view>
    </view>
  </view>
</view>