单应用项目,可以创建很多独立工具类页面 ,不用登录 初始化的页面
zhangchen
2025-09-12 5548b8c1c50947c862c85d0c4048459a39482d3b
src/views/mobile/bedsideAuxiliaryScreen/components/Header.vue
@@ -65,7 +65,7 @@
        alt=""
        @click="openSettingDeviceDialog"
      />
      <img v-if="userInfo?.code" :src="generateCircularAvatar(userInfo.userName)" class="btn-img" alt="" @click="openLoginDialog" />
      <img v-if="userInfo?.code" :src="userInfo?.userAvatar" class="btn-img" alt="" @click="openLoginDialog" />
      <img v-else :src="userImg" class="btn-img" alt="" @click="openLoginDialog" />
    </div>
  </div>
@@ -167,7 +167,10 @@
const userInfo = computed(() => {
  return bedsideAuxiliaryScreenStore.userInfo;
  if (!bedsideAuxiliaryScreenStore.userInfo) return null
  return Object.assign({}, bedsideAuxiliaryScreenStore.userInfo, {
    userAvatar: bedsideAuxiliaryScreenStore.userInfo?.userAvatar ? bedsideAuxiliaryScreenStore.userInfo?.userAvatar : generateCircularAvatar(bedsideAuxiliaryScreenStore.userInfo?.userName)
  });
});
watch(
@@ -254,6 +257,7 @@
};
function generateCircularAvatar(name: string, size = 100): string {
  console.log('name: ', name)
  const canvas = document.createElement('canvas');
  canvas.width = size;
  canvas.height = size;