feat: bbs完善钱钱实时变化

This commit is contained in:
橙子
2024-11-02 15:28:45 +08:00
parent f9890bdc7f
commit 8d9c5bb762
6 changed files with 40 additions and 20 deletions

View File

@@ -1,5 +1,6 @@
import signalR from "@/utils/signalR";
import useNoticeStore from "@/stores/notice";
import useUserStore from "@/stores/user";
import { dayjs } from 'element-plus'
const receiveMsg=(connection)=> {
@@ -11,6 +12,13 @@ const receiveMsg=(connection)=> {
creationTime
});
});
const userStore=useUserStore();
connection.on("Money", (message,creationTime) => {
const updateMoneyNumber=Number(message)
userStore.updateMoney(updateMoneyNumber)
});
};
export default ()=>{