diff --git a/App.vue b/App.vue index 5277032..0d416ed 100644 --- a/App.vue +++ b/App.vue @@ -2,6 +2,7 @@ export default { onLaunch: function() { this.$store.commit('initConfig') + this.$store.commit('getCategoryList') }, onShow: function() { }, diff --git a/api/model/index.js b/api/model/index.js index 2db07b1..5c4b3d3 100644 --- a/api/model/index.js +++ b/api/model/index.js @@ -20,7 +20,7 @@ const api = { }, // 获取首页新闻详情 getRiceNewsDetail: { - url: '/rice_index/getRiceNewsDetail', + url: '/rice_index/getCommonNewsDetail', method: 'GET', }, // 获取首页新闻列表 @@ -43,6 +43,28 @@ const api = { url: '/rice_index/getRiceProductList', method: 'GET', }, + // 查询分类接口 + getCategoryList: { + url: '/rice_index/getCategoryList', + method: 'GET', + }, + // 获取分类分页商品列表接口 + getClassShopPageList: { + url: '/rice_index/getClassShopPageList', + method: 'GET', + }, + // 加入购物车 + addCart: { + url: '/rice_index/addCart', + method: 'GET', + auth : true, + }, + // 创建订单 + createOrder: { + url: '/rice_index/createOrder', + method: 'GET', + auth : true, + }, } export default api \ No newline at end of file diff --git a/api/model/info.js b/api/model/info.js index 993cfc8..6fc61df 100644 --- a/api/model/info.js +++ b/api/model/info.js @@ -41,16 +41,29 @@ const api = { getOrderPageList: { url: '/rice_info/getOrderPageList', method: 'GET', - limit : 500, auth : true, }, // 获取流水记录带分页 getWaterPageList: { url: '/rice_info/getWaterPageList', method: 'GET', - limit : 500, auth : true, }, + // 获取相关介绍 + getInfoIntroduce: { + url: '/rice_info/getInfoIntroduce', + method: 'GET', + }, + // 获取相关介绍详情 + getRiceInfo: { + url: '/rice_info/getRiceNewsDetail', + method: 'GET', + }, + // 查询个人信息相关 + getRiceInfo: { + url: '/rice_info/getRiceInfo', + method: 'GET', + }, } export default api \ No newline at end of file diff --git a/components/base/tabbar.vue b/components/base/tabbar.vue index bbff9ef..724d6a0 100644 --- a/components/base/tabbar.vue +++ b/components/base/tabbar.vue @@ -65,7 +65,7 @@ }, methods : { toPath(item, index){ - if(index == this.select){ + if(item.key == this.select){ return } uni.reLaunch({ diff --git a/components/product/productItem.vue b/components/product/productItem.vue index f3da87d..1228adc 100644 --- a/components/product/productItem.vue +++ b/components/product/productItem.vue @@ -1,7 +1,8 @@