diff --git a/common/api/shop.js b/common/api/shop.js index df760ba..b0c65cc 100644 --- a/common/api/shop.js +++ b/common/api/shop.js @@ -1,6 +1,10 @@ export default { init(vm){ return { + // 获取商城首页信息(顶部轮播图与商品分类) + getShopTopList(){ + return vm.$u.post('Shop/getShopTopList'); + }, // 商品推荐 getGoodsRecommend({page}){ return vm.$u.post('Goods/getGoodsRecommend', { @@ -10,7 +14,11 @@ export default { // 购物车商品列表 getCartList() { return vm.$u.post('cart/cartList'); - } + }, + // 购物车商品列表(树结构) + getCartTreeList() { + return vm.$u.post('cart/cartTreeList'); + }, } } diff --git a/common/api/user.js b/common/api/user.js index e75f644..87b6ff8 100644 --- a/common/api/user.js +++ b/common/api/user.js @@ -160,10 +160,24 @@ export default { time: time }); }, + // 会员服务-积分数 + getMemberPointsStat() { + return vm.$u.post('member/memberPointsStat'); + }, // 会员服务-积分列表 getPointslogList() { return vm.$u.post('member/pointslogList'); }, + // 商品收藏列表 + getGoodsFavoritesList() { + return vm.$u.post('Member/getFavoritesList'); + }, + // 店铺收藏列表 + getStoreFavoritesList({ type }) { + return vm.$u.post('Member/getFavoritesList', { + type: type + }); + }, } } } \ No newline at end of file diff --git a/components/mine/address-active/index.vue b/components/mine/address-active/index.vue index 4d96406..6c5e90e 100644 --- a/components/mine/address-active/index.vue +++ b/components/mine/address-active/index.vue @@ -58,13 +58,13 @@ export default { this.getAreaData(); }, created() { - // console.log(this.info); + console.log(typeof this.info); this.initAddressInfo(); }, methods: { // 判断是不是编辑页面 数据初始化 initAddressInfo() { - if(JSON.stringify(this.info) != '{}') { + if(this.info) { [this.name, this.phone, this.address, this.area, this.area_id, this.city_id] = [ this.info.address_realname, this.info.address_mob_phone, @@ -78,7 +78,7 @@ export default { }, // 判断是不是编辑页面 调用接口 confirmBtn() { - JSON.stringify(this.info) != '{}' ? this.editAddress() : this.addAddress(); + this.info ? this.editAddress() : this.addAddress(); }, // 验证 validateValue() { diff --git a/components/mine/article-list/index.vue b/components/mine/article-list/index.vue index 52c72c4..65dd682 100644 --- a/components/mine/article-list/index.vue +++ b/components/mine/article-list/index.vue @@ -1,5 +1,6 @@