Ver código fonte

fix: 1.群广场的按显示。

suwenjiang 1 mês atrás
pai
commit
0bb75f4ea4
1 arquivos alterados com 3 adições e 5 exclusões
  1. 3 5
      src/pages/chat/group-square.vue

+ 3 - 5
src/pages/chat/group-square.vue

@@ -79,7 +79,6 @@
                   </template>
                   <template #value>
                     <van-button
-                      v-if="item?.codeShowStatus"
                       size="small"
                       :color="chageState(item.codeShowStatus).color"
                       round
@@ -151,9 +150,7 @@ const onClickTab = ({ title }) => {
 
 // 加入群聊
 const handleJoinGroup = (item) => {
-  if (item.codeShowStatus == 0) {
-    console.log(item.id, '222')
-
+  if (!item.codeShowStatus) {
     getGroupAdd(item.id)
   }
   if (item.codeShowStatus == 1) {
@@ -204,7 +201,8 @@ const getTabList = async () => {
 
 function chageState(state) {
   let item = {}
-  if (state == 0) {
+
+  if (!state) {
     item.text = '加入'
     item.color = '#FF9300'
   }