暂存
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user