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
@@ -68,7 +68,7 @@ export default defineComponent({
|
||||
height: 84px;
|
||||
overflow: hidden;
|
||||
.left {
|
||||
width: 100px;
|
||||
width: 80px;
|
||||
float: left;
|
||||
.thumbnail {
|
||||
text-align: center;
|
||||
@@ -81,10 +81,12 @@ export default defineComponent({
|
||||
padding: 10px 0;
|
||||
color: white;
|
||||
float: left;
|
||||
|
||||
width: calc(100% - 100px);
|
||||
width: calc(100% - 80px);
|
||||
.title {
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.info {
|
||||
color: rgb(120, 144, 156);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export default {
|
||||
startStudy: '开始学习'
|
||||
startStudy: '开始学习',
|
||||
buy: '购买课程'
|
||||
};
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
+1
-2
@@ -12,8 +12,7 @@ export interface IState {
|
||||
const store = createStore({
|
||||
state(): IState {
|
||||
return {
|
||||
accessToken:
|
||||
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjY1MTc5MTE2LCJqdGkiOiJlYjEzNGMzMjZlMTc0YzViODFhNGZlZDgxMjJlYzFhNiIsInVzZXJfaWQiOjQsInBlcm1pc3Npb25zIjpbInZpZXdfYWNhZGVteV9jb3Vyc2UiXSwiaXNfc3VwZXJ1c2VyIjpmYWxzZSwiaXNfdmVyaWZpZWQiOnRydWUsInJlYWxuYW1lIjoiXHU1ZDE0XHU1ZTg2XHU2MjRkIiwicGhvbmUiOiIxNzYwMDE1NTU2NyIsImlkY2FyZCI6IjM3MDc4MTE5OTQwNjI5MzI3MSJ9.Xc4B9GhgJ5i2I9R_6j7bD38yX3bPC_FI7kUVQzCDaq4',
|
||||
accessToken: undefined,
|
||||
refreshToken: undefined,
|
||||
user: undefined
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user