@@ -230,12 +234,16 @@ export default defineComponent({
this.loading = false;
});
},
- getRemainingCount(application: IApplication) {
+ getCount(application: IApplication) {
if (application.type === IApplicationType.API) {
- return application.remaining_count;
+ const unit = this.$t(`api.unit.${application?.api?.unit}`);
+ return `${application.remaining_count}${unit}`;
}
if (application.type === IApplicationType.PROXY) {
- return `${((application.remaining_count || 0) / 1024 / 1024).toFixed(2)}MB`;
+ const unit = this.$t(`proxy.unit.${application?.proxy?.unit}`);
+ if (unit === 'MB') {
+ return `${((application.remaining_count || 0) / 1024 / 1024).toFixed(2)}${unit}`;
+ }
}
}
}
diff --git a/src/pages/console/order/Detail.vue b/src/pages/console/order/Detail.vue
index 5b26d9e5..81f3120b 100644
--- a/src/pages/console/order/Detail.vue
+++ b/src/pages/console/order/Detail.vue
@@ -33,7 +33,12 @@
{{ order?.application?.proxy?.title }}
- {{ order?.amount }}
+
+ {{ order?.amount }}{{ $t(`api.unit.${order?.application?.api?.unit}`) }}
+
+
+ {{ order?.amount }}{{ $t(`proxy.unit.${order?.application?.proxy?.unit}`) }}
+
{{ $dayjs.format(order?.created_at) }}