浏览代码

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

suwenjiang 1 月之前
父节点
当前提交
0bb75f4ea4
共有 1 个文件被更改,包括 3 次插入5 次删除
  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'
   }