diff --git a/api/model/index.js b/api/model/index.js index 99a6565..9fe5cdc 100644 --- a/api/model/index.js +++ b/api/model/index.js @@ -16,6 +16,11 @@ const api = { url: '/index/getProductDetail', method: 'GET', }, + // 获取分类 + getClassify: { + url: '/index/getClassify', + method: 'GET', + }, // 获取商品列表 getProductList: { url: '/index/getProductList', @@ -86,6 +91,12 @@ const api = { method: 'POST', limit : 1000, }, + // 修改默认地址 + updateDefaultAddress: { + url: '/info/updateDefaultAddress', + method: 'POST', + limit : 1000, + }, // 删除地址 deleteAddress: { url: '/info/deleteAddress', diff --git a/pages/index/category.vue b/pages/index/category.vue index 1b25d49..41e1bb2 100644 --- a/pages/index/category.vue +++ b/pages/index/category.vue @@ -10,9 +10,9 @@ :barItemBadgeStyle="{right:'20px',top:'12px'}" @change="change"> - + @@ -61,7 +61,7 @@ methods: { // 获取分类列表 getCategory() { - this.$api('getIcon', res => { + this.$api('getClassify', res => { if(res.code == 200) { this.category = res.result if(this.category.length > 0) { @@ -73,7 +73,7 @@ // 获取商品列表 getProductList(shopIconId) { this.$api('getProductList', { - shopIconId: shopIconId, + shopClassId: shopIconId, pageNo: 1, pageSize: 99999 }, res => { diff --git a/pages_order/mine/address.vue b/pages_order/mine/address.vue index 8bb9c95..e92a4a9 100644 --- a/pages_order/mine/address.vue +++ b/pages_order/mine/address.vue @@ -107,7 +107,7 @@ //修改默认地址 editDefault(id) { - this.$api('addressDefault', { + this.$api('updateDefaultAddress', { id: id, }, res => { if (res.code == 200) { diff --git a/pages_order/product/productList.vue b/pages_order/product/productList.vue index d7d327f..2b3c284 100644 --- a/pages_order/product/productList.vue +++ b/pages_order/product/productList.vue @@ -27,7 +27,7 @@ onLoad({title, iconId}) { this.title = title this.iconId = iconId - this.queryParams.iconId = iconId + this.queryParams.shopIconId = iconId }, methods: {