diff --git a/litemall-vue/src/api/api.js b/litemall-vue/src/api/api.js index 52d08215..b76b03a8 100644 --- a/litemall-vue/src/api/api.js +++ b/litemall-vue/src/api/api.js @@ -219,8 +219,29 @@ const CommentCount='wx/comment/count'; //评论总数 const CommentPost='wx/comment/post'; //发表评论 const TopicList='wx/topic/list'; //专题列表 +export function topicList(query) { + return request({ + url: TopicList, + method: 'get', + params: query + }) +} const TopicDetail='wx/topic/detail'; //专题详情 +export function topicDetail(query) { + return request({ + url: TopicDetail, + method: 'get', + params: query + }) +} const TopicRelated='wx/topic/related'; //相关专题 +export function topicRelated(query) { + return request({ + url: TopicRelated, + method: 'get', + params: query + }) +} const SearchIndex='wx/search/index'; //搜索关键字 const SearchResult='wx/search/result'; //搜索结果 diff --git a/litemall-vue/src/router/items.js b/litemall-vue/src/router/items.js index 2569041e..58d01698 100644 --- a/litemall-vue/src/router/items.js +++ b/litemall-vue/src/router/items.js @@ -61,5 +61,17 @@ export default [ name: 'brandList', component: () => import('@/views/items/brand-list'), props: route => route.query + }, + { + path: '/items/topic/:topicId', + name: 'topic', + props: true, + component: () => import('@/views/items/topic') + }, + { + path: '/items/topic-list', + name: 'topicList', + component: () => import('@/views/items/topic-list'), + props: route => route.query } ]; diff --git a/litemall-vue/src/views/home/tabbar-home.vue b/litemall-vue/src/views/home/tabbar-home.vue index 95191d34..1223d869 100755 --- a/litemall-vue/src/views/home/tabbar-home.vue +++ b/litemall-vue/src/views/home/tabbar-home.vue @@ -91,7 +91,7 @@ :url="goBrand(brand.id)"> -
{{ brand.name }}
+
{{ brand.name }}
@@ -152,6 +152,29 @@
+ + + + +
{{ topic.title }}
+
{{ topic.subtitle }}
+
+
+
+ + + 更多专题精选 + + +
+
+ @@ -200,6 +223,9 @@ export default { goBrand(id) { return `#/items/brand/${id}`; }, + goTopic(id) { + return `#/items/topic/${id}`; + }, getCoupon(id) { couponReceive({ couponId: id }).then(res => { Toast.success('领取成功'); diff --git a/litemall-vue/src/views/items/brand-list/index.vue b/litemall-vue/src/views/items/brand-list/index.vue index b7e00753..522ff0c8 100644 --- a/litemall-vue/src/views/items/brand-list/index.vue +++ b/litemall-vue/src/views/items/brand-list/index.vue @@ -56,7 +56,6 @@ export default { getBrandList() { this.page++; brandList({ - isNew: true, page: this.page, limit: this.limit }).then(res => { diff --git a/litemall-vue/src/views/items/topic-list/index.vue b/litemall-vue/src/views/items/topic-list/index.vue new file mode 100644 index 00000000..23bcadd3 --- /dev/null +++ b/litemall-vue/src/views/items/topic-list/index.vue @@ -0,0 +1,141 @@ + + + + + \ No newline at end of file diff --git a/litemall-vue/src/views/items/topic/index.vue b/litemall-vue/src/views/items/topic/index.vue new file mode 100644 index 00000000..665efb28 --- /dev/null +++ b/litemall-vue/src/views/items/topic/index.vue @@ -0,0 +1,87 @@ + + + + + \ No newline at end of file