吉安感知网项目-前端
张含笑
2026-02-09 36ed6676abe7240cd514056f87d9db0b2a81f582
feat:修改通讯录
1 files modified
22 ■■■■■ changed files
uniapps/work-app/src/pages/voiceCall/index.vue 22 ●●●●● patch | view | raw | blame | history
uniapps/work-app/src/pages/voiceCall/index.vue
@@ -15,7 +15,7 @@
        <div class="itemBox">
          <!-- 头像 -->
          <div class="contactAvatar">
            <image :src="contact.avatar || defaultAvatar"  />
            <image :src="contact.avatar || defaultAvatar" :class="{ 'avatar-disabled': contact.status === '0' }"  />
          </div>
          <!-- 联系人信息 -->
@@ -25,7 +25,7 @@
          </div>
          <!-- 电话按钮 -->
          <div class="callButton" @click="makeCall(contact)">
          <div class="callButton" :class="{ 'call-button-disabled': contact.status === '0' }" @click="makeCall(contact)">
            <image src="@/static/images/voiceVal/phoneVal.svg"  />
          </div>
        </div>
@@ -120,6 +120,9 @@
}
// 拨打电话方法
const makeCall = (contact) => {
  if (contact.status === '0') {
    return
  }
  console.log('拨打电话', contact)
  // 将contact对象转换为JSON字符串并URL编码
  const contactStr = encodeURIComponent(JSON.stringify(contact))
@@ -241,6 +244,21 @@
}
/* 禁用状态样式 */
.avatar-disabled {
  filter: grayscale(100%);
  opacity: 0.6;
}
.call-button-disabled {
  opacity: 0.6;
  pointer-events: none;
}
.call-button-disabled image {
  filter: grayscale(100%);
}
.loadingMore {
  display: flex;
  justify-content: center;