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

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 { isApp } from '../../utils/jm-common'
2
1
  return new Promise((resolve, reject) => {
3
2
  let platform: string = getPlatform()
4
3
  if (platform === TokenPlatform.TYPE_JDAPP) {
5
4
  ready('jmfe', 3000)
6
5
  .then(() => {
7
6
  console.log('window.jmfe已经存在:', window['jmfe'])
8
7
  import('./token.jd')
9
8
  .then((data) => {
10
9
  console.log('data:', data)
11
10
  resolve(data)
12
11
  })
13
12
  .catch((err) => {
14
13
  reject(err)
15
14
  })
16
15
  })
17
16
  .catch((e) => {
18
17
  console.log('window.jmfe不存在')
19
18
  reject(e)
20
19
  })
21
20
  }
22
21
  else if (platform === TokenPlatform.TYPE_WQ) {
23
22
  import('./token.wxapp')
24
23
  .then((data) => {
25
24
  console.log('data:', data)
26
25
  resolve(data)
27
26
  })
28
27
  .catch((err) => {
29
28
  reject(err)
30
29
  })
31
30
  } else {
32
31
  import('./token')
33
32
  .then((data) => {
34
33
  console.log('data:', data)
35
34
  resolve(data)
36
35
  })
37
36
  .catch((err) => {
38
37
  reject(err)
39
38
  })
40
39
  }
41
40
  })
42
41
  console.log(e)
43
42
  return {}
44
43
  return new Promise((resolve) => {
45
44
  loadTokenPromise
46
45
  .then((proxy: any) => {
47
46
  if (proxy?.isLogin) {
48
47
  proxy?.isLogin().then((data: boolean) => {
49
48
  resolve(data)
50
49
  })
51
50
  } else {
52
51
  resolve(false)
53
52
  }
54
53
  })
55
54
  .catch((err) => {
56
55
  resolve(false)
57
56
  })
58
57
  })
59
58
  return new Promise((resolve) => {
60
59
  loadTokenPromise
61
60
  .then((proxy: any) => {
62
61
  if (proxy?.getIsvToken) {
63
62
  proxy?.getIsvToken().then((data: string) => {
64
63
  resolve(data)
65
64
  })
66
65
  } else {
67
66
  resolve('')
68
67
  }
69
68
  })
70
69
  .catch((err) => {
71
70
  resolve('')
72
71
  })
73
72
  })
74
73
  return new Promise((resolve) => {
75
74
  loadTokenPromise
76
75
  .then((proxy: any) => {
77
76
  if (proxy?.toLogin) {
78
77
  proxy?.toLogin(options)
79
78
  resolve(true)
80
79
  } else {
81
80
  resolve(false)
82
81
  }
83
82
  })
84
83
  .catch((err) => {
85
84
  resolve(false)
86
85
  })
87
86
  })
88
87
  let platform = TokenPlatform.TYPE_M
89
88
  if (isApp('jd')) {
90
89
  platform = TokenPlatform.TYPE_JDAPP
91
90
  }
92
91
  else if (isApp('wx') && isApp('mp')) {
93
92
  platform = TokenPlatform.TYPE_WQ
94
93
  }
95
94
  return platform
96
95
  let platform = getPlatform()
97
96
  let source = platform
98
97
  if (platform === TokenPlatform.TYPE_M || platform === TokenPlatform.TYPE_WQ) {
99
98
  source = TokenPlatform.TYPE_JDAPP
100
99
  }
101
100
  return source
102
101
  return window?.page_data?.pageChannel || ''
102
+ import global from '../../common';
103
103
  return new Promise((resolve, reject) => {
104
104
  let platform: string = getPlatform();
105
105
  if (platform === TokenPlatform.TYPE_JDAPP) {
106
106
  global
107
107
  .jmfeReayPromise()
108
108
  .then(() => {
109
109
  console.log(
110
110
  'loadTokenAsync window.jmfe已经存在:',
111
111
  window?.jmfe,
112
112
  '当前版本',
113
113
  window?.jmfe?.VERSION,
114
114
  );
115
115
  import('./token.jd')
116
116
  .then((data) => {
117
117
  console.log('data:', data);
118
118
  resolve(data);
119
119
  })
120
120
  .catch((err) => {
121
121
  reject(err);
122
122
  });
123
123
  })
124
124
  .catch((e) => {
125
125
  console.log('window.jmfe不存在');
126
126
  reject(e);
127
127
  });
128
128
  }
129
129
  else if (platform === TokenPlatform.TYPE_WQ) {
130
130
  import('./token.wxapp')
131
131
  .then((data) => {
132
132
  console.log('data:', data);
133
133
  resolve(data);
134
134
  })
135
135
  .catch((err) => {
136
136
  reject(err);
137
137
  });
138
138
  } else {
139
139
  import('./token')
140
140
  .then((data) => {
141
141
  console.log('data:', data);
142
142
  resolve(data);
143
143
  })
144
144
  .catch((err) => {
145
145
  reject(err);
146
146
  });
147
147
  }
148
148
  });
149
149
  console.log(e);
150
150
  return {};
151
151
  return new Promise((resolve) => {
152
152
  loadTokenPromise
153
153
  .then((proxy: any) => {
154
154
  if (proxy?.isLogin) {
155
155
  proxy?.isLogin().then((data: boolean) => {
156
156
  resolve(data);
157
157
  });
158
158
  } else {
159
159
  resolve(false);
160
160
  }
161
161
  })
162
162
  .catch((err) => {
163
163
  console.log(err);
164
164
  resolve(false);
165
165
  });
166
166
  });
167
167
  return new Promise((resolve) => {
168
168
  loadTokenPromise
169
169
  .then((proxy: any) => {
170
170
  if (proxy?.getIsvToken) {
171
171
  proxy?.getIsvToken().then((data: string) => {
172
172
  resolve(data);
173
173
  });
174
174
  } else {
175
175
  resolve('');
176
176
  }
177
177
  })
178
178
  .catch((err) => {
179
179
  console.log(err);
180
180
  resolve('');
181
181
  });
182
182
  });
183
183
  return new Promise((resolve) => {
184
184
  loadTokenPromise
185
185
  .then((proxy: any) => {
186
186
  if (proxy?.toLogin) {
187
187
  proxy?.toLogin(options);
188
188
  resolve(true);
189
189
  } else {
190
190
  resolve(false);
191
191
  }
192
192
  })
193
193
  .catch((err) => {
194
194
  console.log(err);
195
195
  resolve(false);
196
196
  });
197
197
  });
198
198
  let platform = TokenPlatform.TYPE_M;
199
199
  if (isApp('jd')) {
200
200
  platform = TokenPlatform.TYPE_JDAPP;
201
201
  }
202
202
  else if (isApp('wx') && isApp('mp')) {
203
203
  platform = TokenPlatform.TYPE_WQ;
204
204
  }
205
205
  return platform;
206
206
  let platform = getPlatform();
207
207
  let source = platform;
208
208
  if (platform === TokenPlatform.TYPE_M || platform === TokenPlatform.TYPE_WQ) {
209
209
  source = TokenPlatform.TYPE_JDAPP;
210
210
  }
211
211
  return source;
212
212
  return window?.page_data?.pageChannel || '';
@@ -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
43
42
  ? requestIsvTokenHarmony(url)
44
43
  : window['jmfe'].requestIsvToken(url)
45
44
  ).then((result: any) => {
46
45
  console.log('requestIsvToken result:' + JSON.stringify(result));
47
46
  const { status, data } = result;
48
47
  if (status === '0') {
49
48
  resolve(data || '');
50
49
  } else {
51
50
  resolve('');
52
51
  }
53
52
  if (!data) {
54
53
  exceptionReport({
55
54
  data: {
56
55
  desc: '调用API有返回,但token值为空',
57
56
  jmfeVersion,
58
57
  originResult: result,
59
58
  url,
60
59
  },
61
60
  });
62
61
  }
63
62
  });
64
63
  } catch (error) {
65
64
  resolve('');
66
65
  const errorInfo = {
67
66
  name: error?.name,
68
67
  message: error?.message,
69
68
  stack: error?.stack,
70
69
  };
71
70
  exceptionReport({
72
71
  data: {
73
72
  desc: '调用API发生异常',
74
73
  jmfeVersion,
75
74
  error: errorInfo,
76
75
  url,
77
76
  },
78
77
  });
79
78
  }
80
79
  } else {
81
80
  resolve('');
82
81
  exceptionReport({
83
82
  data: {
84
83
  desc: '前置依赖window.jmfe不存在',
85
84
  },
86
85
  });
87
86
  }
88
87
  });
88
+ import {isJdAndHarmonyDevice, draBusinessCustomReport} from '../../utils/h5Utils'
89
89
  draBusinessCustomReport({
90
90
  type,
91
91
  errMsg,
92
92
  data,
93
93
  });
94
94
  return new Promise((resolve) => {
95
95
  if (window['jmfe']) {
96
96
  window['jmfe'].isJDAppLogin().then(({ data }) => {
97
97
  if (data === '1') {
98
98
  resolve(true);
99
99
  } else if (data === '0') {
100
100
  resolve(false);
101
101
  }
102
102
  });
103
103
  } else {
104
104
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js');
105
105
  resolve(false);
106
106
  }
107
107
  });
108
108
  return requestIsvToken(window.location.href);
109
109
  if (window['jmfe']) {
110
110
  window['jmfe'].toLogin(options);
111
111
  } else {
112
112
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js');
113
113
  }
114
114
  if (window['jmfe']) {
115
115
  console.log('registerCode:', code);
116
116
  window['jmfe'].registerCode(code);
117
117
  } else {
118
118
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js');
119
119
  }
120
120
  const plugin = 'JDHybridLoginPlugin';
121
121
  const action = 'requestIsvToken';
122
122
  const params = { url };
123
123
  return jmfe.callNative(plugin, action, params);
124
124
  return new Promise((resolve) => {
125
125
  console.log('requestIsvToken:', url);
126
126
  if (window['jmfe']) {
127
127
  const jmfeVersion = window['jmfe'].VERSION || 'unknow';
128
128
  try{
129
129
  (isJdAndHarmonyDevice ? requestIsvTokenHarmony(url): 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
  });
@@ -1 +1 @@
1
- import * as WXAPP_LOGIN from '../wxapp/common/login/login.js'
1
+ import * as WXAPP_LOGIN from '../wxapp/common/login/login.js';
2
2
  WXAPP_LOGIN,
3
3
  WXAPP_BIZ,
4
4
  WXAPP_USER_INFO,
5
5
  WXAPP_NAVIGATOR,
6
6
  WXAPP_REPORT_GDT,
7
7
  WXAPP_PARAMS_SIGN,
8
8
  WXAPP_FINGER_REPORT,
9
9
  WXAPP_REPORT_MANAGE,
10
10
  WXAPP_SUBS_GUIDER,
11
11
  WXAPP_ADDRESS_V2_API,
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  abTestLabels: {
3
2
  [key: string]: any
4
3
  }
5
4
  [key: string]: number
6
5
  }
7
6
  isJingxiMiniViewState?: boolean
8
7
  floorVideInfo: object
9
8
  isFloorInfoDataByPage?: boolean
10
9
  originQueryInfo: {
11
10
  openAppData?: {
12
11
  [key: string]: any
13
12
  }
13
+ import Taro from '@tarojs/taro';
14
14
  export interface BaseConfigInfo {
15
15
  abTestLabels: {
16
16
  [key: string]: any;
17
17
  };
18
18
  nonSellableSkuids: {
19
19
  [key: string]: number;
20
20
  };
21
21
  loginState: boolean;
22
22
  cookiesStr: string;
23
23
  isImmersive: boolean;
24
24
  isJingGouMiniViewState?: boolean;
25
25
  isJingxiMiniViewState?: boolean;
26
26
  shopInfo: {
27
27
  shopId?: string | number;
28
28
  venderId?: string | number;
29
29
  };
30
30
  pageInfo: {
31
31
  appId?: string;
32
32
  shopId?: string | number;
33
33
  venderId?: string | number;
34
34
  logoSquare?: string;
35
35
  logoUrl?: string;
36
36
  address?: string | null;
37
37
  addressCommaStr?: string | null;
38
38
  un_area?: string | null;
39
39
  userLbsAddress?: string;
40
40
  shopName?: string;
41
41
  jumpTab?: string;
42
42
  sourceType?: string;
43
43
  sourceValue?: string;
44
44
  moduleId?: string;
45
45
  entrance?: string;
46
46
  EA_PTAG?: string;
47
47
  ptag?: string;
48
48
  originReferer?: string;
49
49
  recBroker?: string;
50
50
  rcmdRelateSkuId?: string;
51
51
  tabSpm?: string;
52
52
  skuId?: string;
53
53
  keywords?: string;
54
54
  sceneId?: string;
55
55
  miniScrollInfo?: {
56
56
  scrollLeft: number;
57
57
  scrollTop: number;
58
58
  scrollHeight: number;
59
59
  scrollWidth: number;
60
60
  deltaX: number;
61
61
  deltaY: number;
62
62
  };
63
63
  tabsLoadAllDataInfo: {
64
64
  [key: string]: boolean;
65
65
  };
66
66
  wxBusinessType: string;
67
67
  vapptype: string;
68
68
  pageType: string;
69
69
  dataType: string;
70
70
  floorExposureInfo: object;
71
71
  floorVideInfo: object;
72
72
  isExposureState?: boolean;
73
73
  appLazyContainerList?: string[];
74
74
  appLazyFinishContainerList?: [];
75
75
  shopStickyAndToTopInfo?: {
76
76
  toTop: boolean;
77
77
  sticky: boolean;
78
78
  };
79
79
  isVipShop?: boolean;
80
80
  updateShopInfosState?: boolean;
81
81
  pageScrollTop: number;
82
82
  shopNavBarHeight: number;
83
83
  isFloorInfoDataByPage?: boolean;
84
84
  };
85
85
  lazyContainer?: {
86
86
  wellChosen: {
87
87
  appLazyContainerList?: string[];
88
88
  appLazyFinishContainerList?: string[];
89
89
  };
90
90
  };
91
91
  queryLogInfo?: {
92
92
  sourceType: string;
93
93
  sourceValue: string;
94
94
  moduleId?: string;
95
95
  entrance?: string;
96
96
  };
97
97
  queryInfo: {
98
98
  shopId?: string | number;
99
99
  venderId?: string | number;
100
100
  shopName?: string;
101
101
  [key: string]: any;
102
102
  };
103
103
  originQueryInfo: {
104
104
  shopId?: string | number;
105
105
  venderId?: string | number;
106
106
  shopName?: string;
107
107
  [key: string]: any;
108
108
  };
109
109
  sysInfo: {
110
110
  [key: string]: any;
111
111
  };
112
112
  userInfo: {
113
113
  pin?: string;
114
114
  encodePin?: string;
115
115
  ptkey?: string;
116
116
  wqCookie?: string | null;
117
117
  wxappVersion?: string;
118
118
  wqAuthToken?: string;
119
119
  wqVisitkey?: string;
120
120
  };
121
121
  openAppData?: {
122
122
  [key: string]: any;
123
123
  };
124
124
  }
125
125
 
126
126
  export interface OneKeyJoinMemberParamInfo {
127
127
  title?: string;
128
128
  shopId?: string | number;
129
129
  venderId?: string | number;
130
130
  businessSource?: keyof OneKeyJoinMemberBusinessSource;
131
131
  }
132
132
  export interface OneKeyJoinMemberBusinessSource {
133
133
  isv;
134
134
  lv0;
135
135
  }
136
136
  export type lazyContainer = {
137
137
  [key in 'string']?: {
138
138
  appLazyFinishContainerList: any[];
139
139
  appLazyContainerList: any[];
140
140
  };
141
141
  };
142
142
  export type renderedIsvComponents = {
143
143
  [key in 'string']?: any;
144
144
  };
145
145
  export type MiniApplogUtil = any;
146
146
  export type MiniAppLog = any;
147
147
  export type WxAppLogin = any;
148
148
  export type WxAppUserInfo = any;
149
149
  export type wxAppReportManage = any;
150
150
  export type WxAppReportGDT = any;
151
151
  export type WxAppNavigator = any;
152
152
  export type wxAppParamsSign = any;
153
153
  export type wxAppFingerReportInstance = any;
154
154
  export type wxAppSubsGuider = any;
155
155
  export type wxAppAddressV2api = any;
156
156
  [key: string]: any;