feat: 首页侧边抽屉调整
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user