From 0ac6b869bf783248aa39d30876e582530ce72fec Mon Sep 17 00:00:00 2001 From: zc <2064281269@qq.com> Date: Mon, 1 Dec 2025 18:31:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=95=86=E5=93=81=E4=B8=8B=E5=8D=95?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/checkout.js | 1 + api/order.js | 18 ++ components/goods-sku-popup/index.vue | 2 +- config.js | 3 +- pages/checkout/index.vue | 264 +++++++++++++-------------- pages/goods/components/SkuPopup.vue | 11 +- 6 files changed, 162 insertions(+), 137 deletions(-) diff --git a/api/checkout.js b/api/checkout.js index db4a362..935d121 100644 --- a/api/checkout.js +++ b/api/checkout.js @@ -10,6 +10,7 @@ const api = { // 结算台订单信息 export const order = (mode, param) => { + console.warn('----- my data is { mode, ...param }: ', { mode, ...param }) return request.get(api.order, { mode, ...param }) } diff --git a/api/order.js b/api/order.js index a0a7289..52d6f07 100644 --- a/api/order.js +++ b/api/order.js @@ -1,4 +1,6 @@ import request from '@/utils/request' +import {httpRequest} from '@/utils/request/axios' +const baseUrl = 'https://api.1024api.com/api-interface/app' // api地址 const api = { @@ -40,3 +42,19 @@ export function cancel(orderId, data) { export function receipt(orderId, data) { return request.post(api.receipt, { orderId, ...data }) } + +// 获取地理位置 +export const apiGetAddressList = (data) => { + return httpRequest.post( + `${baseUrl}/buyer/address/list`, + data + ); + } + +// 下单 +export const apiOrderAdd = (data) => { + return httpRequest.post( + `${baseUrl}/order/add`, + data + ); + } diff --git a/components/goods-sku-popup/index.vue b/components/goods-sku-popup/index.vue index d2bd9d8..e931ea7 100644 --- a/components/goods-sku-popup/index.vue +++ b/components/goods-sku-popup/index.vue @@ -801,7 +801,7 @@ let that = this; that.checkSelectComplete({ success: function(selectShop) { - console.warn('----- my data is : ', selectShop) + console.warn('----- my data is 111: ', selectShop) selectShop.buy_num = that.selectNum; that.$emit('buy-now', selectShop); that.$emit('buy', selectShop); diff --git a/config.js b/config.js index 1607afe..2f0d66d 100644 --- a/config.js +++ b/config.js @@ -8,7 +8,8 @@ export default { * 例如: https://www.你的域名.com/index.php?s=/api/ */ // apiUrl: "https://shop2.client.yiovo.com/index.php?s=/api/", // 微信小程序 - apiUrl: "/index.php?s=/api/", // H5 +// apiUrl: "/index.php?s=/api/", // H5 + apiUrl: "http://127.0.0.1:4523/m1/7488507-7223875-default/index.php?s=/api/", // mock /** * 是否启用商城设置缓存 diff --git a/pages/checkout/index.vue b/pages/checkout/index.vue index 09e6847..3fa458a 100644 --- a/pages/checkout/index.vue +++ b/pages/checkout/index.vue @@ -1,18 +1,18 @@