diff --git a/src/apis/apiKey.ts b/src/apis/apiKey.ts new file mode 100644 index 0000000..0d00fb4 --- /dev/null +++ b/src/apis/apiKey.ts @@ -0,0 +1,10 @@ +import { get, post } from '@/utlis/request'; + +// 获取当前账号下可查看的 API Key 应用列表 +export const getApiKeyList = (): Promise => get('/dapi/downapps.dspy'); + +// 申请新的 API Key +export const applyApiKey = (data: D): Promise => post('/dapi/apply_apikey.dspy', data); + +// 根据应用 id 查看对应的 API Key 详情 +export const getApiKeyDetail = (id:D ): Promise => get('/dapi/get_apikey.dspy', id); \ No newline at end of file diff --git a/src/assets/css/iconfont/demo_index.html b/src/assets/css/iconfont/demo_index.html index 95b351e..3cf9511 100644 --- a/src/assets/css/iconfont/demo_index.html +++ b/src/assets/css/iconfont/demo_index.html @@ -54,6 +54,12 @@
    +
  • + +
    apikey
    +
    
    +
  • +
  • 消费记录
    @@ -180,9 +186,9 @@
    @font-face {
       font-family: 'iconfont';
    -  src: url('iconfont.woff2?t=1775638325739') format('woff2'),
    -       url('iconfont.woff?t=1775638325739') format('woff'),
    -       url('iconfont.ttf?t=1775638325739') format('truetype');
    +  src: url('iconfont.woff2?t=1776308634739') format('woff2'),
    +       url('iconfont.woff?t=1776308634739') format('woff'),
    +       url('iconfont.ttf?t=1776308634739') format('truetype');
     }
     

    第二步:定义使用 iconfont 的样式

    @@ -208,6 +214,15 @@
      +
    • + +
      + apikey +
      +
      .icon-apikey +
      +
    • +
    • @@ -397,6 +412,14 @@
        +
      • + +
        apikey
        +
        #icon-apikey
        +
      • +
      + +
      + + + + + + +
      @@ -126,6 +145,9 @@ const handleSelect = (index: string) => { case 'material-square': router.push('/material-square'); break; + case 'apikey': + router.push('/apikey'); + break; default: break; } @@ -152,7 +174,10 @@ const updateActiveIndex = () => { activeIndex.value = 'digital-human'; } else if (path.includes('/material-square')) { activeIndex.value = 'material-square'; - } else { + } else if (path.includes('/apikey')) { + activeIndex.value = 'apikey'; + } + else { activeIndex.value = 'index'; } } diff --git a/src/router/index.ts b/src/router/index.ts index 892f256..e56f02f 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -83,8 +83,13 @@ const router = createRouter({ path: '/material-square', name: 'material-square', component: () => import('@/views/videoGenerate/videoGenerate.vue') + }, + // apikey + { + path: '/apikey', + name: 'apikey', + component: () => import('@/views/APiKey/apikey.vue') } - ] }, diff --git a/src/types/apiKey.ts b/src/types/apiKey.ts new file mode 100644 index 0000000..166b45d --- /dev/null +++ b/src/types/apiKey.ts @@ -0,0 +1,32 @@ +export interface ListApikeys { + id: string; + name: null; + apikeyid: string; +}; + +export interface ListResult { + apikeys: Array< ListApikeys >; +}; + +export interface AddParams { + appname: string; + description: string; +} +export interface AddResult{ + status: string; +} + +interface DetailData { + id: string; + name: null; + description: null; + secretkey: string; + allowedips: null; + orgid: string; + apikey: string; +}; + +export interface DetailResult { + status: string; + data: DetailData; +}; diff --git a/src/utlis/request.ts b/src/utlis/request.ts index ff87f03..e34062d 100644 --- a/src/utlis/request.ts +++ b/src/utlis/request.ts @@ -22,11 +22,11 @@ const shouldIncludeCredentials = (url?: string, baseURL?: string) => { axios.interceptors.request.use( function (config) { // console.log('=== 请求拦截器 ===') - console.log('请求 URL:', config) + // console.log('请求 URL:', config) // console.log('请求方法:', config.method) // console.log('请求参数 (params):', config.params) // console.log('请求数据 (data):', config.data) - console.log('请求头:', config.headers) + // console.log('请求头:', config.headers) config.baseURL = apiBaseURL config.withCredentials = shouldIncludeCredentials(config.url, config.baseURL) return config diff --git a/src/views/APiKey/apikey.vue b/src/views/APiKey/apikey.vue new file mode 100644 index 0000000..ed9e8a0 --- /dev/null +++ b/src/views/APiKey/apikey.vue @@ -0,0 +1,332 @@ + + + + + + \ No newline at end of file diff --git a/src/views/login/Login.vue b/src/views/login/Login.vue index 47b2360..c42ad62 100644 --- a/src/views/login/Login.vue +++ b/src/views/login/Login.vue @@ -9,7 +9,7 @@ loop playsinline crossorigin="anonymous" - src="../../assets/images/login.mp4" + src="../../assets/images/idfile.mp4" >