From 808b1214aec0d75c19a1c2c4d8b6de4fd247e41b Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: Wed, 28 Oct 2020 23:51:20 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=95=86=E5=93=81=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/goods/goodsApi.js | 26 +
components/vc-price/vc-price.vue | 14 -
components/vc-recommend/vc-recommend.vue | 2 +-
components/vc-sku/vc-sku.vue | 6 +-
constant/url.js | 1 +
pages/goodDetail/goodDetail.vue | 1161 +++++++++++-----------
6 files changed, 596 insertions(+), 614 deletions(-)
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 @@
-
+
-
-
+
+
- {{ swiperCurrent + 1 }} / {{ goodsInfo.images.length }}
+ {{ swiperCurrent + 1 }} / {{ goodsInfo.carouselFigurePhotos.length }}
@@ -18,11 +19,7 @@
{{ goodsInfo.title }}
{{ goodsInfo.subtitle }}
-
+
规格
@@ -31,25 +28,16 @@
-
+
-
-
+
+
-
+
玩法
{{ goodsInfo.activity.richtext_title || '开团/参团·邀请好友·人满发货(不满退款' }}
@@ -68,7 +56,9 @@
-
+
+
+
@@ -78,8 +68,12 @@
-
+