You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
118 lines
2.4 KiB
118 lines
2.4 KiB
<template>
|
|
<view class="container">
|
|
<image class="cbg" src="../../static/common_bg.png"></image>
|
|
<view class="wrap">
|
|
<view class="wrap-title">
|
|
{{info.course?info.course.name:''}}
|
|
</view>
|
|
<view class="wrap-btn">
|
|
<image @click="toUrl(1)" src="../../static/mycourse-icon1.png"></image>
|
|
<image @click="toUrl(2)" src="../../static/mycourse-icon2.png"></image>
|
|
<image @click="toUrl(3)" src="../../static/mycourse-icon3.png"></image>
|
|
<image @click="toUrl(4)" src="../../static/mycourse-icon4.png"></image>
|
|
</view>
|
|
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
components: {
|
|
},
|
|
data() {
|
|
return {
|
|
course_id:'',
|
|
info:''
|
|
}
|
|
},
|
|
onLoad(options) {
|
|
this.course_id = options.id
|
|
this.getCourseDetail(options.id)
|
|
},
|
|
methods:{
|
|
toUrl(type){
|
|
if(type===1){
|
|
uni.navigateTo({
|
|
url:'/packages/mycourse/courseStatus?id='+this.course_id
|
|
})
|
|
}else if(type===2){
|
|
if(this.info.status===0){
|
|
this.base.toast("请等待审核通过")
|
|
return
|
|
}
|
|
if(this.info.status>1){
|
|
this.base.toast("您没有权限查看本班通讯录")
|
|
return
|
|
}
|
|
uni.navigateTo({
|
|
url:'/packages/mycourse/courseTxl?id='+this.course_id
|
|
})
|
|
}else if(type===3){
|
|
if(this.info.course.is_arrange!=1){
|
|
this.base.toast("当前课程没有课表")
|
|
return
|
|
}
|
|
uni.navigateTo({
|
|
url:'/packages/mycourse/courseContents?id='+this.course_id
|
|
})
|
|
}else if(type===4){
|
|
if(this.info.course.is_fee!=1){
|
|
this.base.toast("当前课程无需缴费")
|
|
return
|
|
}
|
|
uni.navigateTo({
|
|
url:'/packages/mycourse/coursePay?id='+this.course_id
|
|
})
|
|
}
|
|
},
|
|
async getCourseDetail(id) {
|
|
|
|
const res = await this.$u.api.courseGetSign({
|
|
course_id: id
|
|
})
|
|
this.info = res.detail
|
|
},
|
|
}
|
|
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.container{
|
|
padding: 30rpx;
|
|
width:100%;
|
|
height:100vh;
|
|
.cbg {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100vh;
|
|
}
|
|
.wrap{
|
|
position: relative;
|
|
height:100%;
|
|
&-title{
|
|
color:32rpx;
|
|
font-size: 32rpx;
|
|
text-align: center;
|
|
padding:120rpx 0;
|
|
}
|
|
&-btn{
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
flex-wrap: wrap;
|
|
padding:0 35rpx;
|
|
image{
|
|
width:280rpx;
|
|
height:195rpx;
|
|
margin-bottom:35rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
</style> |