add check for pay status
This commit is contained in:
1 parent
a94623baac
commit
e73a743d3c
5 files changed
+17
-14
No files matched your search
@@ -22,14 +22,14 @@
|
||||
</div>
|
||||
<div class="operation">
|
||||
<p v-if="paid === false">
|
||||
<el-button @click="onBuy">
|
||||
<el-icon class="icon"> <arrow-right /> </el-icon>
|
||||
{{ $t('course.button.startStudy') }}
|
||||
<el-button @click="onBuy" type="danger">
|
||||
<el-icon class="icon"> <goods /> </el-icon>
|
||||
{{ $t('course.button.buy') }}
|
||||
</el-button>
|
||||
</p>
|
||||
<p v-if="paid === true">
|
||||
<el-button>
|
||||
<el-icon class="icon"> <arrow-right /> </el-icon>
|
||||
<el-icon class="icon"> <video-play /> </el-icon>
|
||||
{{ $t('course.button.startStudy') }}
|
||||
</el-button>
|
||||
</p>
|
||||
@@ -110,7 +110,7 @@ import { episodeService } from '@/services/episode/service';
|
||||
import { IEpisode, IEpisodeListResponse } from '@/services/episode/types';
|
||||
import { orderService } from '@/services/order/service';
|
||||
import { defineComponent } from 'vue';
|
||||
import { Clock, MagicStick, Collection, ArrowRight } from '@element-plus/icons-vue';
|
||||
import { Clock, MagicStick, Collection, VideoPlay, Goods } from '@element-plus/icons-vue';
|
||||
import VerificationAlert from '@/components/common/VerificationAlert.vue';
|
||||
import { IOrder, IOrderDetailResponse } from '@/services/order/types';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
@@ -130,7 +130,8 @@ export default defineComponent({
|
||||
Collection,
|
||||
MagicStick,
|
||||
VerificationAlert,
|
||||
ArrowRight
|
||||
VideoPlay,
|
||||
Goods
|
||||
},
|
||||
data(): IData {
|
||||
return {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<div v-if="paid === true || episode?.isFree">
|
||||
<episode-player v-if="episode?.resourceUrl" :resource="episode?.resourceUrl" :preview="episode?.thumbnail" />
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="paid === false && !episode?.isFree">
|
||||
{{ $t('course.message.needPay') }}
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -101,7 +101,7 @@ $width: 300px;
|
||||
|
||||
.side {
|
||||
background-color: #0d131d;
|
||||
height: 100vh;
|
||||
min-height: 100vh;
|
||||
overflow-y: scroll;
|
||||
width: $width;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user