diff --git a/api/api.js b/api/api.js index 04a98f0..2d975d2 100644 --- a/api/api.js +++ b/api/api.js @@ -190,21 +190,15 @@ const config = { method: 'POST', showLoading: true, }, - // 获取收藏列表 - queryCollectionList: { - url: '/user/queryCollectionList', - method: 'GET', - showLoading: true, - }, - // 添加购物车 - addShopcar: { - url: '/user/addShopcar', + // 取消收藏 + deleteCollection: { + url: '/user/deleteCollection', method: 'POST', showLoading: true, }, - // 获取购物车列表 - queryShopcarList: { - url: '/user/queryShopcarList', + // 获取收藏列表 + queryCollectionList: { + url: '/user/queryCollectionList', method: 'GET', showLoading: true, }, @@ -239,7 +233,18 @@ const config = { method: 'GET', showLoading: true, }, - + // 添加购物车 + addShopcar: { + url: '/wares/addShopcar', + method: 'POST', + showLoading: true, + }, + // 获取购物车列表 + queryShopcarList: { + url: '/wares/queryShopcarList', + method: 'GET', + showLoading: true, + }, } diff --git a/components/list/h-list.vue b/components/list/h-list.vue new file mode 100644 index 0000000..bc6c049 --- /dev/null +++ b/components/list/h-list.vue @@ -0,0 +1,59 @@ + + + + + diff --git a/manifest.json b/manifest.json index 72c4c63..8f22c8d 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "name" : "unapp模板", + "name" : "遗产里的景徳镇", "appid" : "__UNI__197A38F", "description" : "", "versionName" : "1.0.0", diff --git a/pages_order/components/product/productList.vue b/pages_order/components/product/productList.vue index 2441561..00c87b3 100644 --- a/pages_order/components/product/productList.vue +++ b/pages_order/components/product/productList.vue @@ -1,7 +1,10 @@ @@ -80,6 +80,12 @@ this.productId = args.id this.queryWaresById() }, + onShareAppMessage(res) { + return { + title: this.productDetail.waresTitle, + path: '/pages_order/product/productDetail?id=' + this.id + } + }, methods: { // 分享商品 share() { diff --git a/pages_order/service/reservationDetail.vue b/pages_order/service/reservationDetail.vue index 201e244..5a0db23 100644 --- a/pages_order/service/reservationDetail.vue +++ b/pages_order/service/reservationDetail.vue @@ -169,11 +169,16 @@ methods: { addCollection(){ this.$api('addCollection', { - collectionItmeId : this.detail.id, + itemId : this.detail.id, collectionType : this.collectType[this.type], }, res => { if(res.code == 200){ this.getData() + + uni.showToast({ + title: res.message, + icon:'none' + }) } }) },