kulley 6 лет назад
Родитель
Сommit
a805447c31

+ 1 - 1
src/pages/my/all/index.css

@@ -2,7 +2,7 @@
 }
 
 .avatar-area {
-    height: 20%;
+    height: 150px;
     /*background-image: linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);*/
     background-image: linear-gradient(to top, #ffdcd2 0%, #ffdbd1 1%, #fd898c 100%);
     position: relative;

+ 39 - 2
src/pages/my/all/index.js

@@ -62,6 +62,24 @@ const memberIcon = [
     }
 ]
 
+const shopIcon = [
+    {
+        icon: 'https://ece-img-1254337200.cos.ap-chengdu.myqcloud.com/icon/shop.png',
+        text: '店铺展示',
+        id: 'shop'
+    },
+    {
+        icon: 'https://ece-img-1254337200.cos.ap-chengdu.myqcloud.com/icon/goods.png',
+        text: '商品管理',
+        id: 'goods'
+    },
+    {
+        icon: 'https://ece-img-1254337200.cos.ap-chengdu.myqcloud.com/icon/order.png',
+        text: '订单管理',
+        id: 'order'
+    }
+]
+
 class All extends Component {
     constructor(props) {
         super(props)
@@ -69,9 +87,8 @@ class All extends Component {
     }
 
     render() {
-        let contentHeight = window.innerHeight - 95
         return (
-            <div className='my-wrap all' style={{height: contentHeight}}>
+            <div className='my-wrap all'>
                 <div className='avatar-area'>
                     <div className='avatar'/>
                     <div className='nickname'>110</div>
@@ -141,6 +158,26 @@ class All extends Component {
                         />
                     </div>
                 </div>
+
+                <div className='my-card member-card'>
+                    <div className='card-title'>
+                        商家入口
+                    </div>
+                    <div className='card-icons'>
+                        <Grid data={shopIcon}
+                              columnNum={4}
+                              hasLine={false}
+                              onClick={(shop) => {
+                                  this.props.history.push({
+                                      pathname: '/my/shop',
+                                      state: {
+                                          page: shop.id
+                                      }
+                                  })
+                              }}
+                        />
+                    </div>
+                </div>
             </div>
         )
     }

+ 2 - 0
src/pages/my/index.js

@@ -4,6 +4,7 @@ import All from './all'
 import Order from './order'
 import Tools from './tools'
 import Member from './member'
+import Shop from './shop'
 import {Switch, Route} from 'react-router-dom'
 
 const My = () => (
@@ -14,6 +15,7 @@ const My = () => (
             <Route path="/my/order" component={Order}/>
             <Route path="/my/tools" component={Tools}/>
             <Route path="/my/member" component={Member}/>
+            <Route path="/my/shop" component={Shop}/>
         </Switch>
     </div>
 )

+ 0 - 0
src/pages/my/shop/index.css


+ 28 - 0
src/pages/my/shop/index.js

@@ -0,0 +1,28 @@
+import React, {Component} from 'react'
+import './index.css'
+import {NavBar, Icon} from 'antd-mobile'
+import {withRouter} from 'react-router-dom'
+
+class Shop extends Component {
+    constructor(props) {
+        super(props)
+        this.state = {}
+    }
+
+    render() {
+        return (
+            <div className='shop-wrap'>
+                <div className='shop-navbar-wrap'>
+                    <NavBar
+                        className='shop-navbar'
+                        mode="light"
+                        icon={<Icon type="left"/>}
+                        onLeftClick={() => {this.props.history.push({pathname: '/my/all'})}}
+                    >店铺详情</NavBar>
+                </div>
+            </div>
+        )
+    }
+}
+
+export default withRouter(Shop)