@conecli/cone-render 0.10.1-shop3.18 → 0.10.1-shop3.19

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.
@@ -1 +1 @@
1
- import ready from '../utils/ready'
2
1
  return new Promise((resolve, reject) => {
3
2
  ready('jmfe', timeout)
4
3
  .then(() => {
5
4
  registerCode(JSSDK_APP_WEBVIEW_CODE)
6
5
  resolve(window['jmfe'])
7
6
  })
8
7
  .catch(() => {
9
8
  console.log('window.jmfe不存在')
10
9
  reject(null)
11
10
  })
12
11
  })
13
12
  if (window['jmfe']) {
14
13
  console.log('registerCode:', code)
15
14
  window['jmfe'].registerCode(code)
16
15
  } else {
17
16
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js')
18
17
  }
18
+ import ready from '../utils/ready';
19
19
  return new Promise((resolve, reject) => {
20
20
  ready('jmfe', timeout)
21
21
  .then(() => {
22
22
  registerCode(JSSDK_APP_WEBVIEW_CODE);
23
23
  resolve(window['jmfe']);
24
24
  })
25
25
  .catch(() => {
26
26
  console.log('window.jmfe不存在');
27
27
  reject(null);
28
28
  });
29
29
  });
30
30
  if (window['jmfe']) {
31
31
  console.log('registerCode:', code);
32
32
  window['jmfe'].registerCode(code);
33
33
  } else {
34
34
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js');
35
35
  }
@@ -1 +1 @@
1
- import {isJdAndHarmonyDevice, draBusinessCustomReport} from '../../utils/h5Utils'
2
1
  draBusinessCustomReport({
3
2
  type,
4
3
  errMsg,
5
4
  data,
6
5
  });
7
6
  return new Promise((resolve) => {
8
7
  if (window['jmfe']) {
9
8
  window['jmfe'].isJDAppLogin().then(({ data }) => {
10
9
  if (data === '1') {
11
10
  resolve(true);
12
11
  } else if (data === '0') {
13
12
  resolve(false);
14
13
  }
15
14
  });
16
15
  } else {
17
16
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js');
18
17
  resolve(false);
19
18
  }
20
19
  });
21
20
  return requestIsvToken(window.location.href);
22
21
  if (window['jmfe']) {
23
22
  window['jmfe'].toLogin(options);
24
23
  } else {
25
24
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js');
26
25
  }
27
26
  if (window['jmfe']) {
28
27
  console.log('registerCode:', code);
29
28
  window['jmfe'].registerCode(code);
30
29
  } else {
31
30
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js');
32
31
  }
33
32
  const plugin = 'JDHybridLoginPlugin';
34
33
  const action = 'requestIsvToken';
35
34
  const params = { url };
36
35
  return jmfe.callNative(plugin, action, params);
37
36
  return new Promise((resolve) => {
38
37
  console.log('requestIsvToken:', url);
39
38
  if (window['jmfe']) {
40
39
  const jmfeVersion = window['jmfe'].VERSION || 'unknow';
41
40
  try{
42
41
  (isJdAndHarmonyDevice ? requestIsvTokenHarmony(url): window['jmfe'].requestIsvToken(url))
43
42
  .then((result: any) => {
44
43
  console.log('requestIsvToken result:' + JSON.stringify(result))
45
44
  const { status, data } = result
46
45
  if (status === '0') {
47
46
  resolve(data || '')
48
47
  } else {
49
48
  resolve('')
50
49
  }
51
50
  if(!data){
52
51
  exceptionReport({
53
52
  data: {
54
53
  desc: '调用API有返回,但token值为空',
55
54
  jmfeVersion,
56
55
  originResult: result,
57
56
  url,
58
57
  }
59
58
  })
60
59
  }
61
60
  })
62
61
  }catch(error){
63
62
  resolve('')
64
63
  const errorInfo = {
65
64
  name: error?.name,
66
65
  message: error?.message,
67
66
  stack: error?.stack,
68
67
  };
69
68
  exceptionReport({
70
69
  data: {
71
70
  desc: '调用API发生异常',
72
71
  jmfeVersion,
73
72
  error: errorInfo,
74
73
  url
75
74
  }
76
75
  })
77
76
  }
78
77
  } else {
79
78
  resolve('')
80
79
  exceptionReport({
81
80
  data: {
82
81
  desc: '前置依赖window.jmfe不存在',
83
82
  }
84
83
  })
85
84
  }
86
85
  });
86
+ import { isJdAndHarmonyDevice, draBusinessCustomReport } from '../../utils/h5Utils';
87
87
  draBusinessCustomReport({
88
88
  type,
89
89
  errMsg,
90
90
  data,
91
91
  });
92
92
  return new Promise((resolve) => {
93
93
  if (window['jmfe']) {
94
94
  window['jmfe'].isJDAppLogin().then(({ data }) => {
95
95
  if (data === '1') {
96
96
  resolve(true);
97
97
  } else if (data === '0') {
98
98
  resolve(false);
99
99
  }
100
100
  });
101
101
  } else {
102
102
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js');
103
103
  resolve(false);
104
104
  }
105
105
  });
106
106
  return requestIsvToken(window.location.href);
107
107
  if (window['jmfe']) {
108
108
  window['jmfe'].toLogin(options);
109
109
  } else {
110
110
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js');
111
111
  }
112
112
  if (window['jmfe']) {
113
113
  console.log('registerCode:', code);
114
114
  window['jmfe'].registerCode(code);
115
115
  } else {
116
116
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js');
117
117
  }
118
118
  const plugin = 'JDHybridLoginPlugin';
119
119
  const action = 'requestIsvToken';
120
120
  const params = { url };
121
121
  return jmfe.callNative(plugin, action, params);
122
122
  return new Promise((resolve) => {
123
123
  console.log('requestIsvToken:', url);
124
124
  if (window['jmfe']) {
125
125
  const jmfeVersion = window['jmfe'].VERSION || 'unknow';
126
126
  try {
127
127
  (isJdAndHarmonyDevice
128
128
  ? requestIsvTokenHarmony(url)
129
129
  : window['jmfe'].requestIsvToken(url)
130
130
  ).then((result: any) => {
131
131
  console.log('requestIsvToken result:' + JSON.stringify(result));
132
132
  const { status, data } = result;
133
133
  if (status === '0') {
134
134
  resolve(data || '');
135
135
  } else {
136
136
  resolve('');
137
137
  }
138
138
  if (!data) {
139
139
  exceptionReport({
140
140
  data: {
141
141
  desc: '调用API有返回,但token值为空',
142
142
  jmfeVersion,
143
143
  originResult: result,
144
144
  url,
145
145
  },
146
146
  });
147
147
  }
148
148
  });
149
149
  } catch (error) {
150
150
  resolve('');
151
151
  const errorInfo = {
152
152
  name: error?.name,
153
153
  message: error?.message,
154
154
  stack: error?.stack,
155
155
  };
156
156
  exceptionReport({
157
157
  data: {
158
158
  desc: '调用API发生异常',
159
159
  jmfeVersion,
160
160
  error: errorInfo,
161
161
  url,
162
162
  },
163
163
  });
164
164
  }
165
165
  } else {
166
166
  resolve('');
167
167
  exceptionReport({
168
168
  data: {
169
169
  desc: '前置依赖window.jmfe不存在',
170
170
  },
171
171
  });
172
172
  }
173
173
  });
@@ -6,7 +6,7 @@
6
6
  left: 0;
7
7
  right: 0;
8
8
  bottom: 0;
9
- z-index: 50;
9
+ z-index: 9999;
10
10
 
11
11
  .debug-layout {
12
12
  position: absolute;
@@ -58,7 +58,7 @@
58
58
  .d-info {
59
59
  position: relative;
60
60
  cursor: pointer;
61
- z-index: 3;
61
+ z-index: 9999;
62
62
  margin: 3PX 3PX;
63
63
  width: 22PX;
64
64
  height: 22PX;
@@ -266,6 +266,12 @@ taro-text-core {
266
266
  }
267
267
 
268
268
 
269
+ body .taro_page {
270
+ overflow-x: hidden;
271
+ overflow-y: auto;
272
+ }
273
+
274
+
269
275
  .taro-scroll-view {
270
276
  &__scroll-x {
271
277
  overflow-x: scroll;
@@ -0,0 +1 @@
1
+ export const timeLog = (...messages) => {
2
  const level = 'info';
1
3
  const now = new Date();
2
4
  const timestamp = now.toLocaleString('zh-CN', {
3
5
  year: 'numeric',
4
6
  month: '2-digit',
5
7
  day: '2-digit',
6
8
  hour: '2-digit',
7
9
  minute: '2-digit',
8
10
  second: '2-digit',
9
11
  hour12: false,
10
12
  });
11
13
  const milliseconds = now.getMilliseconds().toString().padStart(3, '0');
12
14
  const prefix = `[${timestamp}.${milliseconds}] `;
13
15
  const logMethods = {
14
16
  info: console.info,
15
17
  warn: console.warn,
16
18
  error: console.error,
17
19
  };
18
20
  logMethods[level](prefix, ...messages);
package/package.json CHANGED
@@ -1,161 +1,160 @@
1
1
  {
2
- "name": "@conecli/cone-render",
3
- "version": "0.10.1-shop3.18",
4
- "private": false,
5
- "files": [
6
- "dist/"
7
- ],
8
- "exports": {
9
- "./api": "./dist/open/api/index.ts",
10
- "./components": "./dist/open/components/index.ts",
11
- "./modules": "./dist/open/modules/index.ts",
12
- "./_api": "./dist/api",
13
- "./_config/": "./dist/config/",
14
- "./_common/": "./dist/common/",
15
- "./_components/": "./dist/components/",
16
- "./_interface": "./dist/interface",
17
- "./_jumpEventReport": "./dist/jumpEventReport",
18
- "./_jumpEventReport/": "./dist/jumpEventReport/",
19
- "./_utils": "./dist/utils",
20
- "./_utils/": "./dist/utils/",
21
- "./sass/": "./dist/sass/"
22
- },
23
- "description": "cone-render",
24
- "templateInfo": {
25
- "name": "default",
26
- "typescript": true,
27
- "css": "sass",
28
- "framework": "React"
29
- },
30
- "scripts": {
31
- "build:weapp": "taro build --type weapp",
32
- "build:swan": "taro build --type swan",
33
- "build:alipay": "taro build --type alipay",
34
- "build:tt": "taro build --type tt",
35
- "build:h5": "taro build --type h5",
36
- "build:rn": "taro build --type rn",
37
- "build:qq": "taro build --type qq",
38
- "build:jd": "taro build --type jd",
39
- "build:harmony-hybrid": "taro build --type harmony-hybrid",
40
- "dev:weapp": "npm run build:weapp -- --watch",
41
- "dev:swan": "npm run build:swan -- --watch",
42
- "dev:alipay": "npm run build:alipay -- --watch",
43
- "dev:tt": "npm run build:tt -- --watch",
44
- "dev:h5": "npm run build:h5 -- --watch",
45
- "dev:rn": "npm run build:rn -- --watch",
46
- "dev:qq": "npm run build:qq -- --watch",
47
- "dev:jd": "npm run build:jd -- --watch",
48
- "dev:harmony-hybrid": "npm run build:harmony-hybrid -- --watch",
49
- "compressWatch": "gulp compressWatch --gulpfile ./publish/gulpfile.js",
50
- "compress": "gulp compress --gulpfile ./publish/gulpfile.js",
51
- "build": "npm run compress",
52
- "check": "gulp check --gulpfile ./publish/gulpfile.js"
53
- },
54
- "browserslist": {
55
- "development": [
56
- "defaults and fully supports es6-module",
57
- "maintained node versions"
58
- ],
59
- "production": [
60
- "last 3 versions",
61
- "Android >= 4.1",
62
- "ios >= 8"
63
- ]
64
- },
65
- "husky": {
66
- "hooks": {
67
- "pre-commit": "lint-staged",
68
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
69
- }
70
- },
71
- "lint-staged": {
72
- "*.{js,ts}": [
73
- "eslint",
74
- "eslint --fix",
75
- "git add"
76
- ],
77
- "*.{scss}": [
78
- "prettier --write",
79
- "git add"
80
- ]
81
- },
82
- "keywords": [
83
- "conecli",
84
- "render"
85
- ],
86
- "author": "conecli",
87
- "dependencies": {
88
- "@babel/runtime": "7.24.4",
89
- "@tarojs/components": "4.0.9",
90
- "@tarojs/helper": "4.0.9",
91
- "@tarojs/plugin-platform-weapp": "4.0.9",
92
- "@tarojs/plugin-platform-alipay": "4.0.9",
93
- "@tarojs/plugin-platform-tt": "4.0.9",
94
- "@tarojs/plugin-platform-swan": "4.0.9",
95
- "@tarojs/plugin-platform-jd": "4.0.9",
96
- "@tarojs/plugin-platform-qq": "4.0.9",
97
- "@tarojs/plugin-platform-h5": "4.0.9",
98
- "@tarojs/plugin-platform-harmony-hybrid": "4.0.9",
99
- "@tarojs/runtime": "4.0.9",
100
- "@tarojs/shared": "4.0.9",
101
- "@tarojs/taro": "4.0.9",
102
- "@tarojs/plugin-framework-react": "4.0.9",
103
- "@tarojs/react": "4.0.9",
104
- "@tarojs/service": "4.0.9",
105
- "react-dom": "^18.2.0",
106
- "react": "^18.2.0",
107
- "art-template": "^4.13.2",
108
- "gulp-filter": "^7.0.0",
109
- "normalize.css": "^8.0.1",
110
- "react-content-loader": "^6.2.0",
111
- "react-intersection-observer": "8.33.1",
112
- "react-refresh": "^0.14.0",
113
- "sha256": "^0.2.0"
114
- },
115
- "devDependencies": {
116
- "@babel/plugin-transform-strict-mode": "^7.16.7",
117
- "@babel/core": "7.24.4",
118
- "@tarojs/cli": "4.0.9",
119
- "@babel/plugin-proposal-class-properties": "7.14.5",
120
- "@types/webpack-env": "^1.13.6",
121
- "@types/react": "^18.0.17",
122
- "webpack": "5.91.0",
123
- "@tarojs/taro-loader": "4.0.9",
124
- "@tarojs/webpack5-runner": "4.0.9",
125
- "sass": "^1.75.0",
126
- "babel-preset-taro": "4.0.9",
127
- "eslint-config-taro": "4.0.9",
128
- "eslint-config-prettier": "^8.3.0",
129
- "eslint": "^8.57.0",
130
- "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
131
- "react-refresh": "^0.14.0",
132
- "@babel/preset-react": "^7.24.1",
133
- "eslint-plugin-react": "^7.34.1",
134
- "eslint-plugin-import": "^2.12.0",
135
- "eslint-plugin-react-hooks": "^4.4.0",
136
- "stylelint": "^16.4.0",
137
- "@typescript-eslint/parser": "^6.2.0",
138
- "@typescript-eslint/eslint-plugin": "^6.2.0",
139
- "typescript": "^5.4.5",
140
- "tsconfig-paths-webpack-plugin": "^4.1.0",
141
- "postcss": "^8.4.38",
142
- "ts-node": "^10.9.1",
143
- "@types/node": "^18",
144
- "del": "^6.1.1",
145
- "escodegen": "^2.0.0",
146
- "espree": "^9.3.2",
147
- "esprima": "^4.0.1",
148
- "estraverse": "^5.3.0",
149
- "gulp": "^4.0.2",
150
- "gulp-util": "^3.0.8",
151
- "html-webpack-plugin": "^5.5.0",
152
- "mini-css-extract-plugin": "^2.6.1",
153
- "shelljs": "^0.8.5",
154
- "terser-webpack-plugin": "^5.3.6"
155
- },
156
- "resolutions": {
157
- "@babel/runtime": "7.24.4",
158
- "@tarojs/cli": "4.0.9",
159
- "@tarojs/helper": "4.0.9"
160
- }
2
+ "name": "@conecli/cone-render",
3
+ "version": "0.10.1-shop3.19",
4
+ "private": false,
5
+ "files": [
6
+ "dist/"
7
+ ],
8
+ "exports": {
9
+ "./api": "./dist/open/api/index.ts",
10
+ "./components": "./dist/open/components/index.ts",
11
+ "./modules": "./dist/open/modules/index.ts",
12
+ "./_api": "./dist/api",
13
+ "./_config/": "./dist/config/",
14
+ "./_common/": "./dist/common/",
15
+ "./_components/": "./dist/components/",
16
+ "./_interface": "./dist/interface",
17
+ "./_jumpEventReport": "./dist/jumpEventReport",
18
+ "./_jumpEventReport/": "./dist/jumpEventReport/",
19
+ "./_utils": "./dist/utils",
20
+ "./_utils/": "./dist/utils/",
21
+ "./sass/": "./dist/sass/"
22
+ },
23
+ "description": "cone-render",
24
+ "templateInfo": {
25
+ "name": "default",
26
+ "typescript": true,
27
+ "css": "sass",
28
+ "framework": "React"
29
+ },
30
+ "scripts": {
31
+ "build:weapp": "taro build --type weapp",
32
+ "build:swan": "taro build --type swan",
33
+ "build:alipay": "taro build --type alipay",
34
+ "build:tt": "taro build --type tt",
35
+ "build:h5": "taro build --type h5",
36
+ "build:rn": "taro build --type rn",
37
+ "build:qq": "taro build --type qq",
38
+ "build:jd": "taro build --type jd",
39
+ "build:harmony-hybrid": "taro build --type harmony-hybrid",
40
+ "dev:weapp": "npm run build:weapp -- --watch",
41
+ "dev:swan": "npm run build:swan -- --watch",
42
+ "dev:alipay": "npm run build:alipay -- --watch",
43
+ "dev:tt": "npm run build:tt -- --watch",
44
+ "dev:h5": "npm run build:h5 -- --watch",
45
+ "dev:rn": "npm run build:rn -- --watch",
46
+ "dev:qq": "npm run build:qq -- --watch",
47
+ "dev:jd": "npm run build:jd -- --watch",
48
+ "dev:harmony-hybrid": "npm run build:harmony-hybrid -- --watch",
49
+ "compressWatch": "gulp compressWatch --gulpfile ./publish/gulpfile.js",
50
+ "compress": "gulp compress --gulpfile ./publish/gulpfile.js",
51
+ "build": "npm run compress",
52
+ "check": "gulp check --gulpfile ./publish/gulpfile.js"
53
+ },
54
+ "browserslist": {
55
+ "development": [
56
+ "defaults and fully supports es6-module",
57
+ "maintained node versions"
58
+ ],
59
+ "production": [
60
+ "last 3 versions",
61
+ "Android >= 4.1",
62
+ "ios >= 8"
63
+ ]
64
+ },
65
+ "husky": {
66
+ "hooks": {
67
+ "pre-commit": "lint-staged",
68
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
69
+ }
70
+ },
71
+ "lint-staged": {
72
+ "*.{js,ts}": [
73
+ "eslint",
74
+ "eslint --fix",
75
+ "git add"
76
+ ],
77
+ "*.{scss}": [
78
+ "prettier --write",
79
+ "git add"
80
+ ]
81
+ },
82
+ "keywords": [
83
+ "conecli",
84
+ "render"
85
+ ],
86
+ "author": "conecli",
87
+ "dependencies": {
88
+ "@babel/runtime": "7.24.4",
89
+ "@tarojs/components": "4.1.2",
90
+ "@tarojs/helper": "4.1.2",
91
+ "@tarojs/plugin-platform-weapp": "4.1.2",
92
+ "@tarojs/plugin-platform-alipay": "4.1.2",
93
+ "@tarojs/plugin-platform-tt": "4.1.2",
94
+ "@tarojs/plugin-platform-swan": "4.1.2",
95
+ "@tarojs/plugin-platform-jd": "4.1.2",
96
+ "@tarojs/plugin-platform-qq": "4.1.2",
97
+ "@tarojs/plugin-platform-h5": "4.1.2",
98
+ "@tarojs/plugin-platform-harmony-hybrid": "4.1.2",
99
+ "@tarojs/runtime": "4.1.2",
100
+ "@tarojs/shared": "4.1.2",
101
+ "@tarojs/taro": "4.1.2",
102
+ "@tarojs/plugin-framework-react": "4.1.2",
103
+ "@tarojs/react": "4.1.2",
104
+ "@tarojs/service": "4.1.2",
105
+ "react-dom": "^18.2.0",
106
+ "react": "^18.2.0",
107
+ "art-template": "^4.13.2",
108
+ "gulp-filter": "^7.0.0",
109
+ "normalize.css": "^8.0.1",
110
+ "react-content-loader": "^6.2.0",
111
+ "react-intersection-observer": "8.33.1",
112
+ "react-refresh": "^0.14.0",
113
+ "sha256": "^0.2.0"
114
+ },
115
+ "devDependencies": {
116
+ "@babel/plugin-transform-strict-mode": "^7.16.7",
117
+ "@babel/core": "7.24.4",
118
+ "@tarojs/cli": "4.1.2",
119
+ "@babel/plugin-proposal-class-properties": "7.14.5",
120
+ "@types/webpack-env": "^1.13.6",
121
+ "@types/react": "^18.0.17",
122
+ "webpack": "5.91.0",
123
+ "@tarojs/taro-loader": "4.1.2",
124
+ "@tarojs/webpack5-runner": "4.1.2",
125
+ "sass": "^1.75.0",
126
+ "babel-preset-taro": "4.1.2",
127
+ "eslint-config-taro": "4.1.2",
128
+ "eslint": "^8.57.0",
129
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
130
+ "react-refresh": "^0.14.0",
131
+ "@babel/preset-react": "^7.24.1",
132
+ "eslint-plugin-react": "^7.34.1",
133
+ "eslint-plugin-import": "^2.12.0",
134
+ "eslint-plugin-react-hooks": "^4.4.0",
135
+ "stylelint": "^16.4.0",
136
+ "@typescript-eslint/parser": "^6.2.0",
137
+ "@typescript-eslint/eslint-plugin": "^6.2.0",
138
+ "typescript": "^5.4.5",
139
+ "tsconfig-paths-webpack-plugin": "^4.1.0",
140
+ "postcss": "^8.4.38",
141
+ "ts-node": "^10.9.1",
142
+ "@types/node": "^18",
143
+ "del": "^6.1.1",
144
+ "escodegen": "^2.0.0",
145
+ "espree": "^9.3.2",
146
+ "esprima": "^4.0.1",
147
+ "estraverse": "^5.3.0",
148
+ "gulp": "^4.0.2",
149
+ "gulp-util": "^3.0.8",
150
+ "html-webpack-plugin": "^5.5.0",
151
+ "mini-css-extract-plugin": "^2.6.1",
152
+ "shelljs": "^0.8.5",
153
+ "terser-webpack-plugin": "^5.3.6"
154
+ },
155
+ "resolutions": {
156
+ "@babel/runtime": "7.24.4",
157
+ "@tarojs/cli": "4.1.2",
158
+ "@tarojs/helper": "4.1.2"
159
+ }
161
160
  }