Fix packages for usage issue (#101)

Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
GermeyandAceDataCloud authored and GitHub committed 2024-08-09 17:24:31 +00:00
1 parent e4c9e0b5d3
commit 2cdb987181
7 files changed
+23 -6

No files matched your search

+7
View File
@@ -45,10 +45,17 @@ export interface IResponse {
headers: ISchema;
}
export enum IPackageType {
PERIOD = 'Period',
USAGE = 'Usage'
}
export interface IPackage {
id: string;
amount: number;
price: number;
type?: IPackageType;
duration?: number;
}
export enum IApiUnit {
+2 -1
View File
@@ -2,7 +2,8 @@ import { ICredential } from './credential';
import { IService } from './service';
export enum IApplicationType {
API = 'Api'
USAGE = 'Usage',
PERIOD = 'Period'
}
export interface IApplication {
+1
View File
@@ -20,6 +20,7 @@
<el-radio-group v-if="application?.service?.packages" v-model="form.packageId">
<el-radio-button
v-for="(pkg, pkgIndex) in application?.service.packages"
v-show="pkg.type === 'Usage'"
:key="pkgIndex"
:label="pkg.id"
class="mb-2"
-3
View File
@@ -30,9 +30,6 @@
<span v-if="order?.pay_way === PayWay.WechatPay">{{ $t('order.title.wechatPay') }}</span>
<span v-if="order?.pay_way === PayWay.Stripe">{{ $t('order.title.stripe') }}</span>
</el-descriptions-item>
<el-descriptions-item :label="$t('order.field.amount')">
{{ order?.amount }} {{ $t(`service.unit.${order?.application?.service?.unit}`) }}
</el-descriptions-item>
<el-descriptions-item :label="$t('order.field.createdAt')">
{{ $dayjs.format(order?.created_at) }}
</el-descriptions-item>
+5 -1
View File
@@ -149,7 +149,8 @@
<qr-code
v-if="distributionLink"
:value="distributionLink"
:size="150"
:size="180"
:margin="2"
class="block mb-2 ml-auto mr-auto"
/>
<p class="mt-0">
@@ -390,6 +391,9 @@ export default defineComponent({
}
.qr-wrapper {
padding: 15px 0;
img {
width: 200px;
}
p {
text-align: center;
color: var(--el-text-color-regular);