diff --git a/api/members.js b/api/members.js index 46eb96b..e198238 100644 --- a/api/members.js +++ b/api/members.js @@ -202,6 +202,22 @@ export function getGoodsCollection(params, type) { }); } +/** + * 获取商品收藏 + * @param params + * @returns {AxiosPromise} + */ +export function getStoreCollection(params, type) { + return http.request({ + url: `/member/storeCollection/${type}`, + method: Method.GET, + needToken: true, + loading: false, + message: false, + params, + }); +} + /** * 收藏商品 * @returns {AxiosPromise} @@ -236,7 +252,7 @@ export function deleteGoodsCollection(ids) { */ export function deleteStoreCollection(store_id) { return http.request({ - url: `/member/collection/delete/STORE/${store_id}`, + url: `/member/storeCollection/delete/STORE/${store_id}`, method: Method.DELETE, needToken: true, }); @@ -255,6 +271,19 @@ export function getGoodsIsCollect(type, good_id) { }); } +/** + * 获取商品是否被收藏 + * @param good_id + */ +export function getStoreIsCollect(type, store_id) { + return http.request({ + url: `/member/storeCollection/isCollection/${type}/${store_id}`, + method: Method.GET, + needToken: true, + loading: false, + }); +} + /** * 收藏店铺 * @param store_id 店铺ID @@ -262,10 +291,9 @@ export function getGoodsIsCollect(type, good_id) { */ export function collectionStore(store_id) { return http.request({ - url: "members/collection/store", - header: { "content-type": "application/x-www-form-urlencoded" }, + url: `/member/storeCollection/add/STORE/${store_id}`, method: Method.POST, - data: { store_id }, + needToken: true, }); } diff --git a/components/m-buy/goods.vue b/components/m-buy/goods.vue index 2dba42d..6605795 100644 --- a/components/m-buy/goods.vue +++ b/components/m-buy/goods.vue @@ -96,8 +96,7 @@ 数量 - - + @@ -112,8 +111,11 @@ + + diff --git a/pages/mine/address/add.vue b/pages/mine/address/add.vue index 1ca7598..d19e4a3 100644 --- a/pages/mine/address/add.vue +++ b/pages/mine/address/add.vue @@ -121,6 +121,7 @@ export default { // 选择地址后数据的回调 callBackAddress(val) { + console.log(val) uni.showLoading({ title: "加载中", }); @@ -133,7 +134,7 @@ export default { this.form.consigneeAddressPath = val.data.result.name; //地址名称, ','分割 this.form.lat = val.latitude; //纬度 this.form.lon = val.longitude; //经度 - if (this.$store.state.isShowToast){ uni.hideLoading() }; + uni.hideLoading(); } this.mapFlag = !this.mapFlag; //关闭地图 diff --git a/pages/mine/myCollect.vue b/pages/mine/myCollect.vue index 7191f68..e10766f 100644 --- a/pages/mine/myCollect.vue +++ b/pages/mine/myCollect.vue @@ -64,6 +64,7 @@ diff --git a/pages/order/fillorder.vue b/pages/order/fillorder.vue index 1a99144..8f806a5 100644 --- a/pages/order/fillorder.vue +++ b/pages/order/fillorder.vue @@ -1,7 +1,11 @@