overseas 0.0.1

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.
Files changed (178) hide show
  1. package/README.md +12 -0
  2. package/lib/base/bottom-popup.js +550 -0
  3. package/lib/base/button.js +400 -0
  4. package/lib/base/dialog.js +979 -0
  5. package/lib/base/icon.js +273 -0
  6. package/lib/base/image.js +309 -0
  7. package/lib/base/material-list.js +357 -0
  8. package/lib/base/popup.js +364 -0
  9. package/lib/business/basic-image.js +325 -0
  10. package/lib/business/bottom-fixed-button.js +350 -0
  11. package/lib/business/class-choose.js +1717 -0
  12. package/lib/business/grade-panel.js +683 -0
  13. package/lib/business/material-panel.js +778 -0
  14. package/lib/business/notified-panel.js +2141 -0
  15. package/lib/business/page-render.js +364 -0
  16. package/lib/business/registration-panel.js +1071 -0
  17. package/lib/business/selector-panel.js +667 -0
  18. package/lib/business/student-info.js +1172 -0
  19. package/lib/business/switch-student.js +1407 -0
  20. package/lib/business/tips-popup.js +626 -0
  21. package/lib/business/user-login.js +816 -0
  22. package/lib/index.js +1 -0
  23. package/lib/network/api.js +64 -0
  24. package/lib/network/apiUrl.js +68 -0
  25. package/lib/overseas-ui.common.js +8771 -0
  26. package/lib/static/logo.b6015b3.png +0 -0
  27. package/lib/static/logo.b6015b30.png +0 -0
  28. package/lib/theme-style/bottom-fixed-button.css +1 -0
  29. package/lib/theme-style/bottom-popup.css +1 -0
  30. package/lib/theme-style/button.css +1 -0
  31. package/lib/theme-style/class-choose.css +1 -0
  32. package/lib/theme-style/common.css +1 -0
  33. package/lib/theme-style/dialog.css +1 -0
  34. package/lib/theme-style/grade-panel.css +1 -0
  35. package/lib/theme-style/icon.css +1 -0
  36. package/lib/theme-style/image.css +1 -0
  37. package/lib/theme-style/img/body_bg.png +0 -0
  38. package/lib/theme-style/img/pdf.png +0 -0
  39. package/lib/theme-style/img/title_bg.png +0 -0
  40. package/lib/theme-style/index.css +1 -0
  41. package/lib/theme-style/material-list.css +1 -0
  42. package/lib/theme-style/material-panel.css +1 -0
  43. package/lib/theme-style/notified-panel.css +1 -0
  44. package/lib/theme-style/page-render.css +1 -0
  45. package/lib/theme-style/registration-panel.css +1 -0
  46. package/lib/theme-style/selector-panel.css +1 -0
  47. package/lib/theme-style/student-info.css +1 -0
  48. package/lib/theme-style/switch-student.css +1 -0
  49. package/lib/theme-style/tips-popup.css +1 -0
  50. package/lib/theme-style/user-login.css +1 -0
  51. package/lib/utils/dom.js +60 -0
  52. package/lib/utils/filters.js +87 -0
  53. package/lib/utils/merge.js +19 -0
  54. package/lib/utils/phone.js +156 -0
  55. package/lib/utils/popup/index.js +132 -0
  56. package/lib/utils/popup/popup-manager.js +198 -0
  57. package/lib/utils/storage.js +27 -0
  58. package/lib/utils/utils.js +65 -0
  59. package/package.json +80 -0
  60. package/packages/.DS_Store +0 -0
  61. package/packages/base/bottom-popup/index.js +10 -0
  62. package/packages/base/bottom-popup/src/bottom-popup.vue +151 -0
  63. package/packages/base/button/index.js +10 -0
  64. package/packages/base/button/src/button.vue +108 -0
  65. package/packages/base/dialog/index.js +10 -0
  66. package/packages/base/dialog/src/dialog.vue +173 -0
  67. package/packages/base/icon/index.js +10 -0
  68. package/packages/base/icon/src/icon.vue +15 -0
  69. package/packages/base/image/index.js +10 -0
  70. package/packages/base/image/src/image.vue +40 -0
  71. package/packages/base/material-list/index.js +10 -0
  72. package/packages/base/material-list/src/material-list.vue +48 -0
  73. package/packages/base/popup/index.js +10 -0
  74. package/packages/base/popup/src/popup.vue +44 -0
  75. package/packages/business/basic-image/index.js +10 -0
  76. package/packages/business/basic-image/src/basicImage.vue +51 -0
  77. package/packages/business/bottom-fixed-button/index.js +10 -0
  78. package/packages/business/bottom-fixed-button/src/bottomFixedButton.vue +66 -0
  79. package/packages/business/class-choose/index.js +10 -0
  80. package/packages/business/class-choose/src/courseCard.vue +142 -0
  81. package/packages/business/class-choose/src/img/icon_close_bottomcard.svg +14 -0
  82. package/packages/business/class-choose/src/img/icon_date.svg +21 -0
  83. package/packages/business/class-choose/src/img/icon_full.svg +27 -0
  84. package/packages/business/class-choose/src/img/icon_full_EL.svg +49 -0
  85. package/packages/business/class-choose/src/img/icon_selected.svg +18 -0
  86. package/packages/business/class-choose/src/img/icon_star_selected.svg +13 -0
  87. package/packages/business/class-choose/src/img/icon_star_unselect.svg +13 -0
  88. package/packages/business/class-choose/src/index.vue +316 -0
  89. package/packages/business/grade-panel/index.js +10 -0
  90. package/packages/business/grade-panel/src/gradePanel.vue +150 -0
  91. package/packages/business/material-panel/index.js +10 -0
  92. package/packages/business/material-panel/src/index.vue +136 -0
  93. package/packages/business/notified-panel/index.js +10 -0
  94. package/packages/business/notified-panel/src/areaCodeList.js +181 -0
  95. package/packages/business/notified-panel/src/index.vue +491 -0
  96. package/packages/business/page-render/index.js +10 -0
  97. package/packages/business/page-render/src/pageRender.vue +73 -0
  98. package/packages/business/registration-panel/index.js +10 -0
  99. package/packages/business/registration-panel/src/areaCodeList.js +181 -0
  100. package/packages/business/registration-panel/src/img/icon_off.png +0 -0
  101. package/packages/business/registration-panel/src/img/icon_on.png +0 -0
  102. package/packages/business/registration-panel/src/index.vue +329 -0
  103. package/packages/business/registration-panel/src/languageList.js +41 -0
  104. package/packages/business/selector-panel/index.js +10 -0
  105. package/packages/business/selector-panel/src/selectorPanel.vue +134 -0
  106. package/packages/business/student-info/index.js +10 -0
  107. package/packages/business/student-info/src/api/index.js +10 -0
  108. package/packages/business/student-info/src/config.js +11 -0
  109. package/packages/business/student-info/src/studentInfo.vue +145 -0
  110. package/packages/business/switch-student/index.js +10 -0
  111. package/packages/business/switch-student/src/api/index.js +28 -0
  112. package/packages/business/switch-student/src/switchStudent.vue +245 -0
  113. package/packages/business/tips-popup/index.js +10 -0
  114. package/packages/business/tips-popup/src/tipsPopup.vue +76 -0
  115. package/packages/business/user-login/index.js +10 -0
  116. package/packages/business/user-login/src/api/index.js +23 -0
  117. package/packages/business/user-login/src/img/logo.png +0 -0
  118. package/packages/business/user-login/src/index.vue +149 -0
  119. package/packages/theme-style/lib/bottom-fixed-button.css +1 -0
  120. package/packages/theme-style/lib/bottom-popup.css +1 -0
  121. package/packages/theme-style/lib/button.css +1 -0
  122. package/packages/theme-style/lib/class-choose.css +1 -0
  123. package/packages/theme-style/lib/common.css +1 -0
  124. package/packages/theme-style/lib/dialog.css +1 -0
  125. package/packages/theme-style/lib/grade-panel.css +1 -0
  126. package/packages/theme-style/lib/icon.css +1 -0
  127. package/packages/theme-style/lib/image.css +1 -0
  128. package/packages/theme-style/lib/img/body_bg.png +0 -0
  129. package/packages/theme-style/lib/img/pdf.png +0 -0
  130. package/packages/theme-style/lib/img/title_bg.png +0 -0
  131. package/packages/theme-style/lib/index.css +1 -0
  132. package/packages/theme-style/lib/material-list.css +1 -0
  133. package/packages/theme-style/lib/material-panel.css +1 -0
  134. package/packages/theme-style/lib/notified-panel.css +1 -0
  135. package/packages/theme-style/lib/page-render.css +1 -0
  136. package/packages/theme-style/lib/registration-panel.css +1 -0
  137. package/packages/theme-style/lib/selector-panel.css +1 -0
  138. package/packages/theme-style/lib/student-info.css +1 -0
  139. package/packages/theme-style/lib/switch-student.css +1 -0
  140. package/packages/theme-style/lib/tips-popup.css +1 -0
  141. package/packages/theme-style/lib/user-login.css +1 -0
  142. package/packages/theme-style/package.json +38 -0
  143. package/packages/theme-style/src/bottom-fixed-button.scss +31 -0
  144. package/packages/theme-style/src/bottom-popup.scss +87 -0
  145. package/packages/theme-style/src/button.scss +110 -0
  146. package/packages/theme-style/src/class-choose.scss +251 -0
  147. package/packages/theme-style/src/common/popup.scss +39 -0
  148. package/packages/theme-style/src/common/var.scss +6 -0
  149. package/packages/theme-style/src/common.scss +97 -0
  150. package/packages/theme-style/src/dialog.scss +130 -0
  151. package/packages/theme-style/src/grade-panel.scss +76 -0
  152. package/packages/theme-style/src/icon.scss +369 -0
  153. package/packages/theme-style/src/image.scss +8 -0
  154. package/packages/theme-style/src/img/body_bg.png +0 -0
  155. package/packages/theme-style/src/img/pdf.png +0 -0
  156. package/packages/theme-style/src/img/title_bg.png +0 -0
  157. package/packages/theme-style/src/index.scss +20 -0
  158. package/packages/theme-style/src/material-list.scss +118 -0
  159. package/packages/theme-style/src/material-panel.scss +2 -0
  160. package/packages/theme-style/src/notified-panel.scss +207 -0
  161. package/packages/theme-style/src/page-render.scss +3 -0
  162. package/packages/theme-style/src/registration-panel.scss +158 -0
  163. package/packages/theme-style/src/selector-panel.scss +86 -0
  164. package/packages/theme-style/src/student-info.scss +114 -0
  165. package/packages/theme-style/src/switch-student.scss +176 -0
  166. package/packages/theme-style/src/tips-popup.scss +60 -0
  167. package/packages/theme-style/src/user-login.scss +93 -0
  168. package/src/index.js +74 -0
  169. package/src/network/api.js +53 -0
  170. package/src/network/apiUrl.js +65 -0
  171. package/src/utils/dom.js +54 -0
  172. package/src/utils/filters.js +82 -0
  173. package/src/utils/merge.js +16 -0
  174. package/src/utils/phone.js +153 -0
  175. package/src/utils/popup/index.js +115 -0
  176. package/src/utils/popup/popup-manager.js +178 -0
  177. package/src/utils/storage.js +22 -0
  178. package/src/utils/utils.js +49 -0
@@ -0,0 +1,181 @@
1
+ /**
2
+ * 国际区号配置
3
+ */
4
+ export const areaCodeList = [
5
+ {
6
+ // 美国
7
+ value: '1',
8
+ text: '+1',
9
+ code: 'us',
10
+ name: 'United States',
11
+ reg: /^\d{10}$/,
12
+ },
13
+ {
14
+ // 英国
15
+ value: '44',
16
+ text: '+44',
17
+ code: 'uk',
18
+ name: 'United Kingdom',
19
+ reg: /(^[0-9]{10,11}$)/,
20
+ },
21
+ {
22
+ // 新加坡
23
+ value: '65',
24
+ text: '+65',
25
+ code: 'sg',
26
+ name: 'Singapore',
27
+ reg: /^\d{8}$/,
28
+ },
29
+ {
30
+ // 中国
31
+ value: '86',
32
+ text: '+86',
33
+ code: 'cn',
34
+ name: 'China',
35
+ reg: /^\d{11}$/,
36
+ },
37
+ {
38
+ // 澳大利亚
39
+ value: '61',
40
+ text: '+61',
41
+ code: 'au',
42
+ name: 'Australia',
43
+ reg: /(^[0-9]{1,99}$)/,
44
+ },
45
+ {
46
+ // 柬埔寨
47
+ value: '855',
48
+ text: '+855',
49
+ code: 'kh',
50
+ name: 'Cambodia',
51
+ reg: /^\d{10}$/,
52
+ },
53
+ {
54
+ // 加拿大
55
+ value: '1',
56
+ text: '+1',
57
+ code: 'ca',
58
+ name: 'Canada',
59
+ reg: /(^[0-9]{1,99}$)/,
60
+ },
61
+ {
62
+ // 法国
63
+ value: '33',
64
+ text: '+33',
65
+ code: 'fr',
66
+ name: 'France',
67
+ reg: /^\d{10}$/,
68
+ },
69
+ {
70
+ // 德国
71
+ value: '49',
72
+ text: '+49',
73
+ code: 'de',
74
+ name: 'Germany',
75
+ reg: /^\d{11}$/,
76
+ },
77
+ {
78
+ // 香港
79
+ value: '852',
80
+ text: '+852',
81
+ code: 'hk',
82
+ name: 'Hong Kong, China',
83
+ reg: /^\d{8}$/,
84
+ },
85
+ {
86
+ // 印度
87
+ value: '91',
88
+ text: '+91',
89
+ code: 'in',
90
+ name: 'India',
91
+ reg: /^\d{10}$/,
92
+ },
93
+ {
94
+ // 印度尼西亚
95
+ value: '62',
96
+ text: '+62',
97
+ code: 'id',
98
+ name: 'Indonesia',
99
+ reg: /^\d{11}$/,
100
+ },
101
+ {
102
+ // 爱尔兰
103
+ value: '353',
104
+ text: '+353',
105
+ code: 'ie',
106
+ name: 'Ireland',
107
+ reg: /^\d{9,10}$/,
108
+ },
109
+ {
110
+ // 意大利
111
+ value: '39',
112
+ text: '+39',
113
+ code: 'it',
114
+ name: 'Italy',
115
+ reg: /^\d{10}$/,
116
+ },
117
+ {
118
+ // 日本
119
+ value: '81',
120
+ text: '+81',
121
+ code: 'jp',
122
+ name: 'Japan',
123
+ reg: /^\d{11}$/,
124
+ },
125
+ {
126
+ // 澳门
127
+ value: '853',
128
+ text: '+853',
129
+ code: 'mo',
130
+ name: 'Macau, China',
131
+ reg: /^\d{6,7}$/,
132
+ },
133
+ {
134
+ // 马来西亚
135
+ value: '60',
136
+ text: '+60',
137
+ code: 'ms',
138
+ name: 'Malaysia',
139
+ reg: /(^[0-9]{1,99}$)/,
140
+ },
141
+ {
142
+ // 挪威
143
+ value: '47',
144
+ text: '+47',
145
+ code: 'no',
146
+ name: 'Norway',
147
+ reg: /^\d{8}$/,
148
+ },
149
+ {
150
+ // 波兰
151
+ value: '48',
152
+ text: '+48',
153
+ code: 'pl',
154
+ name: 'Poland',
155
+ reg: /^\d{9}$/,
156
+ },
157
+ {
158
+ // 韩国
159
+ value: '82',
160
+ text: '+82',
161
+ code: 'kr',
162
+ name: 'South Korea',
163
+ reg: /^\d{11}$/,
164
+ },
165
+ {
166
+ // 西班牙
167
+ value: '34',
168
+ text: '+34',
169
+ code: 'es',
170
+ name: 'Spain',
171
+ reg: /^\d{10}$/,
172
+ },
173
+ {
174
+ // 泰国
175
+ value: '66',
176
+ text: '+66',
177
+ code: 'th',
178
+ name: 'Thailand',
179
+ reg: /^\d{10}$/,
180
+ },
181
+ ]
@@ -0,0 +1,329 @@
1
+ <template>
2
+ <div
3
+ id="registration-panel"
4
+ ref="registration-panel"
5
+ class="registration-panel"
6
+ :style="[backgroundColorStyle, backgroundImgStyle]"
7
+ >
8
+ <div class="registration-form">
9
+ <van-form @submit="onSubmit">
10
+ <div class="form-item">
11
+ <div class="item-body phone-body">
12
+ <van-field
13
+ style="width: 120px; margin-right: -1px"
14
+ readonly
15
+ clickable
16
+ :value="'+' + areaCodeValue"
17
+ name="areaCode"
18
+ right-icon="arrow-down"
19
+ @click="showAreaPicker = true"
20
+ />
21
+ <van-popup v-model="showAreaPicker" round position="bottom">
22
+ <van-picker
23
+ show-toolbar
24
+ :columns="areaCodeList.map((e) => `(${e.text}) ${e.name}`)"
25
+ @cancel="showAreaPicker = false"
26
+ @confirm="onConfirmArea"
27
+ />
28
+ </van-popup>
29
+ <van-field
30
+ v-model="phone"
31
+ name="phone"
32
+ :placeholder="languagetxt.enterPhone"
33
+ @input="phoneRules"
34
+ :rules="[
35
+ { required: true, message: languagetxt.enterPhonePlease },
36
+ {
37
+ validator: validatorPhone,
38
+ message: languagetxt.invalidPhone,
39
+ },
40
+ ]"
41
+ />
42
+ </div>
43
+ <div class="item-body code-body" style="margin-top: 16px">
44
+ <van-field
45
+ v-model="phoneCode"
46
+ name="phoneCode"
47
+ :placeholder="languagetxt.enterCode"
48
+ @input="phoneRules"
49
+ :rules="[
50
+ { required: true, message: languagetxt.enterCodePlease },
51
+ ]"
52
+ />
53
+ <!-- <van-field style="width:120px;border-right: 0px;" readonly clickable :value="areacodeText" name="areaCode2"
54
+ right-icon="arrow-down" @click="showAreaPicker = true"
55
+ /> -->
56
+ <div
57
+ class="code-box"
58
+ :class="{ hide: codeType }"
59
+ v-if="isCodeSu == 1"
60
+ @click="getCode"
61
+ >
62
+ <div class="pa-box">
63
+ {{ languagetxt.send }}
64
+ </div>
65
+ </div>
66
+ <div class="code-box countdown" v-else-if="isCodeSu == 2">
67
+ <div class="pa-box">
68
+ {{ countdown + languagetxt.countdown }}
69
+ <span>{{ languagetxt.resend }}</span>
70
+ </div>
71
+ </div>
72
+ <div
73
+ class="code-box"
74
+ :class="{ hide: codeType }"
75
+ v-else
76
+ @click="getCode"
77
+ >
78
+ <div class="pa-box">
79
+ {{ languagetxt.resend }}
80
+ </div>
81
+ </div>
82
+ </div>
83
+ </div>
84
+ <div>
85
+ <van-button
86
+ round
87
+ block
88
+ type="info"
89
+ :color="buttonProps.backgroundColor"
90
+ native-type="submit"
91
+ :class="{ hide: btnType }"
92
+ >
93
+ {{ buttonProps.text }}
94
+ </van-button>
95
+ </div>
96
+ <div
97
+ class="agreement-box"
98
+ @click="
99
+ () => {
100
+ agreement = !agreement;
101
+ phoneRules();
102
+ }
103
+ "
104
+ >
105
+ <span class="icon" :class="{ on: agreement }"></span>
106
+ <div class="text" v-html="languagetxt.policyText"></div>
107
+ </div>
108
+ </van-form>
109
+ </div>
110
+ </div>
111
+ </template>
112
+
113
+ <script>
114
+ import Button from "vant/es/button";
115
+ import Field from "vant/es/field";
116
+ import Form from "vant/es/form";
117
+ import Picker from "vant/es/picker";
118
+ import Popup from "vant/es/popup";
119
+ import { areaCodeList } from "./areaCodeList";
120
+ import { languageList } from "./languageList";
121
+ export default {
122
+ name: "TsRegistrationPanel",
123
+ components: {
124
+ [Button.name]: Button,
125
+ [Form.name]: Form,
126
+ [Field.name]: Field,
127
+ [Picker.name]: Picker,
128
+ [Popup.name]: Popup,
129
+ },
130
+ props: {
131
+ crmTagList: {
132
+ type: Array,
133
+ default: () => [],
134
+ },
135
+ areacodeText: {
136
+ type: String,
137
+ default: "us",
138
+ },
139
+ buttonProps: {
140
+ type: Object,
141
+ default: () => {
142
+ return {
143
+ text: "Submit",
144
+ backgroundColor: "#FF9F0A",
145
+ eventName: "registration-submit",
146
+ dialogType: "alert",
147
+ alert: {
148
+ title: "Successfully Submitted",
149
+ message: "",
150
+ buttonText: "ok",
151
+ buttonBgColor: "#FF9F0A",
152
+ },
153
+ };
154
+ },
155
+ },
156
+ backgroundImgUrl: {
157
+ type: String,
158
+ default:
159
+ "https://img2.baidu.com/it/u=3202947311,1179654885&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500",
160
+ },
161
+ backgroundColor: {
162
+ type: String,
163
+ default: "",
164
+ },
165
+ languageType: {
166
+ type: String,
167
+ default: "us",
168
+ },
169
+ isCodeSuProps: {
170
+ type: Number,
171
+ default: 1,
172
+ },
173
+ },
174
+ data() {
175
+ return {
176
+ areaCodeList,
177
+ languagetxt: languageList.us,
178
+ phone: "",
179
+ areaCode: "us",
180
+ areaCodeValue: "1",
181
+ gradeList: [],
182
+ showAreaPicker: false,
183
+ showCustomizePicker: {},
184
+ phoneReg: /^\d{1,99}$/,
185
+ phoneCode: "",
186
+ countdown: 60,
187
+ isCodeSu: 1,
188
+ agreement: false,
189
+ codeType: true,
190
+ btnType: true,
191
+ };
192
+ },
193
+ computed: {
194
+ areaCodeNameList() {
195
+ return this.areaCodeList.map((area) => {
196
+ return {
197
+ value: area.value,
198
+ text: area.text,
199
+ };
200
+ });
201
+ },
202
+ backgroundImgStyle() {
203
+ if (this.backgroundImgUrl) {
204
+ return {
205
+ backgroundImage: `url(${this.backgroundImgUrl})`,
206
+ backgroundSize: "cover",
207
+ backgroundRepeat: "no-repeat",
208
+ };
209
+ } else {
210
+ return {};
211
+ }
212
+ },
213
+ backgroundColorStyle() {
214
+ if (this.backgroundColor) {
215
+ return {
216
+ backgroundColor: this.backgroundColor,
217
+ };
218
+ } else {
219
+ return {};
220
+ }
221
+ },
222
+ },
223
+ watch: {
224
+ languageType: {
225
+ handler(newValue) {
226
+ console.log("languageType", newValue);
227
+ switch (this.languageType) {
228
+ case "us":
229
+ this.languagetxt = languageList.us;
230
+ break;
231
+ case "cn":
232
+ this.languagetxt = languageList.cn;
233
+ break;
234
+ case "hk":
235
+ this.languagetxt = languageList.hk;
236
+ break;
237
+ }
238
+ },
239
+ deep: true,
240
+ immediate: true,
241
+ },
242
+ areacodeText: {
243
+ handler(newValue) {
244
+ console.log("areacodeText", newValue);
245
+ const areaCodeObj = this.areaCodeList.find(
246
+ (e) => e.code === this.areacodeText
247
+ );
248
+ this.areaCodeValue = areaCodeObj.value;
249
+ this.phoneReg = areaCodeObj.reg;
250
+ },
251
+ deep: true,
252
+ immediate: true,
253
+ },
254
+ isCodeSuProps: {
255
+ handler(newValue) {
256
+ console.log("isCodeSuProps", newValue);
257
+ if (this.isCodeSuProps !== 1) {
258
+ this.isCodeSu = 2;
259
+ let time = setInterval(() => {
260
+ if (this.countdown > 0) {
261
+ this.countdown--;
262
+ } else {
263
+ clearTimeout(time);
264
+ this.isCodeSu = 3;
265
+ this.countdown = 60;
266
+ }
267
+ }, 1000);
268
+ }
269
+ },
270
+ deep: true,
271
+ immediate: true,
272
+ },
273
+ },
274
+ mounted() {
275
+ console.log("form", this.form);
276
+ },
277
+ destroyed() {},
278
+ methods: {
279
+ validator(val) {
280
+ return (
281
+ !val ||
282
+ /^([A-Za-z0-9_\-.])+@([A-Za-z0-9_\-.])+.([A-Za-z]{2,8})$/.test(val)
283
+ );
284
+ },
285
+ validatorPhone(val) {
286
+ return !val || this.phoneReg.test(val);
287
+ },
288
+ // 设置区号
289
+ onConfirmArea(value, index) {
290
+ console.log("onConfirmArea", value, index);
291
+ const areaObj = this.areaCodeList[index];
292
+ this.phoneReg = areaObj.reg;
293
+ this.areaCodeValue = areaObj.value;
294
+ this.showAreaPicker = false;
295
+ },
296
+ // 验证码
297
+ getCode() {
298
+ if (!this.phone) return this.$toast(this.languagetxt.enterPhonePlease);
299
+ if (!this.phoneReg.test(this.phone))
300
+ return this.$toast(this.languagetxt.enterPhonePlease);
301
+ console.log("send code");
302
+ let params = {
303
+ contactInfo: this.phone,
304
+ countryCallingCode: this.areaCodeValue,
305
+ };
306
+ this.$emit("btn-click", "registration-submit-getCode", params);
307
+ },
308
+ // 注册
309
+ onSubmit() {
310
+ if (!this.agreement) return this.$toast(this.languagetxt.confirmPlease);
311
+ let params = {
312
+ crmTagList: this.crmTagList,
313
+ contactInfo: this.phone,
314
+ countryCallingCode: this.areaCodeValue,
315
+ verificationCode: this.phoneCode,
316
+ };
317
+ this.$emit("btn-click", "registration-submit", params);
318
+ },
319
+ phoneRules() {
320
+ this.codeType = !this.phoneReg.test(this.phone);
321
+ if (!this.codeType && this.agreement && this.phoneCode) {
322
+ this.btnType = false;
323
+ } else {
324
+ this.btnType = true;
325
+ }
326
+ },
327
+ },
328
+ };
329
+ </script>
@@ -0,0 +1,41 @@
1
+ export const languageList = {
2
+ us:{
3
+ enterPhone: 'Phone number',
4
+ enterCode: 'SMS verification code',
5
+ send: 'Send',
6
+ resend: 'Resend',
7
+ countdown: 's',
8
+ enterPhonePlease: 'Please enter your phone number',
9
+ invalidPhone: 'Invalid phone number',
10
+ enterCodePlease: 'Please enter the verification code',
11
+ codeErr: 'Verification code incorrect',
12
+ confirmPlease: 'Please confirm the policies to continue',
13
+ policyText: `By continuing, you need to be the parents or legal guardian of the students to agree to Think Academy’s <a class="link-text" href="/terms-of-use" target="_blank">【Term of Use】</a> and confirm that you have read the <a class="link-text" href="/privacy-policy" target="_blank">【Privacy Policy】</a>`
14
+ },
15
+ cn:{
16
+ enterPhone: '请输入手机号',
17
+ enterCode: '请输入验证码',
18
+ send: '获取验证码',
19
+ resend: '重新获取',
20
+ countdown: '秒',
21
+ enterPhonePlease: '请输入手机号',
22
+ invalidPhone: '手机号格式不正确',
23
+ enterCodePlease: '请输入验证码',
24
+ codeErr: '验证码错误',
25
+ confirmPlease: '请在下方点击同意用户协议',
26
+ policyText: `继续即代表您已阅读并同意Think Academy的<a class="link-text" href="/terms-of-use" target="_blank">【用户协议】</a>、<a class="link-text" href="/privacy-policy" target="_blank">【隐私政策】</a>`,
27
+ },
28
+ hk:{
29
+ enterPhone: '請輸入手機號',
30
+ enterCode: '請輸入驗證碼',
31
+ send: '獲取驗證碼',
32
+ resend: '重新獲取',
33
+ countdown: '秒',
34
+ enterPhonePlease: '請輸入手機號',
35
+ invalidPhone: '手機號格式不正確',
36
+ enterCodePlease: '請輸入驗證碼',
37
+ codeErr: '驗證碼錯誤',
38
+ confirmPlease: '請在下方點擊同意用戶協議',
39
+ policyText: `繼續即代表您已閱讀並同意香港學而思的<a class="link-text" href="/terms-of-use" target="_blank">【用戶協議】</a>、<a class="link-text" href="/privacy-policy" target="_blank">【隱私政策和兒童隱私政策】</a>`,
40
+ },
41
+ }
@@ -0,0 +1,10 @@
1
+ import TsSelectorPanel from './src/selectorPanel.vue'
2
+
3
+ // install 是默认的方法,供按需引入
4
+ // 当外界在 use 这个组件的时候,就会调用本身的install方法,同时传一个Vue这个类的参数
5
+
6
+ TsSelectorPanel.install = (Vue) => {
7
+ Vue.component(TsSelectorPanel.name, TsSelectorPanel)
8
+ }
9
+
10
+ export default TsSelectorPanel
@@ -0,0 +1,134 @@
1
+ <template>
2
+ <div class="selection-list-wrapper" :style="backgroundImgStyle">
3
+ <div class="selection-list-title">
4
+ {{ title }}
5
+ </div>
6
+ <div class="selection-list-container">
7
+ <ul class="selection-item-wrapper">
8
+ <li v-for="(item, index) in optionCardList" :key="index">
9
+ <div
10
+ :class="{
11
+ 'font-medium': true,
12
+ 'selection-item': true,
13
+ 'double': optionsNumber == '2',
14
+ 'only-one': optionsNumber == '1',
15
+ 'active': isActive == index,
16
+ }"
17
+ @click="selectGrade(item, index)"
18
+ >
19
+ <span class="item-text">{{ item.name }}</span>
20
+ </div>
21
+ </li>
22
+ </ul>
23
+ <ts-button
24
+ class="btn"
25
+ style-type="primary"
26
+ size="small"
27
+ width="100%"
28
+ height="48px"
29
+ @click="btnClick"
30
+ >
31
+ {{ btnTitle }}
32
+ </ts-button>
33
+ </div>
34
+ </div>
35
+ </template>
36
+ <script>
37
+ import TsButton from "../../../base/button";
38
+
39
+ export default {
40
+ name: "TsSelectorPanel",
41
+ components: { TsButton },
42
+ props: {
43
+ title: {
44
+ default: "选择器引导文案",
45
+ type: String,
46
+ },
47
+ optionsNumber: {
48
+ default: "3",
49
+ type: String,
50
+ },
51
+ backgroundImgUrl: {
52
+ default: "",
53
+ type: String,
54
+ },
55
+ btnTitle: {
56
+ default: "按钮操作文案",
57
+ type: String,
58
+ },
59
+ optionCardList: {
60
+ default: () => [],
61
+ type: Array,
62
+ },
63
+ },
64
+ data() {
65
+ return {
66
+ isActive: null,
67
+ touchItem: {},
68
+ };
69
+ },
70
+ computed: {
71
+ backgroundImgStyle() {
72
+ return {
73
+ backgroundImage: `url(${this.backgroundImgUrl})`,
74
+ backgroundSize: 'cover',
75
+ backgroundRepeat: 'no-repeat',
76
+ boxShadow: this.backgroundImgUrl ? 'none' : '0px 2px 11px 0px rgba(0, 45, 65, 0.17)',
77
+ }
78
+ }
79
+ },
80
+ mounted() {
81
+ this.$sensors.track('h5_selector_panel_show', {
82
+ list_pattern: this.optionsNumber,
83
+ list_num: this.optionCardList.length,
84
+ button_name: this.btnTitle
85
+ })
86
+ },
87
+ methods: {
88
+ selectGrade(item, index) {
89
+ console.log("点击触发Item", index)
90
+ this.isActive = index;
91
+ this.touchAction(index)
92
+ },
93
+ btnClick() {
94
+ console.log("点击触发", this.$props)
95
+ if (!this.isActive && this.isActive !== 0) {
96
+ this.$toast("Please select at least one option before continue.");
97
+ return
98
+ }
99
+ this.touchAction(this.isActive)
100
+ },
101
+ touchAction(index) {
102
+ this.touchItem = { ...this.optionCardList[index] }
103
+ console.log(this.touchItem)
104
+ this.$sensors.track('h5_selector_panel_click', {
105
+ list_pattern: this.optionsNumber,
106
+ list_num: this.optionCardList.length,
107
+ click_panel: this.touchItem.name,
108
+ click_link_type: this.touchItem.jumpTo === "saleLinkUrl" ? 2 : 1 //1=h5链接或项目页面;2=打开班级页
109
+ })
110
+ if (this.touchItem.jumpTo === "saleLinkUrl") {
111
+ if (this.touchItem.idsString) {
112
+ this.$emit("btn-click", 'click-sell-link', {
113
+ id: this.touchItem.idsString,
114
+ });
115
+ return;
116
+ } else {
117
+ this.$toast("Please set at least one option before continue.");
118
+ }
119
+ }
120
+ if (this.touchItem.jumpTo === "linkUrl") {
121
+ if (this.touchItem.linkString) {
122
+ console.log('链接上报')
123
+ this.$emit("open-other-links", {
124
+ link: this.touchItem.linkString, //普通链接,
125
+ target: "_self",
126
+ });
127
+ } else {
128
+ this.$toast("Please set at least one option before continue.");
129
+ }
130
+ }
131
+ },
132
+ },
133
+ };
134
+ </script>
@@ -0,0 +1,10 @@
1
+ import TsStudentInfo from './src/studentInfo.vue'
2
+
3
+ // install 是默认的方法,供按需引入
4
+ // 当外界在 use 这个组件的时候,就会调用本身的install方法,同时传一个Vue这个类的参数
5
+
6
+ TsStudentInfo.install = (Vue) => {
7
+ Vue.component(TsStudentInfo.name, TsStudentInfo)
8
+ }
9
+
10
+ export default TsStudentInfo