From 2e36e4bffbc9870bc9b29d6dac801bbe0df04d67 Mon Sep 17 00:00:00 2001 From: 542634 <1322755174@qq.com> Date: Sun, 23 Dec 2018 20:00:52 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86exlint=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BHeader.vue | 21 ++- src/pages/Cart.vue | 8 +- src/pages/Category.vue | 374 +++++++++++++++++++------------------ src/pages/Details.vue | 341 +++++++++++++++++---------------- src/pages/Home.vue | 1 - src/pages/List.vue | 51 +++-- src/pages/Mall.vue | 3 +- 7 files changed, 403 insertions(+), 396 deletions(-) diff --git a/src/components/BHeader.vue b/src/components/BHeader.vue index cadc218..2585ccd 100644 --- a/src/components/BHeader.vue +++ b/src/components/BHeader.vue @@ -1,12 +1,13 @@ diff --git a/src/pages/Cart.vue b/src/pages/Cart.vue index a2306c5..14f76c2 100644 --- a/src/pages/Cart.vue +++ b/src/pages/Cart.vue @@ -64,7 +64,7 @@ @change="cartAllcheckedHeadler" type="checkbox">全选 合计:¥{{cartCheckedPrice | toFixed}} - + @@ -299,9 +299,11 @@ export default { } } .cartIsEmpty { - height: 50vw; + width: 98%; + height: 20vw; text-align: center; - line-height: 50vw; + line-height: 20vw; + border-bottom: 1px solid #dddddd; } .youLike { width: 96vw; diff --git a/src/pages/Category.vue b/src/pages/Category.vue index e9c36cd..fcf07f1 100644 --- a/src/pages/Category.vue +++ b/src/pages/Category.vue @@ -1,50 +1,61 @@ @@ -52,172 +63,173 @@ export default { name: 'category', data () { - return { - lists: {}, - listTop: [{ - id: 2000, - title: '总榜', - img: 'http://dummyimage.com/50x50/f2bd79' - }, { - id: 2001, - title: '新书榜', - img: 'http://dummyimage.com/50x50/9979f2' - }, { - id: 2002, - title: '童书榜', - img: 'http://dummyimage.com/50x50/7bf279' - }] - } + return { + lists: {}, + listTop: [{ + id: 2000, + title: '总榜', + img: 'http://dummyimage.com/50x50/f2bd79' + }, { + id: 2001, + title: '新书榜', + img: 'http://dummyimage.com/50x50/9979f2' + }, { + id: 2002, + title: '童书榜', + img: 'http://dummyimage.com/50x50/7bf279' + }] + } }, beforeRouteEnter (to, from, next) { - next(vm => { - vm.$http.getLists() - .then(resp => { - vm.lists = resp - }) - }) + next(vm => { + vm.$http.getLists() + .then(resp => { + vm.lists = resp + }) + }) }, beforeRouteUpdate (to, from, next) { // console.log(to.params.categoryID) this.$http.getLists(to.params.categoryID) - .then(resp => { - this.lists = resp - }) - next() + .then(resp => { + this.lists = resp + }) + next() } } diff --git a/src/pages/Details.vue b/src/pages/Details.vue index da5014f..fc5b16c 100644 --- a/src/pages/Details.vue +++ b/src/pages/Details.vue @@ -1,53 +1,51 @@ diff --git a/src/pages/Home.vue b/src/pages/Home.vue index a2e2b21..9ff21d8 100644 --- a/src/pages/Home.vue +++ b/src/pages/Home.vue @@ -78,7 +78,6 @@ export default { .then(resp => { console.log(resp) this.list1 = resp - }) this.$http.getList2() .then(resp => { diff --git a/src/pages/List.vue b/src/pages/List.vue index 64118d0..1abfa1b 100644 --- a/src/pages/List.vue +++ b/src/pages/List.vue @@ -21,27 +21,26 @@
  • 11-14岁
  • - - + }">
    {{item.id}}
    -
    +

    {{item.title}}({{item.desc}})

    作者: - {{item.author1}} 著 ,{{item.author2}} 图 + {{item.author1}} 著 ,{{item.author2}} 图

    出版社: {{item.public}}出版社 @@ -53,15 +52,15 @@

    ¥{{item.nowPrice}} ¥{{item.oldPrice}} - 电子书版 ¥{{item.ebookPrice}} + 电子书版¥{{item.ebookPrice}}

    - - {{item.comment}}条评论 + + {{item.comment}}条评论

    @@ -79,22 +78,22 @@ export default { } }, beforeRouteEnter (to, from, next) { - next(vm => { - console.log(vm.$http) - vm.$http.getProLists(vm.$route.params.listID) - .then(resp => { - console.log(resp) - vm.lists = resp - }) - }) + next(vm => { + console.log(vm.$http) + vm.$http.getProLists(vm.$route.params.listID) + .then(resp => { + console.log(resp) + vm.lists = resp + }) + }) }, beforeRouteUpdate (to, from, next) { - console.log(to.params.categoryID) + console.log(to.params.categoryID) this.$http.getProLists(to.params.listID) - .then(resp => { - this.lists = resp - }) - next() + .then(resp => { + this.lists = resp + }) + next() } } diff --git a/src/pages/Mall.vue b/src/pages/Mall.vue index bdd11a1..1474adb 100644 --- a/src/pages/Mall.vue +++ b/src/pages/Mall.vue @@ -76,7 +76,7 @@ export default { }, { id: 1015, title: '优品' - },{ + }, { id: 1016, title: '超市' }, { @@ -96,7 +96,6 @@ export default { console.log(to) vm.$http.getListBtn() .then(resp => { - vm.$nextTick() .then(() => { const categoryID = to.params.categoryID || resp[0].id -- Gitee