From 28832c38aed0c92add98acd2f21f5d0e9867ad95 Mon Sep 17 00:00:00 2001
From: ghusermoon <2673031505@qq.com>
Date: Fri, 11 Sep 2020 14:45:30 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BE=8E=E7=94=B2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/api/user.js | 5 ++--
pageE/tool/Manicure.vue | 3 ++-
pageE/tool/ManicureOrder.vue | 49 ++++++++++++++++++++++++++++--------
3 files changed, 44 insertions(+), 13 deletions(-)
diff --git a/common/api/user.js b/common/api/user.js
index da2a7e7..909f210 100644
--- a/common/api/user.js
+++ b/common/api/user.js
@@ -154,10 +154,11 @@ export default {
});
},
// 美甲-提交订单
- addManicure({ name, time }) {
+ addManicure({ name, phone, time }) {
return vm.$u.post('MemberManicure/addManicure', {
name: name,
- time: time
+ phone: phone,
+ // time: time
});
},
// 会员服务-积分数
diff --git a/pageE/tool/Manicure.vue b/pageE/tool/Manicure.vue
index c185975..f19661d 100644
--- a/pageE/tool/Manicure.vue
+++ b/pageE/tool/Manicure.vue
@@ -14,6 +14,7 @@
{{ item.status }}
美甲人姓名:{{ item.manicure_name }}
+ 美甲人电话:{{ item.phone }}
时间:{{ item.manicure_time | date }}
@@ -129,7 +130,7 @@ export default {
.order-item {
padding: 30rpx;
width:690rpx;
- height: 229rpx;
+ // height: 229rpx;
background: rgba(255,255,255,1);
border-radius: 10rpx;
margin-bottom: 20rpx;
diff --git a/pageE/tool/ManicureOrder.vue b/pageE/tool/ManicureOrder.vue
index 7f079fb..1b3f83e 100644
--- a/pageE/tool/ManicureOrder.vue
+++ b/pageE/tool/ManicureOrder.vue
@@ -5,15 +5,23 @@
美甲人:
-
- 美甲时间:
-
- {{ time }}
+
+ 美甲人电话:
+
美甲地址:
+
+ 美甲店电话:
+
+
+
确认订单
@@ -26,6 +34,8 @@ export default {
return {
name: '',
time: '',
+ phone: '',
+ storePhone: '',
address: '',
params: {
year: true,
@@ -41,28 +51,38 @@ export default {
},
onLoad() {
this.getConfigInfo();
+ this.getPhone();
},
methods: {
validateValue() {
if(this.$u.test.isEmpty(this.name)) {
- this.showToast('姓名不能为空', 'error');
+ this.showToast('姓名不能为空');
return false;
}
- if(this.$u.test.isEmpty(this.time)) {
- this.showToast('日期不能为空', 'error');
+ if(this.$u.test.isEmpty(this.phone)) {
+ this.showToast('美甲人电话不能为空');
return false;
}
- if(new Date() > new Date(this.time)) {
- this.showToast('日期错误', 'error');
+ if(!this.$u.test.mobile(this.phone)) {
+ this.showToast('美甲人电话错误');
return false;
}
+ // if(this.$u.test.isEmpty(this.time)) {
+ // this.showToast('日期不能为空', 'error');
+ // return false;
+ // }
+ // if(new Date() > new Date(this.time)) {
+ // this.showToast('日期错误', 'error');
+ // return false;
+ // }
return true;
},
addManicureOrder() {
if(!this.validateValue()) return false;
this.$u.api.addManicure({
name: this.name,
- time: new Date(this.time)
+ phone: this.phone,
+ // time: new Date(this.time)
}).then((res)=>{
if(res.errCode == 0) {
this.$refs.uToast.show({
@@ -85,6 +105,15 @@ export default {
}
})
},
+ getPhone() {
+ this.$u.api.getConfigInfo({
+ code: 'manicure_phone',
+ }).then(res => {
+ if(res.errCode == 0) {
+ this.storePhone = res.data.config.value;
+ }
+ })
+ },
chooseDate(e) {
// let time = e.year + '年' + e.month + '月' + e.day + '日' + e.hour + '时' + e.minute + '分'
let time = e.year + '/' + e.month + '/' + e.day + ' ' + e.hour + ':' + e.minute