代码提交

feature/v-xuexi
wangdong 10 months ago
parent 8093fbe4a4
commit 9ef0ec86f2
  1. 8
      api/learning.js
  2. 11
      pages/activity/event.vue
  3. 2
      pages/activity/index.vue
  4. 6
      pages/index/index.vue
  5. 2
      pages/learning/index.vue
  6. 2
      pages/learningCenter/brushQuestion.vue
  7. 122
      pages/learningCenter/clockRecord.vue
  8. 2
      pages/learningCenter/components/calendar.vue
  9. 16
      pages/learningCenter/reciteDetail.vue
  10. 6
      pages/my/fileDownload.vue
  11. 31
      pages/special/grade_list.vue
  12. 4
      pages/special/question_index.vue
  13. 8
      pages/store/goodsCate.vue
  14. 5
      pages/topic/question_result.vue
  15. 5
      pages/topic/question_sheet.vue

@ -14,4 +14,12 @@ export function clearanceSubjectChapter(params){
export function specialTestPaper(params){
return http.get("/Topic/specialTestPaper", params)
}
export function getDateRecordList(params){
return http.get("/clearance/clockInRecord", params)
}
export function reciteClock(params){
return http.get("/clearance/recite", params)
}

@ -1,6 +1,6 @@
<template>
<BaseContainer class="activity-event">
<NavBar title="线下课预约" />
<NavBar title="报名" />
<view class="form-section">
<form>
<label :class="{ required: item.is_required }" v-for="(item, index) in event" :key="item.id">
@ -346,6 +346,15 @@ export default {
};
</script>
<style lang="scss" scoped>
.active-event {
backrgound: #f5f5f5;
.form-section {
width: 690rpx;
background: #fff;
border-radius: 10rpx;
margin: 20rpx auto;
}
}
.activity-event .form-section uni-label uni-label {
border-top: 1px solid;
}

@ -1,6 +1,6 @@
<template>
<BaseContainer class="activity">
<NavBar title="活动报名" />
<NavBar title="报名" />
<view class="header">
<view class="image">
<image class="img" mode="aspectFill" :src="activity.image" />

@ -795,7 +795,11 @@ export default {
}
},
getNavHrefTaber(item, bo) {
if (item.grade_id) {
if (item.type === 1) {
uni.navigateTo({
url: `/pages/activity/event?id=${this.id}`,
});
} else if (item.grade_id) {
app.globalData.grade_id = item.grade_id
uni.switchTab({
url: `/pages/course/special_cate`

@ -13,7 +13,7 @@
<image :src="getImgPath('/static/frontend/exam-bg.png')" mode="aspectFill"></image>
<view class="exam-left flex">
<view class="exam-name flex">我的考试:
<text @click="changeCate">{{ learningData.exam_list[0].name }}</text>
<text @click="changeCate">{{ learningData.exam.name || learningData.exam_list[0].name }}</text>
<image src="@/static/images/learning/change.png" mode="aspectFill" @click="changeCate"></image>
</view>
<view class="exam-time">开考时间:

@ -59,7 +59,7 @@ import { specialTestPaper } from '@/api/learning';
async specialTestPaper() {
try {
const { data } = await specialTestPaper({
special_id: 1 || this.id,
special_id: this.id,
type: 2,
relationship: 6
});

@ -15,28 +15,34 @@
</view>
</view>
<view class="calendar-box">
<calendar />
<calendar ref="calendar" @change="changeRecord"/>
</view>
<view class="record-list">
<view class="list-title">
打卡记录
</view>
<view v-for="(item, index) in recordList" :key="index" class="list-item">
<view class="item-top flex flex-center-x">
<view v-for="(item, index) in recordList" :key="index" class="list-item flex">
<view class="item-left">
<view>{{ item.name }}</view>
<view>{{ item.score }}</view>
<view v-if="item.type === 2" class="time">用时{{ item.use_time }}</view>
</view>
<view class="item-bottom flex flex-center-x">
<view>用时{{ item.time }}</view>
<view class="item-right">
<view v-if="item.type === 2" class="score">{{ item.score }}</view>
<view>{{ item.date }}</view>
</view>
</view>
<view v-if="recordList.length && !loading" class="finished">{{ loadTitle }}</view>
<view v-if="finished && !recordList.length" class="empty">
<image mode="aspectFill" :src="getImgPath('/wap/first/zsff/images/empty.png')" alt="暂无记录" />
<view>暂无消息</view>
</view>
</view>
</view>
</BaseContainer>
</template>
<script>
import { getDateRecordList } from '@/api/learning';
import Calendar from './components/calendar.vue';
export default {
components: {
@ -46,17 +52,51 @@
return {
totalClock: 50,
todayClock: false,
recordList: [
{ name: '英语四级考试专项训练', time: '01:23:52', score: '98', date: '2023-10-20' },
{ name: '英语四级考试专项训练', time: '01:23:52', score: '98', date: '2023-10-20' },
{ name: '英语四级考试专项训练', time: '01:23:52', score: '98', date: '2023-10-20' },
{ name: '英语四级考试专项训练', time: '01:23:52', score: '98', date: '2023-10-20' },
{ name: '英语四级考试专项训练', time: '01:23:52', score: '98', date: '2023-10-20' },
]
recordList: [],
page: 1,
limit: 10,
loading: false,
finished: false,
loadTitle: '',
};
},
onLoad() {
this.$nextTick(() => {
this.getRecordList();
});
},
onReachBottom() {
this.getRecordList();
},
methods: {
changeRecord() {
this.page = 1;
this.limit = 10;
this.finished = false;
this.recordList = [];
this.getRecordList();
},
async getRecordList() {
if (this.loading || this.finished) {
return;
}
uni.showLoading();
console.log(this);
const { nowYear, nowMonth, nowDate } = this.$refs.calendar;
const { data } = await getDateRecordList(
{
page: this.page++,
limit: this.limit,
date: `${nowYear}-${nowMonth < 10 ? '0' + nowMonth : nowMonth}-${nowDate}`
// date: '',
}
);
uni.hideLoading();
this.recordList = this.recordList.concat(data);
console.log(this.recordList);
this.finished = data.length < this.limit;
this.loadTitle = this.finished ? "已全部加载完" : "上拉加载更多";
},
},
};
</script>
@ -64,6 +104,8 @@
<style lang="scss" scoped>
.record {
flex-direction: column;
min-height: 100vh;
height: fit-content!important;
.bg {
position: absolute;
top: 0;
@ -150,31 +192,57 @@
padding: 30rpx 0;
>view {
justify-content: space-between;
&.item-top {
&.item-left {
color: #333333;
font-size: 30rpx;
line-height: 30rpx;
margin-bottom: 15rpx;
>view:last-child {
color: #3293FF;
font-size: 32rpx;
width: 400rpx;
>view {
height: 30rpx;
}
>.time {
font-size: 22rpx;
color: #999797;
margin-top: 15rpx;
}
}
&.item-bottom {
&.item-right {
font-size: 22rpx;
color: #999797;
line-height: 22rpx;
}
>view {
&:first-child {
width: 400rpx;
line-height: 30rpx;
margin-left: auto;
>.score {
color: #3293FF;
font-size: 32rpx;
margin-bottom: 15rpx;
}
&:last-child {
margin-left: auto;
>view {
height: 30rpx;
}
}
}
}
.finished,
.loading {
font-size: 28rpx;
line-height: 100rpx;
text-align: center;
color: #bbb;
}
.empty {
margin-top: 100rpx;
font-size: 28rpx;
text-align: center;
color: #bbb;
}
.empty image {
display: block;
width: 414rpx;
height: 305rpx;
margin: 0 auto;
pointer-events: none;
}
}
}
}

@ -216,7 +216,7 @@ export default {
this.nowYear = this.currentYear;
this.nowMonth = this.currentMonth;
this.nowDate = item.date;
// this.$emit('change');
this.$emit('change');
}
},
formatterNum(num) {

@ -59,7 +59,7 @@
</template>
<script>
import { clearanceSubjectChapter } from '@/api/learning';
import { clearanceSubjectChapter, reciteClock } from '@/api/learning';
import mpHtml from "mp-html/dist/uni-app/components/mp-html/mp-html.vue";
export default {
@ -89,6 +89,7 @@
subjectId: 0,
name: '',
allList: [],
chapterId: 0,
};
},
onLoad({id, subjectId, name}) {
@ -105,7 +106,9 @@
});
console.log(data);
this.allList = data.filter(v => v.name === this.name)[0].children;
this.chapterId = data.filter(v => v.name === this.name)[0].id;
this.content = this.allList.filter(v => Number(v.id) === Number(this.id))[0].content;
this.reciteClock();
console.log(this.allList);
} catch (err) {
console.log(err);
@ -120,10 +123,21 @@
if (index < this.allList.length - 1) {
this.content = this.allList[index + 1].content;
this.id = this.allList[index + 1].id;
this.reciteClock();
} else {
this.$util.showMsg('已经是最后一题了');
}
},
async reciteClock() {
try {
await reciteClock({
chapter_id: this.chapterId,
section_id: this.id,
});
} catch (err) {
console.log(err);
}
},
},
};
</script>

@ -23,11 +23,7 @@
export default {
data() {
return {
fileList: [
{ pic: '', name: '雅思托福文件资料下载雅思托福 文件资料下载', url: '', downloadCount: 10000 },
{ pic: '', name: '雅思托福文件资料下载雅思托福 文件资料下载', url: '', downloadCount: 10000 },
{ pic: '', name: '雅思托福文件资料下载雅思托福 文件资料下载', url: '', downloadCount: 10000 },
]
fileList: []
};
},
onLoad() {

@ -8,7 +8,7 @@
<view :class="{ on: active === 0 }" @click="tab(0)">课程</view>
</view>
<view v-if="makeGradeList.length" :class="{ material: active }" class="list">
<template v-if="Number(active) === 0">
<template>
<navigator
v-for="(item, index) in makeGradeList"
:key="item.id"
@ -24,9 +24,9 @@
<image mode="aspectFill" :src="item.image" alt="" />
<!-- <view v-if="!active">{{ type == 1 ? item.types : item.type }}</view> -->
</view>
<view class="function-mask" :style="{visibility: activeHeaderMask === index ? 'visible' : 'hidden' }" @click="activeHeaderMask = -1"></view>
<view class="function-mask" :style="{visibility: activeHeaderMask === index ? 'visible' : 'hidden' }" @click.stop="activeHeaderMask = -1"></view>
<view class="function">
<view class="btn">取消收藏</view>
<view class="btn" @click.stop="cancelCollect(item)">取消收藏</view>
</view>
<view>
<view>{{ item.title }}</view>
@ -81,6 +81,8 @@
</template>
<script>
import { toggleCollectMaterial } from "@/api/material";
import { collectSpecial } from "@/api/special";
import { getGradeList } from "@/api/special";
import specialType from "@/constants/special-type";
@ -198,6 +200,29 @@ export default {
}
}
},
cancelCollect(item) {
if (this.active === 1) {
toggleCollectMaterial(item.id).then(() => {
this.$util.showMsg("取消收藏成功");
this.$set(this, "gradeList", []);
this.page = 1;
this.loadend = false;
this.getGradeList();
});
} else {
collectSpecial(item.id)
.then(() => {
this.$util.showMsg("取消收藏成功");
this.$set(this, "gradeList", []);
this.page = 1;
this.loadend = false;
this.getGradeList();
})
.catch((err) => {
console.log(err);
});
}
},
},
};
</script>

@ -109,8 +109,8 @@
this.isMember = isMember;
this.getDetail();
this.getAuthInfo();
if (is_analysis) {
this.is_analysis = is_analysis;
if (parseInt(is_analysis)) {
this.is_analysis = parseInt(is_analysis);
} else {
this.is_analysis = 0;
}

@ -94,11 +94,9 @@
case 'learning':
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2];
console.log(prevPage.$vm.myExam);
prevPage.$vm.myExam.examName = con.name;
prevPage.$vm.myExam.grade_id = con.grade_id;
prevPage.$vm.myExam.subject_id = con.id;
console.log(prevPage.$vm.myExam);
prevPage.$vm.learningData.exam.examName = con.name;
prevPage.$vm.learningData.exam.grade_id = con.grade_id;
prevPage.$vm.learningData.exam.subject_id = con.id;
uni.navigateBack();
break;
default:

@ -62,7 +62,7 @@
<view v-if="!footerHidden" class="result-ft">
<navigator :url="`/pages/topic/question_sheet?is_analysis=1&test_id=${test_id}&record_id=${result.id}`">查看解析
</navigator>
<navigator open-type="redirect" :url="`/pages/special/question_index?id=${test_id}`">再考一次</navigator>
<navigator open-type="redirect" :url="`/pages/special/question_index?id=${test_id}&is_analysis=${is_analysis}`">再考一次</navigator>
</view>
</view>
<view :class="{ mask: imgSrc }" @touchmove.prevent @click="imgSrc = ''"></view>
@ -99,8 +99,9 @@ export default {
userInfo: {}
};
},
onLoad({ test_id, from }) {
onLoad({ test_id, from, is_analysis }) {
this.test_id = test_id;
this.is_analysis = parseInt(is_analysis);
this.footerHidden = from === "question_user";
this.$util.removeStorage("exam_time");

@ -82,6 +82,7 @@ export default {
this.test_id = test_id;
this.record_id = record_id;
this.is_analysis = parseInt(is_analysis);
console.log(this.is_analysis, 85);
if (index) {
this.index = parseInt(index);
}
@ -147,9 +148,9 @@ export default {
if (200 === code) {
this.$util.removeStorage("e_id");
this.$util.removeStorage("exam_time");
this.is_analysis = 1;
// this.is_analysis = 1;
uni.redirectTo({
url: "/pages/topic/question_result?test_id=" + this.test_id,
url: `/pages/topic/question_result?test_id=${this.test_id}&is_analysis=${this.is_analysis}`,
});
} else {
this.$util.showMsg(msg);

Loading…
Cancel
Save