差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン 次のリビジョン両方とも次のリビジョン | ||
apps:public:member_entry [2020/03/21 11:54] – admin | apps:public:member_entry [2020/07/01 20:11] – admin | ||
---|---|---|---|
行 22: | 行 22: | ||
<div class=" | <div class=" | ||
<ul> | <ul> | ||
- | <li>賛助会員、公認審判員、チーム代表者(および、その代理の方)はこちらから会員登録をお願いいたします。</ | + | < |
< | < | ||
</ul> | </ul> | ||
行 34: | 行 34: | ||
<div class=" | <div class=" | ||
<input type=" | <input type=" | ||
- | < | + | <span> |
+ | < | ||
</ | </ | ||
</ | </ | ||
行 47: | 行 48: | ||
</ | </ | ||
<h4 v-show=" | <h4 v-show=" | ||
- | < | + | <span> |
+ | < | ||
</ | </ | ||
</ | </ | ||
行 103: | 行 105: | ||
</ | </ | ||
- | <script> | + | < |
- | const VueRecaptcha | + | |
- | + | ||
- | Vue.component(' | + | |
- | template: '# | + | |
- | components: { | + | |
- | ' | + | |
- | }, | + | |
- | data: function() { | + | |
- | return { | + | |
- | item: { | + | |
- | login: '', | + | |
- | password: '', | + | |
- | email: '' | + | |
- | } | + | |
- | } | + | |
- | }, | + | |
- | methods: { | + | |
- | show(item) { | + | |
- | this.item = item; | + | |
- | jQuery('# | + | |
- | }, | + | |
- | hide() { | + | |
- | jQuery('# | + | |
- | }, | + | |
- | applyButtonClickHandler() { | + | |
- | this.$emit(' | + | |
- | this.hide(); | + | |
- | }, | + | |
- | cancelButtonClickHandler() { | + | |
- | this.hide(); | + | |
- | } | + | |
- | } | + | |
- | }); | + | |
- | + | ||
- | var app = new Vue({ | + | |
- | el: '# | + | |
- | components: { | + | |
- | ' | + | |
- | }, | + | |
- | data: { | + | |
- | item: { | + | |
- | login: '', | + | |
- | password: '', | + | |
- | email: '', | + | |
- | recaptcha: '' | + | |
- | }, | + | |
- | errors: { | + | |
- | login: '', | + | |
- | password: '', | + | |
- | email: '' | + | |
- | }, | + | |
- | display_password: | + | |
- | }, | + | |
- | methods: { | + | |
- | clearItem() { | + | |
- | this.item.login = ''; | + | |
- | this.item.password = ''; | + | |
- | this.item.email = ''; | + | |
- | this.item.recaptcha = ''; | + | |
- | }, | + | |
- | clearErrors() { | + | |
- | this.errors.login = ''; | + | |
- | this.errors.password = ''; | + | |
- | this.errors.email = ''; | + | |
- | this.errors.recaptcha = ''; | + | |
- | }, | + | |
- | validate() { | + | |
- | let isValid = true; | + | |
- | this.clearErrors(); | + | |
- | this.item.recaptcha = document.getElementById(' | + | |
- | if (!this.item.recaptcha) { | + | |
- | this.errors.recaptcha = ' | + | |
- | isValid = false; | + | |
- | } | + | |
- | re_login = /^[\x20-\x7e]{3, | + | |
- | if (!this.item.login || !re_login.test(this.item.login)) { | + | |
- | this.errors.login = ' | + | |
- | isValid = false; | + | |
- | } | + | |
- | re_login = / | + | |
- | if (!this.item.password) { | + | |
- | this.errors.password = ' | + | |
- | isValid = false; | + | |
- | } | + | |
- | re_email = / | + | |
- | if (!this.item.email || re_email.test(this.item.email)) { | + | |
- | this.errors.email = ' | + | |
- | isValid = false; | + | |
- | } | + | |
- | return isValid; | + | |
- | }, | + | |
- | showConfirmModalHandler() { | + | |
- | if (this.validate()) { | + | |
- | this.$refs.confirmModal.show(this.item); | + | |
- | } | + | |
- | }, | + | |
- | applyItemHandler() { | + | |
- | this.loading = true; | + | |
- | const url = '/ | + | |
- | const api = axios.create({withCredentials: | + | |
- | api.post(url, | + | |
- | resource: ' | + | |
- | action: ' | + | |
- | params: this.item | + | |
- | }) | + | |
- | .then((res) => { | + | |
- | alert(' | + | |
- | }) | + | |
- | .catch((res) => { | + | |
- | alert(' | + | |
- | this.loading = false; | + | |
- | }); | + | |
- | }, | + | |
- | clearItemHandler() { | + | |
- | this.clearErrors(); | + | |
- | this.clearItem(); | + | |
- | } | + | |
- | } | + | |
- | }) | + | |
- | </ | + | |
</ | </ |