diff --git a/b/cntoai/model_management_customer_search.dspy b/b/cntoai/model_management_customer_search.dspy index f8e066d..1876e1f 100644 --- a/b/cntoai/model_management_customer_search.dspy +++ b/b/cntoai/model_management_customer_search.dspy @@ -8,7 +8,7 @@ _CUSTOMER_MODEL_COLUMNS = """ id, llmid, provider, model_name, display_name, model_type, context_length, input_token_price, output_token_price, cache_hit_input_price, billing_method, billing_unit, - capabilities, limitations, highlights, description, sort_order + capabilities, limitations, highlights, description, sort_order,is_active, experience """ 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文档 - @@ -354,6 +359,11 @@ export default { return provider ? provider.slice(0, 1) : 'M'; }, + // experience 为 1 才允许模型体验,0 时按钮置灰禁用。 + isModelExperienceEnabled(model) { + return Number(model && model.experience) === 1; + }, + // TOKEN 市集卡片点击:进入模型详情页。 goModelDetail(model) { this.cacheTokenMarketModel(model); @@ -387,6 +397,7 @@ export default { // TOKEN 市集体验按钮:进入模型体验页。 goModelExperience(model) { + if (!this.isModelExperienceEnabled(model)) return; if (!this.loginState) { this.$message.warning('请先登录再进行体验哦') return; @@ -1418,6 +1429,20 @@ export default { border-color: #a5b4fc; background: #eef2ff; } + + &.disabled, + &:disabled { + color: #98a2b3; + cursor: not-allowed; + background: #f3f4f6; + border-color: #e5e7eb; + + &:hover { + color: #98a2b3; + background: #f3f4f6; + border-color: #e5e7eb; + } + } } }