Merge pull request '修改美甲' (#363) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/363
This commit is contained in:
commit
ab4c80ae36
@ -154,10 +154,11 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 美甲-提交订单
|
// 美甲-提交订单
|
||||||
addManicure({ name, time }) {
|
addManicure({ name, phone, time }) {
|
||||||
return vm.$u.post('MemberManicure/addManicure', {
|
return vm.$u.post('MemberManicure/addManicure', {
|
||||||
name: name,
|
name: name,
|
||||||
time: time
|
phone: phone,
|
||||||
|
// time: time
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 会员服务-积分数
|
// 会员服务-积分数
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
<view class="order-status">{{ item.status }}</view>
|
<view class="order-status">{{ item.status }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-name">美甲人姓名:{{ item.manicure_name }}</view>
|
<view class="order-name">美甲人姓名:{{ item.manicure_name }}</view>
|
||||||
|
<view class="order-name">美甲人电话:{{ item.phone }}</view>
|
||||||
<view class="order-date">时间:{{ item.manicure_time | date }}</view>
|
<view class="order-date">时间:{{ item.manicure_time | date }}</view>
|
||||||
</view>
|
</view>
|
||||||
<u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-bottom="20" v-if="orderList.length>=pageSize"></u-loadmore>
|
<u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-bottom="20" v-if="orderList.length>=pageSize"></u-loadmore>
|
||||||
@ -129,7 +130,7 @@ export default {
|
|||||||
.order-item {
|
.order-item {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
width:690rpx;
|
width:690rpx;
|
||||||
height: 229rpx;
|
// height: 229rpx;
|
||||||
background: rgba(255,255,255,1);
|
background: rgba(255,255,255,1);
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
@ -5,15 +5,23 @@
|
|||||||
<view>美甲人:</view>
|
<view>美甲人:</view>
|
||||||
<input type="text" v-model="name" />
|
<input type="text" v-model="name" />
|
||||||
</view>
|
</view>
|
||||||
<view class="order-date" @click="show=true">
|
<view class="order-name">
|
||||||
<view class="title">美甲时间:</view>
|
<view>美甲人电话:</view>
|
||||||
<image src="../static/mine/21.png" v-if="!time"></image>
|
<input type="text" v-model="phone" maxlength="11" />
|
||||||
<view v-else class="time">{{ time }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="order-address">
|
<view class="order-address">
|
||||||
<view class="title">美甲地址:</view>
|
<view class="title">美甲地址:</view>
|
||||||
<input type="text" v-model="address" disabled />
|
<input type="text" v-model="address" disabled />
|
||||||
</view>
|
</view>
|
||||||
|
<view class="order-name">
|
||||||
|
<view>美甲店电话:</view>
|
||||||
|
<input type="text" v-model="storePhone" disabled />
|
||||||
|
</view>
|
||||||
|
<!-- <view class="order-date" @click="show=true">
|
||||||
|
<view class="title">美甲时间:</view>
|
||||||
|
<image src="../static/mine/21.png" v-if="!time"></image>
|
||||||
|
<view v-else class="time">{{ time }}</view>
|
||||||
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="order-btn" @click="addManicureOrder">确认订单</view>
|
<view class="order-btn" @click="addManicureOrder">确认订单</view>
|
||||||
<u-picker mode="time" v-model="show" :params="params" @confirm="chooseDate"></u-picker>
|
<u-picker mode="time" v-model="show" :params="params" @confirm="chooseDate"></u-picker>
|
||||||
@ -26,6 +34,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
name: '',
|
name: '',
|
||||||
time: '',
|
time: '',
|
||||||
|
phone: '',
|
||||||
|
storePhone: '',
|
||||||
address: '',
|
address: '',
|
||||||
params: {
|
params: {
|
||||||
year: true,
|
year: true,
|
||||||
@ -41,28 +51,38 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getConfigInfo();
|
this.getConfigInfo();
|
||||||
|
this.getPhone();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
validateValue() {
|
validateValue() {
|
||||||
if(this.$u.test.isEmpty(this.name)) {
|
if(this.$u.test.isEmpty(this.name)) {
|
||||||
this.showToast('姓名不能为空', 'error');
|
this.showToast('姓名不能为空');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(this.$u.test.isEmpty(this.time)) {
|
if(this.$u.test.isEmpty(this.phone)) {
|
||||||
this.showToast('日期不能为空', 'error');
|
this.showToast('美甲人电话不能为空');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(new Date() > new Date(this.time)) {
|
if(!this.$u.test.mobile(this.phone)) {
|
||||||
this.showToast('日期错误', 'error');
|
this.showToast('美甲人电话错误');
|
||||||
return false;
|
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;
|
return true;
|
||||||
},
|
},
|
||||||
addManicureOrder() {
|
addManicureOrder() {
|
||||||
if(!this.validateValue()) return false;
|
if(!this.validateValue()) return false;
|
||||||
this.$u.api.addManicure({
|
this.$u.api.addManicure({
|
||||||
name: this.name,
|
name: this.name,
|
||||||
time: new Date(this.time)
|
phone: this.phone,
|
||||||
|
// time: new Date(this.time)
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.$refs.uToast.show({
|
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) {
|
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 + '分'
|
||||||
let time = e.year + '/' + e.month + '/' + e.day + ' ' + e.hour + ':' + e.minute
|
let time = e.year + '/' + e.month + '/' + e.day + ' ' + e.hour + ':' + e.minute
|
||||||
|
Loading…
Reference in New Issue
Block a user