---
# System prepended metadata

title: Untitled

---


<src="https://cdn.jsdelivr.net/npm/sweetalert2@9">
$(document).ready(function(){
		$('input:button').on('click',function(){
			swal.fire({
				title:'注意',
				text:'您確定要將這些點數兌換成現金嗎?',
				icon:'warning',
				buttons:true,
				dangerMode:true
			}).then(result => {
				if(isConfirm){
					if('${coaVO.coapoint}' < $('#price').val()){
						swal.fire('注意','您的申請兌換點數超過持有點數','error');
					} else {
						swal.fire('您已經完成兌換申請作業','FitMate審核通過後將寄信通知您','success');
						setTimeout(function(){
							$('input:button').parent('form').submit();
						},2000);
					} 
				} else {
					swal('取消','已取消兌換申請作業','error');
				}
			});
		});
	});