Explorar o código

调整likeNum顺序

wolyshaw %!s(int64=3) %!d(string=hai) anos
pai
achega
ef9cce4056

+ 2 - 0
src/components/live-broadcast/index.tsx

@@ -53,6 +53,8 @@ export default defineComponent({
     async initializeRoom () {
     async initializeRoom () {
       if (!state.user) throw Error('请先登录')
       if (!state.user) throw Error('请先登录')
       try {
       try {
+        runtime.likeCount = state.user?.likeNum || 0
+        runtime.lookCount = state.user?.lookNum || 0
         const isLiveing = sessionStorage.getItem(RuntimeUtils.START_LIVE_STATUS) === 'liveing'
         const isLiveing = sessionStorage.getItem(RuntimeUtils.START_LIVE_STATUS) === 'liveing'
         // IM连接
         // IM连接
         await RuntimeUtils.connectIM(state.user?.imToken)
         await RuntimeUtils.connectIM(state.user?.imToken)

+ 0 - 4
src/components/live-message/index.tsx

@@ -32,10 +32,6 @@ export default defineComponent({
       return status
       return status
     }
     }
   },
   },
-  mounted() {
-    runtime.likeCount = state.user?.likeNum || 0
-    runtime.lookCount = state.user?.lookNum || 0
-  },
   methods: {
   methods: {
     tabChange(val: any) {
     tabChange(val: any) {
       this.modelIndex = val.props.name
       this.modelIndex = val.props.name