zz-shopify-components 0.3.1-beta.12 → 0.3.1-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
if (!customElements.get('zz-edu-info-dialog')) {
|
|
2
|
+
class ZZEduInfoDialog extends HTMLElement {
|
|
2
3
|
constructor() {
|
|
3
4
|
super();
|
|
4
5
|
this.init();
|
|
@@ -115,8 +116,8 @@ class ZZEduInfoDialog extends HTMLElement {
|
|
|
115
116
|
|
|
116
117
|
|
|
117
118
|
}
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
|
|
120
120
|
customElements.define('zz-edu-info-dialog', ZZEduInfoDialog);
|
|
121
|
+
}
|
|
121
122
|
|
|
122
123
|
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
<zz-radio-tabs-item value="manual">Upload student card</zz-radio-tabs-item>
|
|
98
98
|
</zz-radio-tabs>
|
|
99
99
|
<div class="zz-edu-form-container">
|
|
100
|
-
<form class="zz-edu-form-form" id="eduForm">
|
|
100
|
+
<form class="zz-edu-form-form" id="eduForm-{{ block.id }}">
|
|
101
101
|
<div class="zz-edu-form-group">
|
|
102
102
|
<label for="firstName" class="zz-edu-form-label">Full name</label>
|
|
103
103
|
<div class="zz-edu-form-row">
|
|
@@ -217,19 +217,14 @@
|
|
|
217
217
|
|
|
218
218
|
<script src="{{ 'aliyun-oss-sdk-6.20.0.min.js' | asset_url }}" defer></script>
|
|
219
219
|
|
|
220
|
-
|
|
221
|
-
{% assign base_url = 'https://h130-app-server-us.hoverx1.cn' %}
|
|
222
|
-
{% else %}
|
|
223
|
-
{% assign base_url = 'https://h130-app-server-test-us.hoverx1.cn' %}
|
|
224
|
-
{% endif %}
|
|
220
|
+
|
|
225
221
|
<script src="{{ 'zz-edu-info-dialog.js' | asset_url }}" defer></script>
|
|
226
222
|
|
|
227
223
|
<script>
|
|
228
|
-
|
|
229
|
-
const verifySuccessMessage = '{{ block.settings.verify_success_message }}';
|
|
230
|
-
const verifyFailTitle = '{{ block.settings.verify_fail_title }}';
|
|
224
|
+
|
|
231
225
|
|
|
232
|
-
|
|
226
|
+
|
|
227
|
+
var EduErrorCodeConf = {
|
|
233
228
|
201: {
|
|
234
229
|
zh: "该教育邮箱已完成注册,无需重复认证",
|
|
235
230
|
en: "This educational email has been registered, no need to re-authenticate"
|
|
@@ -276,10 +271,18 @@
|
|
|
276
271
|
}
|
|
277
272
|
}
|
|
278
273
|
document.addEventListener('DOMContentLoaded', function () {
|
|
274
|
+
{% if block.settings.request_type == 'prod' %}
|
|
275
|
+
{% assign base_url = 'https://h130-app-server-us.hoverx1.cn' %}
|
|
276
|
+
{% else %}
|
|
277
|
+
{% assign base_url = 'https://h130-app-server-test-us.hoverx1.cn' %}
|
|
278
|
+
{% endif %}
|
|
279
|
+
const verifySuccessTitle = '{{ block.settings.verify_success_title }}';
|
|
280
|
+
const verifySuccessMessage = '{{ block.settings.verify_success_message }}';
|
|
281
|
+
const verifyFailTitle = '{{ block.settings.verify_fail_title }}';
|
|
279
282
|
|
|
280
283
|
const baseUrl = '{{ base_url }}';
|
|
281
284
|
const block = document.getElementById('shopify-block-{{ block.id }}');
|
|
282
|
-
const form = block.querySelector('#eduForm');
|
|
285
|
+
const form = block.querySelector('#eduForm-{{ block.id }}');
|
|
283
286
|
let verifyType = 'email'
|
|
284
287
|
let identityDocumentUrl = ''
|
|
285
288
|
|
|
@@ -544,15 +547,6 @@
|
|
|
544
547
|
block.querySelector('.upload-file-row').classList.add('zz-edu-form-hidden');
|
|
545
548
|
}
|
|
546
549
|
});
|
|
547
|
-
{% comment %} block.querySelector('.zz-edu-form-submit-btn').addEventListener('click', (e) => {
|
|
548
|
-
const zzEduInfoDialog = block.querySelector('zz-edu-info-dialog');
|
|
549
|
-
zzEduInfoDialog.showModal({
|
|
550
|
-
title: 'Verify my email',
|
|
551
|
-
message: 'Please enter the verification code sent to your email',
|
|
552
|
-
showInput: true
|
|
553
|
-
});
|
|
554
|
-
|
|
555
|
-
}); {% endcomment %}
|
|
556
550
|
|
|
557
551
|
});
|
|
558
552
|
</script>
|