kulley 6 年 前
コミット
8ac0267669
3 ファイル変更15 行追加13 行削除
  1. 3 1
      src/App.js
  2. 1 1
      src/pages/home/all/index.js
  3. 11 11
      src/pages/my/all/index.js

+ 3 - 1
src/App.js

@@ -17,6 +17,7 @@ class App extends Component {
         }
     }
 
+    // componentWillMount 适用于刷新的 tabbar 的展示
     componentWillMount() {
         let {location} = this.props,
             pathname = location.pathname
@@ -30,7 +31,7 @@ class App extends Component {
         }
 
         // 如果不是首页的初始界面,就隐藏 tabbar
-        // 如在 /home/detail 刷新
+        // 如在 /home/detail 或 /home/detail/ 刷新
         let pathnameArray = location.pathname.split('/')
         let length = pathnameArray.length
         if (length > 2 && pathnameArray[length - 1] !== '') {
@@ -40,6 +41,7 @@ class App extends Component {
         }
     }
 
+    // componentWillReceiveProps 适用于跳转的 tabbar 的展示
     componentWillReceiveProps(next) {
         let {location} = next,
             pathname = location.pathname,

+ 1 - 1
src/pages/home/all/index.js

@@ -52,7 +52,7 @@ class All extends Component {
                 id: 'pants'
             },
             {
-                icon: 'https://gw.alipayobjects.com/zos/rmsportal/nywPmnTAvTmLusPxHPSu.png',
+                icon: 'https://ece-img-1254337200.cos.ap-chengdu.myqcloud.com/icon/more.png',
                 text: '更多',
                 id: 'more'
             }

+ 11 - 11
src/pages/my/all/index.js

@@ -5,22 +5,22 @@ import {withRouter} from 'react-router-dom'
 
 const orderIcon = [
     {
-        icon: 'https://gw.alipayobjects.com/zos/rmsportal/nywPmnTAvTmLusPxHPSu.png',
+        icon: 'https://ece-img-1254337200.cos.ap-chengdu.myqcloud.com/icon/pay.png',
         text: '待付款',
         id: 'pay'
     },
     {
-        icon: 'https://gw.alipayobjects.com/zos/rmsportal/nywPmnTAvTmLusPxHPSu.png',
+        icon: 'https://ece-img-1254337200.cos.ap-chengdu.myqcloud.com/icon/ship.png',
         text: '待发货',
         id: 'ship'
     },
     {
-        icon: 'https://gw.alipayobjects.com/zos/rmsportal/nywPmnTAvTmLusPxHPSu.png',
+        icon: 'https://ece-img-1254337200.cos.ap-chengdu.myqcloud.com/icon/unbox.png',
         text: '待收货',
         id: 'unbox'
     },
     {
-        icon: 'https://gw.alipayobjects.com/zos/rmsportal/nywPmnTAvTmLusPxHPSu.png',
+        icon: 'https://ece-img-1254337200.cos.ap-chengdu.myqcloud.com/icon/judge.png',
         text: '待评价',
         id: 'judge'
     }
@@ -28,17 +28,17 @@ const orderIcon = [
 
 const toolsIcon = [
     {
-        icon: 'https://gw.alipayobjects.com/zos/rmsportal/nywPmnTAvTmLusPxHPSu.png',
+        icon: 'https://ece-img-1254337200.cos.ap-chengdu.myqcloud.com/icon/address.png',
         text: '收货地址',
         id: 'address'
     },
     {
-        icon: 'https://gw.alipayobjects.com/zos/rmsportal/nywPmnTAvTmLusPxHPSu.png',
-        text: '购物',
+        icon: 'https://ece-img-1254337200.cos.ap-chengdu.myqcloud.com/icon/cart.png',
+        text: '购物',
         id: 'cart'
     },
     {
-        icon: 'https://gw.alipayobjects.com/zos/rmsportal/nywPmnTAvTmLusPxHPSu.png',
+        icon: 'https://ece-img-1254337200.cos.ap-chengdu.myqcloud.com/icon/message.png',
         text: '系统通知',
         id: 'message'
     }
@@ -46,17 +46,17 @@ const toolsIcon = [
 
 const memberIcon = [
     {
-        icon: 'https://gw.alipayobjects.com/zos/rmsportal/nywPmnTAvTmLusPxHPSu.png',
+        icon: 'https://ece-img-1254337200.cos.ap-chengdu.myqcloud.com/icon/card.png',
         text: '会员卡',
         id: 'card'
     },
     {
-        icon: 'https://gw.alipayobjects.com/zos/rmsportal/nywPmnTAvTmLusPxHPSu.png',
+        icon: 'https://ece-img-1254337200.cos.ap-chengdu.myqcloud.com/icon/coupon.png',
         text: '优惠券',
         id: 'coupon'
     },
     {
-        icon: 'https://gw.alipayobjects.com/zos/rmsportal/nywPmnTAvTmLusPxHPSu.png',
+        icon: 'https://ece-img-1254337200.cos.ap-chengdu.myqcloud.com/icon/credit.png',
         text: '积分',
         id: 'credit'
     }