diff --git a/api/goods/goodsApi.js b/api/goods/goodsApi.js index a8dc995..75ff320 100644 --- a/api/goods/goodsApi.js +++ b/api/goods/goodsApi.js @@ -56,3 +56,29 @@ export function getGroupBuyProduct(dataObj) { }) } +/** + * 查询产品 + */ +export function getProduct(dataObj) { + return new Promise( + (resolve, reject) => { + requestNoAuth({ + url: url.queryProduct, + method: "GET", + data: dataObj, + //动态数据 + success: function(res) { + if (res.statusCode == 200) { + let _products = res.data.data; + resolve(_products); + return; + } + reject(); + }, + fail: function(e) { + reject(); + } + }); + }) +} + diff --git a/components/vc-price/vc-price.vue b/components/vc-price/vc-price.vue index d7f3b06..0b06ec2 100644 --- a/components/vc-price/vc-price.vue +++ b/components/vc-price/vc-price.vue @@ -16,20 +16,6 @@ - - - - - {{ detail.price }} - - - - 价值:¥{{ detail.original_price }} - - 已兑换:{{ detail.sales }}件 - - - diff --git a/components/vc-recommend/vc-recommend.vue b/components/vc-recommend/vc-recommend.vue index 5c23a25..51e3902 100644 --- a/components/vc-recommend/vc-recommend.vue +++ b/components/vc-recommend/vc-recommend.vue @@ -5,7 +5,7 @@ - + diff --git a/components/vc-sku/vc-sku.vue b/components/vc-sku/vc-sku.vue index abb833a..aac9ce7 100644 --- a/components/vc-sku/vc-sku.vue +++ b/components/vc-sku/vc-sku.vue @@ -68,7 +68,7 @@ import uniNumberBox from '@/components/uni-number-box/uni-number-box.vue'; import { mapMutations, mapActions, mapState } from 'vuex'; export default { - name: 'shoproSku', + name: 'vcSku', components: { uniNumberBox }, @@ -276,6 +276,10 @@ export default { // 当前所选规格下,获取所有有库存的 skuPrice getCanUseSkuPrice() { let newPrice = []; + + if(this.skuPrice == undefined){ + return newPrice; + } for (let price of this.skuPrice) { if (price.stock <= 0) { diff --git a/constant/url.js b/constant/url.js index 9fd3955..38a3fb8 100644 --- a/constant/url.js +++ b/constant/url.js @@ -93,6 +93,7 @@ export default { queryActivitiesType: baseUrl +'app/activitiesType/queryActivitiesType', queryProductLabel: baseUrl +'app/product/queryProductLabel', queryGroupBuyProduct: baseUrl +'app/groupBuy/queryGroupBuyProduct', + queryProduct: baseUrl +'app/product/queryProduct', NEED_NOT_LOGIN_PAGE: [ '/pages/login/login', diff --git a/pages/goodDetail/goodDetail.vue b/pages/goodDetail/goodDetail.vue index 8c03cb9..8ee7719 100644 --- a/pages/goodDetail/goodDetail.vue +++ b/pages/goodDetail/goodDetail.vue @@ -1,16 +1,17 @@