|
|
|
|
@ -1,8 +1,11 @@
|
|
|
|
|
<template>
|
|
|
|
|
<view class="container">
|
|
|
|
|
<image class="cbg" :src="base.imgHost('common_bg.png')"></image>
|
|
|
|
|
<!-- <u-divider>个人信息</u-divider> -->
|
|
|
|
|
<view class="wrap">
|
|
|
|
|
<view class="loading-mask" v-if="loading">
|
|
|
|
|
<u-loading mode="circle" size="48" color="#0d0398"></u-loading>
|
|
|
|
|
<text class="loading-tip">加载中...</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="wrap" v-else>
|
|
|
|
|
<applyForm ref="applyForm" @backForm="backForm" :course_forms="course_forms"></applyForm>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
@ -25,6 +28,7 @@
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
loading: true,
|
|
|
|
|
course_id: '',
|
|
|
|
|
|
|
|
|
|
is_fee: 0, //需不需要缴费这个课程
|
|
|
|
|
@ -45,15 +49,18 @@
|
|
|
|
|
},
|
|
|
|
|
async onLoad(options) {
|
|
|
|
|
this.course_id = options.id
|
|
|
|
|
// 先获取最新的用户信息
|
|
|
|
|
await this.getUserInfo()
|
|
|
|
|
|
|
|
|
|
if (options.type === 'edit') {
|
|
|
|
|
this.opType = 'edit'
|
|
|
|
|
this.getCourseDetail(options.id)
|
|
|
|
|
// this.getSignDetail(options.id)
|
|
|
|
|
} else {
|
|
|
|
|
this.getCourseDetail(options.id)
|
|
|
|
|
}
|
|
|
|
|
this.loading = true
|
|
|
|
|
try {
|
|
|
|
|
await this.getUserInfo()
|
|
|
|
|
await this.getCourseDetail(options.id)
|
|
|
|
|
} catch (err) {
|
|
|
|
|
console.log('页面数据加载失败', err)
|
|
|
|
|
this.base.toast('加载失败,请稍后重试')
|
|
|
|
|
} finally {
|
|
|
|
|
this.loading = false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
@ -91,8 +98,8 @@
|
|
|
|
|
this.course_forms = res.course_forms.sort((a, b) => (a.sort - b.sort))
|
|
|
|
|
}
|
|
|
|
|
this.is_fee = res.is_fee
|
|
|
|
|
if(this.opType == 'edit'){
|
|
|
|
|
this.getSignDetail(id)
|
|
|
|
|
if (this.opType == 'edit') {
|
|
|
|
|
await this.getSignDetail(id)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 修改
|
|
|
|
|
@ -442,6 +449,23 @@
|
|
|
|
|
height: 100vh;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.loading-mask {
|
|
|
|
|
position: relative;
|
|
|
|
|
z-index: 2;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
min-height: 60vh;
|
|
|
|
|
padding: 80rpx 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.loading-tip {
|
|
|
|
|
margin-top: 24rpx;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
color: #666;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.wrap {
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
padding: 20rpx 50rpx;
|
|
|
|
|
|