|  | @@ -116,7 +116,10 @@
 | 
											
												
													
														|  |  				this.getAddrById(this.id)
 |  |  				this.getAddrById(this.id)
 | 
											
												
													
														|  |  			}
 |  |  			}
 | 
											
												
													
														|  |  			this.fromPage = page.from;
 |  |  			this.fromPage = page.from;
 | 
											
												
													
														|  | -			this.backUrl = decodeURIComponent(page.backUrl);
 |  | 
 | 
											
												
													
														|  | 
 |  | +			if(page.backUrl){
 | 
											
												
													
														|  | 
 |  | +				this.backUrl = decodeURIComponent(page.backUrl);
 | 
											
												
													
														|  | 
 |  | +			}
 | 
											
												
													
														|  | 
 |  | +			
 | 
											
												
													
														|  |  		},
 |  |  		},
 | 
											
												
													
														|  |  		onReady() {
 |  |  		onReady() {
 | 
											
												
													
														|  |  			//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
 |  |  			//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
 | 
											
										
											
												
													
														|  | @@ -156,18 +159,19 @@
 | 
											
												
													
														|  |  				})
 |  |  				})
 | 
											
												
													
														|  |  			},
 |  |  			},
 | 
											
												
													
														|  |  			addAddr(){
 |  |  			addAddr(){
 | 
											
												
													
														|  | 
 |  | +				let that = this;
 | 
											
												
													
														|  |  				this.$u.api.addAddr(this.model).then(res=>{
 |  |  				this.$u.api.addAddr(this.model).then(res=>{
 | 
											
												
													
														|  | -					// console.log('res',res);
 |  | 
 | 
											
												
													
														|  | -					if(this.backUrl){
 |  | 
 | 
											
												
													
														|  | -						uni.$u.route(this.backUrl, {
 |  | 
 | 
											
												
													
														|  | -							// type: 'redirectTo'
 |  | 
 | 
											
												
													
														|  | -						});
 |  | 
 | 
											
												
													
														|  | -					}else{
 |  | 
 | 
											
												
													
														|  | -						uni.$u.route('/center/addrlist', {
 |  | 
 | 
											
												
													
														|  | -							type: 'redirectTo'
 |  | 
 | 
											
												
													
														|  | -						});
 |  | 
 | 
											
												
													
														|  | -					}
 |  | 
 | 
											
												
													
														|  | -					
 |  | 
 | 
											
												
													
														|  | 
 |  | +					uni.$u.toast('保存成功')
 | 
											
												
													
														|  | 
 |  | +					setTimeout(()=>{
 | 
											
												
													
														|  | 
 |  | +						if(that.backUrl){
 | 
											
												
													
														|  | 
 |  | +							console.log('that.backUrl',that.backUrl);
 | 
											
												
													
														|  | 
 |  | +							uni.$u.route(that.backUrl, {});
 | 
											
												
													
														|  | 
 |  | +						}else{
 | 
											
												
													
														|  | 
 |  | +							uni.$u.route('/center/addrlist', {
 | 
											
												
													
														|  | 
 |  | +								type: 'redirectTo'
 | 
											
												
													
														|  | 
 |  | +							});
 | 
											
												
													
														|  | 
 |  | +						}
 | 
											
												
													
														|  | 
 |  | +					},1500)
 | 
											
												
													
														|  |  				}).catch(err=>{
 |  |  				}).catch(err=>{
 | 
											
												
													
														|  |  					console.log('addAddr',err.data);
 |  |  					console.log('addAddr',err.data);
 | 
											
												
													
														|  |  				})
 |  |  				})
 | 
											
										
											
												
													
														|  | @@ -175,10 +179,14 @@
 | 
											
												
													
														|  |  			editAddr(){
 |  |  			editAddr(){
 | 
											
												
													
														|  |  				this.model.id = this.id;
 |  |  				this.model.id = this.id;
 | 
											
												
													
														|  |  				this.$u.api.editAddr(this.model).then(res=>{
 |  |  				this.$u.api.editAddr(this.model).then(res=>{
 | 
											
												
													
														|  | 
 |  | +					uni.$u.toast('保存成功')
 | 
											
												
													
														|  |  					// console.log('res',res);
 |  |  					// console.log('res',res);
 | 
											
												
													
														|  | -					uni.$u.route('/center/addrlist', {
 |  | 
 | 
											
												
													
														|  | -						type: 'redirectTo'
 |  | 
 | 
											
												
													
														|  | -					});
 |  | 
 | 
											
												
													
														|  | 
 |  | +					setTimeout(()=>{
 | 
											
												
													
														|  | 
 |  | +						uni.$u.route('/center/addrlist', {
 | 
											
												
													
														|  | 
 |  | +							type: 'redirectTo'
 | 
											
												
													
														|  | 
 |  | +						});
 | 
											
												
													
														|  | 
 |  | +					},1500)
 | 
											
												
													
														|  | 
 |  | +					
 | 
											
												
													
														|  |  				}).catch(err=>{
 |  |  				}).catch(err=>{
 | 
											
												
													
														|  |  					console.log('addAddr',err.data);
 |  |  					console.log('addAddr',err.data);
 | 
											
												
													
														|  |  				})
 |  |  				})
 |