diff --git a/backend/app/http/users.go b/backend/app/http/users.go
index b801e0a..7c22ec3 100644
--- a/backend/app/http/users.go
+++ b/backend/app/http/users.go
@@ -17,6 +17,7 @@ type UserInfo struct {
ID int64 `json:"id,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
Username string `json:"username,omitempty"`
+ Avatar string `json:"avatar,omitempty"`
}
// @Router /users/profile [get]
@@ -26,6 +27,7 @@ func (ctl *users) Profile(ctx fiber.Ctx, user *model.Users) (*UserInfo, error) {
ID: user.ID,
CreatedAt: user.CreatedAt,
Username: user.Username,
+ Avatar: *user.Avatar,
}, nil
}
diff --git a/frontend/wechat/index.html b/frontend/wechat/index.html
index da7b223..8cb8fd4 100644
--- a/frontend/wechat/index.html
+++ b/frontend/wechat/index.html
@@ -3,7 +3,7 @@
-
+
动态曲谱
diff --git a/frontend/wechat/src/components/ArticleListItem.vue b/frontend/wechat/src/components/ArticleListItem.vue
index 6f4de39..f938c3e 100644
--- a/frontend/wechat/src/components/ArticleListItem.vue
+++ b/frontend/wechat/src/components/ArticleListItem.vue
@@ -17,7 +17,7 @@ const formattedDate = computed(() => {
})
const discountPrice = computed(() => {
- return (props.article.price * props.article.discount / 100).toFixed(2)
+ return (props.article.price * props.article.discount / (100 * 100)).toFixed(2)
})
const showArticle = (article) => {
@@ -68,7 +68,7 @@ const showArticle = (article) => {
- ¥{{ article.price }}
+ ¥{{ (article.price / 100).toFixed(2) }}
¥{{ discountPrice }}
diff --git a/frontend/wechat/src/layouts/MainLayout.vue b/frontend/wechat/src/layouts/MainLayout.vue
index e91f376..bc9322a 100644
--- a/frontend/wechat/src/layouts/MainLayout.vue
+++ b/frontend/wechat/src/layouts/MainLayout.vue
@@ -30,7 +30,7 @@ const switchTab = (index, route) => {
diff --git a/frontend/wechat/src/views/ArticleDetail.vue b/frontend/wechat/src/views/ArticleDetail.vue
index 5b70c23..691cdd3 100644
--- a/frontend/wechat/src/views/ArticleDetail.vue
+++ b/frontend/wechat/src/views/ArticleDetail.vue
@@ -185,7 +185,7 @@ onUnmounted(() => {
¥
- {{ (article.price / 100).toFixed(2) }}
+ {{ (article.price * article.discount / (100 * 100)).toFixed(2) }}