feat: add new features, update theme and build config
- Add 40+ new UI components including chat modules, discovery cards, photo galleries, FAQ and booking tools - Standardize brand color across all styles by replacing $theme-color-500 SCSS variables with #0ccd58 - Add sass 1.58.3 dependency and update vite config for modern scss compiler support - Refactor existing components (AddCarCrad, login page) and remove unused /quick/list router route - Add utility functions for URL parameter handling - Add static assets including custom znicons font, component images and icons - Fix scss syntax issues and deprecation warnings
This commit is contained in:
46
src/pages/home/components/DrawerSection/index.vue
Normal file
46
src/pages/home/components/DrawerSection/index.vue
Normal file
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<uni-drawer ref="drawerRef" mode="left" :width="320">
|
||||
<div class="drawer-home">
|
||||
<div class="drawer-home-nav">
|
||||
<uni-icons type="closeempty" size="22" color="#333333" class="close-icon" @click="close" />
|
||||
<span class="title">我的</span>
|
||||
</div>
|
||||
|
||||
<MineSetting ref="mineSettingRef" @close="close" />
|
||||
</div>
|
||||
</uni-drawer>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, defineExpose } from "vue";
|
||||
import { checkToken } from "@/hooks/useGoLogin";
|
||||
import MineSetting from "./components/MineSetting/index.vue";
|
||||
|
||||
const drawerRef = ref(null);
|
||||
|
||||
// 监听抽屉显示事件
|
||||
const mineSettingRef = ref(null);
|
||||
const open = async () => {
|
||||
await checkToken();
|
||||
|
||||
drawerRef.value?.open?.();
|
||||
|
||||
try {
|
||||
await mineSettingRef.value?.getLoginUserPhoneInfo?.();
|
||||
} catch (error) {
|
||||
console.warn("获取登录用户手机号失败:", error);
|
||||
}
|
||||
};
|
||||
|
||||
// 监听抽屉隐藏事件
|
||||
const close = () => drawerRef.value?.close?.();
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
close,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "./styles/index.scss";
|
||||
</style>
|
||||
Reference in New Issue
Block a user