|
@@ -253,6 +253,9 @@
|
|
if(type=="1"){
|
|
if(type=="1"){
|
|
this.showTime=this.detail.shareEndTime
|
|
this.showTime=this.detail.shareEndTime
|
|
}
|
|
}
|
|
|
|
+ if(!this.showTime){
|
|
|
|
+ this.showTime=new Date().getHours()+":"+new Date().getMinutes()
|
|
|
|
+ }
|
|
this.show=true;
|
|
this.show=true;
|
|
},
|
|
},
|
|
submit(){
|
|
submit(){
|
|
@@ -275,7 +278,14 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
var reserveMinutes=sz2.join();
|
|
var reserveMinutes=sz2.join();
|
|
|
|
+ if(!this.detail.shareStartTime){
|
|
|
|
+ this.detail.shareStartTime=""
|
|
|
|
+ }
|
|
|
|
+ if(!this.detail.shareEndTime){
|
|
|
|
+ this.detail.shareEndTime=""
|
|
|
|
+ }
|
|
var weekTime=[this.detail.shareStartTime,this.detail.shareEndTime]
|
|
var weekTime=[this.detail.shareStartTime,this.detail.shareEndTime]
|
|
|
|
+
|
|
if(this.detail.enableAppointment){
|
|
if(this.detail.enableAppointment){
|
|
if(weekDay==""){
|
|
if(weekDay==""){
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -283,11 +293,7 @@
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- this.detail.weekDay=weekDay
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
|
|
- this.detail.reserveMinutes=reserveMinutes
|
|
|
|
if(!weekTime[0]){
|
|
if(!weekTime[0]){
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title:"开放预约功能需要预约开始时间"
|
|
title:"开放预约功能需要预约开始时间"
|
|
@@ -306,19 +312,31 @@
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- this.detail.weekTime=weekTime
|
|
|
|
|
|
+
|
|
console.log( this.detail )
|
|
console.log( this.detail )
|
|
}
|
|
}
|
|
|
|
+ this.detail.weekDay=weekDay
|
|
|
|
+
|
|
|
|
+ this.detail.weekTime=weekTime.join();
|
|
|
|
|
|
|
|
+ this.detail.reserveMinutes=reserveMinutes
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title:"加载中",mask:true,
|
|
title:"加载中",mask:true,
|
|
})
|
|
})
|
|
API.saveGunShare(this.detail).then((res) => {
|
|
API.saveGunShare(this.detail).then((res) => {
|
|
|
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
- uni.showToast({
|
|
|
|
- title:"操作成功"
|
|
|
|
- })
|
|
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title:"提示",
|
|
|
|
+ content:"操作成功",
|
|
|
|
+ showCancel:false,
|
|
|
|
+ success:()=>{
|
|
|
|
+ uni.navigateBack({
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
|
|