component-shipinlv 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,2 @@
1
- declare const fileSelect: (fileType: 'video' | 'video+image' | 'image' | 'sound' | '') => Promise<unknown>;
1
+ declare const fileSelect: (fileType: 'video' | 'video+image' | 'image' | 'sound' | '') => Promise<LocalFile.FileSelect>;
2
2
  export default fileSelect;
@@ -29,7 +29,7 @@ var fileSelect = /*#__PURE__*/function () {
29
29
  case 2:
30
30
  openResult = _context.sent;
31
31
  if (openResult) {
32
- resolve(true);
32
+ resolve(openResult);
33
33
  }
34
34
  case 4:
35
35
  case "end":
@@ -29,7 +29,7 @@ var folderOpen = /*#__PURE__*/function () {
29
29
  case 2:
30
30
  openResult = _context.sent;
31
31
  if (openResult) {
32
- resolve(true);
32
+ resolve(openResult);
33
33
  }
34
34
  case 4:
35
35
  case "end":
@@ -29,7 +29,7 @@ var folderSelect = /*#__PURE__*/function () {
29
29
  case 2:
30
30
  openResult = _context.sent;
31
31
  if (openResult) {
32
- resolve(true);
32
+ resolve(openResult);
33
33
  }
34
34
  case 4:
35
35
  case "end":
@@ -29,7 +29,7 @@ var openInFolder = /*#__PURE__*/function () {
29
29
  case 2:
30
30
  openResult = _context.sent;
31
31
  if (openResult) {
32
- resolve(true);
32
+ resolve(openResult);
33
33
  }
34
34
  case 4:
35
35
  case "end":
@@ -43,12 +43,12 @@ var requestApi = function requestApi() {
43
43
  var result = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
44
44
  console.log('ajax requestData then:', result);
45
45
  if (result.success) {
46
- resolve(result.data);
46
+ resolve(result.data || true);
47
47
  } else {
48
48
  var error = new Error((result === null || result === void 0 ? void 0 : result.message) || '发生了一些问题,请稍后重试');
49
49
  error.name = result.code;
50
50
  error.stack = result.data;
51
- if (['staff-not-login', 'not-login'].includes(result === null || result === void 0 ? void 0 : result.code)) {
51
+ if (['staff-not-login', 'not-login'].includes((result === null || result === void 0 ? void 0 : result.code) || '')) {
52
52
  // 未登录,跳走;
53
53
  goAuth(result.authType);
54
54
  reject(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",