no message
This commit is contained in:
parent
f2bad7b3de
commit
253970b860
@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<full-page mainClass="bg-white">
|
||||
<view class="article-detail-page">
|
||||
<view v-if="loading" class="loading-container">
|
||||
<uni-icons type="spinner-cycle" size="40" color="#999" />
|
||||
@ -22,10 +23,12 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</full-page>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import FullPage from "@/components/full-page.vue";
|
||||
import api from "@/utils/api.js";
|
||||
import { ref } from "vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
@ -40,7 +43,7 @@ const articleData = ref({
|
||||
});
|
||||
|
||||
let articleId = "";
|
||||
const corpId = ref('')
|
||||
const corpId = ref("");
|
||||
|
||||
const markArticleRead = async () => {
|
||||
const unionid = account.value?.unionid;
|
||||
@ -91,7 +94,10 @@ const loadArticle = async () => {
|
||||
loading.value = true;
|
||||
error.value = "";
|
||||
try {
|
||||
const res = await api("getArticle", { id: articleId, corpId: corpId.value });
|
||||
const res = await api("getArticle", {
|
||||
id: articleId,
|
||||
corpId: corpId.value,
|
||||
});
|
||||
|
||||
if (res.success && res.data) {
|
||||
// 格式化日期
|
||||
|
||||
@ -407,7 +407,7 @@ $primary-color: #0877F1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 12rpx 20rpx;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
padding-bottom: 40rpx;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
@ -514,7 +514,7 @@ $primary-color: #0877F1;
|
||||
background: #fff;
|
||||
border-top: 1rpx solid #eee;
|
||||
padding: 20rpx 0 20rpx 60rpx;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
padding-bottom: 40rpx;
|
||||
gap: 40rpx 50rpx;
|
||||
flex-wrap: wrap;
|
||||
background-color: #f5f5f5;
|
||||
@ -544,7 +544,7 @@ $primary-color: #0877F1;
|
||||
background-color: white;
|
||||
border-top: 1rpx solid #e0e0e0;
|
||||
padding: 16rpx;
|
||||
margin-bottom: env(safe-area-inset-bottom);
|
||||
margin-bottom: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
@ -689,7 +689,7 @@ $primary-color: #0877F1;
|
||||
width: 100%;
|
||||
max-height: 80vh;
|
||||
padding: 20rpx;
|
||||
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||
padding-bottom: calc(20rpx + 40rpx);
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
@ -821,7 +821,7 @@ $primary-color: #0877F1;
|
||||
background-color: white;
|
||||
width: auto;
|
||||
padding: 32rpx 20rpx 48rpx 20rpx;
|
||||
padding-bottom: calc(48rpx + env(safe-area-inset-bottom));
|
||||
padding-bottom: calc(48rpx + 40rpx);
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
|
||||
@ -36,6 +36,8 @@ const handleApply = () => {
|
||||
padding: 20rpx 32rpx;
|
||||
background-color: #f5f5f5;
|
||||
box-sizing: border-box;
|
||||
position:absolute;
|
||||
bottom: 40rpx;
|
||||
}
|
||||
|
||||
.apply-card {
|
||||
|
||||
@ -12,11 +12,10 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
const emit = defineEmits(['cancel']);
|
||||
const emit = defineEmits(["cancel"]);
|
||||
|
||||
const handleCancel = () => {
|
||||
emit('cancel');
|
||||
emit("cancel");
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -26,6 +25,8 @@ const handleCancel = () => {
|
||||
padding: 20rpx 32rpx;
|
||||
background-color: #f5f5f5;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
bottom: 40rpx;
|
||||
}
|
||||
|
||||
.cancel-card {
|
||||
|
||||
@ -58,8 +58,8 @@ export default function useGroupChat(groupID) {
|
||||
return member.isTeamMember ? '/static/default-avatar.svg' : '/static/default-patient-avatar.png'
|
||||
}
|
||||
// 获取群聊信息和成员头像
|
||||
async function getGroupInfo() {
|
||||
const gid = typeof groupID === 'string' ? groupID : groupID.value
|
||||
async function getGroupInfo(id) {
|
||||
const gid = id || groupID;
|
||||
if (!gid) return
|
||||
|
||||
try {
|
||||
@ -73,7 +73,6 @@ export default function useGroupChat(groupID) {
|
||||
status: groupResult.data.orderStatus || 'active',
|
||||
teamId: groupResult.data.teamId
|
||||
}
|
||||
|
||||
// 2. 如果有teamId,获取团队成员头像和名称
|
||||
if (groupResult.data.teamId) {
|
||||
const memberMap = await teamStore.getTeamMemberAvatarsAndName(groupResult.data.teamId)
|
||||
@ -111,13 +110,14 @@ export default function useGroupChat(groupID) {
|
||||
}
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
getGroupInfo()
|
||||
})
|
||||
// onShow(() => {
|
||||
|
||||
onUnload(() => {
|
||||
// 清理资源
|
||||
})
|
||||
// getGroupInfo()
|
||||
// })
|
||||
|
||||
// onUnload(() => {
|
||||
// // 清理资源
|
||||
// })
|
||||
|
||||
return {
|
||||
groupInfo,
|
||||
|
||||
@ -456,7 +456,7 @@ onLoad(async (options) => {
|
||||
if (options.userID) {
|
||||
chatInfo.value.userID = options.userID;
|
||||
}
|
||||
|
||||
await getGroupInfo(groupId.value);
|
||||
// 监听键盘高度变化
|
||||
uni.onKeyboardHeightChange((res) => {
|
||||
console.log("键盘高度变化:", res.height);
|
||||
@ -474,7 +474,6 @@ onLoad(async (options) => {
|
||||
});
|
||||
|
||||
// 先获取群组信息和成员信息,确保 chatMember 已初始化
|
||||
await getGroupInfo();
|
||||
|
||||
checkLoginAndInitTIM();
|
||||
updateNavigationTitle();
|
||||
|
||||
@ -40,10 +40,10 @@ export default defineStore("teamStore", () => {
|
||||
|
||||
// 获取团队成员头像和名称映射
|
||||
async function getTeamMemberAvatarsAndName(teamId) {
|
||||
if (!teamId || !account.value?.corpId) return {};
|
||||
|
||||
if (!teamId) return {};
|
||||
const res = await api('getTeamMemberAvatarsAndName', {
|
||||
teamId,
|
||||
corpId: account.value.corpId
|
||||
teamId
|
||||
}, false);
|
||||
if (res && res.success && res.data) {
|
||||
return res.data;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user