|
@@ -11,8 +11,7 @@
|
|
<view v-if="data.current === 0">
|
|
<view v-if="data.current === 0">
|
|
<scroll-view scroll-y="true" refresher-enabled="true"
|
|
<scroll-view scroll-y="true" refresher-enabled="true"
|
|
:refresher-triggered="data.shuxue.loading" :refresher-threshold="50"
|
|
:refresher-triggered="data.shuxue.loading" :refresher-threshold="50"
|
|
- refresher-background="transparent" @refresherrefresh="onRefresh" @refresherrestore="onRestore"
|
|
|
|
- @refresherabort="onAbort" class="cuoti-scroll-view">
|
|
|
|
|
|
+ refresher-background="lightgreen" @refresherrefresh="onRefresh" class="cuoti-scroll-view">
|
|
<!--数学-->
|
|
<!--数学-->
|
|
<uni-list>
|
|
<uni-list>
|
|
<uni-list-item v-for="item in data.shuxue.list" class="list-item-box">
|
|
<uni-list-item v-for="item in data.shuxue.list" class="list-item-box">
|
|
@@ -20,7 +19,7 @@
|
|
<!-- 时间 -->
|
|
<!-- 时间 -->
|
|
<view class="item-date-row">
|
|
<view class="item-date-row">
|
|
<icon class="data-icon"></icon>
|
|
<icon class="data-icon"></icon>
|
|
- <text>{{ item.date }}</text>
|
|
|
|
|
|
+ <text>{{ item.cdate }}</text>
|
|
</view>
|
|
</view>
|
|
<!-- 数量 -->
|
|
<!-- 数量 -->
|
|
<view class="item-cuoti-row">
|
|
<view class="item-cuoti-row">
|
|
@@ -31,27 +30,35 @@
|
|
</template>
|
|
</template>
|
|
</uni-list-item>
|
|
</uni-list-item>
|
|
<uni-load-more :status="data.shuxue.state" @click="getMore(0)"
|
|
<uni-load-more :status="data.shuxue.state" @click="getMore(0)"
|
|
- :contentText="data.shuxue.contentText"></uni-load-more>
|
|
|
|
|
|
+ :contentText="data.shuxue.state_text"></uni-load-more>
|
|
</uni-list>
|
|
</uni-list>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
</view>
|
|
</view>
|
|
<view v-if="data.current === 1">
|
|
<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="item-date-row">
|
|
|
|
+ <icon class="data-icon"></icon>
|
|
|
|
+ <text>{{ item.cdate }}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <!-- 数量 -->
|
|
|
|
+ <view class="item-cuoti-row">
|
|
|
|
+ <icon class="cuoti-icon"></icon>
|
|
|
|
+ <view class="cuoti-content">错题数:<text class="cuoti-text">{{ item.count }}</text>题</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view @click="getCuotiData(item)" class="cuoti-btn">查看错题</view>
|
|
|
|
+ </template>
|
|
|
|
+ </uni-list-item>
|
|
|
|
+ <uni-load-more :status="data.yingyu.state" @click="getMore(1)"
|
|
|
|
+ :contentText="data.yingyu.state_text"></uni-load-more>
|
|
|
|
+ </uni-list>
|
|
|
|
+ </scroll-view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -258,11 +265,10 @@
|
|
function formatListToUse(list) {
|
|
function formatListToUse(list) {
|
|
list.forEach((item, index) => {
|
|
list.forEach((item, index) => {
|
|
item.mta_show = false;
|
|
item.mta_show = false;
|
|
- item.reply = null;
|
|
|
|
if (item.type == 3) {
|
|
if (item.type == 3) {
|
|
item.result = JSON.parse(item.result);
|
|
item.result = JSON.parse(item.result);
|
|
item.placeholders = item.result.map((item, cindex) => `[bank${cindex}]`)
|
|
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(() => '');
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -291,16 +297,6 @@
|
|
refreshData(data.current);
|
|
refreshData(data.current);
|
|
}
|
|
}
|
|
|
|
|
|
- function onRestore() {
|
|
|
|
- data.shuxue.loading = 'restore'; // 需要重置
|
|
|
|
- // console.log("onRestore");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- function onAbort() {
|
|
|
|
- // console.log("onAbort");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
onLoad(() => {
|
|
onLoad(() => {
|
|
getMore(data.current);
|
|
getMore(data.current);
|
|
})
|
|
})
|