提交修改

This commit is contained in:
daihh
2022-11-14 14:20:41 +08:00
parent f098615ec5
commit 4bbb616a1d
4 changed files with 149 additions and 36 deletions

View File

@@ -118,7 +118,7 @@
</view>
</view>
</view>
<view class="contentbox">
<view class="contentbox" v-if="courseInfo.name">
<view v-if="!catalogShow">
<view class="tabrow">
<view class="tabrow-item" @click="changeTab(1)"><text :class="{'tabrow-active':tabIndex==1}">简介</text></view>
@@ -128,8 +128,9 @@
<view v-if="tabIndex==1" class="cinfo">
<view class="cinfo-title">
{{courseInfo.name}}
<text class="cinfo-tag1">通用力</text>
<text class="cinfo-tag2">职场技能</text>
<text class="cinfo-tag1">{{convertTypeName(courseInfo.sysType1)}}</text>
<text v-if="courseInfo.sysType2" class="cinfo-tag2">{{convertTypeName(courseInfo.sysType2)}}</text>
<text v-if="courseInfo.sysType3" class="cinfo-tag2">{{convertTypeName(courseInfo.sysType3)}}</text>
</view>
<view class="desrow">
<view>
@@ -357,26 +358,26 @@
</u-popup>
<!-- 评分赞和踩 -->
<u-popup :show="scoreInfo.dlgShow" mode="center" :closeable="false" :closeOnClickOverlay="false" :round="14" @close="closeScore" @open="openScore">
<view>
<view style="text-align: center;padding: 50upx 100upx 0upx 100upx;">
<view style="text-align: center;font-size: 36upx;">课程评价</view>
<view style="text-align: center;color: #999999;font-size: 24upx;padding-top: 10upx;">对课程进行评分吧</view>
<view style="padding-top: 40upx;display: flex;justify-content: center;">
<view class="dlgscore">
<view class="dlgscore-top">
<view class="dlgscore-title">课程评价</view>
<view class="dlgscore-desc">对课程进行评分吧</view>
<view class="dlgscore-score">
<u-rate :count="5" :size="35" activeColor="#F37101" v-model="scoreInfo.score"></u-rate>
</view>
</view>
<view style="margin-top: 60upx;height: 100upx;display: flex;justify-content: center;border-top: 1px solid rgba(153,153,153,0.14);">
<view style="text-align: center;width: 49%;border-right:1px solid rgba(153,153,153,0.14);line-height: 100upx;">
<text @click="closeScore" style="color: #666666;">取消</text>
<view class="dlgscore-btns">
<view class="dlgscore-cancel">
<text @click="closeScore">取消</text>
</view>
<view style="text-align: center;width: 50%;line-height: 100upx;">
<text @click="addScore()" style="color: #387DF7;">提交</text>
<view class="dlgscore-submit">
<text @click="addScore()">提交</text>
</view>
<!-- <u-button type="primary" @click="addScore()" text="提交评分"></u-button> -->
</view>
</view>
</u-popup>
<interact-share ref="comShare" :data="courseInfo"></interact-share>
<interact-share ref="comShare" :data="courseInfo":type="1"></interact-share>
</view>
</template>
@@ -395,7 +396,7 @@
import {getContentType} from "@/utils/tools.js";
import studyUtil from '@/utils/study.js';
import {toScore,cutOrgNamePath,formatUserNumber} from '@/utils/tools.js';
import {mapGetters} from 'vuex'
import {mapGetters,mapActions} from 'vuex'
export default {
data(){
return{
@@ -463,7 +464,7 @@
}
},
computed: {
...mapGetters(['userInfo']),
...mapGetters(['userInfo','sysTypeMap']),
catalogTree(){
let treeList=[];
let $this=this;
@@ -515,6 +516,8 @@
this.courseId=options.id;
this.courseInfo.id=options.id;
this.loadDetail();//加载课程数据
this.getSysTypeTree();
this.loadSysTypes();
this.loadReCourses();//加载推荐课程
this.loadIsData();//加载关注,收藏,评价等信息
},
@@ -526,6 +529,16 @@
this.videoPlayer=uni.createVideoContext("myVideo", this);
},
methods:{
...mapActions({
// getResOwnerTree:'resOwner/getResOwnerTree',
// loadResOwners:'resOwner/loadResOwners',
getSysTypeTree:'sysType/getSysTypeTree',
loadSysTypes:'sysType/loadSysTypes'
}),
convertTypeName(code){
if(!code){return '';}
return this.sysTypeMap.get(code);
},
loadDetail(){
let $this=this;
uni.showLoading({title:'加载中...'})
@@ -731,7 +744,7 @@
sysType2:this.courseInfo.sysType2,
sysType3:this.courseInfo.sysType3
}
apiCourseStudy.courseRecommends(dto).then(rs=>{
apiCoursePortal.recommendList(dto).then(rs=>{
if(rs.status==200){
this.recommendCourses=rs.result;
}
@@ -876,6 +889,7 @@
this.$refs.comments.loadData(false);
},
openShare(){
this.$refs.messager.show({message:'打开分享',type:'success'});
//console.log(this.$refs.fiexdbar,'this.$refs.fiexdbar');
//因为开始是v-if控制的所以这里获取不到必须显示时才会获取到所以需要单独的弄一个分享组件
this.$refs.comShare.openShare();
@@ -1580,4 +1594,45 @@
}
}
}
.dlgscore{ //评分的样式
.dlgscore-top{
text-align: center;
padding: 50upx 100upx 0upx 100upx;
.dlgscore-title{
text-align: center;
font-size: 36upx;
}
.dlgscore-desc{
text-align: center;
color: #999999;
font-size: 24upx;
padding-top: 10upx;
}
.dlgscore-score{
padding-top: 40upx;
display: flex;
justify-content: center;
}
}
.dlgscore-btns{
margin-top: 60upx;
height: 100upx;
display: flex;
justify-content: center;
border-top: 1px solid rgba(153,153,153,0.14);
.dlgscore-cancel{
text-align: center;
width: 49%;
border-right:1px solid rgba(153,153,153,0.14);
line-height: 100upx;
color: #666666;
}
.dlgscore-submit{
text-align: center;
width: 50%;
line-height: 100upx;
color: #387DF7;
}
}
}
</style>