|
@@ -11,15 +11,14 @@
|
|
|
<view v-if="data.current === 0">
|
|
|
<scroll-view style="height: 300px;" scroll-y="true" refresher-enabled="true"
|
|
|
:refresher-triggered="data.shuxue.loading" :refresher-threshold="50"
|
|
|
- refresher-background="lightgreen" @refresherrefresh="onRefresh" @refresherrestore="onRestore"
|
|
|
- @refresherabort="onAbort">
|
|
|
+ refresher-background="lightgreen" @refresherrefresh="onRefresh">
|
|
|
<!--数学-->
|
|
|
<uni-list>
|
|
|
<uni-list-item v-for="item in data.shuxue.list">
|
|
|
<template v-slot:body>
|
|
|
<view class="slot-box">
|
|
|
<!-- 时间 -->
|
|
|
- <text class="slot-text">日期{{ item.date }}</text>
|
|
|
+ <text class="slot-text">日期{{ item.cdate }}</text>
|
|
|
<!-- 数量 -->
|
|
|
<text class="slot-text">错题数:{{ item.count }}题</text>
|
|
|
<button @click="getCuotiData(item)">查看错题</button>
|
|
@@ -32,22 +31,26 @@
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
<view v-if="data.current === 1">
|
|
|
- <!--英语-->
|
|
|
- <uni-list>
|
|
|
- <uni-list-item v-for="item in data.yingyu.list">
|
|
|
- <template v-slot:body>
|
|
|
- <view class="slot-box">
|
|
|
- {{ item }}
|
|
|
- <text class="slot-text">title</text>
|
|
|
- <text class="slot-text">date</text>
|
|
|
- <text class="slot-text">wrong</text>
|
|
|
- <button>查看错题</button>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
- </uni-list-item>
|
|
|
- <uni-load-more :status="data.yingyu.state" @click="getMore(1)"
|
|
|
- :contentText="data.yingyu.contentText"></uni-load-more>
|
|
|
- </uni-list>
|
|
|
+ <scroll-view style="height: 300px;" scroll-y="true" refresher-enabled="true"
|
|
|
+ :refresher-triggered="data.yingyu.loading" :refresher-threshold="50"
|
|
|
+ refresher-background="lightgreen" @refresherrefresh="onRefresh">
|
|
|
+ <!--英语-->
|
|
|
+ <uni-list>
|
|
|
+ <uni-list-item v-for="item in data.yingyu.list">
|
|
|
+ <template v-slot:body>
|
|
|
+ <view class="slot-box">
|
|
|
+ <!-- 时间 -->
|
|
|
+ <text class="slot-text">日期{{ item.cdate }}</text>
|
|
|
+ <!-- 数量 -->
|
|
|
+ <text class="slot-text">错题数:{{ item.count }}题</text>
|
|
|
+ <button @click="getCuotiData(item)">查看错题</button>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </uni-list-item>
|
|
|
+ <uni-load-more :status="data.yingyu.state" @click="getMore(1)"
|
|
|
+ :contentText="data.yingyu.contentText"></uni-load-more>
|
|
|
+ </uni-list>
|
|
|
+ </scroll-view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -254,11 +257,10 @@
|
|
|
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(() => '');
|
|
|
+ item.reply = item.reply ? JSON.parse(item.reply) : item.result.map(() => '');
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -287,16 +289,6 @@
|
|
|
refreshData(data.current);
|
|
|
}
|
|
|
|
|
|
- function onRestore() {
|
|
|
- data.shuxue.loading = 'restore'; // 需要重置
|
|
|
- // console.log("onRestore");
|
|
|
- }
|
|
|
-
|
|
|
- function onAbort() {
|
|
|
- // console.log("onAbort");
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
onLoad(() => {
|
|
|
getMore(data.current);
|
|
|
})
|