|  | @ -79,6 +79,7 @@ | 
		
	
		
			
				|  |  | <script> |  |  | <script> | 
		
	
		
			
				|  |  | import { reactive, getCurrentInstance, toRefs, onMounted } from 'vue' |  |  | import { reactive, getCurrentInstance, toRefs, onMounted } from 'vue' | 
		
	
		
			
				|  |  | import { areaList } from '@vant/area-data' |  |  | import { areaList } from '@vant/area-data' | 
		
	
		
			
				|  |  |  |  |  | import { Toast } from 'vant' | 
		
	
		
			
				|  |  | export default { |  |  | export default { | 
		
	
		
			
				|  |  | 	name: 'AddAddress', |  |  | 	name: 'AddAddress', | 
		
	
		
			
				|  |  | 	setup() { |  |  | 	setup() { | 
		
	
	
		
			
				|  | @ -97,7 +98,6 @@ export default { | 
		
	
		
			
				|  |  |     onMounted(() => { |  |  |     onMounted(() => { | 
		
	
		
			
				|  |  |       data.addressType = proxy.$route.query.type |  |  |       data.addressType = proxy.$route.query.type | 
		
	
		
			
				|  |  |       data.currentAddress = JSON.parse(proxy.$route.query.currentAddress)  |  |  |       data.currentAddress = JSON.parse(proxy.$route.query.currentAddress)  | 
		
	
		
			
				|  |  |       console.log(data.currentAddress) |  |  |  | 
		
	
		
			
				|  |  |       if(data.currentAddress){ |  |  |       if(data.currentAddress){ | 
		
	
		
			
				|  |  |         data.name = data.currentAddress.name |  |  |         data.name = data.currentAddress.name | 
		
	
		
			
				|  |  |         data.phone = data.currentAddress.phone |  |  |         data.phone = data.currentAddress.phone | 
		
	
	
		
			
				|  | @ -122,7 +122,7 @@ export default { | 
		
	
		
			
				|  |  |       }else{ |  |  |       }else{ | 
		
	
		
			
				|  |  |         param.id = data.currentAddress.id |  |  |         param.id = data.currentAddress.id | 
		
	
		
			
				|  |  |       } |  |  |       } | 
		
	
		
			
				|  |  |       console.log(param) |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       param.isDefault = param.isDefault === false ? 0 : 1 | 
		
	
		
			
				|  |  |       proxy.$http |  |  |       proxy.$http | 
		
	
		
			
				|  |  | 		  	    .post(proxy.$API.EDITMYADDRESS, |  |  | 		  	    .post(proxy.$API.EDITMYADDRESS, | 
		
	
		
			
				|  |  | 		  			param, |  |  | 		  			param, | 
		
	
	
		
			
				|  | @ -133,8 +133,16 @@ export default { | 
		
	
		
			
				|  |  |             } |  |  |             } | 
		
	
		
			
				|  |  | 		  	   ) |  |  | 		  	   ) | 
		
	
		
			
				|  |  | 		  	.then(res => { |  |  | 		  	.then(res => { | 
		
	
		
			
				|  |  |           data.detailBook = res.data.book |  |  |  | 
		
	
		
			
				|  |  |           data.showDetial = true |  |  |  | 
		
	
		
			
				|  |  |  |  |  |           if(res.errCode === 0){ | 
		
	
		
			
				|  |  |  |  |  |             if(data.addressType==='add'){ | 
		
	
		
			
				|  |  |  |  |  |               Toast('新增地址成功') | 
		
	
		
			
				|  |  |  |  |  |             }else{ | 
		
	
		
			
				|  |  |  |  |  |               Toast('编辑地址成功') | 
		
	
		
			
				|  |  |  |  |  |             } | 
		
	
		
			
				|  |  |  |  |  |             setTimeout(()=>{ | 
		
	
		
			
				|  |  |  |  |  |               proxy.$router.push({ path: '/myAddress'}) | 
		
	
		
			
				|  |  |  |  |  |             },1000) | 
		
	
		
			
				|  |  |  |  |  |           } | 
		
	
		
			
				|  |  | 		  	}) |  |  | 		  	}) | 
		
	
		
			
				|  |  | 		  	.catch((res) => { |  |  | 		  	.catch((res) => { | 
		
	
		
			
				|  |  | 		  		console.log(res) |  |  | 		  		console.log(res) | 
		
	
	
		
			
				|  | 
 |