From c4ecdd21e430b6c95bb15731999cafc1bdb410d8 Mon Sep 17 00:00:00 2001
From: hrx <18603305412@163.com>
Date: Mon, 25 May 2026 16:38:31 +0800
Subject: [PATCH 1/2] updata
---
f/web-kboss/src/api/model/model.js | 9 ++++
f/web-kboss/src/views/login/indexNew.vue | 17 +++++---
f/web-kboss/src/views/tokenUsage/index.vue | 48 +++++++++-------------
3 files changed, 40 insertions(+), 34 deletions(-)
diff --git a/f/web-kboss/src/api/model/model.js b/f/web-kboss/src/api/model/model.js
index ba45ad7..c6287ad 100644
--- a/f/web-kboss/src/api/model/model.js
+++ b/f/web-kboss/src/api/model/model.js
@@ -112,4 +112,13 @@ export const reqModelExperienceDeleteHistory = (params = {}) => {
method: 'get',
params
})
+}
+
+// token用量查询
+export const reqTokenUsage = (params = {}) => {
+ return request({
+ url: '/cntoai/model_usage_user_report.dspy',
+ method: 'post',
+ params
+ })
}
\ No newline at end of file
diff --git a/f/web-kboss/src/views/login/indexNew.vue b/f/web-kboss/src/views/login/indexNew.vue
index 4137ea6..92890a7 100644
--- a/f/web-kboss/src/views/login/indexNew.vue
+++ b/f/web-kboss/src/views/login/indexNew.vue
@@ -129,7 +129,7 @@
忘记密码?
没有账号?去注册
@@ -1018,8 +1018,7 @@ $dark_gray: #889aa4;
/* 统一表单项目样式 + 边距 */
::v-deep .el-form-item {
- margin-bottom: 15px !important;
- /* 给错误提示预留空间 */
+ margin-bottom: 30px !important;
}
/* 统一输入框外框 */
@@ -1103,7 +1102,7 @@ $dark_gray: #889aa4;
height: 42px;
line-height: 42px;
font-size: 16px;
- margin-top: 0 !important;
+ margin-top: 4px !important;
margin-bottom: 12px !important;
}
@@ -1117,10 +1116,14 @@ $dark_gray: #889aa4;
}
.forgot-password {
- margin-bottom: 12px;
+ display: inline-flex;
+ align-items: center;
+ height: 22px;
+ margin-bottom: 0;
color: #409eff;
cursor: pointer;
font-size: 14px;
+ line-height: 22px;
&:hover {
text-decoration: underline;
@@ -1128,8 +1131,12 @@ $dark_gray: #889aa4;
}
.go-register {
+ display: inline-flex;
+ align-items: center;
+ height: 22px;
font-size: 14px;
color: #333;
+ line-height: 22px;
.go-register-btn {
color: #409eff;
diff --git a/f/web-kboss/src/views/tokenUsage/index.vue b/f/web-kboss/src/views/tokenUsage/index.vue
index 0c9d73d..bf7ea06 100644
--- a/f/web-kboss/src/views/tokenUsage/index.vue
+++ b/f/web-kboss/src/views/tokenUsage/index.vue
@@ -7,7 +7,7 @@
-
Token用量
+ Token用量
查看模型调用 Token 消耗、调用次数和费用趋势。
@@ -53,6 +53,8 @@
From f1d3cd833fbd79416f2faf184338590f1f020891 Mon Sep 17 00:00:00 2001
From: hrx <18603305412@163.com>
Date: Mon, 25 May 2026 18:04:10 +0800
Subject: [PATCH 2/2] updata
---
.../src/views/modelManagement/ApiDocument.vue | 11 ++-----
.../src/views/modelManagement/Experience.vue | 6 +---
.../src/views/modelManagement/ModelDetail.vue | 31 ++++++++++++++-----
.../src/views/product/allProduct/index.vue | 27 +++++++++++++++-
4 files changed, 52 insertions(+), 23 deletions(-)
diff --git a/f/web-kboss/src/views/modelManagement/ApiDocument.vue b/f/web-kboss/src/views/modelManagement/ApiDocument.vue
index 94d87fa..61c629c 100644
--- a/f/web-kboss/src/views/modelManagement/ApiDocument.vue
+++ b/f/web-kboss/src/views/modelManagement/ApiDocument.vue
@@ -181,14 +181,6 @@ print(response.json())`
return match ? match[0] : ''
},
goBack() {
- if (this.$route.query.from === 'tokenMarket') {
- if (this.$route.query.single === '1') {
- this.$router.push({ path: '/tokenMarket', query: { category: 'TOKEN市集', single: '1' } })
- return
- }
- this.$router.push({ path: '/product', query: { category: 'TOKEN市集' } })
- return
- }
this.$router.back()
}
}
@@ -224,7 +216,8 @@ print(response.json())`
}
.doc-container {
- width: 920px;
+ width: 1180px;
+ max-width: calc(100vw - 48px);
margin: 28px auto 0;
}
diff --git a/f/web-kboss/src/views/modelManagement/Experience.vue b/f/web-kboss/src/views/modelManagement/Experience.vue
index 8ab93db..c387f3a 100644
--- a/f/web-kboss/src/views/modelManagement/Experience.vue
+++ b/f/web-kboss/src/views/modelManagement/Experience.vue
@@ -192,12 +192,8 @@ export default {
this.clearStreamFlushTimer()
},
methods: {
- // 返回上一页;从 TOKEN 市集进入时固定回到 TOKEN 市集分类。
+ // 返回浏览器历史记录中的上一页。
goBack() {
- if (this.$route.query.from === 'tokenMarket') {
- this.$router.push({ path: '/product', query: { category: 'TOKEN市集' } })
- return
- }
this.$router.back()
},
diff --git a/f/web-kboss/src/views/modelManagement/ModelDetail.vue b/f/web-kboss/src/views/modelManagement/ModelDetail.vue
index ba24d6c..fa871a2 100644
--- a/f/web-kboss/src/views/modelManagement/ModelDetail.vue
+++ b/f/web-kboss/src/views/modelManagement/ModelDetail.vue
@@ -41,7 +41,14 @@
API文档
- 体验
+
+ 体验
+
@@ -124,7 +131,8 @@ export default {
inputPrice: '0.0021',
outputPrice: '0.0084',
cacheHitInputPrice: '',
- priceUnit: '元/千Tokens'
+ priceUnit: '元/千Tokens',
+ experience: 1
},
capabilityList: [
{ label: '接口类型', value: '/v2/chat/completions' },
@@ -147,6 +155,11 @@ export default {
]
}
},
+ computed: {
+ canExperience() {
+ return Number(this.modelInfo.experience) === 1
+ }
+ },
created() {
this.loadModelDetail()
},
@@ -180,7 +193,8 @@ export default {
inputPrice: this.formatPrice(model.input_token_price),
outputPrice: this.formatPrice(model.output_token_price),
cacheHitInputPrice: this.formatPrice(model.cache_hit_input_price),
- priceUnit: this.getPriceUnit(model.billing_unit)
+ priceUnit: this.getPriceUnit(model.billing_unit),
+ experience: this.normalizeExperience(model.experience)
}
this.capabilityList = this.parseInfoList(model.capabilities, [
{ label: '接口类型', value: '-' },
@@ -271,6 +285,9 @@ export default {
hasValue(value) {
return value !== undefined && value !== null && value !== '' && value !== '-'
},
+ normalizeExperience(value) {
+ return Number(value) === 1 ? 1 : 0
+ },
goTokenMarket() {
if (this.$route.query.single === '1') {
this.$router.push({ path: '/tokenMarket', query: { category: 'TOKEN市集', single: '1' } })
@@ -279,10 +296,6 @@ export default {
this.$router.push({ path: '/product', query: { category: 'TOKEN市集' } })
},
goBack() {
- if (this.$route.query.from === 'tokenMarket') {
- this.goTokenMarket()
- return
- }
this.$router.back()
},
buildModelQuery() {
@@ -298,6 +311,7 @@ export default {
this.$router.push({ name: 'modelApiDocument', query: this.buildModelQuery() })
},
goExperience() {
+ if (!this.canExperience) return
this.$router.push({ name: 'modelExperience', query: this.buildModelQuery() })
}
}
@@ -354,7 +368,8 @@ export default {
}
.detail-container {
- width: 920px;
+ width: 1180px;
+ max-width: calc(100vw - 48px);
margin: 28px auto 0;
}
diff --git a/f/web-kboss/src/views/product/allProduct/index.vue b/f/web-kboss/src/views/product/allProduct/index.vue
index d7c76fe..675af6b 100644
--- a/f/web-kboss/src/views/product/allProduct/index.vue
+++ b/f/web-kboss/src/views/product/allProduct/index.vue
@@ -139,7 +139,12 @@
API文档
-