|
@@ -5,8 +5,8 @@
|
|
<text class="nav-bar-title">我的错题</text>
|
|
<text class="nav-bar-title">我的错题</text>
|
|
</view>
|
|
</view>
|
|
<view class="cuoti-border-box">
|
|
<view class="cuoti-border-box">
|
|
- <uni-segmented-control :current="data.current" :values="data.items"
|
|
|
|
- active-color="#3A7FE9" @clickItem="onChangeTab" class="cuo-tab-box"/>
|
|
|
|
|
|
+ <uni-segmented-control :current="data.current" :values="data.items" active-color="#3A7FE9"
|
|
|
|
+ @clickItem="onChangeTab" class="cuo-tab-box" />
|
|
<view class="cuoti-content-box">
|
|
<view class="cuoti-content-box">
|
|
<view v-if="data.current === 0">
|
|
<view v-if="data.current === 0">
|
|
<scroll-view style="height: 300px;" scroll-y="true" refresher-enabled="true"
|
|
<scroll-view style="height: 300px;" scroll-y="true" refresher-enabled="true"
|
|
@@ -51,7 +51,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <cuoti ref="wrongRef" :list="data.wrongList" @back="handleBackFromCuoti" ></cuoti>
|
|
|
|
|
|
+ <cuoti ref="wrongRef" :list="data.wrongList" @back="handleBackFromCuoti"></cuoti>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -114,14 +114,14 @@
|
|
refreshData(data.current);
|
|
refreshData(data.current);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
function refreshData(code) {
|
|
function refreshData(code) {
|
|
const opt = {
|
|
const opt = {
|
|
page: 1,
|
|
page: 1,
|
|
size: 10, // 固定查询10条
|
|
size: 10, // 固定查询10条
|
|
cardId: data.current + 1 // 前台索引加1为学科cardId
|
|
cardId: data.current + 1 // 前台索引加1为学科cardId
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
if (code == 0) {
|
|
if (code == 0) {
|
|
data.shuxue.list = [];
|
|
data.shuxue.list = [];
|
|
// 数学
|
|
// 数学
|
|
@@ -251,11 +251,24 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function formatListToUse(list) {
|
|
|
|
+ list.forEach((item, index) => {
|
|
|
|
+ item.mta_show = false;
|
|
|
|
+ item.reply = null;
|
|
|
|
+ if (item.type == 3) {
|
|
|
|
+ item.result = JSON.parse(item.result);
|
|
|
|
+ item.placeholders = item.result.map((item, cindex) => `[bank${cindex}]`)
|
|
|
|
+ item.reply = item.result.map(() => '');
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
function getCuotiData(item) {
|
|
function getCuotiData(item) {
|
|
getWrongInfo({
|
|
getWrongInfo({
|
|
cardId: data.current + 1,
|
|
cardId: data.current + 1,
|
|
cdate: item.cdate
|
|
cdate: item.cdate
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
|
+ formatListToUse(res.data)
|
|
data.wrongList = res.data;
|
|
data.wrongList = res.data;
|
|
wrongRef.value.showPopup();
|
|
wrongRef.value.showPopup();
|
|
})
|
|
})
|