feature/v-xuexi
wangdong 10 months ago
parent 982820b5d1
commit f5012732b7
  1. 12
      api/learning.js
  2. 2
      components/Course/offlineStyleCourse.vue
  3. 10
      pages/activity/index.vue
  4. 36
      pages/index/index.vue
  5. 24
      pages/learning/index.vue
  6. 62
      pages/learningCenter/brushQuestion.vue
  7. 35
      pages/learningCenter/recite.vue
  8. 26
      pages/learningCenter/reciteContent.vue
  9. 61
      pages/learningCenter/reciteDetail.vue
  10. 12
      pages/special/question_index.vue
  11. 2
      pages/store/goodsCate.vue
  12. 1
      pages/topic/problem_detail.vue
  13. 10
      pages/topic/question_detail.vue
  14. 2
      pages/topic/question_sheet.vue

@ -2,4 +2,16 @@ import http from "@/utils/request";
export function getLearningData(params){
return http.get("/clearance/grade_index", params)
}
export function clearanceSubject(params){
return http.get("/clearance/clearanceSubject", params)
}
export function clearanceSubjectChapter(params){
return http.get("/clearance/clearanceSubjectChapter", params)
}
export function specialTestPaper(params){
return http.get("/Topic/specialTestPaper", params)
}

@ -52,7 +52,7 @@
.offline-special-item {
margin-bottom: 19rpx;
background: #fff;
padding: 25rpx 32rpx;
padding: 25rpx 20rpx 25rpx 32rpx;
&:last-child {
margin-bottom: 0;
}

@ -18,13 +18,13 @@
<view class="info">
<view class="item">
<view class="iconfont iconshijian2"></view>
<view class="cont">报名时间{{ activity.signup_start_time.split(' ')[0] }} {{
activity.signup_end_time.split(' ')[0]
<view class="cont">报名时间{{ activity.signup_start_time }} {{
activity.signup_end_time
}}</view>
</view>
<view class="item">
<view class="iconfont iconshijian2"></view>
<view class="cont">活动时间{{ activity.start_time.split(' ')[0] }} {{ activity.end_time.split(' ')[0] }}</view>
<view class="cont">活动时间{{ activity.start_time }} {{ activity.end_time }}</view>
</view>
<view class="item">
<view class="iconfont icondidian"></view>
@ -185,6 +185,10 @@ export default {
getActivityDetail({ id: this.id })
.then((res) => {
let data = res.data;
// data.activity.signup_start_time = data.activity.signup_start_time && data.activity.signup_start_time.split(' ')[0];
// data.activity.signup_end_time = data.activity.signup_end_time && data.activity.signup_end_time.split(' ')[0];
// data.activity.start_time = data.activity.start_time && data.activity.start_time.split(' ')[0];
// data.activity.end_time = data.activity.end_time && data.activity.end_time.split(' ')[0];
this.activity = data.activity;
this.siteName = data.Auth_site_name;
this.isMember = data.is_member;

@ -153,24 +153,26 @@
<text class="more-special" @click="toMenu('/pages/store/index')">更多 ></text>
</view>
<view class="goodsList">
<navigator hover-class="none" v-for="item in item.list" :key="item.id" class="item"
:url="'/pages/store/detail?id=' + item.id">
<view class="image">
<image mode="aspectFit" class="img" :src="item.image" alt="" />
</view>
<view class="text">
<view class="title">{{ item.store_name }}</view>
<view class="label flex">
<view v-for="(label, k) in item.label">{{ label }}</view>
<template v-for="goods in item.list">
<navigator hover-class="none" :key="goods.id" class="item"
:url="'/pages/store/detail?id=' + goods.id">
<view class="image">
<image mode="aspectFit" class="img" :src="goods.image" alt="" />
</view>
<view class="group">
<view class="price">
<span class="num">{{ item.price }}</span>
</view>
<view class="sale-num">已售{{ item.sales || 0 }}</view>
</view>
</view>
</navigator>
<view class="text">
<view class="title">{{ goods.store_name }}</view>
<view class="label flex">
<view v-for="(label, k) in goods.label">{{ label }}</view>
</view>
<view class="group">
<view class="price">
<span class="num">{{ goods.price }}</span>
</view>
<view class="sale-num">已售{{ goods.sales || 0 }}</view>
</view>
</view>
</navigator>
</template>
</view>
</view>

@ -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>{{ myExam.examName }}</text>
<text @click="changeCate">{{ myExam.examName }}</text>
<image src="@/static/images/learning/change.png" mode="aspectFill" @click="changeCate"></image>
</view>
<view class="exam-time">开考时间:
@ -66,10 +66,10 @@
<view v-if="learningData.recite && learningData.recite.length > 0" class="tab-container">
<view class="content-title">
背诵过关
<text class="more-content">更多 ></text>
<!-- <text class="more-content">更多 ></text> -->
</view>
<view class="flex tab-content">
<view :data-idx="index" class="tab-item" v-for="(item, index) in learningData.recite" :key="item.id" @click="handleCateClick(item)">
<view :data-idx="index" class="tab-item" v-for="(item, index) in learningData.recite" :key="item.id" @click="handleReciteClick(item)">
<image :src="item.image" mode="aspectFill"></image>
<view>{{ item.name }}</view>
</view>
@ -79,10 +79,10 @@
<view v-if="learningData.brush_questions && learningData.brush_questions.length > 0" class="tab-container">
<view class="content-title">
刷题过关
<text class="more-content">更多 ></text>
<!-- <text class="more-content">更多 ></text> -->
</view>
<view class="flex tab-content">
<view :data-idx="index" class="tab-item" v-for="(item, index) in learningData.brush_questions" :key="item.id" @click="handleCateClick(item)">
<view :data-idx="index" class="tab-item" v-for="(item, index) in learningData.brush_questions" :key="item.id" @click="handleQestionClick(item)">
<image :src="item.image" mode="aspectFill"></image>
<view>{{ item.name }}</view>
</view>
@ -93,7 +93,7 @@
<view v-if="learningData[item.key] && learningData[item.key].length > 0" :key="index" class="special-content">
<view class="content-title">
{{ item.menuName }}
<text v-if="item.menuName !== '线下课堂'" class="more-content" @click="toMoreCourse(item.key)">更多 ></text>
<text class="more-content" @click="toMoreCourse(item.key)">更多 ></text>
</view>
<square-style-course v-if="item.menuName === '视频课'" :specialList="learningData[item.key]" @detail="handleSpecialClick"></square-style-course>
<square-style-course v-if="item.menuName === '直播课'" :specialList="learningData[item.key]" @detail="handleSpecialClick"></square-style-course>
@ -210,7 +210,7 @@ import store from "@/store";
toMoreCourse(key) {
if (key === 'offline_courses') {
uni.navigateTo({
url: '/pages/activity/activity_list'
url: `/pages/activity/activity_list?gradeId=${this.myExam.gradeId}&subjectId=${this.myExam.subjectId}`
});
} else {
uni.navigateTo({
@ -218,6 +218,16 @@ import store from "@/store";
})
}
},
handleReciteClick(item) {
uni.navigateTo({
url: `/pages/learningCenter/recite?id=${item.id}`
})
},
handleQestionClick(item) {
uni.navigateTo({
url: `/pages/learningCenter/brushQuestion?id=${item.id}`
})
},
},
};
</script>

@ -12,49 +12,66 @@
</view>
<view class="list">
<template v-if="list.length > 0">
<view v-for="(item, index) in list" class="list-item flex flex-center-x" @click="toContent">
<view v-for="(item, index) in list" class="list-item flex flex-center-x" @click="toContent(item)">
<view class="item-left">
<view class="title">
<image src="@/static/images/learning/icon.png" mode="aspectFill"></image>
<text>{{ item.name }}</text>
<text>{{ item.title }}</text>
</view>
<view class="content">
<view>词汇{{ item.count }}</view>
<view>题目数{{ item.count || '' }}</view>
</view>
</view>
<view class="item-right">
<image v-if="item.type === 1" src="@/static/images/learning/nolock.png" mode="aspectFill"></image>
<image v-if="item.type === 2" src="@/static/images/learning/lock.png" mode="aspectFill"></image>
<!-- <image v-if="item.type === 1" src="@/static/images/learning/nolock.png" mode="aspectFill"></image>
<image v-if="item.type === 2" src="@/static/images/learning/lock.png" mode="aspectFill"></image> -->
<view class="list-more"></view>
</view>
</view>
</template>
</view>
<view class="question-wrong" @click="toQuestionWrong">错题集</view>
</BaseContainer>
</template>
<script>
import Advert from '@/components/Advert/index.vue';
import { specialTestPaper } from '@/api/learning';
export default {
components: {
Advert,
},
data() {
return {
list: [ // 0 1 2
{ name: '2021-2022大学英语四级词汇背诵', count: '1000', type: 0 },
{ name: '2021-2022大学英语四级词汇背诵', count: '1000', type: 0 },
{ name: '2021-2022大学英语四级词汇背诵', count: '1000', type: 1 },
{ name: '2021-2022大学英语四级词汇背诵', count: '1000', type: 1 },
{ name: '2021-2022大学英语四级词汇背诵', count: '1000', type: 2 },
{ name: '2021-2022大学英语四级词汇背诵', count: '1000', type: 2 }
],
list: [],
};
},
onLoad(options) {
this.id = options.id;
this.specialTestPaper();
},
methods: {
toContent() {
toContent(item) {
uni.navigateTo({
url: '/pages/learningCenter/reciteContent',
url: `/pages/special/question_index?id=${item.id}&is_analysis=${1}`,
});
},
async specialTestPaper() {
try {
const { data } = await specialTestPaper({
special_id: 1 || this.id,
type: 2,
relationship: 6
});
console.log(data);
this.list = [...data];
} catch (err) {
console.log(err);
}
},
toQuestionWrong() {
uni.navigateTo({
url: '/pages/topic/question_wrong',
});
},
},
@ -171,5 +188,20 @@ import Advert from '@/components/Advert/index.vue';
}
}
}
.question-wrong {
position: absolute;
width: 110rpx;
height: 110rpx;
background: linear-gradient(90deg, #4AA5FA 0%, #0F74BB 100%);
box-shadow: 0rpx 8rpx 22rpx 5rpx rgba(77,144,190,0.34);
border-radius: 50%;
right: 30rpx;
bottom: 245rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 22rpx;
color: #fff;
}
}
</style>

@ -3,7 +3,7 @@
<NavBar title="背诵过关" />
<view class="list">
<template v-if="list.length > 0">
<view v-for="(item, index) in list" class="list-item flex flex-center-x" @click="toContent">
<view v-for="(item, index) in list" class="list-item flex flex-center-x" @click="toContent(item)">
<view class="item-left">
<view class="title">
<image src="@/static/images/learning/icon.png" mode="aspectFill"></image>
@ -30,25 +30,42 @@
</template>
<script>
import { clearanceSubject } from '@/api/learning';
export default {
data() {
return {
list: [ // 0 1 2 3
{ name: '大学英语四级词汇背诵', count: '1000', todayRecite: true, type: 0 },
{ name: '大学英语四级词汇背诵', count: '1000', todayRecite: false, type: 0 },
{ name: '大学英语四级词汇背诵', count: '1000', todayRecite: false, type: 1 },
{ name: '大学英语四级词汇背诵', count: '1000', todayRecite: false, type: 1 },
{ name: '大学英语四级词汇背诵', count: '1000', todayRecite: false, type: 2 },
{ name: '大学英语四级词汇背诵', count: '1000', todayRecite: false, type: 3 }
// { name: '', count: '1000', todayRecite: true, type: 0 },
// { name: '', count: '1000', todayRecite: false, type: 0 },
// { name: '', count: '1000', todayRecite: false, type: 1 },
// { name: '', count: '1000', todayRecite: false, type: 1 },
// { name: '', count: '1000', todayRecite: false, type: 2 },
// { name: '', count: '1000', todayRecite: false, type: 3 }
],
id: 0,
};
},
onLoad(options) {
this.id = options.id;
this.clearanceSubject();
},
methods: {
toContent() {
toContent(item) {
uni.navigateTo({
url: '/pages/learningCenter/reciteContent',
url: `/pages/learningCenter/reciteContent?id=${item.id}`,
});
},
async clearanceSubject() {
try {
const { data } = await clearanceSubject({
recite_id: this.id,
});
console.log(data);
this.list = [...data];
} catch (err) {
console.log(err);
}
},
},
};
</script>

@ -20,13 +20,13 @@
<template v-if="info.contentList.length > 0">
<view v-for="(item, index) in info.contentList" :key="index" class="list-box">
<view class="title flex flex-center-x">
{{ item.title }}
{{ item.name }}
<image v-if="item.isLock" src="@/static/images/learning/lock.png" mode="aspectFill"></image>
<image v-else src="@/static/images/learning/nolock.png" mode="aspectFill"></image>
</view>
<view class="list">
<view v-for="(con, k) in item.list" class="list-item flex flex-center-x" @click="toDetail(con, item.isLock)">
<view class="item-name">{{ k + 1 < 10 ? `0${k+1}` : k }}.{{ con }}</view>
<view v-for="(con, k) in item.children" class="list-item flex flex-center-x" @click="toDetail(con, item.isLock, item.name)">
<view class="item-name">{{ k + 1 < 10 ? `0${k+1}` : k }}.{{ con.name }}</view>
<view class="list-more"></view>
</view>
</view>
@ -38,6 +38,7 @@
</template>
<script>
import { clearanceSubjectChapter } from '@/api/learning';
export default {
data() {
return {
@ -62,15 +63,30 @@
list: [],
};
},
onLoad(options) {
this.id = options.id;
this.clearanceSubjectChapter();
},
methods: {
toDetail(con, isLock) {
toDetail(con, isLock, name) {
console.log(isLock);
if (isLock) {
this.$util.showMsg('还未解锁');
} else {
uni.navigateTo({
url: '/pages/learningCenter/reciteDetail',
url: `/pages/learningCenter/reciteDetail?id=${con.id}&subjectId=${this.id}&name=${name}`,
});
}
},
async clearanceSubjectChapter() {
try {
const { data } = await clearanceSubjectChapter({
recite_subject_id: this.id,
});
console.log(data);
this.info.contentList = data.reverse();
} catch (err) {
console.log(err);
}
},
},

@ -2,7 +2,13 @@
<BaseContainer class="recite-detail flex">
<NavBar title="详情" />
<view class="detail-box">
<view class="detail-info">
<mp-html
v-if="!!content"
class="swiper-conter"
container-style="padding: 30rpx;background: #ffffff;"
:content="content"
></mp-html>
<!-- <view class="detail-info">
<view class="info-name flex">
{{ detailInfo.name }}
<view :class="[
@ -43,17 +49,23 @@
<view class="analysis">
<view class="title">词根词缀句</view>
<view class="analysis-content">{{ detailInfo.analysis }}</view>
</view>
</view> -->
</view>
<view class="detail-footer flex flex-center-x">
<view class="btn cut">砍掉</view>
<view class="btn next">下一题</view>
<!-- <view class="btn cut">砍掉</view> -->
<view class="btn next" @click="toNext">下一题</view>
</view>
</BaseContainer>
</template>
<script>
import { clearanceSubjectChapter } from '@/api/learning';
import mpHtml from "mp-html/dist/uni-app/components/mp-html/mp-html.vue";
export default {
components: {
mpHtml,
},
data() {
return {
detailInfo: {
@ -72,12 +84,46 @@
analysis: 'out- 在外面 + door n.门'
},
activeAudio: 1,
id: 0,
content: '',
subjectId: 0,
name: '',
allList: [],
};
},
onLoad({id, subjectId, name}) {
this.id = id;
this.subjectId = subjectId;
this.name = name;
this.clearanceSubjectChapter();
},
methods: {
async clearanceSubjectChapter() {
try {
const { data } = await clearanceSubjectChapter({
recite_subject_id: this.subjectId,
});
console.log(data);
this.allList = data.filter(v => v.name === this.name)[0].children;
this.content = this.allList.filter(v => Number(v.id) === Number(this.id))[0].content;
console.log(this.allList);
} catch (err) {
console.log(err);
}
},
openAudio() {
},
toNext() {
const index = this.allList.findIndex(v => Number(v.id) === Number(this.id));
console.log(index, this.id);
if (index < this.allList.length - 1) {
this.content = this.allList[index + 1].content;
this.id = this.allList[index + 1].id;
} else {
this.$util.showMsg('已经是最后一题了');
}
},
},
};
</script>
@ -215,7 +261,7 @@
width: 100%;
height: 130rpx;
justify-content: center;
padding-left: 30rpx;
// padding-left: 30rpx;
background: #fff;
box-shadow: 0rpx -19rpx 54rpx 0rpx rgba(34,34,34,0.05);
flex-shrink: 0;
@ -223,14 +269,15 @@
color: #666;
font-size: 30rpx;
&.next {
width: 550rpx;
// width: 550rpx;
width: 690rpx;
height: 88rpx;
background: linear-gradient(0deg, #0F74BB 0%, #3293FF 100%);
border-radius: 44rpx;
color: #fff;
line-height: 88rpx;
text-align: center;
margin-left: 44rpx;
// margin-left: 44rpx;
}
}
}

@ -100,14 +100,20 @@
isAlipay: false,
isBalance: false,
isOpenWeixing: false,
status: -1
status: -1,
is_analysis: 0,
};
},
onLoad({ id, isMember }) {
onLoad({ id, isMember, is_analysis }) {
this.id = Number(id);
this.isMember = isMember;
this.getDetail();
this.getAuthInfo();
if (is_analysis) {
this.is_analysis = is_analysis;
} else {
this.is_analysis = 0;
}
},
onShow() {
if (this.isOpenWeixing && this.orderId) {
@ -127,7 +133,7 @@
if (this.status == 1) this.$util.setStorage(`exam_time${id}`, 0);
console.log(this.$util.getStorage(`exam_time${id}`));
uni.navigateTo({
url: `/pages/topic/question_detail?test_id=${id}`
url: `/pages/topic/question_detail?test_id=${id}&is_analysis=${this.is_analysis}`
});
},
async getAuthInfo() {

@ -1,6 +1,6 @@
<template>
<BaseContainer class="cate-box">
<NavBar title="商品分类" />
<NavBar title="分类" />
<view class="cate-list flex">
<view class="cate-list-left">
<view v-for="(item, index) in goodsCateList" :key="index" class="cate-item" :class="{'active': bigCate === item.name}" @click="bigCate = item.name">

@ -165,7 +165,6 @@ export default {
onLoad({ test_id, type, index = 0, e_id, is_analysis }) {
this.test_id = test_id;
this.activeIndex = Number(index);
if (e_id && parseInt(is_analysis)) {
this.is_analysis = 1;
this.e_id = e_id;

@ -55,7 +55,7 @@
</template>
</view>
</view>
<view v-if="is_analysis" class="analysis">
<view v-if="item.is_correct && is_analysis" class="analysis">
<view :class="{ no: item.is_correct === 1 }">
回答{{ item.is_correct === 2 ? "正确" : "错误" }}
</view>
@ -111,7 +111,6 @@
class="button flex flex-column flex-center"
:class="{ disabled: !!questions[activeIndex].is_correct }"
@click="submitQuestion"
v-if="!is_analysis"
>
<i class="iconfont icontijiao"></i>
<view class="tips">确认提交</view>
@ -210,10 +209,11 @@ export default {
} else {
this.exam_time = 0;
}
if (e_id && parseInt(is_analysis)) {
if (parseInt(is_analysis)) {
this.is_analysis = 1;
this.e_id = e_id;
}
if (e_id) {
this.e_id = e_id || '';
this.getQuestions();
} else {
this.getSituation();

@ -31,7 +31,7 @@
>
</view>
</view>
<view v-if="!is_analysis" class="footer">
<view class="footer">
<view class="btn" @click="submit">提交考试</view>
</view>
</view>

Loading…
Cancel
Save