|
|
|
|
@ -22,6 +22,7 @@ |
|
|
|
|
<lil-select :value.sync="course.category" :options="categoryOptions" |
|
|
|
|
placeholder="Выберите категорию"/> |
|
|
|
|
</div> |
|
|
|
|
<div class="courses__old-price" v-if="course.is_paid && course.old_price"><s>{{ course.old_price }}₽</s></div> |
|
|
|
|
<div class="courses__price" v-if="course.is_paid && course.price">{{ course.price }}₽</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="courses__title field field" v-bind:class="{ error: ($v.course.title.$dirty || showErrors) && $v.course.title.$invalid }"> |
|
|
|
|
@ -92,7 +93,14 @@ |
|
|
|
|
<div v-if="course.is_paid" class="info__field field"> |
|
|
|
|
<div class="field__label field__label_gray">СТОИМОСТЬ</div> |
|
|
|
|
<div class="field__wrap field__wrap__appended field__wrap__100px"> |
|
|
|
|
<input type="text" class="field__input field__input__appended" v-model.number="displayPrice"> |
|
|
|
|
<input type="text" class="field__input field__input__appended" v-model.number.lazy="displayPrice"> |
|
|
|
|
<button disabled class="field__append">руб.</button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div v-if="course.is_paid" class="info__field field"> |
|
|
|
|
<div class="field__label field__label_gray">СТОИМОСТЬ БЕЗ СКИДКИ</div> |
|
|
|
|
<div class="field__wrap field__wrap__appended field__wrap__100px"> |
|
|
|
|
<input type="text" class="field__input field__input__appended" v-model.number.lazy="displayOldPrice"> |
|
|
|
|
<button disabled class="field__append">руб.</button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
@ -263,6 +271,7 @@ |
|
|
|
|
duration: null, |
|
|
|
|
author: null, |
|
|
|
|
price: null, |
|
|
|
|
old_price: null, |
|
|
|
|
age: 0, |
|
|
|
|
url: '', |
|
|
|
|
coverImage: '', |
|
|
|
|
@ -1011,23 +1020,14 @@ |
|
|
|
|
this.course.price = value || 0; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// userSelect: { |
|
|
|
|
// get() { |
|
|
|
|
// if (!this.users || this.users.length === 0 || !this.course || !this.course.author) { |
|
|
|
|
// return null; |
|
|
|
|
// } |
|
|
|
|
// let value; |
|
|
|
|
// this.users.forEach((user) => { |
|
|
|
|
// if (user.value === this.course.author) { |
|
|
|
|
// value = user; |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// return value; |
|
|
|
|
// }, |
|
|
|
|
// set(value) { |
|
|
|
|
// this.course.author = value.value; |
|
|
|
|
// } |
|
|
|
|
// }, |
|
|
|
|
displayOldPrice: { |
|
|
|
|
get: function () { |
|
|
|
|
return this.course.is_paid && this.course.old_price ? (this.course.old_price || '') : ''; |
|
|
|
|
}, |
|
|
|
|
set: function (value) { |
|
|
|
|
this.course.old_price = value || 0; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
courseFullUrl() { |
|
|
|
|
if (!this.course.url) { |
|
|
|
|
return `https://lil.city/course/${this.course.id}`; |
|
|
|
|
@ -1194,10 +1194,6 @@ |
|
|
|
|
flex: 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.courses__price { |
|
|
|
|
margin-left: 20px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.courses__preview { |
|
|
|
|
.upload { |
|
|
|
|
position: absolute; |
|
|
|
|
|