123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- <template>
- <view class="courseWrapper">
- <view v-for="(item, index) in requirement" :key="index">
- <view class="requires" @click="requireDetail(item.courseId)">
- <uni-row class="demo-uni-row">
- <uni-col offset="1">
- <view class="requires-col1">课程号:{{item.courseId}}</view>
- </uni-col>
- </uni-row>
- <uni-row class="demo-uni-row">
- <uni-col offset="1" :span="16">
- <view class="requires-col2">科目:{{item.subject}}</view>
- </uni-col>
- </uni-row>
- <view class="requires-col3">
- <uni-row class="demo-uni-row">
- <uni-col :span="4" offset="1">
- <view style="color: red;">{{item.verifyStatus}}</view>
- </uni-col>
- <uni-col :span="4" >
- <view style="color: red;">{{item.deal}}</view>
- </uni-col>
- <uni-col :span="4" >
- <view style="color: red;">{{item.locked}}</view>
- </uni-col>
- <uni-col :span="4" >
- <view :class="item.display == '已上架' ? 'setdisplaycolorgreen' : 'setdisplaycolorred'" >
- <view>{{item.display}}</view>
- </view>
- </uni-col>
- </uni-row>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- requirement: []
- }
- },
- onShow() {
- this.getPublishCounts()
- },
- methods: {
- // 查询个人上架了多少课程
- async getPublishCounts() {
- const { data: result } = await uni.$http.get('/education/teacher-courses/showPersonCourse')
- this.publishCount = result.data.publishCounts
- let courses = []
- courses = result.data.list
-
- for (let i = 0; i < courses.length; i++) {
- if (courses[i].display === '上架') {
- courses[i].display = '已上架'
- } else {
- courses[i].display = '已下架'
- }
- }
- this.requirement = courses
- },
- requireDetail(id) {
- uni.redirectTo({
- url: '/subpkg/teacher/course/teacher_course_my_detail?courseId='
- + encodeURIComponent(id)
- + '&code=' + encodeURIComponent(0)
- })
- },
- }
- }
- </script>
- <!-- 设置页面背景 -->
- <style lang="scss">
- page{
- height: 100%;
- padding: 20rpx;
- // background-color: #FFF;
- }
- </style>
- <style scoped lang="scss">
- .courseWrapper{
- width: 96%;
- height: 100%;
- }
- .requires {
- background-color: #FFF;
- border: 0px solid #41719C;
- border-radius: 30rpx;
- margin: 10rpx 0 20rpx;
- position: relative;
- font-size: 30rpx;
-
- .requires-col1 {
- margin-top: 15rpx;
- }
-
- .requires-col2 {
- margin: 15rpx 0;
- }
-
- .requires-col3 {
- padding-bottom: 15rpx;
- }
-
- .setdisplaycolorgreen{
- display: flex;
- background-color: #35b882;
- color: #fff;
- border-radius: 40rpx;
- justify-content: center;
- }
-
- .setdisplaycolorred{
- display: flex;
- background-color: #ff5500;
- color: #fff;
- border-radius: 40rpx;
- justify-content: center;
- }
- }
- </style>
|