icve-sso-vue3 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.
package/README.en.md ADDED
@@ -0,0 +1,289 @@
1
+ # Smart Vocational Education - Unified User Center
2
+
3
+ ## Project Introduction
4
+
5
+ The Smart Vocational Education Unified User Center is a user authentication and management system developed based on Vue 2.x, providing multiple login methods and comprehensive user information management features.
6
+
7
+ ## Technology Stack
8
+
9
+ - **Framework**: Vue 2.6.14
10
+ - **UI Component Library**: Element UI 2.15.10
11
+ - **Router**: Vue Router 3.4.9
12
+ - **HTTP Client**: Axios 0.24.0
13
+ - **Style Preprocessor**: Sass
14
+ - **QR Code Generation**: qrcodejs2
15
+ - **Cloud Storage**: ali-oss
16
+
17
+ ## Core Features
18
+
19
+ ### 1. Multiple Login Methods
20
+
21
+ #### Account Password Login
22
+
23
+ - Support username/password login
24
+ - Integrated slider CAPTCHA protection
25
+ - Weak password detection and forced modification
26
+
27
+ #### Mobile Verification Code Login
28
+
29
+ - Support domestic and international mobile number login
30
+ - International area code selection (supports 200+ countries/regions worldwide)
31
+ - SMS verification code validation
32
+ - Multiple account management for one mobile number
33
+ - Automatic unbinding reminder for long-term inactive accounts
34
+
35
+ #### Email Login
36
+
37
+ - Support email verification code login
38
+ - Automatic registration for new users
39
+ - International user-friendly
40
+
41
+ #### QR Code Scan Login
42
+
43
+ - WeChat scan login
44
+ - App scan login
45
+ - Real-time status updates (not scanned/scanned/confirmed/expired)
46
+ - Automatic QR code refresh mechanism
47
+ - Automatic account binding after scanning
48
+
49
+ ### 2. User Information Management
50
+
51
+ #### Complete User Information
52
+
53
+ - Identity type selection (Student/Teacher/Social Learner/Enterprise User/International Learner/International Teacher)
54
+ - Nationality selection (supports Chinese and English search)
55
+ - Remote search for organization name
56
+ - Real name input
57
+ - Employee/Student ID management
58
+ - Mandatory information completion on first login
59
+
60
+ #### Mobile Number Binding
61
+
62
+ - New user mobile number binding
63
+ - Existing account mobile number change
64
+ - Multiple account binding management
65
+ - International mobile number support
66
+
67
+ #### Password Management
68
+
69
+ - Forced modification of weak passwords
70
+ - Password strength validation (must contain three of four character types: uppercase, lowercase, numbers, special characters, length 8-50)
71
+ - First-time login password setup for users with empty passwords
72
+
73
+ ### 3. Internationalization Support
74
+
75
+ - Chinese and English bilingual switching
76
+ - Component-level internationalization configuration
77
+ - Automatic browser language detection
78
+ - Nationality data in Chinese and English
79
+
80
+ ### 4. Security Features
81
+
82
+ - Slider CAPTCHA protection
83
+ - Aliyun CAPTCHA integration
84
+ - Login status encryption
85
+ - Token authentication mechanism
86
+ - Multiple account security reminders
87
+ - Automatic unbinding of long-term inactive accounts
88
+
89
+ ### 5. User Experience Optimization
90
+
91
+ - Responsive design, mobile support
92
+ - Smooth animation transitions
93
+ - Intelligent form validation
94
+ - Floating label input fields
95
+ - Alphabetical index for quick navigation
96
+ - Search highlighting
97
+
98
+ ## Project Structure
99
+
100
+ ```
101
+ src/
102
+ ├── api/ # API interfaces
103
+ │ └── resourceManagement/
104
+ │ ├── index.js # Unified API export
105
+ │ └── login.js # Login-related APIs
106
+ ├── components/ # Components
107
+ │ ├── userCenterLogin.vue # Main login component
108
+ │ ├── QRCodeLogin.vue # QR code login component
109
+ │ ├── mobileBinding.vue # Mobile binding component
110
+ │ ├── improveInformation.vue # Complete information component
111
+ │ ├── NationalitySelector.vue # Nationality selector component
112
+ │ ├── agreement.vue # User agreement component
113
+ │ ├── verifyComponents.vue # Verification code component
114
+ │ ├── AliyunCaptchaModal.vue # Aliyun CAPTCHA component
115
+ │ ├── TJCaptcha.vue # Tencent CAPTCHA component
116
+ │ └── locales/ # Internationalization language packs
117
+ │ ├── zh-CN.json # Chinese language pack
118
+ │ └── en.json # English language pack
119
+ ├── utils/ # Utility functions
120
+ │ ├── auth.js # Authentication utilities
121
+ │ ├── i18n.js # Internationalization utilities
122
+ │ ├── request.js # Request wrapper
123
+ │ └── errorCode.js # Error code definitions
124
+ ├── App.vue # Root component
125
+ └── main.js # Entry file
126
+ ```
127
+
128
+ ## Installation
129
+
130
+ ### 1. Clone the Project
131
+
132
+ ```bash
133
+ git clone [project-url]
134
+ cd icve_tyyhzx
135
+ ```
136
+
137
+ ### 2. Install Dependencies
138
+
139
+ ```bash
140
+ npm install
141
+ ```
142
+
143
+ ### 3. Configure Environment Variables
144
+
145
+ Create `.env.development` and `.env.production` files and configure the corresponding environment variables.
146
+
147
+ ### 4. Start Development Server
148
+
149
+ ```bash
150
+ npm run serve
151
+ ```
152
+
153
+ ### 5. Build for Production
154
+
155
+ ```bash
156
+ npm run build
157
+ ```
158
+
159
+ ## Usage Instructions
160
+
161
+ ### Use as Standalone Application
162
+
163
+ Run the project directly and access the login page to use all features.
164
+
165
+ ### Use as Component Library
166
+
167
+ The project supports packaging as a component library and can be imported into other projects:
168
+
169
+ ```javascript
170
+ import IcveSso from 'icve-sso';
171
+ import 'icve-sso/dist/icve-sso.css';
172
+
173
+ Vue.use(IcveSso);
174
+ ```
175
+
176
+ ### Component Usage Example
177
+
178
+ ```vue
179
+ <template>
180
+ <div>
181
+ <!-- Login Component -->
182
+ <userCenterLogin :loginModalShow="true" @loginSuccess="handleLoginSuccess" />
183
+ </div>
184
+ </template>
185
+
186
+ <script>
187
+ import { userCenterLogin } from 'icve-sso';
188
+
189
+ export default {
190
+ components: {
191
+ userCenterLogin,
192
+ },
193
+ methods: {
194
+ handleLoginSuccess(token) {
195
+ console.log('Login successful, token:', token);
196
+ // Handle login success logic
197
+ },
198
+ },
199
+ };
200
+ </script>
201
+ ```
202
+
203
+ ## API Documentation
204
+
205
+ ### Login-related APIs
206
+
207
+ - `userLogin` - Account password login
208
+ - `smsLogin` - Mobile verification code login
209
+ - `smsLoginCaptcha` - Send SMS verification code
210
+ - `emailRegister` - Email login/registration
211
+ - `sendEmailMsg` - Send email verification code
212
+ - `generateQrCode` - Generate QR code
213
+ - `checkCodeStatus` - Check QR code status
214
+ - `loginBindWechat` - WeChat binding login
215
+
216
+ ### User Information APIs
217
+
218
+ - `getInfo` - Get user information
219
+ - `saveUserInfo` - Save user information
220
+ - `BindMobileV2` - Bind mobile number
221
+ - `changeBindMobileV2` - Change bound mobile number
222
+
223
+ ### Other APIs
224
+
225
+ - `gjList` - Get nationality list
226
+ - `getDw` - Get organization list
227
+ - `featuresBySource` - Get feature permissions
228
+ - `userEncrypt` - User information encryption
229
+
230
+ ## Configuration
231
+
232
+ ### Internationalization Configuration
233
+
234
+ Configure language packs in `src/utils/i18n.js`:
235
+
236
+ ```javascript
237
+ import zhCN from '@/components/locales/zh-CN.json';
238
+ import en from '@/components/locales/en.json';
239
+
240
+ const messages = {
241
+ cn: zhCN,
242
+ en: en,
243
+ };
244
+ ```
245
+
246
+ ### Router Configuration
247
+
248
+ Configure routes in `src/router` according to business requirements.
249
+
250
+ ## Browser Support
251
+
252
+ - Chrome (Recommended)
253
+ - Firefox
254
+ - Safari
255
+ - Edge
256
+ - IE 11+
257
+
258
+ ## Contribution
259
+
260
+ 1. Fork the repository
261
+ 2. Create Feat_xxx branch
262
+ 3. Commit your code
263
+ 4. Create Pull Request
264
+
265
+ ## Version History
266
+
267
+ ### v0.0.31 (Current Version)
268
+
269
+ - ✨ Added QR code scan login feature
270
+ - ✨ Added nationality selector component
271
+ - ✨ Added mobile number binding feature
272
+ - ✨ Added complete user information feature
273
+ - ✨ Added email login feature
274
+ - ✨ Added multi-language support (Chinese and English)
275
+ - ✨ Added weak password detection and forced modification
276
+ - ✨ Added multiple account management feature
277
+ - 🐛 Fixed known issues
278
+ - 💄 Optimized UI interaction experience
279
+
280
+ ## License
281
+
282
+ [Fill in according to actual project situation]
283
+
284
+ ## Contact
285
+
286
+ If you have any questions or suggestions, please contact us through:
287
+
288
+ - Submit an Issue
289
+ - Send email to: [email address]
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # 智慧职教-统一用户中心
2
+
3
+ #### 介绍
4
+ 智慧职教-统一用户中心
5
+
6
+ #### 软件架构
7
+ 软件架构说明
8
+
9
+
10
+ #### 安装教程
11
+
12
+ 1. xxxx
13
+ 2. xxxx
14
+ 3. xxxx
15
+
16
+ #### 使用说明
17
+
18
+ 1. xxxx
19
+ 2. xxxx
20
+ 3. xxxx
21
+
22
+ #### 参与贡献
23
+
24
+ 1. Fork 本仓库
25
+ 2. 新建 Feat_xxx 分支
26
+ 3. 提交代码
27
+ 4. 新建 Pull Request
28
+
29
+
30
+ #### 特技
31
+
32
+ 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
33
+ 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
34
+ 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
35
+ 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
36
+ 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
37
+ 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
package/dist/demo.html ADDED
@@ -0,0 +1 @@
1
+ <!doctype html><meta charset="utf-8"><title>icve-sso-vue3 demo</title><script src="./icve-sso-vue3.umd.js"></script><link rel="stylesheet" href="./icve-sso-vue3.css"><script>console.log(icve-sso-vue3)</script>