From efe80aeeec516fbcddc94c75c4dbdc8dd93c7a83 Mon Sep 17 00:00:00 2001 From: sin <2943460818@qq.com> Date: Wed, 10 Apr 2019 22:27:03 +0800 Subject: [PATCH] =?UTF-8?q?=20-=20=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile-web/src/api/user.js | 89 +++++++++++++---------- mobile-web/src/page/shipping/order.vue | 10 ++- mobile-web/src/page/user/address/edit.vue | 2 +- 3 files changed, 59 insertions(+), 42 deletions(-) diff --git a/mobile-web/src/api/user.js b/mobile-web/src/api/user.js index 2fd7d250a..bc4432cc2 100644 --- a/mobile-web/src/api/user.js +++ b/mobile-web/src/api/user.js @@ -16,45 +16,6 @@ export function DelFavorite(id){ }) } -export function GetAddressList(){ - return request({ - url: '/user-api/users/address/list', - method: 'get', - }) -} - -export function GetAddressById(id){ - return request({ - url: '/user-api/users/address/address', - method: 'get', - params: { id } - }) -} - -export function UpdateAddress(data){ - return request({ - url: '/user-api/users/address/update', - method: 'PUT', - params: data - }) -} - -export function SaveAddress(data){ - return request({ - url: '/user-api/users/address/add', - method: 'POST', - params: data - }) -} - -export function DelAddress(data){ - return request({ - url: '/user-api/users/address/remove', - method: 'DELETE', - params: data - }) -} - export function GetCoupon(data){ return request({ url: '/User/GetCoupon', @@ -108,3 +69,53 @@ export function doPassportMobileSendRegisterCode(mobile) { } }); } + + + +// -------------------------- address + +export function GetAddressList(){ + return request({ + url: '/user-api/users/address/list', + method: 'get', + }) +} + +export function GetAddressById(id){ + return request({ + url: '/user-api/users/address/address', + method: 'get', + params: { id } + }) +} + +export function GetDefaultAddress(){ + return request({ + url: '/user-api/users/address/default_address', + method: 'get', + }) +} + +export function UpdateAddress(data){ + return request({ + url: '/user-api/users/address/update', + method: 'PUT', + params: data + }) +} + +export function SaveAddress(data){ + return request({ + url: '/user-api/users/address/add', + method: 'POST', + params: data + }) +} + +export function DelAddress(data){ + return request({ + url: '/user-api/users/address/remove', + method: 'DELETE', + params: data + }) +} diff --git a/mobile-web/src/page/shipping/order.vue b/mobile-web/src/page/shipping/order.vue index 3d9e495ee..7fcc78964 100644 --- a/mobile-web/src/page/shipping/order.vue +++ b/mobile-web/src/page/shipping/order.vue @@ -57,6 +57,7 @@