From c23e1922a38c5a956f87a308f2a059d386ccfd58 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 26 Jun 2023 20:52:27 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=A1=AE=E8=AE=A4=E9=A1=B5=EF=BC=8C?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=9C=B0=E5=9D=80=E3=80=91=201.=20=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/member/address.js | 5 + api/user.js | 34 ---- components/addressWindow/index.vue | 65 ++++--- pages/users/order_confirm/index.vue | 272 +++++++++++----------------- 4 files changed, 144 insertions(+), 232 deletions(-) diff --git a/api/member/address.js b/api/member/address.js index 7b6a5b2e..861dad04 100644 --- a/api/member/address.js +++ b/api/member/address.js @@ -7,6 +7,11 @@ export function getAddress(id) { }); } +// 获得默认的用户收件地址 +export function getDefaultUserAddress() { + return request.get('app-api/member/address/get-default', {}); +} + // 获得用户收件地址列表 export function getAddressList() { return request.get('app-api/member/address/list', {}); diff --git a/api/user.js b/api/user.js index 3ac9f17a..53854438 100644 --- a/api/user.js +++ b/api/user.js @@ -243,40 +243,6 @@ export function userLevelDetection(){ return request.get('user/level/detection'); } -/** - * - * 地址列表 - * @param object data -*/ -export function getAddressList(data){ - return request.get('address/list',data); -} - -/** - * 设置默认地址 - * @param int id -*/ -export function setAddressDefault(id){ - return request.post('address/default/set',{id:id}) -} - -/** - * 修改 添加地址 - * @param object data -*/ -export function editAddress(data){ - return request.post('address/edit',data); -} - -/** - * 删除地址 - * @param int id - * -*/ -export function delAddress(id){ - return request.post('address/del',{id:id}) -} - /** * 获取单个地址 * @param int id diff --git a/components/addressWindow/index.vue b/components/addressWindow/index.vue index d079fb3a..274c023f 100644 --- a/components/addressWindow/index.vue +++ b/components/addressWindow/index.vue @@ -3,14 +3,17 @@ 选择地址 - - + + - {{item.realName}}{{item.phone}} - {{item.province}}{{item.city}}{{item.district}}{{item.detail}} + + {{ item.name }} + {{ item.mobile }} + + {{ item.areaName }} {{ item.detailAddress }} - + @@ -24,10 +27,8 @@ -