diff --git a/api/goods/index.js b/api/goods/index.js index 4f20803..c4db7c1 100644 --- a/api/goods/index.js +++ b/api/goods/index.js @@ -1,6 +1,6 @@ import request from '@/utils/request' import {httpRequest} from '@/utils/request/axios' -const baseUrl = 'https://api.1024api.com/api-interface' +const baseUrl = 'https://api.1024api.com/api-interface/app' // api地址 const api = { @@ -46,3 +46,19 @@ export const apiGetCommodityList = (data) => { ); } +// 获取商品详情 +export const apiGetCommodityDetail = (data) => { + return httpRequest.post( + `${baseUrl}/index/product/detail`, + data + ); + } + +// 加入购物车 +export const apiAddCart = (data) => { + return httpRequest.post( + `${baseUrl}/shipping/cart/addOrUpdate`, + data + ); + } + diff --git a/components/goods-sku-popup/index.vue b/components/goods-sku-popup/index.vue index 67dd53f..d2bd9d8 100644 --- a/components/goods-sku-popup/index.vue +++ b/components/goods-sku-popup/index.vue @@ -801,6 +801,7 @@ let that = this; that.checkSelectComplete({ success: function(selectShop) { + console.warn('----- my data is : ', selectShop) selectShop.buy_num = that.selectNum; that.$emit('buy-now', selectShop); that.$emit('buy', selectShop); diff --git a/manifest.json b/manifest.json index f61768b..a999b8a 100644 --- a/manifest.json +++ b/manifest.json @@ -139,13 +139,10 @@ "devServer" : { "port" : 8010, "proxy" : { - "/api" : { + "/index.php" : { "target" : "https://shop2.client.yiovo.com", "changeOrigin" : true, - "secure" : true, - "pathRewrite" : { - "^/api" : "/index.php?s=/api" - } + "secure" : true } } }, diff --git a/pages/goods/components/Service.vue b/pages/goods/components/Service.vue index e242fa6..d8f964a 100644 --- a/pages/goods/components/Service.vue +++ b/pages/goods/components/Service.vue @@ -49,13 +49,16 @@ // 显示详情内容弹窗 showPopup: false, // 服务列表数据 - list: [] + list: [{ + "name": "48小时发货", + "summary": "下单后48小时之内发货" +}] } }, created() { // 获取商品服务列表 - this.getServiceList() + // this.getServiceList() }, methods: { diff --git a/pages/goods/components/SkuPopup.vue b/pages/goods/components/SkuPopup.vue index e8796ab..1068bc2 100644 --- a/pages/goods/components/SkuPopup.vue +++ b/pages/goods/components/SkuPopup.vue @@ -7,9 +7,8 @@