Bladeren bron

修改主页面样式

wly 7 jaren geleden
bovenliggende
commit
53dcc94d8f

+ 1 - 1
src/case/ShopApp/src/App.css

@@ -14,7 +14,7 @@
     padding: 15px 0;
     overflow-x: hidden;
     overflow-y: hidden;
-    background-color:#fff;
+    background:#fff;
     
 }
 

+ 1 - 1
src/case/ShopApp/src/App.js

@@ -2,7 +2,7 @@ import React, { Component } from 'react';
 import './App.css';
 // import 'antd-mobile/dist/antd-mobile.css';
 
-import NavBars from './components/Common/NavBar'
+import NavBars from './components/App/NavBar'
 import TabBarBottom from './components/App/TabBarBottom'
 
 class ShopApp extends Component {

+ 0 - 0
src/case/ShopApp/src/components/Common/NavBar.css → src/case/ShopApp/src/components/App/NavBar.css


+ 0 - 0
src/case/ShopApp/src/components/Common/NavBar.jsx → src/case/ShopApp/src/components/App/NavBar.jsx


+ 4 - 5
src/case/ShopApp/src/components/App/TabBarBottom.css

@@ -1,5 +1,4 @@
-div.TabBarBottom{
-    position: absolute !important;
-    bottom: 0;
-    z-index: 5;
-} 
+.pageWrap{
+    margin-top: 45px;
+    background: #ffffff;
+}

+ 4 - 4
src/case/ShopApp/src/components/App/TabBarBottom.jsx

@@ -25,7 +25,7 @@ class TabBarBottom extends Component {
     if(page==='index'){
       //console.log(page)
       return (
-        <div style={{ backgroundColor: 'white', height: '100%', textAlign: 'center' }}>
+        <div className="pageWrap">
          <HomePage />
         </div>
       );
@@ -33,7 +33,7 @@ class TabBarBottom extends Component {
     if(page==='shopCar'){
       //console.log(page)
       return (
-        <div style={{ backgroundColor: 'white', height: '100%', textAlign: 'center' }}>
+        <div className="pageWrap">
          <ShopCar />
         </div>
       );
@@ -41,7 +41,7 @@ class TabBarBottom extends Component {
     if(page==='user'){
       //console.log(page)
       return (
-        <div style={{ backgroundColor: 'white', height: '100%', textAlign: 'center' }}>
+        <div className="pageWrap">
         <UserPage />
         </div>
       );
@@ -51,7 +51,7 @@ class TabBarBottom extends Component {
   render() {
     //这里渲染一次
     return (
-      <div style={this.state.fullScreen ? { position: 'fixed', height: '100%', width: '100%', top: 0 } : { height: 400 }} className="TabBarBottom">
+      <div style={this.state.fullScreen ? { position: 'absolute', height: '100%', width: '100%', bottom: 0 } : { height: 400 }} className="TabBarBottom">
         <TabBar
           unselectedTintColor="#949494"
           tintColor="#33A3F4"

+ 0 - 3
src/case/ShopApp/src/components/HomePage/HomePage.css

@@ -1,3 +0,0 @@
-.homeWrap{
-    margin-top: 45px;
-}

+ 1 - 1
src/case/ShopApp/src/components/HomePage/Search.jsx

@@ -23,7 +23,7 @@ class Search extends Component {
     this.manualFocusInst.focus();
   }
   render() {
-    return (<div style={{marginTop:'45px'}}>
+    return (<div>
       <SearchBar
         value={this.state.value}
         placeholder="请输入要搜索的商品名"