Browse Source

style: 更改顶边距

await 8 months ago
parent
commit
b362015d1f
1 changed files with 6 additions and 5 deletions
  1. 6 5
      src/app.tsx

+ 6 - 5
src/app.tsx

@@ -1,5 +1,4 @@
 // import { Component, PropsWithChildren } from 'react'
-import "./app.scss";
 
 // class App extends Component<PropsWithChildren> {
 
@@ -19,13 +18,14 @@ import "./app.scss";
 
 import { PropsWithChildren } from "react";
 import { useRequest } from "ahooks";
+import { Provider as ReduxProvider } from "react-redux";
 import Taro, { useDidShow } from "@tarojs/taro";
+import { WebView } from "@tarojs/components";
 import AppContext from "./context/appContext";
-import { Provider as ReduxProvider } from "react-redux";
 import ReduxUtil from "./utils/reduxUtil";
 import RouteUtil from "./utils/routeUtil";
 import UserHelper from "./helper/userHelper";
-import { WebView } from "@tarojs/components";
+import "./app.scss";
 
 interface IAppProps {}
 
@@ -51,14 +51,15 @@ const App = (props: PropsWithChildren<IAppProps>) => {
           height: result.data?.screenHeight || 0,
         },
         padding: {
-          top: result.data?.safeArea?.top || 0,
+          // top: result.data?.safeArea?.top || 0,
+          top: 0,
           bottom:
             (result.data?.screenHeight || 0) -
             (result.data?.safeArea?.bottom || 0),
         },
       }}
     >
-      <WebView src="https://mp.weixin.qq.com/s/X0OAslHaFjld6Zf2ifVC5A"></WebView>
+      <WebView src='https://mp.weixin.qq.com/s/X0OAslHaFjld6Zf2ifVC5A'></WebView>
       <ReduxProvider store={ReduxUtil.store}>{props.children}</ReduxProvider>
     </AppContext.Provider>
   );