From 134e27ca87fcc4bf0166c1d22d36e3f3ee451971 Mon Sep 17 00:00:00 2001 From: dragon1211 Date: Sat, 8 Jan 2022 14:31:41 -0800 Subject: [PATCH] fixed line --- backend/resources/js/parent/child/add.jsx | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/backend/resources/js/parent/child/add.jsx b/backend/resources/js/parent/child/add.jsx index 475e7ffb..20cc353e 100644 --- a/backend/resources/js/parent/child/add.jsx +++ b/backend/resources/js/parent/child/add.jsx @@ -65,8 +65,24 @@ const ParentChildAdd = () => { const inviteUrl = document.getElementById('inviteurl_html').value; const siteUrl = document.getElementById('siteurl').value; const lineText = `「KIKI」の招待が届いています。%0Aまずは以下より仮登録を行ってください。%0A%0A※スマホ本体を最新の状態にアップデートしてからURLをクリックしてください。%0A%0A${inviteUrl}%0A%0A▼公式サイトはこちら%0A${siteUrl}`; - setSuccess('招待用URLをLINEで追信しました。'); - window.location.href = 'http://line.me/R/msg/text/?'+lineText; + + setIsCheckRelation(true); + set401Error(''); + await axios.get('/api/fathers/relations/check', {params:{father_id: father_id}}) + .then(response=>{ + setNotice(response.data.notice); + setIsCheckRelation(false); + switch(response.data.status_code){ + case 200: { + setSuccess('招待用URLをLINEで追信しました。'); + window.location.href = 'http://line.me/R/msg/text/?'+lineText; + break; + } + case 400: set400Error(response.data.error_messages); break; + case 401: set401Error(response.data.error_messages); set400Error(response.data.error_messages); break; + } + }) + } const contactMailText = 'mailto:56@zotman.jp?subject=KIKIメンバー追加について&body='+ @@ -124,7 +140,7 @@ const ParentChildAdd = () => { 招待用URLをコピーする
- 招待用URLをLINEで追信 + 招待用URLをLINEで送信