diff --git a/common/api/shop.js b/common/api/shop.js
index d3c4551..aea37d9 100644
--- a/common/api/shop.js
+++ b/common/api/shop.js
@@ -314,7 +314,7 @@ export default {
goodsShelves({live_id}){
return vm.$u.post('Specialci/goodsShelves',{live_id})
},
- //
+ // 收藏店铺
addFavoriteStore({ id }) {
return vm.$u.post('member/addFavoriteStore',{ fid: id })
},
@@ -322,6 +322,17 @@ export default {
getAtwillUserInfo({ id }) {
return vm.$u.post('Specialci/getAtwillUserInfo',{ store_id: id })
},
+ // 收藏商品
+ addFavoriteGoods({ fid }) {
+ return vm.$u.post('member/addFavoriteGoods',{ fid: fid })
+ },
+ // 取消收藏(商品/店铺)
+ removeFavorite({ fid, type }) {
+ return vm.$u.post('Member/removeFavorite',{
+ fav_id: fid,
+ type: type
+ })
+ }
}
}
diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index 4bff349..c21e20c 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -66,7 +66,8 @@ const install = (Vue, vm) => {
}
return false;
} else if (res.errCode == 1) {
- console.log(res.message);
+ // console.log(res.message);
+ return res;
} else {
// 如果返回false,则会调用Promise的reject回调,
// 并将进入this.$u.post(url).then().catch(res=>{})的catch回调中,res为服务端的返回值
diff --git a/components/mine/collection-item/index.vue b/components/mine/collection-item/index.vue
index 8c81c56..95c511c 100644
--- a/components/mine/collection-item/index.vue
+++ b/components/mine/collection-item/index.vue
@@ -3,7 +3,7 @@
¥{{ item.favlog_price }}
- {{ item.fav_time }}
+ {{ item.fav_time | date }}
@@ -31,7 +31,6 @@ export default {
data() {
return {
list: [],
- show: false,
options: [
{
text: '删除',
@@ -50,16 +49,22 @@ export default {
this.$u.api.getFavoritesList().then(res => {
if(res.errCode == 0) {
this.list = res.data;
+ this.list.forEach(item => {
+ Object.assign(item, { show: false });
+ })
}
})
},
- removeFavorite(id) {
+ removeFavorite(index) {
+ const id = this.list[index].fav_id;
this.$u.api.removeFavorite({
- id: id
+ fid: id,
+ type: 'goods'
}).then(res => {
- this.$u.toast(res.message);
if(res.errCode == 0) {
this.getGoodsFavoritesList();
+ } else {
+ this.$u.toast(res.message);
}
})
},
diff --git a/components/mine/coupon/mine.vue b/components/mine/coupon/mine.vue
index 30813ec..a41172a 100644
--- a/components/mine/coupon/mine.vue
+++ b/components/mine/coupon/mine.vue
@@ -10,7 +10,7 @@
¥{{ couponInfo.voucher_price }}
满{{ couponInfo.voucher_limit }}使用
- 仅限{{ couponInfo.type == 1 ? '平台' : couponInfo.store_name }}{{ couponInfo.gc_id | showClass(goodsClass) }}商品使用
+ 仅限{{ couponInfo.type == 1 ? '指定商品' : couponInfo.store_name }}{{ couponInfo.gc_id | showClass(goodsClass) }}商品使用
兑换积分:{{ couponInfo.voucher_points }}积分
有效期{{ couponInfo.voucher_startdate }}-{{ couponInfo.voucher_enddate }}
diff --git a/components/shop/list/index.vue b/components/shop/list/index.vue
index 0f607b6..f524ac9 100644
--- a/components/shop/list/index.vue
+++ b/components/shop/list/index.vue
@@ -13,7 +13,7 @@
-
+
diff --git a/pageE/mine/StoreCollection.vue b/pageE/mine/StoreCollection.vue
index fd796ca..78325a1 100644
--- a/pageE/mine/StoreCollection.vue
+++ b/pageE/mine/StoreCollection.vue
@@ -51,7 +51,6 @@ export default {
})
},
removeFavorite(id) {
- console.log(id);
this.$u.api.removeFavorite({
id: id,
type: 'store'
diff --git a/pageE/order/Index.vue b/pageE/order/Index.vue
index 90ac9a8..d7d149e 100644
--- a/pageE/order/Index.vue
+++ b/pageE/order/Index.vue
@@ -13,7 +13,7 @@
-
+
diff --git a/pages.json b/pages.json
index 1eca007..e0be766 100644
--- a/pages.json
+++ b/pages.json
@@ -1030,7 +1030,6 @@
{
"path": "pages/mine/index",
"style": {
- "enablePullDownRefresh": true,
"navigationBarTitleText": "我的",
"app-plus": {
"titleSize": "36px",
diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index 1dd2aa2..9b9650e 100644
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -19,10 +19,10 @@
会员服务
-
+