移动端店铺收藏问题
parent
5e5d5b904b
commit
6717721725
|
@ -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}
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
<script>
|
||||
import {
|
||||
getGoodsCollection,
|
||||
getStoreCollection,
|
||||
deleteGoodsCollection,
|
||||
deleteStoreCollection,
|
||||
} from "@/api/members.js";
|
||||
|
@ -154,7 +155,7 @@
|
|||
* 点击店铺左侧取消收藏
|
||||
*/
|
||||
clickStoreSwiperAction(val) {
|
||||
deleteStoreCollection(val.storeId).then((res) => {
|
||||
deleteStoreCollection(val.id).then((res) => {
|
||||
if (res.statusCode == 200) {
|
||||
this.storeList = [];
|
||||
this.getStoreList();
|
||||
|
@ -224,7 +225,7 @@
|
|||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
getGoodsCollection(this.navList[1].params, "store").then((res) => {
|
||||
getStoreCollection(this.navList[1].params, "STORE").then((res) => {
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.success) {
|
||||
|
|
Loading…
Reference in New Issue