Skip to content

Commit

Permalink
[*] 修复留言和已登录跳转
Browse files Browse the repository at this point in the history
  • Loading branch information
Muska-Ami committed Oct 6, 2024
1 parent 6b1dbbe commit 91a2cda
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/api/v2/donate/say/root.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { post } from '@/utils/request'
* 列出赞助列表
*/
const postSay = async (username: number, trade_no: string, message: string) => {
const rs = post(`${base.api_v2_url}/donate/list`, {
const rs = post(`${base.api_v2_url}/donate/say`, {
username: username,
trade_no: trade_no,
message: message
Expand Down
2 changes: 1 addition & 1 deletion src/components/nav/MainNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function getStyle() {
}
}
if (route.path === '/') router.push('/dashboard')
if (location.pathname === '/') router.push('/dashboard')
</script>

<script>
Expand Down
9 changes: 2 additions & 7 deletions src/views/DonateView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,8 @@ async function submitMessage() {
}
if (!rs) return
if (rs.status === 200) {
if (rs.data.status) {
sendSuccessDialog(rs.message)
getDonateList()
} else {
sendWarningDialog(rs.message)
loading_submit.value = false
}
sendSuccessDialog('提交成功,感谢您的赞助~')
getDonateList()
loading_submit.value = false
} else {
sendWarningDialog(rs.message)
Expand Down

0 comments on commit 91a2cda

Please sign in to comment.