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 0000000..c1b9125
Binary files /dev/null and b/static/image/mine/24.png differ