diff --git a/api/handler/user_handler.go b/api/handler/user_handler.go index a74eff5b..0208e5dc 100644 --- a/api/handler/user_handler.go +++ b/api/handler/user_handler.go @@ -230,6 +230,8 @@ type userProfile struct { Calls int `json:"calls"` ImgCalls int `json:"img_calls"` TotalTokens int64 `json:"total_tokens"` + Tokens int64 `json:"tokens"` + ExpiredTime int64 `json:"expired_time"` } func (h *UserHandler) Profile(c *gin.Context) { diff --git a/web/src/components/UserProfile.vue b/web/src/components/UserProfile.vue new file mode 100644 index 00000000..7e5f8bff --- /dev/null +++ b/web/src/components/UserProfile.vue @@ -0,0 +1,105 @@ + + + + + \ No newline at end of file diff --git a/web/src/views/Member.vue b/web/src/views/Member.vue index eada7e7f..445f1ff9 100644 --- a/web/src/views/Member.vue +++ b/web/src/views/Member.vue @@ -5,40 +5,46 @@
-
- - 说明: 成为本站会员后每月有500次对话额度,50次 AI 绘画额度,限制下月1号解除,若在期间超过次数后可单独购买点卡。 - 当月充值的点卡有效期可以延期到下个月底。 - + - - + +
@@ -81,6 +87,7 @@ import LoginDialog from "@/components/LoginDialog.vue"; import {checkSession} from "@/action/session"; import {arrayContains, removeArrayItem, substr} from "@/utils/libs"; import router from "@/router"; +import UserProfile from "@/components/UserProfile.vue"; const listBoxHeight = window.innerHeight - 97 const list = ref([]) @@ -187,88 +194,105 @@ const queryOrder = (orderNo) => { } .inner { + display flex color #ffffff padding 15px; overflow-y visible overflow-x hidden - .info { - .el-alert__description { - font-size 14px !important - margin 0 - } + .user-profile { padding 10px 20px + background-color #393F4A + color #ffffff + border-radius 10px + + .el-form-item__label { + color #ffffff + justify-content start + } } - .list-box { - .product-item { - border 1px solid #666666 - border-radius 6px - overflow hidden - cursor pointer - transition: all 0.3s ease; /* 添加过渡效果 */ + .product-box { + padding 0 10px - .image-container { - display flex - justify-content center + .info { + .el-alert__description { + font-size 14px !important + margin 0 + } + padding 10px 20px + } - .el-image { - padding 6px + .list-box { + .product-item { + border 1px solid #666666 + border-radius 6px + overflow hidden + cursor pointer + transition: all 0.3s ease; /* 添加过渡效果 */ - .el-image__inner { - border-radius 10px + .image-container { + display flex + justify-content center + + .el-image { + padding 6px + + .el-image__inner { + border-radius 10px + } } } - } - .product-title { - display flex - padding 10px - - .name { - width 100% - text-align center - font-size 16px - font-weight bold - color #47fff1 - } - } - - .product-info { - padding 10px 20px - font-size 14px - color #999999 - - .info-line { + .product-title { display flex - width 100% - padding 5px 0 + padding 10px - .label { + .name { + width 100% + text-align center + font-size 16px + font-weight bold + color #47fff1 + } + } + + .product-info { + padding 10px 20px + font-size 14px + color #999999 + + .info-line { display flex width 100% + padding 5px 0 + + .label { + display flex + width 100% + } + + .price, .expire { + display flex + width 90px + justify-content right + } + + .price { + color #f56c6c + } + + .expire { + color #409eff + } } - .price, .expire { - display flex - width 80px - justify-content right - } - - .price { - color #f56c6c - } - - .expire { - color #409eff - } } - } - - &:hover { - box-shadow: 0 0 10px rgba(71, 255, 241, 0.6); /* 添加阴影效果 */ - transform: translateY(-10px); /* 向上移动10像素 */ + &:hover { + box-shadow: 0 0 10px rgba(71, 255, 241, 0.6); /* 添加阴影效果 */ + transform: translateY(-10px); /* 向上移动10像素 */ + } } } }