diff --git a/.env.development b/.env.development index 18d75c8..1f2bf56 100644 --- a/.env.development +++ b/.env.development @@ -1,2 +1,2 @@ -VITE_API_BASE_URL= 'http://49.233.216.171:12310' +VITE_API_BASE_URL= 'http://127.0.0.1:12401' # VITE_API_BASE_URL='https://partial.kkknametrans.buzz' diff --git a/src/api/generated/.openapi-generator/FILES b/src/api/generated/.openapi-generator/FILES index 6d255e1..a8065b0 100644 --- a/src/api/generated/.openapi-generator/FILES +++ b/src/api/generated/.openapi-generator/FILES @@ -42,6 +42,7 @@ docs/KamiApiCamelOilV1CheckAccountReq.md docs/KamiApiCamelOilV1CheckAccountRes.md docs/KamiApiCamelOilV1CreateTokenReq.md docs/KamiApiCamelOilV1CreateTokenRes.md +docs/KamiApiCamelOilV1DeleteExpiredAccountsRes.md docs/KamiApiCamelOilV1DeleteTokenReq.md docs/KamiApiCamelOilV1DeleteTokenRes.md docs/KamiApiCamelOilV1DenominationSetting.md @@ -488,6 +489,7 @@ models/kami-api-camel-oil-v1-check-account-req.ts models/kami-api-camel-oil-v1-check-account-res.ts models/kami-api-camel-oil-v1-create-token-req.ts models/kami-api-camel-oil-v1-create-token-res.ts +models/kami-api-camel-oil-v1-delete-expired-accounts-res.ts models/kami-api-camel-oil-v1-delete-token-req.ts models/kami-api-camel-oil-v1-delete-token-res.ts models/kami-api-camel-oil-v1-denomination-setting.ts diff --git a/src/api/generated/apis/jdv2-account-api.ts b/src/api/generated/apis/jdv2-account-api.ts index 016fa15..7be9170 100644 --- a/src/api/generated/apis/jdv2-account-api.ts +++ b/src/api/generated/apis/jdv2-account-api.ts @@ -47,6 +47,8 @@ import type { KamiApiCamelOilV1CheckAccountReq } from '../models'; // @ts-ignore import type { KamiApiCamelOilV1CheckAccountRes } from '../models'; // @ts-ignore +import type { KamiApiCamelOilV1DeleteExpiredAccountsRes } from '../models'; +// @ts-ignore import type { KamiApiCamelOilV1ListAccountRes } from '../models'; /** * JDV2AccountApi - axios parameter creator @@ -103,6 +105,45 @@ export const JDV2AccountApiAxiosParamCreator = function ( options: localVarRequestOptions }; }, + /** + * + * @summary 删除所有过期无效账号 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiJdV2AccountDeleteExpiredDelete: async ( + options: RawAxiosRequestConfig = {} + ): Promise => { + const localVarPath = `/api/jd-v2/account/delete-expired`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: 'DELETE', + ...baseOptions, + ...options + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions + }; + }, /** * * @summary 账号历史记录 @@ -324,6 +365,37 @@ export const JDV2AccountApiFp = function (configuration?: Configuration) { configuration )(axios, localVarOperationServerBasePath || basePath); }, + /** + * + * @summary 删除所有过期无效账号 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async apiJdV2AccountDeleteExpiredDelete( + options?: RawAxiosRequestConfig + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.apiJdV2AccountDeleteExpiredDelete( + options + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap[ + 'JDV2AccountApi.apiJdV2AccountDeleteExpiredDelete' + ]?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration + )(axios, localVarOperationServerBasePath || basePath); + }, /** * * @summary 账号历史记录 @@ -472,6 +544,19 @@ export const JDV2AccountApiFactory = function ( ) .then(request => request(axios, basePath)); }, + /** + * + * @summary 删除所有过期无效账号 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiJdV2AccountDeleteExpiredDelete( + options?: RawAxiosRequestConfig + ): AxiosPromise { + return localVarFp + .apiJdV2AccountDeleteExpiredDelete(options) + .then(request => request(axios, basePath)); + }, /** * * @summary 账号历史记录 @@ -547,6 +632,16 @@ export interface JDV2AccountApiInterface { options?: RawAxiosRequestConfig ): AxiosPromise; + /** + * + * @summary 删除所有过期无效账号 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + apiJdV2AccountDeleteExpiredDelete( + options?: RawAxiosRequestConfig + ): AxiosPromise; + /** * * @summary 账号历史记录 @@ -669,6 +764,18 @@ export class JDV2AccountApi extends BaseAPI implements JDV2AccountApiInterface { .then(request => request(this.axios, this.basePath)); } + /** + * + * @summary 删除所有过期无效账号 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public apiJdV2AccountDeleteExpiredDelete(options?: RawAxiosRequestConfig) { + return JDV2AccountApiFp(this.configuration) + .apiJdV2AccountDeleteExpiredDelete(options) + .then(request => request(this.axios, this.basePath)); + } + /** * * @summary 账号历史记录 diff --git a/src/api/generated/docs/JDV2AccountApi.md b/src/api/generated/docs/JDV2AccountApi.md index 947e57a..de8d6ff 100644 --- a/src/api/generated/docs/JDV2AccountApi.md +++ b/src/api/generated/docs/JDV2AccountApi.md @@ -2,12 +2,13 @@ All URIs are relative to _http://localhost_ -| Method | HTTP request | Description | -| --------------------------------------------------------------- | ------------------------------------- | ------------ | -| [**apiJdV2AccountCheckPost**](#apijdv2accountcheckpost) | **POST** /api/jd-v2/account/check | 棂测账号状态 | -| [**apiJdV2AccountHistoryGet**](#apijdv2accounthistoryget) | **GET** /api/jd-v2/account/history | 账号历史记录 | -| [**apiJdV2AccountListGet**](#apijdv2accountlistget) | **GET** /api/jd-v2/account/list | 账号列表 | -| [**apiJdV2AccountStatisticsGet**](#apijdv2accountstatisticsget) | **GET** /api/jd-v2/account/statistics | 账号统计信息 | +| Method | HTTP request | Description | +| --------------------------------------------------------------------------- | -------------------------------------------- | -------------------- | +| [**apiJdV2AccountCheckPost**](#apijdv2accountcheckpost) | **POST** /api/jd-v2/account/check | 棂测账号状态 | +| [**apiJdV2AccountDeleteExpiredDelete**](#apijdv2accountdeleteexpireddelete) | **DELETE** /api/jd-v2/account/delete-expired | 删除所有过期无效账号 | +| [**apiJdV2AccountHistoryGet**](#apijdv2accounthistoryget) | **GET** /api/jd-v2/account/history | 账号历史记录 | +| [**apiJdV2AccountListGet**](#apijdv2accountlistget) | **GET** /api/jd-v2/account/list | 账号列表 | +| [**apiJdV2AccountStatisticsGet**](#apijdv2accountstatisticsget) | **GET** /api/jd-v2/account/statistics | 账号统计信息 | # **apiJdV2AccountCheckPost** @@ -59,6 +60,46 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **apiJdV2AccountDeleteExpiredDelete** + +> KamiApiCamelOilV1DeleteExpiredAccountsRes apiJdV2AccountDeleteExpiredDelete() + +### Example + +```typescript +import { JDV2AccountApi, Configuration } from './api'; + +const configuration = new Configuration(); +const apiInstance = new JDV2AccountApi(configuration); + +const { status, data } = await apiInstance.apiJdV2AccountDeleteExpiredDelete(); +``` + +### Parameters + +This endpoint does not have any parameters. + +### Return type + +**KamiApiCamelOilV1DeleteExpiredAccountsRes** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +| ----------- | ----------- | ---------------- | +| **200** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **apiJdV2AccountHistoryGet** > KamiApiCamelOilV1AccountHistoryRes apiJdV2AccountHistoryGet() diff --git a/src/api/generated/docs/KamiApiCamelOilV1CreateTokenReq.md b/src/api/generated/docs/KamiApiCamelOilV1CreateTokenReq.md index 905c8ce..716a56d 100644 --- a/src/api/generated/docs/KamiApiCamelOilV1CreateTokenReq.md +++ b/src/api/generated/docs/KamiApiCamelOilV1CreateTokenReq.md @@ -5,7 +5,7 @@ | Name | Type | Description | Notes | | ----------------------- | ---------- | ------------ | --------------------------------- | | **name** | **string** | Token名称 | [default to undefined] | -| **phone** | **string** | 绑定的手机号 | [default to undefined] | +| **phone** | **string** | 绑定的手机号 | [optional] [default to undefined] | | **remark** | **string** | 备注 | [optional] [default to undefined] | | **rechargeLimitAmount** | **number** | 充值金额限制 | [default to undefined] | | **rechargeLimitCount** | **number** | 充值次数限制 | [default to undefined] | diff --git a/src/api/generated/docs/KamiApiCamelOilV1DeleteExpiredAccountsRes.md b/src/api/generated/docs/KamiApiCamelOilV1DeleteExpiredAccountsRes.md new file mode 100644 index 0000000..98ded01 --- /dev/null +++ b/src/api/generated/docs/KamiApiCamelOilV1DeleteExpiredAccountsRes.md @@ -0,0 +1,21 @@ +# KamiApiCamelOilV1DeleteExpiredAccountsRes + +## Properties + +| Name | Type | Description | Notes | +| ---------------- | ---------- | -------------- | --------------------------------- | +| **message** | **string** | 操作结果信息 | [optional] [default to undefined] | +| **deletedCount** | **number** | 删除的账号数量 | [optional] [default to undefined] | + +## Example + +```typescript +import { KamiApiCamelOilV1DeleteExpiredAccountsRes } from './api'; + +const instance: KamiApiCamelOilV1DeleteExpiredAccountsRes = { + message, + deletedCount +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/api/generated/models/index.ts b/src/api/generated/models/index.ts index 7f0257d..3fd4104 100644 --- a/src/api/generated/models/index.ts +++ b/src/api/generated/models/index.ts @@ -17,6 +17,7 @@ export * from './kami-api-camel-oil-v1-check-account-req'; export * from './kami-api-camel-oil-v1-check-account-res'; export * from './kami-api-camel-oil-v1-create-token-req'; export * from './kami-api-camel-oil-v1-create-token-res'; +export * from './kami-api-camel-oil-v1-delete-expired-accounts-res'; export * from './kami-api-camel-oil-v1-delete-token-req'; export * from './kami-api-camel-oil-v1-delete-token-res'; export * from './kami-api-camel-oil-v1-denomination-setting'; diff --git a/src/api/generated/models/kami-api-camel-oil-v1-create-token-req.ts b/src/api/generated/models/kami-api-camel-oil-v1-create-token-req.ts index 6a32f4f..0c00811 100644 --- a/src/api/generated/models/kami-api-camel-oil-v1-create-token-req.ts +++ b/src/api/generated/models/kami-api-camel-oil-v1-create-token-req.ts @@ -20,7 +20,7 @@ export interface KamiApiCamelOilV1CreateTokenReq { /** * 绑定的手机号 */ - phone: string; + phone?: string; /** * 备注 */ diff --git a/src/api/generated/models/kami-api-camel-oil-v1-delete-expired-accounts-res.ts b/src/api/generated/models/kami-api-camel-oil-v1-delete-expired-accounts-res.ts new file mode 100644 index 0000000..40ae73c --- /dev/null +++ b/src/api/generated/models/kami-api-camel-oil-v1-delete-expired-accounts-res.ts @@ -0,0 +1,24 @@ +/* tslint:disable */ + +/** + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export interface KamiApiCamelOilV1DeleteExpiredAccountsRes { + /** + * 操作结果信息 + */ + message?: string; + /** + * 删除的账号数量 + */ + deletedCount?: number; +} diff --git a/src/router/routes/modules/camel-oil.ts b/src/router/routes/modules/camel-oil.ts index 8f652a5..2f4c1d9 100644 --- a/src/router/routes/modules/camel-oil.ts +++ b/src/router/routes/modules/camel-oil.ts @@ -12,19 +12,18 @@ const CamelOilMgt: AppRouteRecordRaw = { meta: { locale: '骆驼加油', requiresAuth: true, - icon: 'icon-car', + icon: 'icon-safe', order: 5 }, children: [ { path: 'token', - name: 'camelOilToken', + name: 'camelOilTokenUser', component: () => import('@/views/camel-oil-info/token/index.vue'), meta: { locale: 'Token管理', requiresAuth: true, - roles: ['*'], - activeMenu: '/camel-oil/token' + roles: ['*'] } } ] diff --git a/src/views/camel-oil-info/account/index.vue b/src/views/camel-oil-info/account/index.vue index b3c4a29..70340f0 100644 --- a/src/views/camel-oil-info/account/index.vue +++ b/src/views/camel-oil-info/account/index.vue @@ -61,6 +61,17 @@ + + + 删除过期Token +