action: { instructions: '您可以登录你的后台查看全部数据:', button: { color: '#3869D4', text: '点击进入', link: 'http://songs12174.cn4.caihongjianzhan.com' } }, outro: '感谢您的使用,您遇到任务问题都可以联系我们的售后' } } return fetch('//yun-api.sungdell.com/send-email?email=' + email, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'application/json', }, body: "subject=表单数据&emailObj=" + encodeURIComponent(JSON.stringify(emailObj)), }).then(response => response.json()) .then(data => { console.log(data); if (data && data.status === 0) { console.info('发送邮件成功'); return Promise.resolve(); } return Promise.reject(data); }); } return Promise.resolve(); }) .then(() => { Swal.fire({ title: 'Thank you for your message!', text: 'I will reply to you as soon as possible, thank you!', icon: 'success', confirmButtonText: 'OK', customClass: { confirmButton: 'text-white bg-primary border-primary rounded-lg py-2 px-4 text-center text-xl transition-all brightness-100 hover:brightness-90' }, buttonsStyling: false }) }) .catch(e => { Swal.fire({ title: 'Thank you for your message!', text: e.message || e, icon: 'error', confirmButtonText: 'OK', customClass: { confirmButton: 'text-white bg-primary border-primary rounded-lg py-2 px-4 text-center text-xl transition-all brightness-100 hover:brightness-90' }, buttonsStyling: false }) }) }) } }); });