Skip to content

Commit

Permalink
Merge pull request PowerDos#5 from bitfishxyz/master
Browse files Browse the repository at this point in the history
将Footer组件提取到App.vue这个页面
  • Loading branch information
PowerDos authored Apr 27, 2019
2 parents 68276da + a5b9b32 commit abd9223
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 52 deletions.
Empty file added a
Empty file.
11 changes: 10 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@
<div id="app">
<Header></Header>
<router-view/>
<!-- 部分路由不应该包含这个Footer -->
<Footer v-if="excludeRoutes.indexOf($route.name) == -1"></Footer>
</div>
</template>

<script>
import Header from '@/components/header/Header';
import Footer from '@/components/footer/Footer';
export default {
name: 'App',
data () {
return {
excludeRoutes: ['HomeIndex', 'MyAddress', 'AddAddress', 'MyOrder', 'MyShoppingCart']
};
},
components: {
Header
Header,
Footer
}
};
</script>
5 changes: 0 additions & 5 deletions src/components/Freeback.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@
</div>
</div>
</div>
<Footer></Footer>
</div>
</template>

<script>
import Footer from '@/components/footer/Footer';
export default {
name: 'Freeback',
data () {
Expand All @@ -44,9 +42,6 @@ export default {
content: ''
}
};
},
components: {
Footer
}
};
</script>
Expand Down
5 changes: 1 addition & 4 deletions src/components/GoodsDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<ShowGoods></ShowGoods>
<!-- 商品详细展示 -->
<ShowGoodsDetail></ShowGoodsDetail>
<Footer></Footer>
<Spin size="large" fix v-if="isLoading"></Spin>
</div>
</template>
Expand All @@ -25,7 +24,6 @@
import Search from '@/components/Search';
import GoodsDetailNav from '@/components/nav/GoodsDetailNav';
import ShopHeader from '@/components/header/ShopHeader';
import Footer from '@/components/footer/Footer';
import ShowGoods from '@/components/goodsDetail/ShowGoods';
import ShowGoodsDetail from '@/components/goodsDetail/ShowGoodsDetail';
import store from '@/vuex/store';
Expand Down Expand Up @@ -55,8 +53,7 @@ export default {
ShopHeader,
GoodsDetailNav,
ShowGoods,
ShowGoodsDetail,
Footer
ShowGoodsDetail
},
store
};
Expand Down
5 changes: 1 addition & 4 deletions src/components/GoodsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
<Page :total="100" show-sizer></Page>
</div>
</div>
<Footer></Footer>
<Spin size="large" fix v-if="isLoading"></Spin>
</div>
</template>
Expand All @@ -83,7 +82,6 @@
import Search from '@/components/Search';
import GoodsListNav from '@/components/nav/GoodsListNav';
import GoodsClassNav from '@/components/nav/GoodsClassNav';
import Footer from '@/components/footer/Footer';
import store from '@/vuex/store';
import { mapState, mapActions, mapGetters, mapMutations } from 'vuex';
export default {
Expand Down Expand Up @@ -129,8 +127,7 @@ export default {
components: {
Search,
GoodsListNav,
GoodsClassNav,
Footer
GoodsClassNav
},
store
};
Expand Down
5 changes: 1 addition & 4 deletions src/components/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,12 @@
</div>
</div>
</div>
<Footer></Footer>
</div>
</template>

<script>
import Search from '@/components/Search';
import HomeNav from '@/components/nav/HomeNav';
import Footer from '@/components/footer/Footer';
import store from '@/vuex/store';
import { mapState, mapActions, mapGetters, mapMutations } from 'vuex';
export default {
Expand Down Expand Up @@ -160,8 +158,7 @@ export default {
},
components: {
Search,
HomeNav,
Footer
HomeNav
},
destroyed () {
clearInterval(this.setIntervalObj);
Expand Down
5 changes: 0 additions & 5 deletions src/components/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@
</div>
</i-col>
</Row>
<Footer></Footer>
</div>
</template>

<script>
import Footer from '@/components/footer/Footer';
import store from '@/vuex/store';
import { mapMutations, mapActions } from 'vuex';
export default {
Expand Down Expand Up @@ -79,9 +77,6 @@ export default {
});
}
},
components: {
Footer
},
store
};
</script>
Expand Down
5 changes: 1 addition & 4 deletions src/components/Merchant.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@
<Page :total="100" show-sizer></Page>
</div>
</div>
<Footer></Footer>
</div>
</template>

<script>
import ShopHeader from '@/components/header/ShopHeader';
import Footer from '@/components/footer/Footer';
import store from '@/vuex/store';
import { mapGetters, mapActions } from 'vuex';
export default {
Expand All @@ -46,8 +44,7 @@ export default {
...mapActions(['loadGoodsList'])
},
components: {
ShopHeader,
Footer
ShopHeader
},
store
};
Expand Down
5 changes: 1 addition & 4 deletions src/components/Order.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,12 @@
</div>
</div>
</div>
<Footer></Footer>
</div>
</template>

<script>
import Search from '@/components/Search';
import GoodsListNav from '@/components/nav/GoodsListNav';
import Footer from '@/components/footer/Footer';
import store from '@/vuex/store';
import { mapState, mapActions } from 'vuex';
export default {
Expand Down Expand Up @@ -158,8 +156,7 @@ export default {
},
components: {
Search,
GoodsListNav,
Footer
GoodsListNav
},
store
};
Expand Down
7 changes: 1 addition & 6 deletions src/components/Pay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,12 @@
</div>
</div>
</div>
<Footer></Footer>
</div>
</template>

<script>
import Footer from '@/components/footer/Footer';
export default {
name: 'Pay',
components: {
Footer
}
name: 'Pay'
};
</script>

Expand Down
7 changes: 1 addition & 6 deletions src/components/PayDone.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,12 @@
<div class="pay-done-box">
<img src="static/img/pay-success.png">
</div>
<Footer></Footer>
</div>
</template>

<script>
import Footer from '@/components/footer/Footer';
export default {
name: 'PayDone',
components: {
Footer
}
name: 'PayDone'
};
</script>

Expand Down
5 changes: 1 addition & 4 deletions src/components/ShoppingCart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,12 @@
</div>
</div>
</div>
<Footer></Footer>
</div>
</template>

<script>
import Search from '@/components/Search';
import GoodsListNav from '@/components/nav/GoodsListNav';
import Footer from '@/components/footer/Footer';
import store from '@/vuex/store';
import { mapState, mapActions } from 'vuex';
export default {
Expand All @@ -87,8 +85,7 @@ export default {
},
components: {
Search,
GoodsListNav,
Footer
GoodsListNav
},
store
};
Expand Down
5 changes: 1 addition & 4 deletions src/components/SignUp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<script>
import store from '@/vuex/store';
import { mapState, mapMutations } from 'vuex';
import Footer from '@/components/footer/Footer';
export default {
name: 'SignUp',
data () {
Expand All @@ -48,9 +48,6 @@ export default {
store,
mounted () {
this.SET_SIGN_UP_SETP(0);
},
components: {
Footer
}
};
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default new Router({
children: [
{
path: '/',
name: 'index',
name: 'HomeIndex',
component: MyOrder
},
{
Expand Down

0 comments on commit abd9223

Please sign in to comment.