|
@@ -550,8 +550,8 @@ export default {
|
|
|
// 判断剩余时长是否足够
|
|
|
if(this.consumePeriod > this.usePeriod) {
|
|
|
this.$dialog.confirm({
|
|
|
- message: '剩余可用时间不足,是否充值?',
|
|
|
- confirmButtonText: '去充值'
|
|
|
+ message: '余额不足,请充值。',
|
|
|
+ confirmButtonText: '充值'
|
|
|
}).then(() => {
|
|
|
let params = {
|
|
|
form: form,
|
|
@@ -589,10 +589,17 @@ export default {
|
|
|
this.onSubmitStatus = false
|
|
|
this.$dialog.confirm({
|
|
|
title: '确认创建',
|
|
|
- message: '是否确认创建课程组'
|
|
|
+ message: '确认创建课程组?'
|
|
|
}).then(() => {
|
|
|
+ this.$toast.loading({
|
|
|
+ duration: 0,
|
|
|
+ message: '加载中...',
|
|
|
+ forbidClick: true,
|
|
|
+ loadingType: 'spinner'
|
|
|
+ })
|
|
|
createCourseGroup(params).then(res => {
|
|
|
let result =res.data
|
|
|
+ this.$toast.clear()
|
|
|
if(result.code == 200) {
|
|
|
this.$toast('创建成功')
|
|
|
setTimeout(() => {
|
|
@@ -606,6 +613,15 @@ export default {
|
|
|
// this.$router.push('/business')
|
|
|
// }
|
|
|
}, 500)
|
|
|
+ } else if(result.code == 302) {
|
|
|
+ this.onSubmitStatus = true
|
|
|
+ this.$dialog.alert({
|
|
|
+ title: '课程冲突',
|
|
|
+ message: result.msg,
|
|
|
+ messageAlign: 'left'
|
|
|
+ }).then(() => {
|
|
|
+ // on close
|
|
|
+ });
|
|
|
} else {
|
|
|
this.onSubmitStatus = true
|
|
|
this.$toast(result.msg)
|
|
@@ -613,6 +629,7 @@ export default {
|
|
|
})
|
|
|
}).catch(() => {
|
|
|
// on cancel
|
|
|
+ this.onSubmitStatus = true
|
|
|
})
|
|
|
|
|
|
}
|