代码提交

feature/v-xuexi
wangdong 8 months ago
parent f5012732b7
commit b495f18f63
  1. 46
      pages/learning/index.vue
  2. 2
      pages/mine/index.vue
  3. 42
      pages/my/fileDownload.vue
  4. 2
      pages/special/data_details.vue
  5. 42
      pages/topic/problem_detail.vue
  6. 42
      pages/topic/question_detail.vue

@ -13,33 +13,33 @@
<image :src="getImgPath('/static/frontend/exam-bg.png')" mode="aspectFill"></image>
<view class="exam-left flex">
<view class="exam-name flex">我的考试:
<text @click="changeCate">{{ myExam.examName }}</text>
<text @click="changeCate">{{ learningData.exam_list[0].name }}</text>
<image src="@/static/images/learning/change.png" mode="aspectFill" @click="changeCate"></image>
</view>
<view class="exam-time">开考时间:
<text>{{ myExam.examTime}}</text>
<text>{{ learningData.exam.date}}</text>
</view>
</view>
<view class="exam-right">
<view class="exam-days-title">距离考试</view>
<view class="exam-days-value"><text>{{ myExam.examDays }}</text></view>
<view class="exam-days-value"><text>{{ learningData.exam.distance_exam_day }}</text></view>
</view>
</view>
<view class="learning-info flex">
<view class="info-item flex">
<view class="item-title">坚持天数</view>
<view class="item-value"><text style="color: #FF9500;">{{ info.signDays }}</text></view>
<view class="item-rank">排名:{{ info.signRank }}</view>
<view class="item-value"><text style="color: #FF9500;">{{ learningData.user_study.days }}</text></view>
<view class="item-rank">排名:{{ learningData.user_study.rank }}</view>
</view>
<view class="info-item flex">
<view class="item-title">背诵考点</view>
<view class="item-value"><text style="color: #0F74BB;">{{ info.reciteExamPoint }}</text></view>
<view class="item-rank">排名:{{ info.reciteRank }}</view>
<view class="item-value"><text style="color: #0F74BB;">{{ learningData.user_recite.points }}</text></view>
<view class="item-rank">排名:{{ learningData.user_recite.rank }}</view>
</view>
<view class="info-item flex">
<view class="item-title">刷题正确率</view>
<view class="item-value"><text style="color: #52C794;">{{ info.currentPercent }}</text>%</view>
<view class="item-rank">排名:{{ info.currentRank }}</view>
<view class="item-value"><text style="color: #52C794;">{{ learningData.user_brush_questions.accuracy }}</text></view>
<view class="item-rank">排名:{{ learningData.user_brush_questions.rank }}</view>
</view>
</view>
<view class="sign-record">
@ -49,19 +49,16 @@
</view>
<view class="record-content flex">
<view class="content-left">
<view>
已背诵章节(词汇) <image src="@/static/images/learning/success.png" mode="aspectFill"></image>
<view v-for="(item, index) in learningData.user_clock_in.list">
{{ item.name }} <image src="@/static/images/learning/success.png" mode="aspectFill"></image>
</view>
<view>
今日背诵检测 <image src="@/static/images/learning/success.png" mode="aspectFill"></image>
<view>进度 <view class="progress-bg"><text class="progress" :style="`width: ${learningData.user_clock_in.progress}%;`"></text></view> <text class="progress-percent">{{ learningData.user_clock_in.progress }}%</text> </view>
</view>
<view>进度 <view class="progress-bg"><text class="progress" style="width: 100%;"></text></view> <text class="progress-percent">100%</text> </view>
<view v-if="learningData.user_clock_in.list.length > 0" class="content-right">已打卡</view>
</view>
<view class="content-right">已打卡</view>
</view>
</view>
<view class="practice flex">
2021-2022英语四级考试真题 <text>开始练习</text>
<view v-for="(item, index) in learningData.exam_list" class="practice flex">
{{ item.name }} <text @click="toPractice(item.id)">开始练习</text>
</view>
<view v-if="learningData.recite && learningData.recite.length > 0" class="tab-container">
<view class="content-title">
@ -130,14 +127,6 @@ import store from "@/store";
examTime: '2024-1-12',
examDays: 180,
},
info: {
signDays: 82,
signRank: 1,
reciteExamPoint: 8532,
reciteRank: 64,
currentPercent: 60,
currentRank: '--',
},
indexMenu: [
{ menuName: '视频课', key: 'video' },
{ menuName: '直播课', key: 'live' },
@ -228,6 +217,11 @@ import store from "@/store";
url: `/pages/learningCenter/brushQuestion?id=${item.id}`
})
},
toPractice(id) {
uni.navigateTo({
url: `/pages/topic/problem_index?id=${id}`,
});
}
},
};
</script>

@ -4,7 +4,7 @@
<image :src="getImgPath('/static/frontend/mine-bg.png')" mode="aspectFill" class="bg"></image>
<view class="header">
<view class="user-section" data-eventsync="true" @tap="goProfilePage" >
<image mode="aspectFill" class="img" :src="userInfo.avatar" v-if="isLogin" />
<image mode="aspectFill" class="img" :src="getImgPath(userInfo.avatar)" v-if="isLogin" />
<image mode="aspectFill" class="img" :src="getImgPath('/wap/first/zsff/images/avatar_default.jpg')" v-else />
<view class="text-wrap">
<template v-if="isLogin">

@ -4,12 +4,12 @@
<view class="file-box">
<view class="file-list">
<view v-for="(item, index) in fileList" :key="index" class="file-item flex">
<image :src="item.pic" mode="aspectFill"></image>
<image :src="item.image" mode="aspectFill"></image>
<view class="file-info flex">
<view class="info-top">{{ item.name }}</view>
<view class="info-top">{{ item.title }}</view>
<view class="info-bottom flex flex-center-x">
<text>{{ item.downloadCount }}人已下载</text>
<text>去下载</text>
<text>{{ item.sales }}人已下载</text>
<text @click="toDownload(item.id)">去下载</text>
</view>
</view>
</view>
@ -19,6 +19,7 @@
</template>
<script>
import { getMaterialList2 } from "@/api/material";
export default {
data() {
return {
@ -29,6 +30,34 @@
]
};
},
onLoad() {
this.getMaterialList();
},
methods: {
//
async getMaterialList() {
uni.showLoading({ mask: true });
try {
const { data: materialList } = await getMaterialList2({
pid: '',
cate_id: '',
search: '',
page: 1,
limit: 10000,
});
uni.hideLoading();
this.fileList = [...materialList];
} catch (err) {
uni.hideLoading();
this.$util.showMsg(err.message);
}
},
toDownload(id) {
uni.navigateTo({
url: `/pages/special/data_details?id=${id}`,
});
},
},
};
</script>
@ -76,8 +105,9 @@
background: #0F74BB;
border-radius: 19rpx;
color: #fff;
text-align: center;
line-height: 38rpx;
display: flex;
justify-content: center;
align-items: center;
}
}
}

@ -1,6 +1,6 @@
<template>
<BaseContainer class="material-detail">
<NavBar title="资料下载" />
<NavBar title="文件下载" />
<view class="header">
<image mode="aspectFill" :src="material.image" alt="" />
<view class="header-body">

@ -26,6 +26,7 @@
<view>{{ item.stem }}</view>
<image mode="widthFix" v-if="item.image" :src="item.image" />
<view
v-if="item.question_type <= 3"
:class="{ image: item.is_img }"
class="label-group"
@click="handleClickOptions"
@ -53,12 +54,18 @@
</view>
</template>
</view>
<view v-else class="subject">
<view class="subject-title">小王同学想利用中国知网平台查询近1个月内发 表的最新的文献信息她可以利用的数据库有:()</view>
<view class="subject-content">
<textarea v-model.trim="item.user_answer" placeholder-style="input-placeholder" placeholder="请填写你的答案"></textarea>
</view>
</view>
</view>
<view v-if="item.is_correct" class="analysis">
<view :class="{ no: item.is_correct === 1 }">
回答{{ item.is_correct === 1 ? "错误" : "正确" }}
</view>
<view>
<view :class="{'subject-flex': item.question_type > 3}">
<view>
正确答案
<view>{{ item.answer }}</view>
@ -416,4 +423,37 @@ page {
.abs.on{
display: none;
}
.question {
.subject {
.subject-title {
font-size: 30rpx;
color: #333;
margin: 40rpx 0 30rpx;
}
.subject-content {
::v-deep {
.uni-textarea-placeholder {
color: #BFBFBF;
font-size: 26rpx;
}
textarea {
width: 100%;
height: 349rpx;
border-radius: 13rpx;
border: 1px solid #CCCCCC;
padding: 28rpx 30rpx;
}
}
}
}
}
.analysis {
.subject-flex {
display: flex;
flex-direction: column;
view:nth-child(2) {
margin-top: 20rpx;
}
}
}
</style>

@ -27,6 +27,7 @@
<view>{{ item.stem }}</view>
<image mode="widthFix" v-if="item.image" :src="item.image" />
<view
v-if="item.question_type <= 3"
:class="{ image: item.is_img }"
class="label-group"
@click="handleClickOptions"
@ -54,12 +55,18 @@
</view>
</template>
</view>
<view v-else class="subject">
<view class="subject-title">小王同学想利用中国知网平台查询近1个月内发 表的最新的文献信息她可以利用的数据库有:()</view>
<view class="subject-content">
<textarea v-model.trim="item.user_answer" placeholder-style="input-placeholder" placeholder="请填写你的答案"></textarea>
</view>
</view>
</view>
<view v-if="item.is_correct && is_analysis" class="analysis">
<view :class="{ no: item.is_correct === 1 }">
回答{{ item.is_correct === 2 ? "正确" : "错误" }}
</view>
<view>
<view :class="{'subject-flex': item.question_type > 3}">
<view>
正确答案
<view>{{ item.answer }}</view>
@ -574,4 +581,37 @@ page {
.abs.on{
display: none;
}
.question {
.subject {
.subject-title {
font-size: 30rpx;
color: #333;
margin: 40rpx 0 30rpx;
}
.subject-content {
::v-deep {
.uni-textarea-placeholder {
color: #BFBFBF;
font-size: 26rpx;
}
textarea {
width: 100%;
height: 349rpx;
border-radius: 13rpx;
border: 1px solid #CCCCCC;
padding: 28rpx 30rpx;
}
}
}
}
}
.analysis {
.subject-flex {
display: flex;
flex-direction: column;
view:nth-child(2) {
margin-top: 20rpx;
}
}
}
</style>

Loading…
Cancel
Save