Bladeren bron

设置页面

zhengkaixin 3 jaren geleden
bovenliggende
commit
7a06e4edc9
2 gewijzigde bestanden met toevoegingen van 29 en 9 verwijderingen
  1. 26 8
      pagesFinance/user/myPile.vue
  2. 3 1
      pagesFinance/user/pileManagement.vue

+ 26 - 8
pagesFinance/user/myPile.vue

@@ -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({
 							
 							

+ 3 - 1
pagesFinance/user/pileManagement.vue

@@ -97,7 +97,7 @@
 				></text>
 				></text>
 			</view>
 			</view>
 			
 			
-			<view class="iconfont more" 	
+			<view class="iconfont more"  v-if="isAllow"	
 				 @click="gotoUrl('pagesFinance/user/myPile?id='+item.id)" 
 				 @click="gotoUrl('pagesFinance/user/myPile?id='+item.id)" 
 			>
 			>
 				<text class="set" >设置</text>&#xe600;
 				<text class="set" >设置</text>&#xe600;
@@ -171,6 +171,7 @@
 		data() {
 		data() {
 			return {
 			return {
 				gunList:[],
 				gunList:[],
+				isAllow:false,
 				detail:{
 				detail:{
 					
 					
 
 
@@ -225,6 +226,7 @@
 				API.carDeviceDetail({
 				API.carDeviceDetail({
 					deviceId:this.id
 					deviceId:this.id
 				}).then((res) => {
 				}).then((res) => {
+					this.isAllow=res.data.isAllow	 
 					this.detail=res.data.device	 
 					this.detail=res.data.device	 
 					this.sprList=res.data.sprList
 					this.sprList=res.data.sprList
 					this.gunList=res.data.gunList
 					this.gunList=res.data.gunList