From 8c993da2cddec6c070e137cfc2c9b07bf23d01fd Mon Sep 17 00:00:00 2001
From: ghusermoon <2673031505@qq.com>
Date: Tue, 23 Jun 2020 17:21:01 +0800
Subject: [PATCH] address api
---
common/api/user.js | 69 +++++++
components/mine/address-active/index.vue | 185 ++++++++++++++++--
.../mine/address-block/address-item.vue | 41 +++-
package-lock.json | 6 +-
package.json | 2 +-
pageE/mine/MemberServe.vue | 23 ++-
pageE/more/AddAddress.vue | 1 -
pageE/more/Address.vue | 27 ++-
pageE/more/EditAddress.vue | 33 +++-
pageE/tool/Manicure.vue | 23 ++-
pageE/tool/ManicureOrder.vue | 35 +++-
static/image/mine/24.png | Bin 0 -> 4379 bytes
12 files changed, 390 insertions(+), 55 deletions(-)
create mode 100644 static/image/mine/24.png
diff --git a/common/api/user.js b/common/api/user.js
index 5fae7e1..e75f644 100644
--- a/common/api/user.js
+++ b/common/api/user.js
@@ -78,10 +78,75 @@ export default {
pid: pid
});
},
+ getArea() {
+ return vm.$u.post('Area/getAreaTree')
+ },
// 用户收货地址列表
getAddressList() {
return vm.$u.post('MemberAddress/addressList');
},
+ // 添加收货地址
+ addressAdd({
+ area_id,
+ city_id,
+ is_default,
+ area_info,
+ address,
+ true_name,
+ mobile_phone,
+ // longitude,
+ // latitude,
+ }) {
+ return vm.$u.post('memberAddress/addressAdd', {
+ area_id: area_id,
+ city_id: city_id,
+ is_default: is_default,
+ area_info: area_info,
+ address: address,
+ true_name: true_name,
+ mobile_phone: mobile_phone,
+ // longitude: longitude,
+ // latitude: latitude,
+ });
+ },
+ // 修改收货地址
+ addressEdit({
+ address_id,
+ area_id,
+ city_id,
+ is_default,
+ area_info,
+ address,
+ true_name,
+ mobile_phone,
+ // longitude,
+ // latitude,
+ }) {
+ return vm.$u.post('memberAddress/addressEdit', {
+ address_id: address_id,
+ area_id: area_id,
+ city_id: city_id,
+ is_default: is_default,
+ area_info: area_info,
+ address: address,
+ true_name: true_name,
+ mobile_phone: mobile_phone,
+ // longitude: longitude,
+ // latitude: latitude,
+ });
+ },
+ // 删除地址
+ deleteAddress({ address_id }) {
+ return vm.$u.post('memberAddress/addressDel', {
+ address_id: address_id
+ });
+ },
+ // 设默认地址
+ setDefaultAddress({ address_id }) {
+ return vm.$u.post('memberAddress/addressSetDefault', {
+ address_id: address_id
+ });
+ },
// 美甲
getManicureList({ page }) {
return vm.$u.post('MemberManicure/getManicureList', {
@@ -95,6 +160,10 @@ export default {
time: time
});
},
+ // 会员服务-积分列表
+ getPointslogList() {
+ return vm.$u.post('member/pointslogList');
+ },
}
}
}
\ No newline at end of file
diff --git a/components/mine/address-active/index.vue b/components/mine/address-active/index.vue
index df3052b..4d96406 100644
--- a/components/mine/address-active/index.vue
+++ b/components/mine/address-active/index.vue
@@ -2,16 +2,20 @@
-
+
-
+
-
+
+
+
+ 定位
+
-
+
设为默认地址
@@ -20,34 +24,158 @@
- 保存地址
-
-
+ 保存地址
+
+
+
@@ -71,6 +199,29 @@ export default {
font-size: 30rpx;
color: rgba(51,51,51,1);
}
+ .area {
+ padding: 0 30rpx;
+ display: flex;
+ > input {
+ padding: 30rpx 0;
+ flex: 1;
+ }
+ > view {
+ margin-left: 30rpx;
+ width: 50rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ font-size: 22rpx;
+ color: rgba(255,120,15,1);
+ > image {
+ width: 26rpx;
+ height: 32rpx;
+ margin-bottom: 10rpx;
+ }
+ }
+ }
}
.edit-btn {
margin: 122rpx auto 0;
diff --git a/components/mine/address-block/address-item.vue b/components/mine/address-block/address-item.vue
index 082b162..7cb8bbe 100644
--- a/components/mine/address-block/address-item.vue
+++ b/components/mine/address-block/address-item.vue
@@ -3,7 +3,7 @@
{{ item.address_realname }}
- {{ item.address_tel_phone }}
+ {{ item.address_mob_phone | phoneFormat }}
{{ $u.trim(item.area_info + item.address_detail, 'all') }}
@@ -13,6 +13,7 @@
:name="item.address_id"
shape="circle"
label-size="22"
+ :disabled="false"
>
{{ item.address_is_default == '0' ? '设为默认' : '已设为默认' }}
@@ -24,11 +25,12 @@
编辑
-
+
删除
+
@@ -42,13 +44,40 @@ export default {
},
props: ['item', 'current'],
mounted() {
- console.log(this.item);
+ // console.log(this.item);
+ },
+ filters: {
+ phoneFormat(value) {
+ return value.replace(/^(\d{3})\d*(\d{4})$/, '$1****$2');
+ }
},
methods: {
editAddress() {
- uni.navigateTo({
- url: '/pageE/more/EditAddress'
- });
+ this.$u.route({
+ url: '/pageE/more/EditAddress',
+ params: {
+ item: JSON.stringify(this.item)
+ }
+ })
+ },
+ deleteAddress() {
+ // console.log(this.item.address_id);
+ this.$u.api.deleteAddress({
+ address_id: this.item.address_id
+ }).then((res)=>{
+ if(res.errCode == 0) {
+ this.showToast(res.message, 'success');
+ this.$emit('getAddressList');
+ } else {
+ this.showToast(res.message, 'warning');
+ }
+ })
+ },
+ showToast(message, type) {
+ this.$refs.uToast.show({
+ title: message,
+ type: type,
+ })
},
},
}
diff --git a/package-lock.json b/package-lock.json
index 6318c8b..9cc3ff0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"uview-ui": {
- "version": "1.2.9",
- "resolved": "https://registry.npm.taobao.org/uview-ui/download/uview-ui-1.2.9.tgz",
- "integrity": "sha1-PwC6ziaB/LXyMacGRkMfPrZfF2c="
+ "version": "1.3.68",
+ "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.3.68.tgz",
+ "integrity": "sha512-fwszoohFC1HLvIqwwnXPRytT52qGy0viGEzyJtVwemNBAu5z6Ddjwe9ORqsrlQQo7PSvHdyCNHWrSLGzoyKKoQ=="
}
}
}
diff --git a/package.json b/package.json
index 314bcc3..8089796 100644
--- a/package.json
+++ b/package.json
@@ -13,6 +13,6 @@
"author": "",
"license": "ISC",
"dependencies": {
- "uview-ui": "^1.2.9"
+ "uview-ui": "^1.3.68"
}
}
diff --git a/pageE/mine/MemberServe.vue b/pageE/mine/MemberServe.vue
index 9ab2f45..699c4c6 100644
--- a/pageE/mine/MemberServe.vue
+++ b/pageE/mine/MemberServe.vue
@@ -43,13 +43,13 @@
-
+
- 积分商城兑换礼品
- 2020-03-11
+ {{ item.pl_desc }}
+ {{ item.pl_addtime }}
-
- {{ index&1 ? '-' + 10.00 : '+' + 10.00 }}
+
+ {{ item.pl_addtime > 0 ? item.pl_addtime : '+' + 10.00 }}
@@ -70,9 +70,13 @@ export default {
}],
current: 0,
swiperCurrent: 0,
- nodes: '2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
'
+ nodes: '2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
',
+ pointslogList: []
}
},
+ onShow() {
+ this.getPointslogList();
+ },
methods: {
tabsChange(index) {
this.swiperCurrent = index;
@@ -81,6 +85,13 @@ export default {
let current = e.detail.current;
this.swiperCurrent = current;
this.current = current;
+ },
+ getPointslogList() {
+ this.$u.api.getPointslogList().then((res)=>{
+ if (res.errCode == 0) {
+ this.pointslogList = res.data;
+ }
+ })
}
},
}
diff --git a/pageE/more/AddAddress.vue b/pageE/more/AddAddress.vue
index ad1546f..76a285c 100644
--- a/pageE/more/AddAddress.vue
+++ b/pageE/more/AddAddress.vue
@@ -17,7 +17,6 @@ export default {
onLoad() {
},
methods: {
-
},
}
diff --git a/pageE/more/Address.vue b/pageE/more/Address.vue
index 8836540..1822694 100644
--- a/pageE/more/Address.vue
+++ b/pageE/more/Address.vue
@@ -2,10 +2,11 @@
-
+
添加地址
+
diff --git a/pageE/tool/Manicure.vue b/pageE/tool/Manicure.vue
index 5100701..ddcc108 100644
--- a/pageE/tool/Manicure.vue
+++ b/pageE/tool/Manicure.vue
@@ -10,10 +10,10 @@
订单
- 已预约
+ {{ item.status }}
- 美甲人姓名:xxx
- 时间:2020-04-12
+ 美甲人姓名:{{ item.manicure_name }}
+ 时间:{{ item.manicure_time | dateFormat }}
@@ -39,20 +39,33 @@ export default {
current: 0,
swiperCurrent: 0,
page: 1,
- orderList: 5,
+ orderList: [],
loadStatus: 'loadmore',
}
},
onShow() {
this.current = 0;
this.swiperCurrent = 0;
+ this.getManicureList();
+ },
+ filters: {
+ dateFormat(value) {
+ let date = new Date(value * 1000);
+ let year, month, day;
+ year = date.getFullYear();
+ month = date.getMonth() + 1;
+ day = date.getDate();
+ return year + "-" + month + "-" + day;
+ }
},
methods: {
getManicureList() {
this.$u.api.getManicureList({
page: this.page
}).then((res)=>{
- if (res.errCode == 0) {}
+ if (res.errCode == 0) {
+ this.orderList = res.data.list;
+ }
})
},
reachBottom() {
diff --git a/pageE/tool/ManicureOrder.vue b/pageE/tool/ManicureOrder.vue
index 50471cc..ae2f1b3 100644
--- a/pageE/tool/ManicureOrder.vue
+++ b/pageE/tool/ManicureOrder.vue
@@ -11,8 +11,9 @@
{{ time }}
- 确认订单
+ 确认订单
+
diff --git a/static/image/mine/24.png b/static/image/mine/24.png
new file mode 100644
index 0000000000000000000000000000000000000000..c1b912526b0f1a996a1101f20ee70c49f8bc51c0
GIT binary patch
literal 4379
zcmV+$5#;WPP)4r~TFR`aBIa?-ii{%)
zD5B1&sHg}!Cd^?317<}KXy`z7-+T63``qdVwCSow^!^1@)jj7sJAM1x2VoT-y_lHB
zwR6x|P3(H3>6Q>}32tLVdx2J?QiJH)AT`-C+JMSjL>oXFQJD|^Q%Gka(JT`G8B{k?
zJvT2SNmgZRvMN6cTN~PABfR#(`E`kOLsa^Z(g$P%9KBGgfGUJ|g*7y6v=nhl@6+ju_O5BVGT7jiN
zGs+_1U0^ECKS%kJ*)kIQPRUP~0O^o!TY~J0uq)^e;C4Z%?O?TUA#AP%NPqBo1e8NK
zgmr%OTV*l$*FfGvnF%^mMlYFFDx#7A>DlDS)of0r1JLLwoa|VzNZUI3aLS&=h<=91
zY|w8&?9>$@Tc`ccS_!f)s#~Da8y616teabIEqhHli<+@&UqJT(kg9=Mlw=Nm|XFASwV#(eU@Utc*0NMWQwF
zX-|~3iP#F2-ypKZayw2?eGBwy)K4XnH|6q%d7UBZ6p#+@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