feat: 球局详情完善 & 订单详情完善
This commit is contained in:
43
src/app.ts
43
src/app.ts
@@ -1,50 +1,49 @@
|
||||
import { Component, ReactNode } from 'react'
|
||||
import './nutui-theme.scss'
|
||||
import './app.scss'
|
||||
import { useDictionaryStore } from './store/dictionaryStore'
|
||||
import { useGlobalStore } from './store/global'
|
||||
import { Component, ReactNode } from "react";
|
||||
import "./nutui-theme.scss";
|
||||
import "./app.scss";
|
||||
import "qweather-icons/font/qweather-icons.css";
|
||||
import { useDictionaryStore } from "./store/dictionaryStore";
|
||||
import { useGlobalStore } from "./store/global";
|
||||
|
||||
// import { getNavbarHeight } from "@/utils/getNavbarHeight";
|
||||
|
||||
interface AppProps {
|
||||
children: ReactNode
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
class App extends Component<AppProps> {
|
||||
|
||||
|
||||
onLaunch() {
|
||||
console.log('小程序启动,初始化逻辑写这里')
|
||||
console.log("小程序启动,初始化逻辑写这里");
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
// 初始化字典数据
|
||||
this.initDictionaryData()
|
||||
this.getNavBarHeight()
|
||||
this.initDictionaryData();
|
||||
this.getNavBarHeight();
|
||||
// this.getLocation()
|
||||
}
|
||||
|
||||
componentDidShow() { }
|
||||
componentDidShow() {}
|
||||
|
||||
componentDidHide() { }
|
||||
componentDidHide() {}
|
||||
|
||||
// 初始化字典数据
|
||||
private async initDictionaryData() {
|
||||
try {
|
||||
const { fetchDictionary } = useDictionaryStore.getState()
|
||||
await fetchDictionary()
|
||||
const { fetchDictionary } = useDictionaryStore.getState();
|
||||
await fetchDictionary();
|
||||
} catch (error) {
|
||||
console.error('初始化字典数据失败:', error)
|
||||
console.error("初始化字典数据失败:", error);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取导航高度
|
||||
getNavBarHeight = () => {
|
||||
const { getNavbarHeightInfo } = useGlobalStore.getState()
|
||||
getNavbarHeightInfo()
|
||||
}
|
||||
const { getNavbarHeightInfo } = useGlobalStore.getState();
|
||||
getNavbarHeightInfo();
|
||||
};
|
||||
|
||||
// 获取位置信息
|
||||
// 获取位置信息
|
||||
// getLocation = () => {
|
||||
// const { getCurrentLocationInfo } = useGlobalStore.getState()
|
||||
// getCurrentLocationInfo()
|
||||
@@ -52,8 +51,8 @@ class App extends Component<AppProps> {
|
||||
|
||||
render() {
|
||||
// this.props.children 是将要会渲染的页面
|
||||
return this.props.children
|
||||
return this.props.children;
|
||||
}
|
||||
}
|
||||
|
||||
export default App
|
||||
export default App;
|
||||
|
||||
Reference in New Issue
Block a user