-
+
+
+
+
+
+
+
+
进入{{lists.storeTitle}}书城
+
低至{{lists.storeDiscount}}折
+
>
-
-
-
-
进入{{lists.storeTitle}}书城
-
低至{{lists.storeDiscount}}折
-
>
-
-
-
进入{{lists.storeTitle2}}书馆
-
{{lists.storeDisc}}
-
>
-
+
+
进入{{lists.storeTitle2}}书馆
+
{{lists.storeDisc}}
+
>
-
-
-
榜单
-
-
+ 榜单
+
+ {{list.title}}
-
-
-
-
{{list.title}}
+
+
+
+
-
-
- - {{list.introClasses}}
- - 展开
-
-
+
+
+ - {{list.introClasses}}
+ - 展开
+
+
@@ -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 @@
-
+
-
-
-
+
+
+
-
+
- - 当当发货&售后
- - 正品保障
- - 支持礼品卡
- - 支持7日无理由退货
- - 礼品包装
+ - 当当发货&售后
+ - 正品保障
+ - 支持礼品卡
+ - 支持7日无理由退货
+ - 礼品包装
-
-
+ }">
-
+
{{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}}
-
-
+
+
@@ -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