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 @@ - 添加新地址 - 导入微信地址 + + 添加新地址 + + + 导入微信地址 + - 添加新地址 - 导入微信地址 + + 添加新地址 + + + 导入微信地址 + - - - -