This commit is contained in:
@fawn-nine
2024-08-27 17:10:44 +08:00
parent 4792202081
commit 48a5c3400e
18 changed files with 735 additions and 102 deletions

View File

@@ -66,8 +66,11 @@
<view class="" v-html="curriculumData.questions"></view>
<view class="haveAnswer" v-if="myAnswer.id">
<!-- 有答案 -->
<view class="PM_font flex_box flex_between" style="padding: 20rpx; align-items: center;">
<text style="padding: 20rpx 0; font-size: 40rpx; color: #333">我的见解</text>
<view class=" flex_box flex_between" style="padding: 20rpx; align-items: center;">
<view class="">
<text class="PM_font" style="padding: 20rpx 0; font-size: 40rpx; color: #333">我的见解</text>
<text class="classLink" @click="gotoClass(classList[0])" v-if="classList[0].id">@{{classList[0].title}}</text>
</view>
<view class="rightBtn" @click="showBlank(myAnswer)" v-if="myAnswer.scoreSuccess == 0 && myAnswer.scoreInfo == ''">
<text>修改</text>
</view>
@@ -104,9 +107,10 @@
</view>
<view class="welc">
<text>欢迎留下你的见解</text>
<text v-if="classList.length > 0" class="className1" @click="gotoClass(classList[0])" >提交到{{classList[0].title}}</text>
</view>
<view class="btn">
<text @click="showBlank()">写见解</text>
<view class="flex_box flex_center " style="align-items: center;">
<text class="btn" @click="showBlank()">写见解</text>
</view>
</view>
</view>
@@ -365,6 +369,11 @@
}
this.showEditBlank = true
},
gotoClass(item){
uni.navigateTo({
url: `/pages/miniClass/classInfo?id=${item.id}`
});
},
closePup() {
this.showEditBlank = false
this.answerForm = {
@@ -796,7 +805,7 @@
checkDisable() {
console.log("点击了");
},
// 判断用户是否加入了小班 小班列表为0 表示已经加入
// 判断用户是否加入了小班
getClassList(){
$http.request({
url: '/common/class/getClassByUser',
@@ -937,34 +946,7 @@
</script>
<style lang="scss" scoped>
@import "@/style/mixin.scss";
// .page-body {
// height: calc(100vh - var(--window-top) - var(--status-bar-height));
// }
// .wrapper {
// height: 100%;
// }
// .editor-wrapper {
// height: calc(100vh - var(--window-top) - var(--status-bar-height) - 140px);
// background: #fff;
// }
// .iconfont {
// display: inline-block;
// padding: 8px 8px;
// width: 24px;
// height: 24px;
// cursor: pointer;
// font-size: 20px;
// }
// .toolbar {
// box-sizing: border-box;
// border-bottom: 0;
// font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
// }
@import "@/style/mixin.scss";
.ql-container {
box-sizing: border-box;
@@ -1043,6 +1025,7 @@
// border-bottom: 1px solid #eee;
.welc{ display: block; border-top: 1px solid #eee; margin-bottom: 20rpx; padding-top: 20rpx;}
.lockView{display: none;}
.className1{color: #06c;}
.btn {
display: inline-block;
border-radius: 20rpx;
@@ -1117,7 +1100,7 @@
}
}
}
.classLink{color: #06c;}
.coursePart {
margin-top: 20rpx;
@include ptop_bottm(10px);

View File

@@ -83,6 +83,19 @@
</view>
</view>
</view>
<view class="classEntrance" v-if="classInfo.id">
<view class="flex_box" style="justify-content: space-between;">
<view class="flex_box classTitleBox">
<image src="../../static/icon/class.png" mode="" style="width: 64rpx; height: 64rpx;"></image>
<text class="mainTxt">
<span style="font-weight: bold; padding: 0 16rpx;"></span>
班级{{classInfo.title}}</text>
</view>
<view class="btntext">
<text @click="onPageJump('/pages/miniClass/classInfo', classInfo.id)">进入班级 >></text>
</view>
</view>
</view>
<view class="containerBg2">
<!-- 目录 -->
<view :class="['coursePart','flexbox', userMsg.vip != 0 ? 'vipBgColor':'']"
@@ -476,7 +489,8 @@
},
isAndorid: true,
oprateOsName:'',
linkClassList:[], // 关联班级数组
linkClassList:[], // 可加入关联班级数组
classInfo:[] // 所在班级信息
};
},
//第一次加载
@@ -570,6 +584,8 @@
this.linkClassList = res.result
}else{
this.linkClassList = []
// 查询是否有所在的班级
this.getClassList()
}
}).catch(e => {
uni.showToast({
@@ -997,6 +1013,31 @@
console.log("提交报错", e);
});
},
getClassList(){
$http.request({
url: '/common/class/getClassByUser',
method: "POST",
data: {
"courseId": this.courseId
},
header: { //默认 无 说明:请求头
'Content-Type': 'application/json'
},
})
.then(res => {
this.classInfo = {}
console.log('获取班级列表',res.result);
if(res.code == 0){
if(res.result.id){
this.classInfo = res.result
}
}
console.log('获取班级列表++++++',this.classList);
}).catch(e => {
console.log('获取班级列表失败',e);
this.classInfo = {}
});
},
// 查询课程的评论
getSayList() {
this.status = 1;
@@ -1402,13 +1443,13 @@
</script>
<style lang="scss" scoped>
@import "@/style/mixin.scss";
.classEntrance{background-color: #f2f8ff; padding:20rpx;
.classEntrance{background-color: #d0ecc1; padding:20rpx;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
.flex_box{align-items: center;}
}
.btntext{color: $themeColor; }
.classTitleBox{font-size: 28rpx;
.mainTxt{font-size: 30rpx;}
.classTitleBox{font-size: 28rpx; flex: 1;
.mainTxt{font-size: 30rpx; flex: 1; padding-left: 10rpx;}
}
.completionBg { padding: 10rpx 0;
background-color: #fff; border-bottom: 1px solid #eee;