move
This commit is contained in:
1 parent
3e5e158b27
commit
1e837571e2
17 files changed
+172
-22
No files matched your search
@@ -1,17 +1,22 @@
|
||||
<template>
|
||||
<span v-if="application" class="info">
|
||||
{{ $t('conversation.message.usedCount') }}: {{ application?.used_amount }}
|
||||
{{ $t('conversation.message.remainingCount') }}: {{ application?.remaining_amount }}
|
||||
</span>
|
||||
<div v-if="application" class="status">
|
||||
<span class="info">
|
||||
{{ $t('conversation.message.usedCount') }}: {{ application?.used_amount }}
|
||||
{{ $t('conversation.message.remainingCount') }}: {{ application?.remaining_amount }}
|
||||
</span>
|
||||
<span class="actions">
|
||||
<el-button size="small" type="primary" @click="onBuy">Buy</el-button>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { IApplication } from '@/operators';
|
||||
|
||||
import { ElButton } from 'element-plus';
|
||||
export default defineComponent({
|
||||
name: 'ApiStatus',
|
||||
components: {},
|
||||
components: { ElButton },
|
||||
props: {
|
||||
application: {
|
||||
type: Object as () => IApplication | undefined,
|
||||
@@ -22,15 +27,32 @@ export default defineComponent({
|
||||
return {};
|
||||
},
|
||||
computed: {},
|
||||
methods: {}
|
||||
methods: {
|
||||
onBuy() {
|
||||
const url = `https://data.zhishuyun.com/console/applications/${this.application?.id}/buy`;
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.status {
|
||||
display: block;
|
||||
width: fit-content;
|
||||
margin: auto;
|
||||
}
|
||||
.info {
|
||||
font-size: 14px;
|
||||
color: var(--el-text-color-regular);
|
||||
display: block;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
}
|
||||
.actions {
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
.el-button {
|
||||
border-radius: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="price-text">
|
||||
<span v-if="price > 0" class="unfree"
|
||||
>¥{{ price }} {{ unit ? ` / ${unit}` : '' }}{{ start ? $t('common.message.startPrice') : ''
|
||||
}}{{ $t('service.message.fromPrice') }}
|
||||
</span>
|
||||
<span v-else class="free">
|
||||
{{ $t('common.message.free') }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
export default defineComponent({
|
||||
name: 'ApiPrice',
|
||||
props: {
|
||||
price: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0
|
||||
},
|
||||
unit: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: undefined
|
||||
},
|
||||
start: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.price-text {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
.unfree {
|
||||
color: #ff5441;
|
||||
|
||||
.value {
|
||||
font-weight: bold;
|
||||
color: #ff5441;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
.free {
|
||||
color: #29c287;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user