diff --git a/Yi.Ai.Vue3/src/api/pay/index.ts b/Yi.Ai.Vue3/src/api/pay/index.ts index 0df74551..38bd8f10 100644 --- a/Yi.Ai.Vue3/src/api/pay/index.ts +++ b/Yi.Ai.Vue3/src/api/pay/index.ts @@ -1,5 +1,28 @@ import { get, post } from '@/utils/request.ts'; +// 商品分类类型 +export enum GoodsCategoryType { + Vip = 'Vip', + PremiumPackage = 'PremiumPackage', +} + +// 商品信息接口 +export interface GoodsItem { + goodsName: string; // 商品名称 + originalPrice: number; // 原价 + referencePrice: number; // 参考价格(月均价) + goodsPrice: number; // 实际价格 + discountAmount: number | null; // 折扣金额 + goodsCategory: string; // 商品分类 + remark: string | null; // 备注(标签) + discountDescription: string | null; // 折扣描述 +} + +// 获取商品列表 +export function getGoodsList(categoryType: GoodsCategoryType) { + return get(`/pay/GoodsList?GoodsCategoryType=${categoryType}`).json(); +} + // 创建订单并发起支付 export function createOrder(params: any) { return post(`/pay/Order`, params).json(); diff --git a/Yi.Ai.Vue3/src/api/user/index.ts b/Yi.Ai.Vue3/src/api/user/index.ts index 94acb94c..2c1db1b7 100644 --- a/Yi.Ai.Vue3/src/api/user/index.ts +++ b/Yi.Ai.Vue3/src/api/user/index.ts @@ -22,5 +22,5 @@ export function getWechatAuth(data: any) { // 获取尊享服务Token包额度 export function getPremiumTokenPackage() { - return get('/account/premium/token-package').json(); + return get('/usage-statistics/premium-token-usage').json(); } diff --git a/Yi.Ai.Vue3/src/components/ModelSelect/index.vue b/Yi.Ai.Vue3/src/components/ModelSelect/index.vue index ddf314d3..ba21dd92 100644 --- a/Yi.Ai.Vue3/src/components/ModelSelect/index.vue +++ b/Yi.Ai.Vue3/src/components/ModelSelect/index.vue @@ -87,13 +87,13 @@ function getModelStyleClass(item: GetSessionListVO) { const name = item.modelName.toLowerCase(); // 规则3:彩色流光 - if (name.includes('claude') || name.includes('platinum')) { - return ` - text-transparent bg-clip-text - bg-[linear-gradient(45deg,#ff0000,#ff8000,#ffff00,#00ff00,#00ffff,#0000ff,#8000ff,#ff0080)] - bg-[length:400%_400%] animate-gradientFlow - `; - } + // if (name.includes('claude') || name.includes('platinum')) { + // return ` + // text-transparent bg-clip-text + // bg-[linear-gradient(45deg,#ff0000,#ff8000,#ffff00,#00ff00,#00ffff,#0000ff,#8000ff,#ff0080)] + // bg-[length:400%_400%] animate-gradientFlow + // `; + // } // 规则2:普通灰 if (name.includes('deepseek-r1')) { diff --git a/Yi.Ai.Vue3/src/components/ProductPackage/index.vue b/Yi.Ai.Vue3/src/components/ProductPackage/index.vue index ae1eacb1..edaa429f 100644 --- a/Yi.Ai.Vue3/src/components/ProductPackage/index.vue +++ b/Yi.Ai.Vue3/src/components/ProductPackage/index.vue @@ -1,40 +1,49 @@