|
@@ -14,7 +14,7 @@
|
|
|
class="xxjl-scroll-view">
|
|
|
<!--数学-->
|
|
|
<uni-list>
|
|
|
- <uni-list-item v-for="item in data.shuxue.list" class="xxjl-item-box">
|
|
|
+ <uni-list-item v-for="item in data.shuxue.list" class="xxjl-item-box">
|
|
|
<template v-slot:body>
|
|
|
<view @click="goDao(item)">
|
|
|
<view class="item-date-row">
|
|
@@ -24,7 +24,7 @@
|
|
|
</view>
|
|
|
<!-- 这里加点击事件 wgy看这里 -->
|
|
|
<view class="data-item del-item">
|
|
|
- <icon class="del-icon"></icon>
|
|
|
+ <icon @click.stop="deleteJilu(item)" class="del-icon"></icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="item-zhang-row">
|
|
@@ -62,7 +62,7 @@
|
|
|
</view>
|
|
|
<!-- 这里加点击事件 wgy看这里 -->
|
|
|
<view class="data-item del-item">
|
|
|
- <icon class="del-icon"></icon>
|
|
|
+ <icon @click.stop="deleteJilu(item)" class="del-icon"></icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="item-zhang-row">
|
|
@@ -85,6 +85,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <tip-small-dialog ref="deleteJiluDialogRef" @confirm-btn="deleteJiluBtn"
|
|
|
+ :content="deleteJiluContent"></tip-small-dialog>
|
|
|
<CustomTabBar></CustomTabBar>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -95,22 +97,30 @@
|
|
|
ref
|
|
|
} from "vue";
|
|
|
import {
|
|
|
- xuexiJilu
|
|
|
+ xuexiJilu,
|
|
|
+ xuexiJiluDelete
|
|
|
} from "@/api/my.js";
|
|
|
import {
|
|
|
onLoad
|
|
|
} from "@dcloudio/uni-app";
|
|
|
import cuoti from "@/components/chengji/chengji.vue";
|
|
|
+ import tipSmallDialog from '@/components/dialog/tipSmallDialog.vue';
|
|
|
import {
|
|
|
getWrongInfo
|
|
|
} from "@/api/wrong";
|
|
|
+ import {
|
|
|
+ toast,
|
|
|
+ getUserIdentity
|
|
|
+ } from "@/utils/common";
|
|
|
import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
|
|
|
import cacheManager from "@/utils/cacheManager.js"
|
|
|
const zhangId = ref(null);
|
|
|
const nianji = ref(null);
|
|
|
const subjectId = ref(null);
|
|
|
-
|
|
|
+ const deleteJiluDialogRef = ref(null);
|
|
|
+ const deleteJiluContent = '你确定要执行这个操作吗?';
|
|
|
const wrongRef = ref(null);
|
|
|
+ const deleteId = ref('');
|
|
|
|
|
|
const data = reactive({
|
|
|
items: ['数学', '英语'],
|
|
@@ -153,7 +163,35 @@
|
|
|
uni.redirectTo({
|
|
|
url: `/pages/study/index`
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ function deleteJilu(item) {
|
|
|
+ deleteId.value = item.id
|
|
|
+ deleteJiluDialogRef.value.handleShow();
|
|
|
+ }
|
|
|
+
|
|
|
+ function deleteJiluBtn(id) {
|
|
|
+ let req = {
|
|
|
+ id: deleteId.value
|
|
|
+ }
|
|
|
+ xuexiJiluDelete(req).then(res => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ if (data.current === 0) {
|
|
|
+ data.shuxue.list = [];
|
|
|
+ data.shuxue.page = 0;
|
|
|
+ } else {
|
|
|
+ data.yingyu.list = [];
|
|
|
+ data.yingyu.page = 0;
|
|
|
+ }
|
|
|
+ // 重新加载数据
|
|
|
+ refreshData(data.current);
|
|
|
+ } else {
|
|
|
+ toast('失败,请稍后重试')
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ toast('失败,请稍后重试')
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
function handleBack() {
|
|
@@ -245,6 +283,7 @@
|
|
|
}
|
|
|
|
|
|
function getMore(code) {
|
|
|
+ console.log('12312312312');
|
|
|
const opt = {
|
|
|
page: 1,
|
|
|
size: 10, // 固定查询10条
|
|
@@ -252,6 +291,7 @@
|
|
|
}
|
|
|
|
|
|
if (code == 0) {
|
|
|
+
|
|
|
if (data.shuxue.state == 'no-more') return;
|
|
|
// 数学
|
|
|
data.shuxue.state = 'loading';
|