-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 提交
+
+
+
+
+
+
+
diff --git a/f/web-kboss/src/views/modelManagement/ApiDocument.vue b/f/web-kboss/src/views/modelManagement/ApiDocument.vue
new file mode 100644
index 0000000..85a394e
--- /dev/null
+++ b/f/web-kboss/src/views/modelManagement/ApiDocument.vue
@@ -0,0 +1,302 @@
+
+
-
@@ -177,12 +147,10 @@
import {
getCodeAPI, // 获取验证码API
getLogoAPI, // 获取Logo信息API
- // getPasswordCodeAPI, // 重置密码API
logintypeAPI, // 登录类型API
loginUserAPI, // 用户登录API
reqGetAppidAPI, // 获取微信AppID API
reqGetCodeAPI, // 获取微信授权码API
- // retrieveCodeAPI, // 获取重置密码验证码API,
} from "@/api/login";
import store from "@/store";
@@ -196,10 +164,11 @@ import { Message } from "element-ui";
import router, { resetRouter } from "@/router";
import { reqNewHomeFestival } from "@/api/newHome";
import { getHomePath } from '@/views/setting/tools'
+import ForgotPasswordDialog from './components/ForgotPasswordDialog.vue'
export default {
name: "indexNew",
- components: { BeforeLogin, promotionalInvitationCode },
+ components: { BeforeLogin, promotionalInvitationCode, ForgotPasswordDialog },
data() {
return {
// 微信登录相关
@@ -231,6 +200,7 @@ export default {
// 对话框和加载状态
loading: false, // 登录按钮加载状态
+ forgotPasswordVisible: false, // 忘记密码弹窗显示状态
// 登录表单数据
loginForm: {
@@ -258,21 +228,6 @@ export default {
capsTooltip: false,
passwordType: "password", // 密码输入框类型:password或text
- // 重置密码相关暂时注释
- // form: {
- // username: "", // 用户名
- // vcode: "", // 验证码
- // password: "", // 新密码
- // id: "", // 用户ID
- // codeid: "", // 验证码ID
- // },
-
- // forms: {
- // username: [{ required: true, message: "请输入姓名", trigger: "blur" }],
- // password: [{ required: true, message: "请输入密码", trigger: "blur" }],
- // vcode: [{ required: true, message: "请输入验证码", trigger: "blur" }],
- // },
-
// Logo显示控制
isLogo: false,
isShowSaleProduct: false, // 是否显示销售产品
@@ -374,20 +329,6 @@ export default {
}, 300);
},
- // 重置密码相关方法暂时注释
- // debouncedGetCode1: function () {
- // if (this.isDisabled1 || this.isGettingCode1) return;
- //
- // this.isGettingCode1 = true;
- //
- // clearTimeout(this.debounceTimer1);
- //
- // this.debounceTimer1 = setTimeout(() => {
- // this.getCode1();
- // this.isGettingCode1 = false;
- // }, 300);
- // },
-
// 跳转到百度产品页面
goBaidu(listUrl, url) {
this.$store.commit('setRedirectUrl', url)
@@ -464,6 +405,7 @@ export default {
sessionStorage.setItem("username", user.username); // 存储用户名
// 处理用户角色
+ const routeRoles = admin !== 1 ? response.roles : ['admin'];
if (admin !== 1) {
sessionStorage.setItem("juese", response.roles[0]);
sessionStorage.setItem("jueseNew", response.roles);
@@ -474,14 +416,18 @@ export default {
sessionStorage.setItem("juese", "admin");
sessionStorage.setItem("jueseNew", "admin");
}
+ sessionStorage.setItem("roles", JSON.stringify(routeRoles));
// 生成路由并跳转
+ resetRouter();
+ this.$store.commit("permission/RESET_ROUTES");
const accessRoutes = await this.$store.dispatch("permission/generateRoutes", {
user: user.username,
auths: data,
admin: admin || "",
+ orgType: org_type,
+ roles: routeRoles,
});
- resetRouter();
console.log("生成的路径是", accessRoutes);
router.addRoutes(accessRoutes);
@@ -742,54 +688,6 @@ export default {
});
},
- // getCode1() {
- // if (!this.form.username || !/^1[3-9]\d{9}$/.test(this.form.username)) {
- // this.$message.error('请输入正确的手机号');
- // return;
- // }
- //
- // retrieveCodeAPI({
- // mobile: this.form.username,
- // action_type: 'login'
- // }).then((res) => {
- // if (res.status == true) {
- // this.form.id = res.userid;
- // this.form.codeid = res.codeid;
- // let that = this;
- // this.time_count1 = 59;
- // this.isDisabled1 = true;
- // this.SendCode_text1 = "重新发送" + this.time_count1 + "s";
- //
- // if (!that.timer1) {
- // that.timer1 = setInterval(() => {
- // if (that.time_count1 > 0) {
- // that.time_count1--;
- // that.SendCode_text1 = "重新发送" + that.time_count1 + "s";
- // } else {
- // that.SendCode_text1 = "获取验证码";
- // clearInterval(that.timer1);
- // that.timer1 = null;
- // this.isDisabled1 = false;
- // that.time_count1 = 60;
- // }
- // }, 1000);
- // }
- // this.$message({
- // message: "验证码已发送,请注意查收。",
- // type: "success",
- // });
- // } else {
- // this.$message({
- // message: res.msg,
- // type: "error",
- // });
- // }
- // }).catch(error => {
- // this.isGettingCode1 = false;
- // this.$message.error('验证码获取失败');
- // });
- // },
-
// 标签页点击事件
handleClick(tab, event) {
console.log(tab, event);
@@ -927,50 +825,12 @@ export default {
});
},
- // resetPassword() {
- // this.dialogVisible = true;
- // this.$refs.loginForm.resetFields();
- // },
-
// 跳转到注册页面
handleRegister() {
console.log("注册按钮被点击了")
this.$router.push({ name: "registrationPage" });
},
- // cancelReset() {
- // this.dialogVisible = false;
- // this.$refs.form.resetFields();
- // },
-
- // handleSubmit() {
- // let parmas = {
- // id: this.form.id,
- // password: this.form.password,
- // codeid: this.form.codeid,
- // vcode: this.form.vcode,
- // };
- // getPasswordCodeAPI(parmas).then((res) => {
- // if (res.status == true) {
- // this.$message({
- // message: "密码重置成功",
- // type: "success",
- // });
- // this.isDisabled1 = false;
- // this.dialogVisible = false;
- // this.SendCode_text1 = "获取验证码";
- // clearInterval(this.timer1);
- // this.timer1 = null;
- // this.time_count1 = 60;
- // this.$refs.form.resetFields();
- // } else {
- // this.$message({
- // message: res.msg,
- // type: "error",
- // });
- // }
- // });
- // },
}
}
@@ -1158,10 +1018,22 @@ $dark_gray: #889aa4;
.two-btn {
width: 300px;
display: flex;
- justify-content: center;
+ justify-content: space-between;
+ align-items: center;
margin-top: 0;
}
+.forgot-password {
+ margin-bottom: 30px;
+ color: #409eff;
+ cursor: pointer;
+ font-size: 14px;
+
+ &:hover {
+ text-decoration: underline;
+ }
+}
+
.go-register {
font-size: 14px;
color: #333;
diff --git a/f/web-kboss/src/views/modelManagement/AddModelDialog.vue b/f/web-kboss/src/views/modelManagement/AddModelDialog.vue
new file mode 100644
index 0000000..c5174fe
--- /dev/null
+++ b/f/web-kboss/src/views/modelManagement/AddModelDialog.vue
@@ -0,0 +1,422 @@
+
+
-
- NCMatch
- 算力供需对接平台
+
+
+
+
+
+
+
+
+
+
+
- 好用还省钱,Token 就上开元云
+石景山OPC公共服务平台
++ 为 OPC 而生,极致性价比一站式模型平台 +
+ +
+
-
-
-
+
+
+
+
-
+
+
-
-
- 匠造臻品 精奢惠选 -
Token市集
+汇聚海量精品模型,以更低成本畅享极致 AI 体验
+ +
+
+
+
+
+
+
+
+ 创镜工坊
+以文筑境,以镜生画,全场景 AI 影像创作
+ +
+
+
+
+
+
+ 云枢基座
+深耕基础云服务,筑牢 AI 平台数字根基
+
+
-
-
+ -->
@@ -91,6 +173,7 @@
import Vue from 'vue'
import { reqPublishProductSearchFirstPage, reqEnterpriseAuditInfoSearch, reqHomepageProductCategory, reqGetSupplyAndDemandSquareList } from '@/api/ncmatch'
import { mapGetters, mapState } from "vuex";
+import { gotoYuanJingAPI } from '@/api/gotoYuanJing'
export default Vue.extend({
name: "mainPage",
@@ -153,6 +236,59 @@ export default Vue.extend({
this.showTip = false
this.$router.push('/customer/approve')
},
+ async goCreativeWorkshop() {
+ if (!this.loginState) {
+ this.$message.warning('请先登录哦~')
+ return
+ }
+
+ const yuanJingWindow = window.open('', '_blank')
+
+ try {
+ const res = await gotoYuanJingAPI({
+ user_id: sessionStorage.getItem('userId')
+ })
+
+ const deerer = this.getYuanJingAuthorization(res)
+
+ if (!deerer) {
+ if (yuanJingWindow) {
+ yuanJingWindow.close()
+ }
+ this.$message.error((res && res.msg) || '获取元境授权参数失败')
+ return
+ }
+
+ const loginUrl = `https://ai.opencomputing.cn/#/getCookie?deerer=${encodeURIComponent(deerer)}`
+
+ if (yuanJingWindow) {
+ yuanJingWindow.location.href = loginUrl
+ } else {
+ window.location.href = loginUrl
+ }
+ } catch (error) {
+ if (yuanJingWindow) {
+ yuanJingWindow.close()
+ }
+ this.$message.error('跳转元境失败,请稍后重试')
+ }
+ },
+ getYuanJingAuthorization(res) {
+ if (!res) {
+ return ''
+ }
+
+ if (typeof res === 'string') {
+ return res
+ }
+
+ const data = res.data || res
+ if (typeof data === 'string') {
+ return data
+ }
+
+ return data.Authorization || data.authorization || data.token || data.header || data.value || ''
+ },
handleCurrentChange(val) {
this.current_page = val
this.initData()
@@ -265,221 +401,579 @@ export default Vue.extend({
diff --git a/f/web-kboss/src/views/login/indexNew.vue b/f/web-kboss/src/views/login/indexNew.vue
index 1daa2a0..0dad6ee 100644
--- a/f/web-kboss/src/views/login/indexNew.vue
+++ b/f/web-kboss/src/views/login/indexNew.vue
@@ -110,7 +110,7 @@
-
+ 忘记密码?
@@ -119,37 +119,7 @@
-
-
+
+
+ 基本信息
+
+
+
+ 模型价格
+
+
+
+ 模型介绍
+
+
+
+
+ API文档
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/f/web-kboss/src/views/modelManagement/Experience.vue b/f/web-kboss/src/views/modelManagement/Experience.vue
new file mode 100644
index 0000000..672c519
--- /dev/null
+++ b/f/web-kboss/src/views/modelManagement/Experience.vue
@@ -0,0 +1,1152 @@
+
+ {{ apiDoc.model_name }} API 文档
+{{ heroDescription }}
+ +1. 接口地址
+统一使用 HTTPS 请求,所有接口都需要携带平台签发的 API Key。
+{{ apiUrlText }}
+ 2. 请求示例
+{{ apiDoc.curl_code || requestExample }}
+ 3. Python 示例
+{{ apiDoc.python_code || pythonExample }}
+ 4. 错误码
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/f/web-kboss/src/views/modelManagement/ModelDetail.vue b/f/web-kboss/src/views/modelManagement/ModelDetail.vue
new file mode 100644
index 0000000..717148f
--- /dev/null
+++ b/f/web-kboss/src/views/modelManagement/ModelDetail.vue
@@ -0,0 +1,522 @@
+
+
+
+
+ AI 模型助手
+在这里进行问答、推理、方案生成和能力验证。
+
+
+
+
+ 你好,我是模型体验助手
+可以输入问题体验模型效果,也可以点击下方示例快速开始。
+
+
+
+
+
+
+
+
+
+
+
+ {{ message.role === 'assistant' ? '模型助手' : '我' }}
+
+ 模型正在思考
+
+
+ {{ message.content }}
+
+
+
+
+
+ Token市集
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/f/web-kboss/src/views/modelManagement/modelManagement.vue b/f/web-kboss/src/views/modelManagement/modelManagement.vue
new file mode 100644
index 0000000..2da7a2c
--- /dev/null
+++ b/f/web-kboss/src/views/modelManagement/modelManagement.vue
@@ -0,0 +1,580 @@
+
+
+ 控制台
+ 用户后台
+
+
+
+
+
+
+
+ {{ modelInfo.tag }}
+
+ {{ modelInfo.name }}
+
+ {{ item }}
+
+ {{ modelInfo.description }}
+
+
+ 版本介绍
++ 模型ID:{{ modelInfo.modelId }} + +
+{{ modelInfo.versionDescription }}
+
+ API文档
+ 体验
+
+
+
+
+ 模型能力
+
+ {{ item.label }}
+ {{ item.value }}
+
+
+
+ 模型限制
+
+ {{ item.label }}
+ {{ item.value }}
+
+ 服务价格
+
+
+
+ 模型输入
+ {{ modelInfo.inputPrice }}
+ {{ modelInfo.priceUnit }}
+
+
+ 模型输出
+ {{ modelInfo.outputPrice }}
+ {{ modelInfo.priceUnit }}
+
+
+ 缓存命中输入
+ {{ modelInfo.cacheHitInputPrice }}
+ {{ modelInfo.priceUnit }}
+
+ 1. 模型介绍
+{{ modelInfo.longDescription }}
+ +2. 模型亮点
+
+
+
+
+ {{ item.label }}
+
+ {{ item.value }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ getModelId(scope.row) }}
+
+
+
+
+
+ {{ getModelDisplayName(scope.row) }}
+
+
+
+
+
+
+
+ {{ getModelType(scope.row) }}
+
+ -
+
+
+
+
+
+ {{ getProvider(scope.row) }}
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.billing_method || '-' }}
+
+
+
+
+
+
+
+ {{ getUpdateTime(scope.row) }}
+
+
+
+
+
+
+ {{ getListingStatusText(scope.row.listing_status) }}
+
+
+
+
+
+
+
+ 置顶
+ 下移
+
+
+
+
+
+
+ 详情
+
+ 编辑
+ 上架
+
+
+ 下架
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/f/web-kboss/src/views/operation/operationReport/index.vue b/f/web-kboss/src/views/operation/operationReport/index.vue
new file mode 100644
index 0000000..688f2c8
--- /dev/null
+++ b/f/web-kboss/src/views/operation/operationReport/index.vue
@@ -0,0 +1,197 @@
+
+
+ 刷新
+
+
+
+
+ 模型列表
+展示模型基础信息,支持上下架、排序、编辑等操作。
+
+
+
+ 输入价格: {{ formatPriceText(getInputPrice(scope.row)) }}
+输出价格: {{ formatPriceText(getOutputPrice(scope.row)) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.modelName }}
+
+
+
+
+
+
+
+
+
+ {{ scope.row.paymentMethod }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/f/web-kboss/src/views/product/allProduct/index.vue b/f/web-kboss/src/views/product/allProduct/index.vue
index 220e37a..1a7e311 100644
--- a/f/web-kboss/src/views/product/allProduct/index.vue
+++ b/f/web-kboss/src/views/product/allProduct/index.vue
@@ -1,6 +1,6 @@
+ 导出报表
+
+
+
+
+ 运营报表
+模型使用与计费数据概览
+
+
+
+
+
+ 活跃用户
+ {{ statCards.activeUsers }}
+
+
+ Token消耗
+ {{ statCards.tokenUsage }}
+
+
+ Tokens总费用
+ ¥{{ statCards.totalFee }}
+
+
+
+
-
+
@@ -16,7 +16,59 @@
- {{ category.firTitle }}
+ {{ category.firTitle }}
+
+
+
+
+
+
+
+
+ 模型筛选
+
+
+
+
+
+
+
+
+ 提供方
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+ {{ product.display_name || product.model_name }}
+ + +
+ {{ product.model_type || '-' }}
+ {{ product.billing_method || '-' }}
+ {{ product.provider || '-' }}
+ {{ product.llmid }}
+
+
+ 输入 ¥{{ formatTokenPrice(product.input_token_price) }}/千Token
+ 输出 ¥{{ formatTokenPrice(product.output_token_price) }}/千Token
+
+
+ {{ getProviderInitial(product.provider) }}
+ {{ product.provider || '-' }}
+
+
+
+
+
+
-
@@ -82,6 +193,7 @@
+
+
diff --git a/kgadget/src/kgadget.py b/kgadget/src/kgadget.py
index f40200a..644314d 100644
--- a/kgadget/src/kgadget.py
+++ b/kgadget/src/kgadget.py
@@ -40,6 +40,7 @@ from appPublic.jsonConfig import getConfig
from appPublic.i18n import getI18N
from appPublic.timeUtils import strdate_add
from appPublic.rc4 import unpassword, password
+from appPublic.aes import aes_decode_b64, aes_encode_b64
from ahserver.filedownload import path_encode
@@ -217,6 +218,8 @@ if __name__ == '__main__':
g.KaiYyEnDecryptUtil = KaiYyEnDecryptUtil
g.async_post = async_post
g.jsonpath = jsonpath
+ g.aes_decode_b64 = aes_decode_b64
+ g.aes_encode_b64 = aes_encode_b64
i18n = getI18N(path=workdir)
info(f'gadget version={__version__}')
+
-
-
{{ product.name }}
+
+
+
+
+
{{ product.discount }}折
@@ -64,16 +169,22 @@
{{ getProductDescription(product) }}
{{ product.name }}
+ {{ product.type }} +
- {{ product.type }}
-
+ 稳定服务
+
-
📦
- 暂无产品数据
+
+
+
+
+ {{ searchKeyword ? '没有匹配的产品' : '暂无产品数据' }}
+ 可以切换分类或调整搜索关键词后再试。