feat: 首页侧边抽屉调整

This commit is contained in:
duanshuwen
2025-11-04 18:40:16 +08:00
parent 2d63fbd136
commit e81b7e662a
9 changed files with 3627 additions and 2112 deletions

View File

@@ -14,6 +14,9 @@
<!-- 更多服务 -->
<MoreService />
<!-- 抽屉组件 -->
<DrawerSection ref="drawerRef" @close="closeDrawer" />
</template>
<script setup>
@@ -21,9 +24,11 @@ import { onLoad } from "@dcloudio/uni-app";
import { ref, onUnmounted } from "vue";
import { getUrlParams } from "@/utils/UrlParams";
import { useAppStore } from "@/store";
import { checkToken } from "@/hooks/useGoLogin";
import ChatMainList from "./components/chat/ChatMainList/index.vue";
import Calender from "@/components/Calender/index.vue";
import MoreService from "./components/module/MoreService/index.vue";
import DrawerSection from "./components/DrawerSection/index.vue";
const appStore = useAppStore();
@@ -56,6 +61,19 @@ const getWeixinMiniProgramParams = (e) => {
}
};
// 打开窗口
const drawerRef = ref(null);
const showDrawer = async (e) => {
await checkToken();
drawerRef.value.open();
};
uni.$on("SHOW_DRAWER", showDrawer);
// 关闭窗口
const closeDrawer = (e) => drawerRef.value.close();
onLoad((e) => {
getWeixinMiniProgramParams(e);
});