Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix packages for usage issue #101

Merged
merged 3 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix packages",
"packageName": "@acedatacloud/nexior",
"email": "office@acedata.cloud",
"dependentChangeType": "patch"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@acedatacloud/nexior",
"version": "2.1.0",
"version": "2.2.0",
"author": "Germey Technology <dev@germey.tech>",
"repository": {
"type": "git",
Expand Down
7 changes: 7 additions & 0 deletions src/models/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion src/models/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { ICredential } from './credential';
import { IService } from './service';

export enum IApplicationType {
API = 'Api'
USAGE = 'Usage',
PERIOD = 'Period'
}

export interface IApplication {
Expand Down
1 change: 1 addition & 0 deletions src/pages/console/application/Buy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 0 additions & 3 deletions src/pages/console/order/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 5 additions & 1 deletion src/pages/distribution/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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);
Expand Down
Loading