diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e3d4630..f6720169 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * 功能新增:管理后台增加AI绘图任务管理,可在管理后台浏览和删除用户的绘图任务 * 功能新增:管理后台增加Suno和Luma任务管理功能 * Bug修复:修复管理后台删除兑换码报 404 错误 +* 功能优化:优化充值产品定价逻辑,可以设置原价和优惠价,**升级当前版本之后请务必要到管理后台去重新设置一下产品价格,以免造成损失!!!**,**升级当前版本之后请务必要到管理后台去重新设置一下产品价格,以免造成损失!!!**,**升级当前版本之后请务必要到管理后台去重新设置一下产品价格,以免造成损失!!!**。 ## v4.1.5 * 功能优化:重构 websocket 组件,减少 websocket 连接数,全站共享一个 websocket 连接 diff --git a/api/handler/payment_handler.go b/api/handler/payment_handler.go index 39eb0887..ef450c5e 100644 --- a/api/handler/payment_handler.go +++ b/api/handler/payment_handler.go @@ -17,7 +17,6 @@ import ( "geekai/store/model" "geekai/utils" "geekai/utils/resp" - "github.com/shopspring/decimal" "net/http" "sync" "time" @@ -105,7 +104,7 @@ func (h *PaymentHandler) Pay(c *gin.Context) { return } - amount, _ := decimal.NewFromFloat(product.Price).Sub(decimal.NewFromFloat(product.Discount)).Float64() + amount := product.Discount var payURL, returnURL, notifyURL string switch data.PayWay { case "alipay": diff --git a/web/src/assets/css/member.styl b/web/src/assets/css/member.styl index 60ec8adc..aca86dbf 100644 --- a/web/src/assets/css/member.styl +++ b/web/src/assets/css/member.styl @@ -112,8 +112,9 @@ justify-content right } - .price { + .discount { color #f56c6c + font-size 20px } .expire { diff --git a/web/src/views/ChatPlus.vue b/web/src/views/ChatPlus.vue index 13ad0661..6e3918aa 100644 --- a/web/src/views/ChatPlus.vue +++ b/web/src/views/ChatPlus.vue @@ -138,8 +138,8 @@
- - + + @@ -208,6 +208,10 @@ + + + +
@@ -236,6 +240,7 @@ import FileList from "@/components/FileList.vue"; import ChatSetting from "@/components/ChatSetting.vue"; import BackTop from "@/components/BackTop.vue"; import {showMessageError} from "@/utils/dialog"; +import RealtimeConversation from "@/components/RealtimeConversation.vue"; const title = ref('GeekAI-智能助手'); const models = ref([]) @@ -891,6 +896,21 @@ const insertFile = (file) => { const removeFile = (file) => { files.value = removeArrayItem(files.value, file, (v1,v2) => v1.url===v2.url) } + +// 实时语音对话 +const showConversationDialog = ref(false) +const conversationRef = ref(null) +const dialogHeight = ref(window.innerHeight - 75); +const realtimeChat = () => { + showConversationDialog.value = true; + nextTick(() => { + conversationRef.value.connect() + }) +} +const hangUp = () => { + showConversationDialog.value = false; + conversationRef.value.hangUp() +} \ No newline at end of file diff --git a/web/src/views/Test3.vue b/web/src/views/Test3.vue deleted file mode 100644 index a96bfa3f..00000000 --- a/web/src/views/Test3.vue +++ /dev/null @@ -1,184 +0,0 @@ - - - - - \ No newline at end of file diff --git a/web/src/views/admin/Product.vue b/web/src/views/admin/Product.vue index 0666c5b0..96c0f719 100644 --- a/web/src/views/admin/Product.vue +++ b/web/src/views/admin/Product.vue @@ -15,8 +15,8 @@ - - + +