From 21461991aca7463648ad91907adcb32b2db6cc5c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 25 Jun 2023 22:10:27 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=88=91=E7=9A=84=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E3=80=91=201.=20=E6=8E=A5=E5=85=A5=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E3=80=81=E5=88=A0=E9=99=A4=E3=80=81=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/member/address.js | 16 ++ pages/users/user_address_list/index.vue | 351 +++++++++++------------- 2 files changed, 177 insertions(+), 190 deletions(-) create mode 100644 api/member/address.js diff --git a/api/member/address.js b/api/member/address.js new file mode 100644 index 00000000..9a7fd94d --- /dev/null +++ b/api/member/address.js @@ -0,0 +1,16 @@ +import request from "@/utils/request.js"; + +// 获得用户收件地址列表 +export function getAddressList() { + return request.get('app-api/member/address/list', {}); +} + +// 更新用户收件地址 +export function updateAddress(data) { + return request.put('app-api/member/address/update', data); +} + +// 删除用户收件地址 +export function deleteAddress(id) { + return request.delete('app-api/member/address/delete?id=' + id, {}); +} diff --git a/pages/users/user_address_list/index.vue b/pages/users/user_address_list/index.vue index 2b78887a..6e740593 100644 --- a/pages/users/user_address_list/index.vue +++ b/pages/users/user_address_list/index.vue @@ -3,35 +3,41 @@ - + - 收货人:{{item.realName}}{{item.phone}} - 收货地址:{{item.province}}{{item.city}}{{item.district}}{{item.detail}} + 收货人:{{ item.name }} + {{item.mobile}} + + 收货地址:{{item.areaName}} {{item.detailAddress}} - + 设为默认 - + 设为默认 - 编辑 - 删除 + + 编辑 + + + 删除 + - {{loadTitle}} + {{loadTitle}} - + @@ -40,69 +46,56 @@ - 添加新地址 - 导入微信地址 + + 添加新地址 + + + 导入微信地址 + - 添加新地址 - 导入微信地址 + + 添加新地址 + + + 导入微信地址 + - - - -