@toolspack/ttd-common 1.1.3 → 1.1.5

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/.eslintignore CHANGED
@@ -1,6 +1,6 @@
1
- node_modules
2
- public
3
- pdf.js
4
- pdf.worker.js
5
- pdf.worker.min.js
1
+ node_modules
2
+ public
3
+ pdf.js
4
+ pdf.worker.js
5
+ pdf.worker.min.js
6
6
  **/pdf-view/build/*.js
package/.eslintrc.js CHANGED
@@ -1,52 +1,52 @@
1
- module.exports = {
2
- root: true,
3
- env: {
4
- node: true,
5
- },
6
- extends: [
7
- 'plugin:vue/essential',
8
- '@vue/airbnb',
9
- ],
10
- rules: {
11
- 'template-curly-spacing': 'off',
12
- semi: 0,
13
- 'no-unused-vars': 0,
14
- 'consistent-return': 0,
15
- 'max-len': 0,
16
- 'func-names': 0,
17
- 'no-console': 'off',
18
- 'no-control-regex': 'off',
19
- 'comma-dangle': ['error', 'always-multiline'],
20
- 'no-mixed-spaces-and-tabs': 'off',
21
- 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
22
- 'no-alert': 0,
23
- 'no-underscore-dangle': 0,
24
- 'no-await-in-loop': 0,
25
- 'no-restricted-syntax': 0,
26
- 'prefer-destructuring': 0,
27
- 'import/no-cycle': 0,
28
- 'import/prefer-default-export': 0,
29
- camelcase: 'off',
30
- 'guard-for-in': 0,
31
- 'no-param-reassign': 0,
32
- 'no-plusplus': 0,
33
- 'no-unused-expressions': 0,
34
- "linebreak-styleL": 0,
35
- 'react/jsx-filename-extension': [0, { extensions: ['.js', '.jsx'] }],
36
- },
37
- settings: {
38
- 'import/resolver': {
39
- node: {
40
- paths: ['src'],
41
- extensions: ['.js', '.jsx', '.ts', '.tsx'],
42
- },
43
- },
44
- },
45
- globals: {
46
- PDFCtrl: true,
47
- require: true,
48
- },
49
- parserOptions: {
50
- parser: 'babel-eslint',
51
- },
52
- }
1
+ module.exports = {
2
+ root: true,
3
+ env: {
4
+ node: true,
5
+ },
6
+ extends: [
7
+ 'plugin:vue/essential',
8
+ '@vue/airbnb',
9
+ ],
10
+ rules: {
11
+ 'template-curly-spacing': 'off',
12
+ semi: 0,
13
+ 'no-unused-vars': 0,
14
+ 'consistent-return': 0,
15
+ 'max-len': 0,
16
+ 'func-names': 0,
17
+ 'no-console': 'off',
18
+ 'no-control-regex': 'off',
19
+ 'comma-dangle': ['error', 'always-multiline'],
20
+ 'no-mixed-spaces-and-tabs': 'off',
21
+ 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
22
+ 'no-alert': 0,
23
+ 'no-underscore-dangle': 0,
24
+ 'no-await-in-loop': 0,
25
+ 'no-restricted-syntax': 0,
26
+ 'prefer-destructuring': 0,
27
+ 'import/no-cycle': 0,
28
+ 'import/prefer-default-export': 0,
29
+ camelcase: 'off',
30
+ 'guard-for-in': 0,
31
+ 'no-param-reassign': 0,
32
+ 'no-plusplus': 0,
33
+ 'no-unused-expressions': 0,
34
+ "linebreak-style": 0,
35
+ 'react/jsx-filename-extension': [0, { extensions: ['.js', '.jsx'] }],
36
+ },
37
+ settings: {
38
+ 'import/resolver': {
39
+ node: {
40
+ paths: ['src'],
41
+ extensions: ['.js', '.jsx', '.ts', '.tsx'],
42
+ },
43
+ },
44
+ },
45
+ globals: {
46
+ PDFCtrl: true,
47
+ require: true,
48
+ },
49
+ parserOptions: {
50
+ parser: 'babel-eslint',
51
+ },
52
+ }
package/README.md CHANGED
@@ -1,44 +1,46 @@
1
- # ttd-bamboo
2
-
3
- --target: 构建目标,默认为应用模式。这里修改为 lib 启用库模式。
4
-
5
- --dest : 输出目录,默认 dist。这里我们改成 lib
6
-
7
- [entry]: 最后一个参数为入口文件,默认为 src/App.vue。这里我们指定编译 packages/ 组件库目录。
8
-
9
- # 调试方法
10
- 修改 package.json的main
11
- "main": "lib/ttd-common.umd.min.js",
12
- "main": "src/packages/index.js",
13
- 执行 npm link ,
14
- 然后在开发项目就可以用 npm link @toolspack/ttd-common(项目名或文件夹名称) 来使用 本组件
15
-
16
- # 发布项目
17
- (不能和上次版本一样) npm run lib (打包), 打包完成后,执行npm publish
18
-
19
- # ukey签章,是以左上角为原点,使用前端打的标签位置 除以1.5,
20
- # 套印签署,是以左下角为原点 除以1.5 并且 印章图片也是左下角为原点
21
- # 服务端签署(wzh), 同套印
22
-
23
-
24
- ### 问题:
25
- 1. 使用 SignFile_KeyImage 签章时, 如果ukey内有多个印章, 只能选默认的第一个
26
- 2. 使用 SelectSignCert 选择印章对 SignFile_KeyImage, ReadKeyImage 无效
27
- ### 解决方案:
28
- 1. 使用 SelectSignCert 选择印章
29
- 2. 从服务端获取对应的印章图片
30
- 3. 用 SignFile_Image 进行签署
31
-
32
-
33
- 0.4.9: 更换依赖包位置: https://wsp.totodi.com/cfca_plug/
34
- 0.5.0: 支持chrome,edge
35
- 0.5.1: 支持chrome,edge 获取ukey图片
36
- 0.5.2: 添加没有扩展时报错,并babel 转化es5(否则ie打不开)
37
- 0.5.3: 360急速支持(加入embed元素)
38
- 0.5.4: 初始化失败不在报错,使用时报
39
- 0.5.5: 初始化不兼容浏览器报错改为console
40
- 0.5.6: 关闭chrome的支持(临时线上需要)
41
- 1.0.0: 加入pdfjs: 2.16.105 (此版本不支持ie, 导入需要使用try-chatch)
42
- 1.0.1: 移除pdfjs: 2.16.105 ,单独打包
43
- 1.1.0: 签署效验: 1校验前端上行 序列号和 ukey 类型是否匹配 2 校验上行的印章md5 和 后端获取的印章md5 是否匹配
44
- 1.1.2: 添加userId上行
1
+ # ttd-bamboo
2
+
3
+ --target: 构建目标,默认为应用模式。这里修改为 lib 启用库模式。
4
+
5
+ --dest : 输出目录,默认 dist。这里我们改成 lib
6
+
7
+ [entry]: 最后一个参数为入口文件,默认为 src/App.vue。这里我们指定编译 packages/ 组件库目录。
8
+
9
+ # 调试方法
10
+ 修改 package.json的main
11
+ "main": "lib/ttd-common.umd.min.js",
12
+ "main": "src/packages/index.js",
13
+ 执行 npm link ,
14
+ 然后在开发项目就可以用 npm link @toolspack/ttd-common(项目名或文件夹名称) 来使用 本组件
15
+
16
+ # 发布项目
17
+ (不能和上次版本一样) npm run lib (打包), 打包完成后,执行npm publish
18
+
19
+ # ukey签章,是以左上角为原点,使用前端打的标签位置 除以1.5,
20
+ # 套印签署,是以左下角为原点 除以1.5 并且 印章图片也是左下角为原点
21
+ # 服务端签署(wzh), 同套印
22
+
23
+
24
+ ### 问题:
25
+ 1. 使用 SignFile_KeyImage 签章时, 如果ukey内有多个印章, 只能选默认的第一个
26
+ 2. 使用 SelectSignCert 选择印章对 SignFile_KeyImage, ReadKeyImage 无效
27
+ ### 解决方案:
28
+ 1. 使用 SelectSignCert 选择印章
29
+ 2. 从服务端获取对应的印章图片
30
+ 3. 用 SignFile_Image 进行签署
31
+
32
+
33
+ 0.4.9: 更换依赖包位置: https://wsp.totodi.com/cfca_plug/
34
+ 0.5.0: 支持chrome,edge
35
+ 0.5.1: 支持chrome,edge 获取ukey图片
36
+ 0.5.2: 添加没有扩展时报错,并babel 转化es5(否则ie打不开)
37
+ 0.5.3: 360急速支持(加入embed元素)
38
+ 0.5.4: 初始化失败不在报错,使用时报
39
+ 0.5.5: 初始化不兼容浏览器报错改为console
40
+ 0.5.6: 关闭chrome的支持(临时线上需要)
41
+ 1.0.0: 加入pdfjs: 2.16.105 (此版本不支持ie, 导入需要使用try-chatch)
42
+ 1.0.1: 移除pdfjs: 2.16.105 ,单独打包
43
+ 1.1.0: 签署效验: 1校验前端上行 序列号和 ukey 类型是否匹配 2 校验上行的印章md5 和 后端获取的印章md5 是否匹配
44
+ 1.1.2: 添加userId上行
45
+ 1.1.4: sealId印章图片的id
46
+ 1.1.5 : 显示后端返回error msg