From 1cf286b057555201674b1afd0638bda627f494bd Mon Sep 17 00:00:00 2001 From: JJBoy <291077997@qq.com> Date: Wed, 8 May 2024 21:12:24 +0800 Subject: [PATCH 01/86] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E5=95=86=E5=9F=8E=E7=AE=A1=E7=90=86=E9=A6=96=E9=A1=B5=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=95=B0=E6=8D=AE=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 78dd2fa38a2d040c1c97d70cababc4f9265ac705) --- src/utils/index.ts | 2 +- src/views/mall/home/components/TradeTrendCard.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index 2590bce8..2c2fbbd0 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -313,7 +313,7 @@ export const fenToYuan = (price: string | number): string => { */ export const calculateRelativeRate = (value?: number, reference?: number) => { // 防止除0 - if (!reference) return 0 + if (!reference || reference == 0) return 0 return ((100 * ((value || 0) - reference)) / reference).toFixed(0) } diff --git a/src/views/mall/home/components/TradeTrendCard.vue b/src/views/mall/home/components/TradeTrendCard.vue index a8cab828..7930e212 100644 --- a/src/views/mall/home/components/TradeTrendCard.vue +++ b/src/views/mall/home/components/TradeTrendCard.vue @@ -186,7 +186,7 @@ const getOrderCountTrendComparison = async ( dates.push(item.value.date) if (series.length === 2) { series[0].data.push(fenToYuan(item?.value?.orderPayPrice || 0)) // 当前金额 - series[1].data.push(fenToYuan(item?.value?.orderPayCount || 0)) // 当前数量 + series[1].data.push(item?.value?.orderPayCount || 0) // 当前数量 } else { series[0].data.push(fenToYuan(item?.reference?.orderPayPrice || 0)) // 对照金额 series[1].data.push(fenToYuan(item?.value?.orderPayPrice || 0)) // 当前金额 From 1ce3343578a1a164e240605bca3ac2a7d3db55e3 Mon Sep 17 00:00:00 2001 From: DevDengChao <2325690622@qq.com> Date: Thu, 9 May 2024 15:02:45 +0800 Subject: [PATCH 02/86] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A1=AB?= =?UTF-8?q?=E5=86=99=E5=95=86=E5=93=81=E5=B1=9E=E6=80=A7=E5=90=8E=E6=8C=89?= =?UTF-8?q?=E5=9B=9E=E8=BD=A6=E9=94=AE=E5=AF=BC=E8=87=B4=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mall/product/spu/form/ProductPropertyAddForm.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/mall/product/spu/form/ProductPropertyAddForm.vue b/src/views/mall/product/spu/form/ProductPropertyAddForm.vue index 9a8eee00..15c5a8d5 100644 --- a/src/views/mall/product/spu/form/ProductPropertyAddForm.vue +++ b/src/views/mall/product/spu/form/ProductPropertyAddForm.vue @@ -7,6 +7,7 @@ :model="formData" :rules="formRules" label-width="80px" + @keydown.enter.prevent="submitForm" > From 79f011fe172f9692307857d65f91df79c57291aa Mon Sep 17 00:00:00 2001 From: DevDengChao <2325690622@qq.com> Date: Fri, 10 May 2024 10:24:57 +0800 Subject: [PATCH 03/86] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AE=9E?= =?UTF-8?q?=E4=BE=8B=E8=AE=A2=E5=8D=95=E5=AE=8C=E6=88=90=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E5=90=8E=E8=B7=B3=E8=BD=AC=E5=88=B0=20404=20=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pay/demo/order/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/pay/demo/order/index.vue b/src/views/pay/demo/order/index.vue index 374464eb..32f0de13 100644 --- a/src/views/pay/demo/order/index.vue +++ b/src/views/pay/demo/order/index.vue @@ -147,7 +147,7 @@ const handlePay = (row: any) => { name: 'PayCashier', query: { id: row.payOrderId, - returnUrl: encodeURIComponent('/pay/demo-order?id=' + row.id) + returnUrl: encodeURIComponent('/pay/demo/order?id=' + row.id) } }) } From e1d2305ddde681cafde4a0ca27fd9db2159d4854 Mon Sep 17 00:00:00 2001 From: DevDengChao <2325690622@qq.com> Date: Sat, 11 May 2024 10:35:27 +0800 Subject: [PATCH 04/86] =?UTF-8?q?fix:=20=E8=A1=A5=E5=85=85=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=E7=9A=84=E5=BE=AE=E4=BF=A1=20Native=20=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E4=B8=8E=20WAP=20=E6=94=AF=E4=BB=98=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/constants.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/utils/constants.ts b/src/utils/constants.ts index f4d67b4e..cfa785b0 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -109,6 +109,14 @@ export const PayChannelEnum = { code: 'wx_app', name: '微信 APP 支付' }, + WX_NATIVE: { + code: 'wx_native', + name: '微信 Native 支付' + }, + WX_WAP: { + code: 'wx_wap', + name: '微信 WAP 网站支付' + }, WX_BAR: { code: 'wx_bar', name: '微信条码支付' From 0275cb6dd754b08995f624dbb9af7e8870255d08 Mon Sep 17 00:00:00 2001 From: DevDengChao <2325690622@qq.com> Date: Sat, 11 May 2024 10:39:18 +0800 Subject: [PATCH 05/86] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20el-upload=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=8F=90=E7=A4=BA=20http-request=20=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/components/channel/WeixinChannelForm.vue | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/views/pay/app/components/channel/WeixinChannelForm.vue b/src/views/pay/app/components/channel/WeixinChannelForm.vue index 34e92c69..cfd46bc0 100644 --- a/src/views/pay/app/components/channel/WeixinChannelForm.vue +++ b/src/views/pay/app/components/channel/WeixinChannelForm.vue @@ -80,7 +80,8 @@ :http-request="keyContentUpload" > - 点击上传 + + 点击上传 @@ -120,7 +121,8 @@ :http-request="privateKeyContentUpload" > - 点击上传 + + 点击上传 @@ -148,7 +150,8 @@ :http-request="privateCertContentUpload" > - 点击上传 + + 点击上传 @@ -310,7 +313,7 @@ const pemFileBeforeUpload = (file) => { /** * 读取 apiclient_key.pem 到 privateKeyContent 字段 */ -const privateKeyContentUpload = (event) => { +const privateKeyContentUpload = async (event) => { const readFile = new FileReader() readFile.onload = (e: any) => { formData.value.config.privateKeyContent = e.target.result @@ -321,7 +324,7 @@ const privateKeyContentUpload = (event) => { /** * 读取 apiclient_cert.pem 到 privateCertContent 字段 */ -const privateCertContentUpload = (event) => { +const privateCertContentUpload = async (event) => { const readFile = new FileReader() readFile.onload = (e: any) => { formData.value.config.privateCertContent = e.target.result @@ -332,7 +335,7 @@ const privateCertContentUpload = (event) => { /** * 读取 apiclient_cert.p12 到 keyContent 字段 */ -const keyContentUpload = (event) => { +const keyContentUpload = async (event) => { const readFile = new FileReader() readFile.onload = (e: any) => { formData.value.config.keyContent = e.target.result.split(',')[1] From 7883e3161d01b6dad8c7901941088ebeb2e7a927 Mon Sep 17 00:00:00 2001 From: DevDengChao <2325690622@qq.com> Date: Sat, 11 May 2024 10:59:26 +0800 Subject: [PATCH 06/86] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=8E=9F=E7=94=9F=E6=94=AF=E4=BB=98=E4=B8=8E=E7=BD=91?= =?UTF-8?q?=E7=AB=99=E6=94=AF=E4=BB=98=E6=97=A0=E6=B3=95=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pay/app/index.vue | 199 +++++++++--------------------------- 1 file changed, 46 insertions(+), 153 deletions(-) diff --git a/src/views/pay/app/index.vue b/src/views/pay/app/index.vue index 2f4a9c1e..6b60d9b1 100644 --- a/src/views/pay/app/index.vue +++ b/src/views/pay/app/index.vue @@ -45,10 +45,17 @@ /> - 搜索 - 重置 + + + 搜索 + + + + 重置 + - 新增 + + 新增 @@ -70,12 +77,17 @@ - + - - - - - - - - - - - - diff --git a/src/views/mall/promotion/kefu/components/KefuChatBox.vue b/src/views/mall/promotion/kefu/components/KefuChatBox.vue new file mode 100644 index 00000000..394c8424 --- /dev/null +++ b/src/views/mall/promotion/kefu/components/KefuChatBox.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/src/views/mall/promotion/kefu/components/constants.ts b/src/views/mall/promotion/kefu/components/constants.ts new file mode 100644 index 00000000..015b46a7 --- /dev/null +++ b/src/views/mall/promotion/kefu/components/constants.ts @@ -0,0 +1,14 @@ +export const KeFuMessageContentTypeEnum = { + TEXT: 1, // 文本消息 + IMAGE: 2, // 图片消息 + VOICE: 3, // 语音消息 + VIDEO: 4, // 视频消息 + SYSTEM: 5, // 系统消息 + // ========== 商城特殊消息 ========== + PRODUCT: 10, // 商品消息 + ORDER: 11 // 订单消息" +} +export const UserTypeEnum = { + MEMBER: 1, // 会员 面向 c 端,普通用户 + ADMIN: 2 // 管理员 面向 b 端,管理后台 +} diff --git a/src/views/mall/promotion/kefu/components/emoji.ts b/src/views/mall/promotion/kefu/components/emoji.ts new file mode 100644 index 00000000..6ccd0cff --- /dev/null +++ b/src/views/mall/promotion/kefu/components/emoji.ts @@ -0,0 +1,91 @@ +export const emojiList = [ + { name: '[笑掉牙]', file: 'xiaodiaoya.png' }, + { name: '[可爱]', file: 'keai.png' }, + { name: '[冷酷]', file: 'lengku.png' }, + { name: '[闭嘴]', file: 'bizui.png' }, + { name: '[生气]', file: 'shengqi.png' }, + { name: '[惊恐]', file: 'jingkong.png' }, + { name: '[瞌睡]', file: 'keshui.png' }, + { name: '[大笑]', file: 'daxiao.png' }, + { name: '[爱心]', file: 'aixin.png' }, + { name: '[坏笑]', file: 'huaixiao.png' }, + { name: '[飞吻]', file: 'feiwen.png' }, + { name: '[疑问]', file: 'yiwen.png' }, + { name: '[开心]', file: 'kaixin.png' }, + { name: '[发呆]', file: 'fadai.png' }, + { name: '[流泪]', file: 'liulei.png' }, + { name: '[汗颜]', file: 'hanyan.png' }, + { name: '[惊悚]', file: 'jingshu.png' }, + { name: '[困~]', file: 'kun.png' }, + { name: '[心碎]', file: 'xinsui.png' }, + { name: '[天使]', file: 'tianshi.png' }, + { name: '[晕]', file: 'yun.png' }, + { name: '[啊]', file: 'a.png' }, + { name: '[愤怒]', file: 'fennu.png' }, + { name: '[睡着]', file: 'shuizhuo.png' }, + { name: '[面无表情]', file: 'mianwubiaoqing.png' }, + { name: '[难过]', file: 'nanguo.png' }, + { name: '[犯困]', file: 'fankun.png' }, + { name: '[好吃]', file: 'haochi.png' }, + { name: '[呕吐]', file: 'outu.png' }, + { name: '[龇牙]', file: 'ziya.png' }, + { name: '[懵比]', file: 'mengbi.png' }, + { name: '[白眼]', file: 'baiyan.png' }, + { name: '[饿死]', file: 'esi.png' }, + { name: '[凶]', file: 'xiong.png' }, + { name: '[感冒]', file: 'ganmao.png' }, + { name: '[流汗]', file: 'liuhan.png' }, + { name: '[笑哭]', file: 'xiaoku.png' }, + { name: '[流口水]', file: 'liukoushui.png' }, + { name: '[尴尬]', file: 'ganga.png' }, + { name: '[惊讶]', file: 'jingya.png' }, + { name: '[大惊]', file: 'dajing.png' }, + { name: '[不好意思]', file: 'buhaoyisi.png' }, + { name: '[大闹]', file: 'danao.png' }, + { name: '[不可思议]', file: 'bukesiyi.png' }, + { name: '[爱你]', file: 'aini.png' }, + { name: '[红心]', file: 'hongxin.png' }, + { name: '[点赞]', file: 'dianzan.png' }, + { name: '[恶魔]', file: 'emo.png' } +] + +export const emojiPage = {} +emojiList.forEach((item, index) => { + if (!emojiPage[Math.floor(index / 30) + 1]) { + emojiPage[Math.floor(index / 30) + 1] = [] + } + emojiPage[Math.floor(index / 30) + 1].push(item) +}) + +// 后端上传地址 +const staticUrl = import.meta.env.VITE_STATIC_URL + +// 处理表情 +export function replaceEmoji(data: string) { + let newData = data + if (typeof newData !== 'object') { + const reg = /\[(.+?)\]/g // [] 中括号 + const zhEmojiName = newData.match(reg) + if (zhEmojiName) { + zhEmojiName.forEach((item) => { + const emojiFile = selEmojiFile(item) + newData = newData.replace( + item, + `` + ) + }) + } + } + return newData +} + +function selEmojiFile(name: string) { + for (const index in emojiList) { + if (emojiList[index].name === name) { + return emojiList[index].file + } + } + return false +} diff --git a/src/views/mall/promotion/kefu/components/index.ts b/src/views/mall/promotion/kefu/components/index.ts new file mode 100644 index 00000000..afd2fd76 --- /dev/null +++ b/src/views/mall/promotion/kefu/components/index.ts @@ -0,0 +1,5 @@ +import KeFuConversationBox from './KeFuConversationBox.vue' +import KeFuChatBox from './KefuChatBox.vue' +import * as Constants from './constants' + +export { KeFuConversationBox, KeFuChatBox, Constants } diff --git a/src/views/mall/promotion/kefu/index.vue b/src/views/mall/promotion/kefu/index.vue new file mode 100644 index 00000000..52c6f2ba --- /dev/null +++ b/src/views/mall/promotion/kefu/index.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/types/env.d.ts b/types/env.d.ts index 057b5268..63d9c3ee 100644 --- a/types/env.d.ts +++ b/types/env.d.ts @@ -19,6 +19,7 @@ interface ImportMetaEnv { readonly VITE_UPLOAD_URL: string readonly VITE_API_URL: string readonly VITE_BASE_PATH: string + readonly VITE_STATIC_URL: string readonly VITE_DROP_DEBUGGER: string readonly VITE_DROP_CONSOLE: string readonly VITE_SOURCEMAP: string From d3b4063b94b159dc8d2256fd11c5fc409e79d7c1 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Mon, 1 Jul 2024 16:15:27 +0800 Subject: [PATCH 46/86] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91?= =?UTF-8?q?=EF=BC=9Amall=20=E5=AE=A2=E6=9C=8D=E6=B6=88=E6=81=AF=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/promotion/kefu/conversation/index.ts | 2 +- src/api/mall/promotion/kefu/message/index.ts | 70 ++++++++ .../promotion/kefu/components/KeFuChatBox.vue | 167 ++++++++++++++++++ .../kefu/components/KeFuConversationBox.vue | 8 +- .../promotion/kefu/components/KefuChatBox.vue | 77 -------- .../promotion/kefu/components/constants.ts | 4 - .../mall/promotion/kefu/components/index.ts | 2 +- src/views/mall/promotion/kefu/index.vue | 7 +- 8 files changed, 249 insertions(+), 88 deletions(-) create mode 100644 src/api/mall/promotion/kefu/message/index.ts create mode 100644 src/views/mall/promotion/kefu/components/KeFuChatBox.vue delete mode 100644 src/views/mall/promotion/kefu/components/KefuChatBox.vue diff --git a/src/api/mall/promotion/kefu/conversation/index.ts b/src/api/mall/promotion/kefu/conversation/index.ts index 17432b35..96a23706 100644 --- a/src/api/mall/promotion/kefu/conversation/index.ts +++ b/src/api/mall/promotion/kefu/conversation/index.ts @@ -16,7 +16,7 @@ export interface KeFuConversationRespVO { /** * 会话所属用户昵称 */ - nickname: string + userNickname: string /** * 最后聊天时间 */ diff --git a/src/api/mall/promotion/kefu/message/index.ts b/src/api/mall/promotion/kefu/message/index.ts new file mode 100644 index 00000000..3408f1e0 --- /dev/null +++ b/src/api/mall/promotion/kefu/message/index.ts @@ -0,0 +1,70 @@ +import request from '@/config/axios' + +export interface KeFuMessageRespVO { + /** + * 编号 + */ + id: number + /** + * 会话编号 + */ + conversationId: number + /** + * 发送人编号 + */ + senderId: number + /** + * 发送人头像 + */ + senderAvatar: string + /** + * 发送人类型 + */ + senderType: number + /** + * 接收人编号 + */ + receiverId: number + /** + * 接收人类型 + */ + receiverType: number + /** + * 消息类型 + */ + contentType: number + /** + * 消息 + */ + content: string + /** + * 是否已读 + */ + readStatus: boolean + /** + * 创建时间 + */ + createTime: Date +} + +// 客服会话 API +export const KeFuMessageApi = { + // 发送客服消息 + sendKeFuMessage: async (data: any) => { + return await request.put({ + url: '/promotion/kefu-message/send', + data + }) + }, + // 更新客服消息已读状态 + updateKeFuMessageReadStatus: async (data: any) => { + return await request.put({ + url: '/promotion/kefu-message/update-read-status', + data + }) + }, + // 获得消息分页数据 + getKeFuMessagePage: async (params: any) => { + return await request.get({ url: '/promotion/kefu-message/page', params }) + } +} diff --git a/src/views/mall/promotion/kefu/components/KeFuChatBox.vue b/src/views/mall/promotion/kefu/components/KeFuChatBox.vue new file mode 100644 index 00000000..ee41564b --- /dev/null +++ b/src/views/mall/promotion/kefu/components/KeFuChatBox.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/mall/promotion/kefu/components/KeFuConversationBox.vue b/src/views/mall/promotion/kefu/components/KeFuConversationBox.vue index c94c01c3..595475be 100644 --- a/src/views/mall/promotion/kefu/components/KeFuConversationBox.vue +++ b/src/views/mall/promotion/kefu/components/KeFuConversationBox.vue @@ -10,7 +10,7 @@
-
{{ item.nickname }}
+
{{ item.userNickname }}
{ userId: 283, userAvatar: 'https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKMezSxtOImrC9lbhwHiazYwck3xwrEcO7VJfG6WQo260whaeVNoByE5RreiaGsGfOMlIiaDhSaA991w/132', - nickname: '辉辉鸭' + i, + userNickname: '辉辉鸭' + i, lastMessageTime: getNowDateTime(), lastMessageContent: '[爱心][爱心]你好哇', lastMessageContentType: 1, @@ -54,12 +54,12 @@ const getConversationList = async () => { } defineExpose({ getConversationList }) const emits = defineEmits<{ - (e: 'change', v: number): void + (e: 'change', v: KeFuConversationRespVO): void }>() // 打开右侧消息 const openRightMessage = (item: KeFuConversationRespVO, index: number) => { activeConversationIndex.value = index - emits('change', item.id) + emits('change', item) } diff --git a/src/views/mall/promotion/kefu/components/KefuChatBox.vue b/src/views/mall/promotion/kefu/components/KefuChatBox.vue deleted file mode 100644 index 394c8424..00000000 --- a/src/views/mall/promotion/kefu/components/KefuChatBox.vue +++ /dev/null @@ -1,77 +0,0 @@ - - - - - diff --git a/src/views/mall/promotion/kefu/components/constants.ts b/src/views/mall/promotion/kefu/components/constants.ts index 015b46a7..f8599160 100644 --- a/src/views/mall/promotion/kefu/components/constants.ts +++ b/src/views/mall/promotion/kefu/components/constants.ts @@ -8,7 +8,3 @@ export const KeFuMessageContentTypeEnum = { PRODUCT: 10, // 商品消息 ORDER: 11 // 订单消息" } -export const UserTypeEnum = { - MEMBER: 1, // 会员 面向 c 端,普通用户 - ADMIN: 2 // 管理员 面向 b 端,管理后台 -} diff --git a/src/views/mall/promotion/kefu/components/index.ts b/src/views/mall/promotion/kefu/components/index.ts index afd2fd76..fcf6bd5b 100644 --- a/src/views/mall/promotion/kefu/components/index.ts +++ b/src/views/mall/promotion/kefu/components/index.ts @@ -1,5 +1,5 @@ import KeFuConversationBox from './KeFuConversationBox.vue' -import KeFuChatBox from './KefuChatBox.vue' +import KeFuChatBox from './KeFuChatBox.vue' import * as Constants from './constants' export { KeFuConversationBox, KeFuChatBox, Constants } diff --git a/src/views/mall/promotion/kefu/index.vue b/src/views/mall/promotion/kefu/index.vue index 52c6f2ba..1204b8dc 100644 --- a/src/views/mall/promotion/kefu/index.vue +++ b/src/views/mall/promotion/kefu/index.vue @@ -15,12 +15,17 @@ diff --git a/src/views/ai/image/manager/index.vue b/src/views/ai/image/manager/index.vue index f0e94faa..84403f35 100644 --- a/src/views/ai/image/manager/index.vue +++ b/src/views/ai/image/manager/index.vue @@ -121,7 +121,7 @@ :active-value="true" :inactive-value="false" @change="handleUpdatePublicStatusChange(scope.row)" - :disabled="scope.row.status !== 20" + :disabled="scope.row.status !== AiImageStatusEnum.SUCCESS" /> @@ -165,6 +165,7 @@ import { getIntDictOptions, DICT_TYPE, getStrDictOptions, getBoolDictOptions } f import { dateFormatter } from '@/utils/formatTime' import { ImageApi, ImageVO } from '@/api/ai/image' import * as UserApi from '@/api/system/user' +import { AiImageStatusEnum } from '@/views/ai/utils/constants' /** AI 绘画 列表 */ defineOptions({ name: 'AiImageManager' }) diff --git a/src/views/ai/music/manager/index.vue b/src/views/ai/music/manager/index.vue index ec3c12b0..342f8dd8 100644 --- a/src/views/ai/music/manager/index.vue +++ b/src/views/ai/music/manager/index.vue @@ -158,7 +158,7 @@ :active-value="true" :inactive-value="false" @change="handleUpdatePublicStatusChange(scope.row)" - :disabled="scope.row.status !== 20" + :disabled="scope.row.status !== AiMusicStatusEnum.SUCCESS" /> @@ -199,6 +199,7 @@ import { getIntDictOptions, getBoolDictOptions, DICT_TYPE } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' import { MusicApi, MusicVO } from '@/api/ai/music' import * as UserApi from '@/api/system/user' +import { AiMusicStatusEnum } from '@/views/ai/utils/constants' /** AI 音乐 列表 */ defineOptions({ name: 'AiMusicManager' }) diff --git a/src/views/ai/utils/constants.ts b/src/views/ai/utils/constants.ts new file mode 100644 index 00000000..2e7b9ac5 --- /dev/null +++ b/src/views/ai/utils/constants.ts @@ -0,0 +1,41 @@ +/** + * Created by 芋道源码 + * + * AI 枚举类 + * + * 问题:为什么不放在 src/utils/constants.ts 呢? + * 回答:主要 AI 是可选模块,考虑到独立、解耦,所以放在了 /views/ai/utils/constants.ts + */ + +/** + * AI 平台的枚举 + */ +export const AiPlatformEnum = { + OPENAI: 'OpenAI', + Ollama: 'Ollama', + YI_YAN: 'YiYan', // 百度 + XING_HUO: 'XingHuo', // 讯飞 + QIAN_WEN: 'QianWen', // 阿里 + GEMIR: 'gemir', // 谷歌 + STABLE_DIFFUSION: 'StableDiffusion', // Stability AI + MIDJOURNEY: 'Midjourney', // Midjourney + SUNO: 'Suno' // Suno AI +} + +/** + * AI 图像生成状态的枚举 + */ +export const AiImageStatusEnum = { + IN_PROGRESS: 10, // 进行中 + SUCCESS: 20, // 已完成 + FAIL: 30 // 已失败 +} + +/** + * AI 音乐生成状态的枚举 + */ +export const AiMusicStatusEnum = { + IN_PROGRESS: 10, // 进行中 + SUCCESS: 20, // 已完成 + FAIL: 30 // 已失败 +} From b0b62eb2506d80726f22505a8109f5d4a28ee87c Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 3 Jul 2024 17:51:58 +0800 Subject: [PATCH 54/86] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=EF=BC=9Amall=20=E5=AE=A2=E6=9C=8D=E8=A1=A8=E6=83=85=E5=8C=85?= =?UTF-8?q?=E5=AD=98=E6=94=BE=E5=88=B0=E6=9C=AC=E5=9C=B0=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.local | 4 - .../kefu/components/EmojiSelectPopover.vue | 3 +- .../promotion/kefu/components/KeFuChatBox.vue | 4 +- .../kefu/components/KeFuConversationBox.vue | 3 +- .../mall/promotion/kefu/components/emoji.ts | 101 ++++++++++-------- .../promotion/kefu/components/images/a.png | Bin 0 -> 4237 bytes .../promotion/kefu/components/images/aini.png | Bin 0 -> 2309 bytes .../kefu/components/images/aixin.png | Bin 0 -> 4431 bytes .../kefu/components/images/baiyan.png | Bin 0 -> 3792 bytes .../kefu/components/images/bizui.png | Bin 0 -> 3768 bytes .../kefu/components/images/buhaoyisi.png | Bin 0 -> 4443 bytes .../kefu/components/images/bukesiyi.png | Bin 0 -> 3979 bytes .../kefu/components/images/dajing.png | Bin 0 -> 4298 bytes .../kefu/components/images/danao.png | Bin 0 -> 4568 bytes .../kefu/components/images/daxiao.png | Bin 0 -> 4382 bytes .../kefu/components/images/dianzan.png | Bin 0 -> 1878 bytes .../promotion/kefu/components/images/emo.png | Bin 0 -> 4956 bytes .../promotion/kefu/components/images/esi.png | Bin 0 -> 3873 bytes .../kefu/components/images/fadai.png | Bin 0 -> 3823 bytes .../kefu/components/images/fankun.png | Bin 0 -> 4236 bytes .../kefu/components/images/feiwen.png | Bin 0 -> 6873 bytes .../kefu/components/images/fennu.png | Bin 0 -> 4590 bytes .../kefu/components/images/ganga.png | Bin 0 -> 4396 bytes .../kefu/components/images/ganmao.png | Bin 0 -> 4727 bytes .../kefu/components/images/hanyan.png | Bin 0 -> 2966 bytes .../kefu/components/images/haochi.png | Bin 0 -> 3794 bytes .../kefu/components/images/hongxin.png | Bin 0 -> 3844 bytes .../kefu/components/images/huaixiao.png | Bin 0 -> 4234 bytes .../kefu/components/images/jingkong.png | Bin 0 -> 4272 bytes .../kefu/components/images/jingshu.png | Bin 0 -> 4702 bytes .../kefu/components/images/jingya.png | Bin 0 -> 4167 bytes .../kefu/components/images/kaixin.png | Bin 0 -> 4008 bytes .../promotion/kefu/components/images/keai.png | Bin 0 -> 4060 bytes .../kefu/components/images/keshui.png | Bin 0 -> 3975 bytes .../promotion/kefu/components/images/kun.png | Bin 0 -> 4460 bytes .../kefu/components/images/lengku.png | Bin 0 -> 4630 bytes .../kefu/components/images/liuhan.png | Bin 0 -> 3823 bytes .../kefu/components/images/liukoushui.png | Bin 0 -> 4072 bytes .../kefu/components/images/liulei.png | Bin 0 -> 4246 bytes .../kefu/components/images/mengbi.png | Bin 0 -> 3345 bytes .../kefu/components/images/mianwubiaoqing.png | Bin 0 -> 2928 bytes .../kefu/components/images/nanguo.png | Bin 0 -> 3882 bytes .../promotion/kefu/components/images/outu.png | Bin 0 -> 4403 bytes .../kefu/components/images/shengqi.png | Bin 0 -> 4629 bytes .../kefu/components/images/shuizhuo.png | Bin 0 -> 4641 bytes .../kefu/components/images/tianshi.png | Bin 0 -> 4192 bytes .../kefu/components/images/xiaodiaoya.png | Bin 0 -> 4326 bytes .../kefu/components/images/xiaoku.png | Bin 0 -> 4725 bytes .../kefu/components/images/xinsui.png | Bin 0 -> 4377 bytes .../kefu/components/images/xiong.png | Bin 0 -> 4525 bytes .../kefu/components/images/yiwen.png | Bin 0 -> 4615 bytes .../promotion/kefu/components/images/yun.png | Bin 0 -> 5991 bytes .../promotion/kefu/components/images/ziya.png | Bin 0 -> 4126 bytes 53 files changed, 62 insertions(+), 53 deletions(-) create mode 100644 src/views/mall/promotion/kefu/components/images/a.png create mode 100644 src/views/mall/promotion/kefu/components/images/aini.png create mode 100644 src/views/mall/promotion/kefu/components/images/aixin.png create mode 100644 src/views/mall/promotion/kefu/components/images/baiyan.png create mode 100644 src/views/mall/promotion/kefu/components/images/bizui.png create mode 100644 src/views/mall/promotion/kefu/components/images/buhaoyisi.png create mode 100644 src/views/mall/promotion/kefu/components/images/bukesiyi.png create mode 100644 src/views/mall/promotion/kefu/components/images/dajing.png create mode 100644 src/views/mall/promotion/kefu/components/images/danao.png create mode 100644 src/views/mall/promotion/kefu/components/images/daxiao.png create mode 100644 src/views/mall/promotion/kefu/components/images/dianzan.png create mode 100644 src/views/mall/promotion/kefu/components/images/emo.png create mode 100644 src/views/mall/promotion/kefu/components/images/esi.png create mode 100644 src/views/mall/promotion/kefu/components/images/fadai.png create mode 100644 src/views/mall/promotion/kefu/components/images/fankun.png create mode 100644 src/views/mall/promotion/kefu/components/images/feiwen.png create mode 100644 src/views/mall/promotion/kefu/components/images/fennu.png create mode 100644 src/views/mall/promotion/kefu/components/images/ganga.png create mode 100644 src/views/mall/promotion/kefu/components/images/ganmao.png create mode 100644 src/views/mall/promotion/kefu/components/images/hanyan.png create mode 100644 src/views/mall/promotion/kefu/components/images/haochi.png create mode 100644 src/views/mall/promotion/kefu/components/images/hongxin.png create mode 100644 src/views/mall/promotion/kefu/components/images/huaixiao.png create mode 100644 src/views/mall/promotion/kefu/components/images/jingkong.png create mode 100644 src/views/mall/promotion/kefu/components/images/jingshu.png create mode 100644 src/views/mall/promotion/kefu/components/images/jingya.png create mode 100644 src/views/mall/promotion/kefu/components/images/kaixin.png create mode 100644 src/views/mall/promotion/kefu/components/images/keai.png create mode 100644 src/views/mall/promotion/kefu/components/images/keshui.png create mode 100644 src/views/mall/promotion/kefu/components/images/kun.png create mode 100644 src/views/mall/promotion/kefu/components/images/lengku.png create mode 100644 src/views/mall/promotion/kefu/components/images/liuhan.png create mode 100644 src/views/mall/promotion/kefu/components/images/liukoushui.png create mode 100644 src/views/mall/promotion/kefu/components/images/liulei.png create mode 100644 src/views/mall/promotion/kefu/components/images/mengbi.png create mode 100644 src/views/mall/promotion/kefu/components/images/mianwubiaoqing.png create mode 100644 src/views/mall/promotion/kefu/components/images/nanguo.png create mode 100644 src/views/mall/promotion/kefu/components/images/outu.png create mode 100644 src/views/mall/promotion/kefu/components/images/shengqi.png create mode 100644 src/views/mall/promotion/kefu/components/images/shuizhuo.png create mode 100644 src/views/mall/promotion/kefu/components/images/tianshi.png create mode 100644 src/views/mall/promotion/kefu/components/images/xiaodiaoya.png create mode 100644 src/views/mall/promotion/kefu/components/images/xiaoku.png create mode 100644 src/views/mall/promotion/kefu/components/images/xinsui.png create mode 100644 src/views/mall/promotion/kefu/components/images/xiong.png create mode 100644 src/views/mall/promotion/kefu/components/images/yiwen.png create mode 100644 src/views/mall/promotion/kefu/components/images/yun.png create mode 100644 src/views/mall/promotion/kefu/components/images/ziya.png diff --git a/.env.local b/.env.local index 82a3f72a..005d2f0d 100644 --- a/.env.local +++ b/.env.local @@ -29,9 +29,5 @@ VITE_BASE_PATH=/ # 商城H5会员端域名 VITE_MALL_H5_DOMAIN='http://localhost:3000' -# TODO puhui999:这个可以不走 cdn 地址么? -# 客户端静态资源地址 空=默认使用服务端指定的CDN资源地址前缀 | local=本地 | http(s)://xxx.xxx=自定义静态资源地址前缀 -VITE_STATIC_URL = https://file.sheepjs.com - # 验证码的开关 VITE_APP_CAPTCHA_ENABLE=false diff --git a/src/views/mall/promotion/kefu/components/EmojiSelectPopover.vue b/src/views/mall/promotion/kefu/components/EmojiSelectPopover.vue index 03a963c6..4c777efb 100644 --- a/src/views/mall/promotion/kefu/components/EmojiSelectPopover.vue +++ b/src/views/mall/promotion/kefu/components/EmojiSelectPopover.vue @@ -26,8 +26,9 @@ diff --git a/src/views/mall/promotion/kefu/components/constants.ts b/src/views/mall/promotion/kefu/components/tools/constants.ts similarity index 100% rename from src/views/mall/promotion/kefu/components/constants.ts rename to src/views/mall/promotion/kefu/components/tools/constants.ts diff --git a/src/views/mall/promotion/kefu/components/emoji.ts b/src/views/mall/promotion/kefu/components/tools/emoji.ts similarity index 100% rename from src/views/mall/promotion/kefu/components/emoji.ts rename to src/views/mall/promotion/kefu/components/tools/emoji.ts From e89b274e3f66d8c0ac539b62e22f00d4577290e0 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Thu, 4 Jul 2024 15:41:15 +0800 Subject: [PATCH 66/86] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91?= =?UTF-8?q?=EF=BC=9Amall=20=E5=AE=A2=E6=9C=8D=E6=B6=88=E6=81=AF=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=8A=BD=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../promotion/kefu/components/KeFuChatBox.vue | 52 +++---------------- .../components/message/ImageMessageItem.vue | 40 ++++++++++++++ .../components/message/TextMessageItem.vue | 29 +++++++++++ 3 files changed, 76 insertions(+), 45 deletions(-) create mode 100644 src/views/mall/promotion/kefu/components/message/ImageMessageItem.vue create mode 100644 src/views/mall/promotion/kefu/components/message/TextMessageItem.vue diff --git a/src/views/mall/promotion/kefu/components/KeFuChatBox.vue b/src/views/mall/promotion/kefu/components/KeFuChatBox.vue index cba5869b..da25c9d9 100644 --- a/src/views/mall/promotion/kefu/components/KeFuChatBox.vue +++ b/src/views/mall/promotion/kefu/components/KeFuChatBox.vue @@ -19,49 +19,18 @@ class="flex mb-20px w-[100%]" >
- - + - +
@@ -94,14 +63,14 @@ import { KeFuMessageApi, KeFuMessageRespVO } from '@/api/mall/promotion/kefu/mes import { KeFuConversationRespVO } from '@/api/mall/promotion/kefu/conversation' import EmojiSelectPopover from './tools/EmojiSelectPopover.vue' import PictureSelectUpload from './tools/PictureSelectUpload.vue' -import { Emoji, useEmoji } from './tools/emoji' +import TextMessageItem from './message/TextMessageItem.vue' +import ImageMessageItem from './message/ImageMessageItem.vue' +import { Emoji } from './tools/emoji' import { KeFuMessageContentTypeEnum } from './tools/constants' import { isEmpty } from '@/utils/is' import { UserTypeEnum } from '@/utils/constants' -import { createImageViewer } from '@/components/ImageViewer' defineOptions({ name: 'KeFuMessageBox' }) -const { replaceEmoji } = useEmoji() const messageTool = useMessage() const message = ref('') // 消息 const messageList = ref([]) // 消息列表 @@ -175,13 +144,6 @@ const scrollToBottom = async () => { scrollbarRef.value!.setScrollTop(innerRef.value!.clientHeight) } -/** 图预览 */ -const imagePreview = (imgUrl: string) => { - createImageViewer({ - urlList: [imgUrl] - }) -} - // TODO puhui999: 轮训相关,功能完善后移除 onBeforeUnmount(() => { if (!poller.value) { diff --git a/src/views/mall/promotion/kefu/components/message/ImageMessageItem.vue b/src/views/mall/promotion/kefu/components/message/ImageMessageItem.vue new file mode 100644 index 00000000..7b890cf1 --- /dev/null +++ b/src/views/mall/promotion/kefu/components/message/ImageMessageItem.vue @@ -0,0 +1,40 @@ + + + diff --git a/src/views/mall/promotion/kefu/components/message/TextMessageItem.vue b/src/views/mall/promotion/kefu/components/message/TextMessageItem.vue new file mode 100644 index 00000000..fd4b6edb --- /dev/null +++ b/src/views/mall/promotion/kefu/components/message/TextMessageItem.vue @@ -0,0 +1,29 @@ + + + From b6ff9ede11107e22c27daf8f95f5939b30f8f2f3 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 4 Jul 2024 16:01:08 +0800 Subject: [PATCH 67/86] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo=E3=80=91h?= =?UTF-8?q?andle=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ai/image/ImageDetailDrawer.vue | 10 +++---- src/views/ai/image/ImageTask.vue | 20 +++++++------- src/views/ai/image/ImageTaskCard.vue | 20 +++++++------- src/views/ai/image/dall3/index.vue | 27 +++++++++---------- src/views/ai/image/index.vue | 14 +++++----- src/views/ai/image/midjourney/index.vue | 25 +++++++++-------- src/views/ai/image/stable-diffusion/index.vue | 2 +- 7 files changed, 57 insertions(+), 61 deletions(-) diff --git a/src/views/ai/image/ImageDetailDrawer.vue b/src/views/ai/image/ImageDetailDrawer.vue index fca087da..95ec146c 100644 --- a/src/views/ai/image/ImageDetailDrawer.vue +++ b/src/views/ai/image/ImageDetailDrawer.vue @@ -2,7 +2,7 @@ @@ -79,8 +79,8 @@ const props = defineProps({ }) /** 抽屉 - close */ -const handlerDrawerClose = async () => { - emits('handlerDrawerClose') +const handleDrawerClose = async () => { + emits('handleDrawerClose') } /** 获取 - 图片 detail */ @@ -90,7 +90,7 @@ const getImageDetail = async (id) => { } /** 任务 - detail */ -const handlerTaskDetail = async () => { +const handleTaskDetail = async () => { showDrawer.value = true } @@ -107,7 +107,7 @@ watch(id, async (newVal, oldVal) => { } }) // -const emits = defineEmits(['handlerDrawerClose']) +const emits = defineEmits(['handleDrawerClose']) // onMounted(async () => {}) diff --git a/src/views/ai/image/ImageTask.vue b/src/views/ai/image/ImageTask.vue index 9ddd7461..b4cbd253 100644 --- a/src/views/ai/image/ImageTask.vue +++ b/src/views/ai/image/ImageTask.vue @@ -6,8 +6,8 @@ v-for="image in imageList" :key="image" :image-detail="image" - @on-btn-click="handlerImageBtnClick" - @on-mj-btn-click="handlerImageMjBtnClick" + @on-btn-click="handleImageBtnClick" + @on-mj-btn-click="handleImageMjBtnClick" />
@@ -16,7 +16,7 @@ layout="prev, pager, next" :default-page-size="pageSize" :total="pageTotal" - @change="handlerPageChange" + @change="handlePageChange" />
@@ -24,7 +24,7 @@ diff --git a/src/views/ai/image/dall3/index.vue b/src/views/ai/image/dall3/index.vue index 69e767a3..1751eace 100644 --- a/src/views/ai/image/dall3/index.vue +++ b/src/views/ai/image/dall3/index.vue @@ -25,7 +25,7 @@ :type="(selectHotWord === hotWord ? 'primary' : 'default')" v-for="hotWord in hotWords" :key="hotWord" - @click="handlerHotWordClick(hotWord)" + @click="handleHotWordClick(hotWord)" > {{ hotWord }} @@ -45,7 +45,7 @@
{{model.name}}
@@ -64,7 +64,7 @@
{{imageStyle.name}}
@@ -78,7 +78,7 @@
+ @click="handleSizeClick(imageSize)">
@@ -91,7 +91,7 @@ size="large" round :loading="drawIn" - @click="handlerGenerateImage"> + @click="handleGenerateImage"> {{drawIn ? '生成中' : '生成内容'}}
@@ -183,10 +183,8 @@ const props = defineProps({}) // 定义 emits const emits = defineEmits(['onDrawStart', 'onDrawComplete']) -// TODO @fan:如果是简单注释,建议用 /** */,主要是现在项目里是这种风格哈,保持一致好点~ -// TODO @fan:handler 应该改成 handle 哈 /** 热词 - click */ -const handlerHotWordClick = async (hotWord: string) => { +const handleHotWordClick = async (hotWord: string) => { // 取消选中 if (selectHotWord.value == hotWord) { selectHotWord.value = '' @@ -199,22 +197,22 @@ const handlerHotWordClick = async (hotWord: string) => { } /** 模型 - click */ -const handlerModelClick = async (model: ImageModelVO) => { +const handleModelClick = async (model: ImageModelVO) => { selectModel.value = model.key } /** 样式 - click */ -const handlerStyleClick = async (imageStyle: ImageModelVO) => { +const handleStyleClick = async (imageStyle: ImageModelVO) => { selectImageStyle.value = imageStyle.key } /** size - click */ -const handlerSizeClick = async (imageSize: ImageSizeVO) => { +const handleSizeClick = async (imageSize: ImageSizeVO) => { selectImageSize.value = imageSize.key } /** 图片生产 */ -const handlerGenerateImage = async () => { +const handleGenerateImage = async () => { // 二次确认 await message.confirm(`确认生成内容?`) try { @@ -251,15 +249,14 @@ const settingValues = async (imageDetail: ImageVO) => { selectImageStyle.value = imageDetail.options?.style // const imageSize = imageSizeList.value.find(item => item.key === `${imageDetail.width}x${imageDetail.height}`) as ImageSizeVO - console.log('imageSize', imageSize) - await handlerSizeClick(imageSize) + await handleSizeClick(imageSize) } /** 暴露组件方法 */ defineExpose({ settingValues }) + From f70c8dcee2d95ca9cde2f0458e1329858581f7ce Mon Sep 17 00:00:00 2001 From: downeyin <853384781@qq.com> Date: Sat, 6 Jul 2024 23:12:40 +0800 Subject: [PATCH 83/86] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DCRM=E5=90=88?= =?UTF-8?q?=E5=90=8C=E8=AF=A6=E6=83=85=E4=B8=AD=E5=9B=A2=E9=98=9F=E6=88=90?= =?UTF-8?q?=E5=91=98=E6=9C=AA=E5=B1=95=E7=A4=BA=E6=9D=83=E9=99=90=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/crm/contract/detail/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/crm/contract/detail/index.vue b/src/views/crm/contract/detail/index.vue index 0829e100..1369a355 100644 --- a/src/views/crm/contract/detail/index.vue +++ b/src/views/crm/contract/detail/index.vue @@ -36,7 +36,7 @@ ref="permissionListRef" :biz-id="contract.id!" :biz-type="BizTypeEnum.CRM_CONTRACT" - :show-action="false" + :show-action="!permissionListRef?.isPool || false" @quit-team="close" /> From 6f86ea96da367ab3b25fe04dc74ef9cdd8df9454 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 7 Jul 2024 11:22:02 +0800 Subject: [PATCH 84/86] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91AI=EF=BC=9A=E6=8E=A5=E5=85=A5=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A=20AI=20=E5=A4=A7=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ai/utils/constants.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/views/ai/utils/constants.ts b/src/views/ai/utils/constants.ts index 2e7b9ac5..337cfda3 100644 --- a/src/views/ai/utils/constants.ts +++ b/src/views/ai/utils/constants.ts @@ -11,12 +11,13 @@ * AI 平台的枚举 */ export const AiPlatformEnum = { + TONG_YI: 'TongYi', // 阿里 + YI_YAN: 'YiYan', // 百度 + DEEP_SEEK: 'DeepSeek', // DeepSeek + ZHI_PU: 'ZhiPu', // 智谱 AI + XING_HUO: 'XingHuo', // 讯飞 OPENAI: 'OpenAI', Ollama: 'Ollama', - YI_YAN: 'YiYan', // 百度 - XING_HUO: 'XingHuo', // 讯飞 - QIAN_WEN: 'QianWen', // 阿里 - GEMIR: 'gemir', // 谷歌 STABLE_DIFFUSION: 'StableDiffusion', // Stability AI MIDJOURNEY: 'Midjourney', // Midjourney SUNO: 'Suno' // Suno AI From 2871961582634a5627922f81e8908274a6a2397f Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 7 Jul 2024 11:23:27 +0800 Subject: [PATCH 85/86] docs: update README --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 738fc6d1..f69861f0 100644 --- a/README.md +++ b/README.md @@ -54,16 +54,16 @@ 推荐 VS Code 开发,配合插件如下: -| 插件名 | 功能 | -|-------------------------------|--------------------------| -| Vue - Official | Vue与TypeScript支持 | -| unocss | unocss for vscode | -| Iconify IntelliSense | Iconify 预览和搜索 | -| i18n Ally | 国际化智能提示 | -| Stylelint | Css 格式化 | -| Prettier | 代码格式化 | -| ESLint | 脚本代码检查 | -| DotENV | env 文件高亮 | +| 插件名 | 功能 | +|-------------------------------|---------------------| +| Vue - Official | Vue 与 TypeScript 支持 | +| unocss | unocss for vscode | +| Iconify IntelliSense | Iconify 预览和搜索 | +| i18n Ally | 国际化智能提示 | +| Stylelint | Css 格式化 | +| Prettier | 代码格式化 | +| ESLint | 脚本代码检查 | +| DotENV | env 文件高亮 | ## 🔥 后端架构 From f3777f63348fbaaea21ae5c311a64b3d0b88e843 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 7 Jul 2024 17:22:16 +0800 Subject: [PATCH 86/86] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=91AI=EF=BC=9A=E5=B0=86=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E3=80=81=E8=81=8A=E5=A4=A9=E6=8C=AA=E5=88=B0=20index=20?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E4=B8=8B=EF=BC=8C=E6=9B=B4=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ai/chat/{ => index}/ChatEmpty.vue | 0 .../ai/chat/{ => index}/Conversation.vue | 2 +- src/views/ai/chat/{ => index}/Message.vue | 0 .../ai/chat/{ => index}/MessageLoading.vue | 0 .../ai/chat/{ => index}/MessageNewChat.vue | 0 .../components/ChatConversationUpdateForm.vue | 0 .../ai/chat/{ => index}/components/Header.vue | 0 src/views/ai/chat/{ => index}/index.vue | 2 +- .../{ => index}/role/RoleCategoryList.vue | 0 .../ai/chat/{ => index}/role/RoleList.vue | 0 src/views/ai/chat/{ => index}/role/index.vue | 2 +- .../image/{ => index}/ImageDetailDrawer.vue | 0 src/views/ai/image/{ => index}/ImageTask.vue | 0 .../ai/image/{ => index}/ImageTaskCard.vue | 0 .../ai/image/{ => index}/dall3/index.vue | 0 src/views/ai/image/{ => index}/index.vue | 0 .../ai/image/{ => index}/midjourney/index.vue | 0 .../{ => index}/stable-diffusion/index.vue | 33 ++++++++++++++----- .../ai/utils/{common-utils.ts => utils.ts} | 0 19 files changed, 27 insertions(+), 12 deletions(-) rename src/views/ai/chat/{ => index}/ChatEmpty.vue (100%) rename src/views/ai/chat/{ => index}/Conversation.vue (99%) rename src/views/ai/chat/{ => index}/Message.vue (100%) rename src/views/ai/chat/{ => index}/MessageLoading.vue (100%) rename src/views/ai/chat/{ => index}/MessageNewChat.vue (100%) rename src/views/ai/chat/{ => index}/components/ChatConversationUpdateForm.vue (100%) rename src/views/ai/chat/{ => index}/components/Header.vue (100%) rename src/views/ai/chat/{ => index}/index.vue (99%) rename src/views/ai/chat/{ => index}/role/RoleCategoryList.vue (100%) rename src/views/ai/chat/{ => index}/role/RoleList.vue (100%) rename src/views/ai/chat/{ => index}/role/index.vue (99%) rename src/views/ai/image/{ => index}/ImageDetailDrawer.vue (100%) rename src/views/ai/image/{ => index}/ImageTask.vue (100%) rename src/views/ai/image/{ => index}/ImageTaskCard.vue (100%) rename src/views/ai/image/{ => index}/dall3/index.vue (100%) rename src/views/ai/image/{ => index}/index.vue (100%) rename src/views/ai/image/{ => index}/midjourney/index.vue (100%) rename src/views/ai/image/{ => index}/stable-diffusion/index.vue (93%) rename src/views/ai/utils/{common-utils.ts => utils.ts} (100%) diff --git a/src/views/ai/chat/ChatEmpty.vue b/src/views/ai/chat/index/ChatEmpty.vue similarity index 100% rename from src/views/ai/chat/ChatEmpty.vue rename to src/views/ai/chat/index/ChatEmpty.vue diff --git a/src/views/ai/chat/Conversation.vue b/src/views/ai/chat/index/Conversation.vue similarity index 99% rename from src/views/ai/chat/Conversation.vue rename to src/views/ai/chat/index/Conversation.vue index 5976171b..be184cf8 100644 --- a/src/views/ai/chat/Conversation.vue +++ b/src/views/ai/chat/index/Conversation.vue @@ -98,7 +98,7 @@