Commit f6100e1d authored by zhengke's avatar zhengke

修改

parent 2fd18c68
...@@ -119,6 +119,11 @@ ...@@ -119,6 +119,11 @@
"backgroundColor": "#f5f5f5", "backgroundColor": "#f5f5f5",
"navigationBarBackgroundColor": "#f5f5f5" "navigationBarBackgroundColor": "#f5f5f5"
} }
},{
"path":"readComplete",
"style": {
"navigationStyle": "custom"
}
}] }]
} }
], ],
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
goWordStudy(obj, Type) { goWordStudy(obj, Type) {
if (obj) { if (obj) {
let url = let url =
`/pages/word/wordStudy?CourseId=${obj.ChapterTree.CourseId}&&ChapterId=${obj.ChapterNo}&&ReviewChapterId=${obj.NextChapterNo}&&Type=${Type}&&ClassId=${obj.ClassId}` `/pages/word/wordStudy?CourseId=${obj.ChapterTree.CourseId}&&ChapterId=${obj.ChapterNo}&&ReviewChapterId=${obj.NextChapterNo}&&Type=${Type}&&ClassId=${obj.ClassId}&&CourseName=${this.CourseName}&&TotalHours=${this.TotalHours}`
uni.navigateTo({ uni.navigateTo({
url: url url: url
}); });
......
<style scoped>
.studyCompleta {
width: 100%;
height: 100vh;
background: rgba(69, 69, 69, .9);
}
.stuComTop {
height: 100%;
display: flex;
align-items: center;
color: #FFFFFF;
}
.studyMain {
width: 85%;
height: 50vh;
background-color: #fff;
border-radius: 24rpx;
margin: auto;
position: relative;
top: 120px;
text-align: center;
}
.starList {
position: absolute;
width: 100%;
top: -70px;
display: flex;
justify-content: center;
}
.stars {
margin-right: 20px;
}
.stars:last-child {
margin-right: 0;
}
.stars img {
width: 37px;
height: 37px;
}
.studyContra {
padding-top: 43px;
font-size: 26px;
color: #111111;
font-weight: bold;
}
.study_Success {
font-size: 34rpx;
color: #111111;
font-weight: bold;
margin-top: 15px;
}
.study_Score {
font-size: 30px;
color: #FAC217;
font-weight: bold;
}
.study_Time {
color: #111111;
font-size: 24px;
font-weight: bold;
margin-top: 100rpx;
}
.study_Danwei {
font-size: 14px;
}
.study_Jiyi {
color: #999999;
font-size: 22rpx;
margin: 8rpx 0 80rpx 0;
}
.study_GoCeshi {
width: 300rpx;
height: 80rpx;
text-align: center;
line-height: 80rpx;
border-radius: 40rpx;
color: #fff;
background-color: #4C50E7;
margin: auto;
font-size: 28rpx;
font-weight: 500;
}
.study_GoLearn {
width: 300rpx;
height: 80rpx;
text-align: center;
line-height: 80rpx;
border-radius: 40rpx;
color: #4C50E7;
background-color: #E4E5FB;
margin: 36rpx auto;
font-size: 28rpx;
font-weight: 500;
}
.studyBack {
color: #BBBCCE;
margin-top: 60rpx;
font-size: 28rpx;
font-weight: 500;
}
.study_Piao {
width: 49px;
height: 13px;
position: absolute;
left: -20px;
top: 58px;
}
.study_Piao2 {
width: 29px;
height: 14px;
position: absolute;
right: 20px;
top: 62px;
}
.study_Piao3 {
width: 28px;
height: 17px;
position: absolute;
left: 37px;
top: 251px;
}
.study_Piao4 {
width: 47px;
height: 23px;
position: absolute;
right: -10px;
top: 200px;
}
</style>
<template>
<view class="studyCompleta">
<Navbar bg="transparent">
<view class="stuComTop">
<!-- <view style="margin-left:20rpx;flex-shrink: 0;">
<van-icon name="arrow-left" color="#FFF" @click="goIndex" />
</view> -->
<view style="width:100%; font-size: 32rpx; text-align: center;font-weight: 500;">学习小结</view>
</view>
</Navbar>
<view class="studyMain">
<view class="studyContra">恭喜你</view>
<view class="study_Success">
本章节复习完成
</view>
<img class="study_Piao"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/piao1.png" alt="" />
<img class="study_Piao2"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/piao2.png" alt="" />
<img class="study_Piao3"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/piao3.png" alt="" />
<img class="study_Piao4"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/piao4.png" alt="" />
<view class="study_GoCeshi" style="margin-top:200rpx;" @click="goIndex">返回列表</view>
</view>
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
provide,
} from "vue";
import Navbar from '../../components/navbar.vue'
export default {
components:{
Navbar
},
setup(props) {
let {
proxy
} = getCurrentInstance();
let data = reactive({
ClassId: 0,
CourseId:0,
CourseName:'',
TotalHours:0
})
let methods = {
back() {
uni.redirectTo({
url: '/pages/word/word'
})
},
goIndex() {
uni.redirectTo({
url: `/pages/study/courseList?ClassId=${data.ClassId}&&CourseId=${data.CourseId}&&CourseName=${data.CourseName}&&TotalHours=${data.TotalHours}`
});
}
}
onMounted(() => {
})
let that = methods;
return {
...toRefs(data),
...methods,
};
},
onLoad(options) {
if(options.ClassId){
this.ClassId = options.ClassId
}
if(options.CourseId){
this.CourseId = options.CourseId
}
if(options.CourseName){
this.CourseName = options.CourseName
}
if(options.TotalHours){
this.TotalHours = options.TotalHours
}
}
}
</script>
...@@ -56,49 +56,34 @@ ...@@ -56,49 +56,34 @@
StudyType: 1, //1-预习,2-复习 StudyType: 1, //1-预习,2-复习
}, },
Type:1, //1复习 2 单词 Type:1, //1复习 2 单词
TotalHours:0,
CourseName:''
}) })
let methods = { let methods = {
getData() { getData() {
proxy.$request('/AppletWords/GetStudyWords', data.msg).then(res => { proxy.$request('/AppletWords/GetStudyWords', data.msg).then(res => {
data.StudyList = res.Data.StudyList data.StudyList = res.Data.StudyList
data.ReviewList = res.Data.ReviewList; data.ReviewList = res.Data.ReviewList;
const total = data.StudyList.length + data.ReviewList.length; data.current = 0
if(res.Data.StartIndex>total||res.Data.StartIndex==total){
data.current = 0
}else{
data.current = res.Data.StartIndex;
}
}) })
}, },
swiperChange(val) { swiperChange(val) {
data.current = val.detail.current data.current = val.detail.current
if (data.current <= data.StudyList.length) { if(data.Type==1){
methods.completeRead(val.detail.current, 1) if (val.detail.current + 1 == data.ReviewList.length+1 && data.ReviewList.length > 1) {
} else if (data.current <= (data.ReviewList.length + data.StudyList.length)) { uni.navigateTo({
methods.completeRead(val.detail.current, 2) url: `/pages/word/readComplete?ClassId=${data.readMsg.ClassId}&&CourseId=${data.readMsg.CourseId}&&CourseName=${data.CourseName}&&TotalHours=${data.TotalHours}`
} })
const total = data.StudyList.length + data.ReviewList.length + 1 }
if (val.detail.current + 1 == total && total > 1) {
}
},
completeRead(n, type) {
if (type == 1) {
data.readMsg.PrepNum = n
} else {
data.readMsg.ReviewNum = n-data.StudyList.length;
} }
data.readMsg.StudyType = type; if(data.Type==2){
proxy.$request('/AppletWords/SetStuWordsPrep', data.readMsg).then(res => { if (val.detail.current + 1 == data.StudyList.length+1 && data.StudyList.length > 1) {
if(res.Data.StudyNum==res.Data.TotalNum){
uni.navigateTo({ uni.navigateTo({
url: "/pages/word/studyComplete?CourseId=" + data.readMsg.CourseId + '&&ChapterId=' + data.readMsg.ChapterId + url: `/pages/word/readComplete?ClassId=${data.readMsg.ClassId}&&CourseId=${data.readMsg.CourseId}&&CourseName=${data.CourseName}&&TotalHours=${data.TotalHours}`
'&&NextChapterId=' + '0'
}) })
} }
}) }
} },
} }
onMounted(() => { onMounted(() => {
...@@ -112,7 +97,7 @@ ...@@ -112,7 +97,7 @@
onLoad(options) { onLoad(options) {
console.log("options", options); console.log("options", options);
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '单词习' title: '单词习'
}); });
this.msg.ChapterId = options.ChapterId ?? 0; this.msg.ChapterId = options.ChapterId ?? 0;
this.msg.CourseId = options.CourseId ?? 0; this.msg.CourseId = options.CourseId ?? 0;
...@@ -123,6 +108,12 @@ ...@@ -123,6 +108,12 @@
if(options.Type){ if(options.Type){
this.Type=options.Type this.Type=options.Type
} }
if(options.CourseName){
this.CourseName = options.CourseName;
}
if(options.TotalHours){
this.TotalHours = options.TotalHours;
}
const userInfo = uni.getStorageSync('userInfo'); const userInfo = uni.getStorageSync('userInfo');
this.readMsg.Stu_Account_Id = userInfo.Id ?? 0; this.readMsg.Stu_Account_Id = userInfo.Id ?? 0;
this.readMsg.CourseId = options.CourseId ?? 0; this.readMsg.CourseId = options.CourseId ?? 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment