icve-sso-vue3 0.0.6 → 0.0.7

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/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "icve-sso-vue3",
3
- "version": "0.0.6",
4
- "main": "dist/icve-sso-vue3.umd.js",
3
+ "version": "0.0.7",
4
+ "main": "dist/icve-sso-vue3.common.js",
5
5
  "module": "dist/icve-sso-vue3.esm.js",
6
- "unpkg": "dist/icve-sso-vue3.min.js",
6
+ "style": "dist/icve-sso-vue3.css",
7
7
  "files": [
8
8
  "dist/*"
9
9
  ],
@@ -19,14 +19,19 @@
19
19
  "build": "vue-cli-service build --target lib --name icve-sso-vue3 --formats commonjs,umd,umd-min ./index.js",
20
20
  "lint": "vue-cli-service lint"
21
21
  },
22
+ "license": "MIT",
22
23
  "dependencies": {
23
24
  "@element-plus/icons-vue": "^2.3.2",
24
25
  "ali-oss": "^6.17.1",
25
26
  "axios": "0.24.0",
26
27
  "element-plus": "^2.4.0",
27
- "js-cookie": "3.0.1",
28
+ "fflate": "^0.8.2",
29
+ "hls.js": "^1.6.5",
30
+ "three": "^0.179.1",
31
+ "vant": "^4.0.0",
32
+ "vue": "^3.3.4",
28
33
  "qrcodejs2": "0.0.2",
29
- "vue": "^3.3.4"
34
+ "js-cookie": "^3.0.1"
30
35
  },
31
36
  "devDependencies": {
32
37
  "@babel/core": "^7.27.4",
@@ -36,6 +41,6 @@
36
41
  "babel-loader": "^8.2.4",
37
42
  "sass": "^1.32.13",
38
43
  "sass-loader": "^10.1.1",
39
- "vue-loader": "^17.0.0"
44
+ "vue-loader": "^15.11.1"
40
45
  }
41
46
  }
package/README.en.md DELETED
@@ -1,289 +0,0 @@
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 DELETED
@@ -1,123 +0,0 @@
1
- # 智慧职教-统一用户中心
2
-
3
- #### 介绍
4
- 智慧职教-统一用户中心 Vue3 组件库
5
-
6
- #### 安装教程
7
-
8
- ```bash
9
- npm install icve-sso-vue3
10
- ```
11
-
12
- #### 使用说明
13
-
14
- ##### 1. 基础使用
15
-
16
- ```vue
17
- <template>
18
- <div>
19
- <!-- 登录组件 -->
20
- <userCenterLogin
21
- v-model:loginModalShow="loginModalShow"
22
- @loginSuccess="handleLoginSuccess"
23
- />
24
-
25
- <!-- 信息完善组件 -->
26
- <userCenterCompleteInformation
27
- @completeInformation="handleCompleteInformation"
28
- :token="token"
29
- />
30
- </div>
31
- </template>
32
-
33
- <script>
34
- import { userCenterLogin, userCenterCompleteInformation } from 'icve-sso-vue3';
35
-
36
- export default {
37
- components: {
38
- userCenterLogin,
39
- userCenterCompleteInformation
40
- },
41
- data() {
42
- return {
43
- loginModalShow: true,
44
- token: ''
45
- };
46
- },
47
- methods: {
48
- handleLoginSuccess(data) {
49
- console.log('登录成功', data);
50
- this.loginModalShow = false;
51
- },
52
- handleCompleteInformation() {
53
- console.log('信息完善');
54
- }
55
- }
56
- };
57
- </script>
58
- ```
59
-
60
- ##### 2. 全局注册
61
-
62
- ```javascript
63
- // main.js
64
- import { createApp } from 'vue';
65
- import IcveSso from 'icve-sso-vue3';
66
- import 'icve-sso-vue3/dist/icve-sso-vue3.css';
67
-
68
- const app = createApp(App);
69
-
70
- // 安装插件(默认会自动加载验证码脚本)
71
- app.use(IcveSso);
72
-
73
- // 或者手动控制验证码脚本加载
74
- app.use(IcveSso, { loadCaptcha: false });
75
- ```
76
-
77
- ##### 3. 手动加载验证码脚本(可选)
78
-
79
- 如果你想在应用启动时提前加载验证码脚本,可以使用以下方法:
80
-
81
- ```javascript
82
- // 在 main.js 中
83
- import { loadCaptchaScripts } from 'icve-sso-vue3';
84
-
85
- // 提前加载验证码脚本
86
- loadCaptchaScripts();
87
- ```
88
-
89
- ##### 4. 注意事项
90
-
91
- - 组件库会自动处理验证码脚本的加载,无需手动在 HTML 中添加 script 标签
92
- - 支持腾讯验证码和阿里云验证码,会根据后端配置自动选择
93
- - 组件库内部已包含完整的错误处理和降级方案
94
- - 需要引入样式文件:`import 'icve-sso-vue3/dist/icve-sso-vue3.css'`
95
-
96
- #### 组件Props
97
-
98
- ##### userCenterLogin
99
-
100
- | 属性 | 类型 | 默认值 | 说明 |
101
- |-----|------|--------|------|
102
- | loginModalShow | Boolean | true | 控制登录弹窗显示/隐藏 |
103
-
104
- | 事件 | 参数 | 说明 |
105
- |-----|------|------|
106
- | loginSuccess | data | 登录成功回调,返回登录数据 |
107
-
108
- ##### userCenterCompleteInformation
109
-
110
- | 属性 | 类型 | 默认值 | 说明 |
111
- |-----|------|--------|------|
112
- | token | String | - | 用户token(必需) |
113
-
114
- | 事件 | 参数 | 说明 |
115
- |-----|------|------|
116
- | completeInformation | - | 信息完成回调 |
117
-
118
- #### 参与贡献
119
-
120
- 1. Fork 本仓库
121
- 2. 新建 Feat_xxx 分支
122
- 3. 提交代码
123
- 4. 新建 Pull Request