@conecli/cone-render 0.9.1-shop2.2 → 0.9.1-shop2.21

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.
Files changed (103) hide show
  1. package/dist/api/index.ts +1 -1
  2. package/dist/common/const.ts +1 -1
  3. package/dist/common/environmentType.ts +1 -0
  4. package/dist/common/index.h5.ts +1 -1
  5. package/dist/common/index.jd.ts +1 -1
  6. package/dist/common/index.ts +1 -1
  7. package/dist/common/index.weapp.ts +1 -1
  8. package/dist/common/jdplayerSdk.ts +1 -0
  9. package/dist/common/jssdk.ts +1 -0
  10. package/dist/common/pageType.ts +1 -0
  11. package/dist/common/sgmCustomCode.ts +1 -0
  12. package/dist/common/token/index.h5.ts +1 -1
  13. package/dist/common/token/token.jd.ts +1 -1
  14. package/dist/common/token/token.ts +1 -1
  15. package/dist/common/wxappApi.jd.ts +1 -0
  16. package/dist/components/ErrorBoundary.tsx +1 -1
  17. package/dist/components/base/CountDown/index.tsx +1 -1
  18. package/dist/components/base/CustomScrollView/index.jd.tsx +1 -0
  19. package/dist/components/base/CustomScrollView/index.module.scss +7 -0
  20. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  21. package/dist/components/base/CustomVideo/index.tsx +1 -1
  22. package/dist/components/base/Dialog/index.module.scss +5 -0
  23. package/dist/components/base/Dialog/index.tsx +1 -1
  24. package/dist/components/base/Exposure/index.h5.tsx +1 -1
  25. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  26. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  27. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  28. package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
  29. package/dist/components/base/InViewRender/index.tsx +1 -1
  30. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  31. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  32. package/dist/components/base/LazyLoadImage/const.ts +1 -1
  33. package/dist/components/base/LazyLoadImage/index.h5.module.scss +23 -20
  34. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  35. package/dist/components/base/MobileCommonHeader/index.module.scss +17 -0
  36. package/dist/components/base/MobileCommonHeader/index.tsx +1 -0
  37. package/dist/components/base/NetworkDataError/const.ts +1 -1
  38. package/dist/components/base/NetworkDataError/index.module.scss +7 -0
  39. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  40. package/dist/components/base/Price/Double/index.tsx +1 -1
  41. package/dist/components/base/Price/index.tsx +1 -1
  42. package/dist/components/decorate/DecorateFloorModule/index.module.scss +32 -2
  43. package/dist/components/decorate/DecorateFloorModule/index.tsx +1 -1
  44. package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
  45. package/dist/components/decorate/PlaceHolder/index.tsx +1 -1
  46. package/dist/components/floorItem.jd.tsx +1 -1
  47. package/dist/components/floorItem.tsx +1 -1
  48. package/dist/components/floorItem.weapp.tsx +1 -1
  49. package/dist/components/isv/Floor/index.tsx +1 -1
  50. package/dist/components/remoteFloorItem.tsx +1 -1
  51. package/dist/interface/common.ts +1 -1
  52. package/dist/interface/component.ts +1 -1
  53. package/dist/interface/jumpEventReport.ts +1 -1
  54. package/dist/interface/service.ts +1 -1
  55. package/dist/interface/utils.ts +1 -1
  56. package/dist/jumpEventReport/base.ts +1 -1
  57. package/dist/jumpEventReport/const.ts +1 -1
  58. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  59. package/dist/jumpEventReport/index.h5.ts +1 -1
  60. package/dist/jumpEventReport/index.jd.ts +1 -1
  61. package/dist/jumpEventReport/index.weapp.ts +1 -1
  62. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  63. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  64. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  65. package/dist/jumpEventReport/web/report.ts +1 -1
  66. package/dist/jumpEventReport/web.base.ts +1 -1
  67. package/dist/jumpEventReport/web.jd.ts +1 -1
  68. package/dist/jumpEventReport/web.jdb.ts +1 -1
  69. package/dist/jumpEventReport/web.jdjch.ts +1 -1
  70. package/dist/jumpEventReport/web.jxwxapp.ts +1 -0
  71. package/dist/jumpEventReport/web.tjapp.ts +1 -0
  72. package/dist/jumpEventReport/web.tjm.ts +1 -0
  73. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  74. package/dist/modules/ContainerFloorList/index.h5.module.scss +18 -1
  75. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  76. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  77. package/dist/open/api/device.ts +1 -1
  78. package/dist/open/api/environment.ts +1 -1
  79. package/dist/open/api/index.ts +1 -1
  80. package/dist/open/api/jump copy.ts +1 -1
  81. package/dist/open/api/request.ts +1 -1
  82. package/dist/open/api/shopMember.ts +1 -1
  83. package/dist/open/api/track.ts +1 -1
  84. package/dist/open/api/util.ts +1 -1
  85. package/dist/open/components/index.ts +1 -1
  86. package/dist/sass/app.h5.scss +49 -3
  87. package/dist/sass/base.scss +57 -0
  88. package/dist/service/fetchGateway.ts +1 -1
  89. package/dist/service/http/const.ts +1 -1
  90. package/dist/service/requestServer.ts +1 -1
  91. package/dist/utils/connectNativeJsBridge.ts +1 -1
  92. package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
  93. package/dist/utils/draExceptionAndProfile.ts +1 -1
  94. package/dist/utils/h5Utils.ts +1 -1
  95. package/dist/utils/index.h5.ts +1 -1
  96. package/dist/utils/index.ts +1 -1
  97. package/dist/utils/index.weapp.ts +1 -1
  98. package/dist/utils/jm-common.js +1 -1
  99. package/dist/utils/sgmCodeUtils.ts +1 -0
  100. package/dist/utils/taroRenderUtil.ts +1 -1
  101. package/dist/utils/utils.ts +1 -1
  102. package/package.json +1 -1
  103. package/dist/customHooks/useDocumentVisibilitychange.ts +0 -1
@@ -0,0 +1 @@
1
+ import ready from '../utils/ready'
2
  return new Promise((resolve, reject) => {
1
3
  ready('jmfe', timeout)
2
4
  .then(() => {
3
5
  registerCode(JSSDK_APP_WEBVIEW_CODE)
4
6
  resolve(window['jmfe'])
5
7
  })
6
8
  .catch(() => {
7
9
  console.log('window.jmfe不存在')
8
10
  reject(null)
9
11
  })
10
12
  })
11
13
  if (window['jmfe']) {
12
14
  console.log('registerCode:', code)
13
15
  window['jmfe'].registerCode(code)
14
16
  } else {
15
17
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js')
16
18
  }
@@ -0,0 +1 @@
1
+ export const getPageType = () => {
2
  return process.env.BUILD_TYPE || ''
1
3
 
2
4
  M_DECORATE = 'm-decorate',
3
5
  M_RENDER_MODULE = 'm-render-module',
4
6
  M_PREVIEW = 'm-preview',
5
7
  M_ISV_PREVIEW = 'm-isv-preview',
6
8
  MARKETING_PREVIEW = 'marketing-preview',
7
9
 
8
10
  APP_VIEW = 'app-view',
9
11
  APP_MEMBER = 'app-member',
10
12
  APP_INTRODUCE = 'app-introduce',
11
13
  APP_PROMOTION = 'app-promotion',
12
14
  APP_CLASSIFY = 'app-classify',
13
15
  APP_PRODUCT = 'app-product',
14
16
 
15
17
 
16
18
  PC_VIEW = 'pc-view',
17
19
  PC_VIEW1 = 'pc-view1',
18
20
  PC_VIEW2 = 'pc-view2',
19
21
  M_VIEW = 'm-view',
20
22
  M_BSC_VIEW = 'm-bsc-view',
21
23
  SALE_VIEW = 'sale-view',
22
24
  VIP_VIEW = 'vip-view',
23
25
  M_SEARCH = 'm-search',
24
26
  M_INTRODUCE = 'm-introduce',
25
27
 
26
28
  MEMBER_SHOPCARD = 'member-shopcard',
27
29
  M_MEMBER = 'm-member',
28
30
  M_MEMBER_SAM_BIND_CARD = 'm-member-sam-bind-card',
29
31
  M_MEMBER_WATSONS_BIND_CARD = 'm-member-watsons-bind-card',
30
32
  M_SAM_CARD = 'm-sam-card',
31
33
  M_SAM_CENTER = 'm-sam-center',
32
34
  M_WATSONS_CARD = 'm-watsons-card',
33
35
 
34
36
  M_LOTTERY = 'm-lottery',
35
37
  M_COUPON = 'm-coupon',
36
38
  M_WARES = 'm-wares',
37
39
  M_FAST_SHOPPING = 'm-fast-shopping',
38
40
  M_SPECIAL_SECKILL = 'm-special-seckill',
39
41
  WEAPP_SHOP = 'weapp-shop',
40
42
  WEAPP_PROMOTION = 'weapp-promotion',
41
43
  M_VIDEOS = 'm-videos',
@@ -0,0 +1 @@
1
+ export const NO_ENVIRONMENT_AND_PAGE_TYPE_FLAG = 'noType_'
2
  IMAGE_LOAD = 'imageLazyLoadError',
1
3
  GRAYSCALE = 'grayscale',
2
4
  REMOTEMODULE_DATA = 'remoteModule_interface_dataError',
3
5
  REMOTEMODULE_JS = 'remoteModule_render_jsError',
4
6
  SYSTEMMODULE_JS = 'systemModule_render_jsError',
5
7
  SYSTEMPDCMODULE_DATA = 'systemPdcModule_interface_dataError',
6
8
  SYSTEMPDCMODULE_JS = 'systemPdcModule_render_jsError',
7
9
  FLOORLAZYLOAD_DATA = 'floorLazyLoad_render_dataError',
@@ -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已经存在:', 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 { isApp } from '../../utils/jm-common'
103
103
  return new Promise((resolve, reject) => {
104
104
  let platform: string = getPlatform()
105
105
  if (platform === TokenPlatform.TYPE_JDAPP) {
106
106
  ready('jmfe', 3000)
107
107
  .then(() => {
108
108
  console.log('window.jmfe已经存在:', window['jmfe'])
109
109
  import('./token.jd')
110
110
  .then((data) => {
111
111
  console.log('data:', data)
112
112
  resolve(data)
113
113
  })
114
114
  .catch((err) => {
115
115
  reject(err)
116
116
  })
117
117
  })
118
118
  .catch((e) => {
119
119
  console.log('window.jmfe不存在')
120
120
  reject(e)
121
121
  })
122
122
  }
123
123
  else if (platform === TokenPlatform.TYPE_WQ) {
124
124
  import('./token.wxapp')
125
125
  .then((data) => {
126
126
  console.log('data:', data)
127
127
  resolve(data)
128
128
  })
129
129
  .catch((err) => {
130
130
  reject(err)
131
131
  })
132
132
  } else {
133
133
  import('./token')
134
134
  .then((data) => {
135
135
  console.log('data:', data)
136
136
  resolve(data)
137
137
  })
138
138
  .catch((err) => {
139
139
  reject(err)
140
140
  })
141
141
  }
142
142
  })
143
143
  console.log(e)
144
144
  return {}
145
145
  return new Promise((resolve) => {
146
146
  loadTokenPromise
147
147
  .then((proxy: any) => {
148
148
  if (proxy?.isLogin) {
149
149
  proxy?.isLogin().then((data: boolean) => {
150
150
  resolve(data)
151
151
  })
152
152
  } else {
153
153
  resolve(false)
154
154
  }
155
155
  })
156
156
  .catch((err) => {
157
157
  resolve(false)
158
158
  })
159
159
  })
160
160
  return new Promise((resolve) => {
161
161
  loadTokenPromise
162
162
  .then((proxy: any) => {
163
163
  if (proxy?.getIsvToken) {
164
164
  proxy?.getIsvToken().then((data: string) => {
165
165
  resolve(data)
166
166
  })
167
167
  } else {
168
168
  resolve('')
169
169
  }
170
170
  })
171
171
  .catch((err) => {
172
172
  resolve('')
173
173
  })
174
174
  })
175
175
  return new Promise((resolve) => {
176
176
  loadTokenPromise
177
177
  .then((proxy: any) => {
178
178
  if (proxy?.toLogin) {
179
179
  proxy?.toLogin(options)
180
180
  resolve(true)
181
181
  } else {
182
182
  resolve(false)
183
183
  }
184
184
  })
185
185
  .catch((err) => {
186
186
  resolve(false)
187
187
  })
188
188
  })
189
189
  let platform = TokenPlatform.TYPE_M
190
190
  if (isApp('jd')) {
191
191
  platform = TokenPlatform.TYPE_JDAPP
192
192
  }
193
193
  else if (isApp('wx') && isApp('mp')) {
194
194
  platform = TokenPlatform.TYPE_WQ
195
195
  }
196
196
  return platform
197
197
  let platform = getPlatform()
198
198
  let source = platform
199
199
  if (platform === TokenPlatform.TYPE_M || platform === TokenPlatform.TYPE_WQ) {
200
200
  source = TokenPlatform.TYPE_JDAPP
201
201
  }
202
202
  return source
203
203
  return window?.page_data?.pageChannel || ''
@@ -1 +1 @@
1
- console.log('load token.jd')
2
1
  return new Promise((resolve) => {
3
2
  if (jmfe) {
4
3
  jmfe.isJDAppLogin().then(({ data }) => {
5
4
  if (data === '1') {
6
5
  resolve(true)
7
6
  } else if (data === '0') {
8
7
  resolve(false)
9
8
  }
10
9
  })
11
10
  } else {
12
11
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js')
13
12
  resolve(false)
14
13
  }
15
14
  })
16
15
  return requestIsvToken(window.location.href)
17
16
  if (jmfe) {
18
17
  jmfe.toLogin(options)
19
18
  } else {
20
19
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js')
21
20
  }
22
21
  if (jmfe) {
23
22
  console.log('registerCode:', code)
24
23
  jmfe.registerCode(code)
25
24
  } else {
26
25
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js')
27
26
  }
28
27
  return new Promise((resolve) => {
29
28
  console.log('requestIsvToken:', url)
30
29
  if (jmfe) {
31
30
  jmfe
32
31
  .requestIsvToken(url)
33
32
  .then((result: any) => {
34
33
  console.log('requestIsvToken result:' + JSON.stringify(result))
35
34
  const { status, data, msg } = result
36
35
  if (status === '0') {
37
36
  resolve(data || '')
38
37
  } else {
39
38
  resolve('')
40
39
  }
41
40
  })
42
41
  .catch((e: any) => {
43
42
  console.log('requestIsvToken error:' + JSON.stringify(e))
44
43
  resolve('')
45
44
  })
46
45
  } else {
47
46
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js')
48
47
  resolve('')
49
48
  }
50
49
  })
50
+ console.log('load token.jd')
51
51
  return new Promise((resolve) => {
52
52
  if (window['jmfe']) {
53
53
  window['jmfe'].isJDAppLogin().then(({ data }) => {
54
54
  if (data === '1') {
55
55
  resolve(true)
56
56
  } else if (data === '0') {
57
57
  resolve(false)
58
58
  }
59
59
  })
60
60
  } else {
61
61
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js')
62
62
  resolve(false)
63
63
  }
64
64
  })
65
65
  return requestIsvToken(window.location.href)
66
66
  if (window['jmfe']) {
67
67
  window['jmfe'].toLogin(options)
68
68
  } else {
69
69
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js')
70
70
  }
71
71
  if (window['jmfe']) {
72
72
  console.log('registerCode:', code)
73
73
  window['jmfe'].registerCode(code)
74
74
  } else {
75
75
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js')
76
76
  }
77
77
  return new Promise((resolve) => {
78
78
  console.log('requestIsvToken:', url)
79
79
  if (window['jmfe']) {
80
80
  window['jmfe']
81
81
  .requestIsvToken(url)
82
82
  .then((result: any) => {
83
83
  console.log('requestIsvToken result:' + JSON.stringify(result))
84
84
  const { status, data, msg } = result
85
85
  if (status === '0') {
86
86
  resolve(data || '')
87
87
  } else {
88
88
  resolve('')
89
89
  }
90
90
  })
91
91
  .catch((e: any) => {
92
92
  console.log('requestIsvToken error:' + JSON.stringify(e))
93
93
  resolve('')
94
94
  })
95
95
  } else {
96
96
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js')
97
97
  resolve('')
98
98
  }
99
99
  })
@@ -1 +1 @@
1
- import global from '../../common'
2
1
  return window?.page_data?.pageChannel || ''
3
2
  return new Promise((resolve) => {
4
3
  const channel = getPageChannel()
5
4
  if (
6
5
  channel === PageChannel.TYPE_ISVDEV ||
7
6
  channel === PageChannel.TYPE_ISV_PACK_SAMPLE
8
7
  ) {
9
8
  getIsvToken().then((token) => {
10
9
  console.log('isLogin token:' + token)
11
10
  if (token) {
12
11
  resolve(true)
13
12
  } else {
14
13
  resolve(false)
15
14
  }
16
15
  })
17
16
  } else {
18
17
  global.checkLoginStatus().then(res => {
19
18
  resolve(res)
20
19
  }).catch(() => {
21
20
  resolve(false)
22
21
  })
23
22
  }
24
23
  })
25
24
  let token = ''
26
25
  const result: any = await getIsvTokenInner()
27
26
  if (!result.success) {
28
27
  const channel = getPageChannel()
29
28
  if (channel === PageChannel.TYPE_ISV_PACK_SAMPLE) {
30
29
  console.log('getIsvToken打包校验中获取token失败')
31
30
  if (window['isvTokenFailCallback']) {
32
31
  window['isvTokenFailCallback'](result.error)
33
32
  console.log('浏览器中调用isvTokenFailCallback结束')
34
33
  }
35
34
  }
36
35
  } else {
37
36
  token = result.data
38
37
  }
39
38
  return token
40
39
  return new Promise((resolve) => {
41
40
  fetchGateway(
42
41
  'isvObfuscator',
43
42
  {
44
43
  url: window.location.href,
45
44
  id: 'shopisv',
46
45
  },
47
46
  {},
48
47
  )
49
48
  .then((data: any) => {
50
49
  console.log('fetchGateway isvObfuscator data:' + JSON.stringify(data))
51
50
  if (
52
51
  data?.statusCode == 200 &&
53
52
  data?.data?.errcode === 0 &&
54
53
  data?.data?.token
55
54
  ) {
56
55
  resolve({
57
56
  success: true,
58
57
  data: data?.data?.token,
59
58
  })
60
59
  } else {
61
60
  resolve({
62
61
  success: false,
63
62
  error: data,
64
63
  })
65
64
  }
66
65
  })
67
66
  .catch((error: { message: any }) => {
68
67
  console.log('fetchGateway isvObfuscator error:' + error.message)
69
68
  resolve({
70
69
  success: false,
71
70
  error,
72
71
  })
73
72
  })
74
73
  })
75
74
  const defaultParams = {
76
75
  appid: '100',
77
76
  returnurl: window.location.href,
78
77
  }
79
78
  const params = Object.assign({}, defaultParams, options)
80
79
  params.returnurl = encodeURIComponent(params.returnurl)
81
80
  const loginUrl = `${domain.mobileLogin}/user/login.action?${serialize(
82
81
  params,
83
82
  )}`
84
83
  console.log('loginUrl:', loginUrl)
85
84
  window.location.href = loginUrl
85
+ import global from '../../common'
86
86
  return window?.page_data?.pageChannel || ''
87
87
  return new Promise((resolve) => {
88
88
  const channel = getPageChannel()
89
89
  if (
90
90
  channel === PageChannel.TYPE_ISVDEV ||
91
91
  channel === PageChannel.TYPE_ISV_PACK_SAMPLE
92
92
  ) {
93
93
  getIsvToken().then((token) => {
94
94
  console.log('isLogin token:' + token)
95
95
  if (token) {
96
96
  resolve(true)
97
97
  } else {
98
98
  resolve(false)
99
99
  }
100
100
  })
101
101
  } else {
102
102
  global.checkLoginStatus().then(res => {
103
103
  resolve(res)
104
104
  }).catch(() => {
105
105
  resolve(false)
106
106
  })
107
107
  }
108
108
  })
109
109
  let token = ''
110
110
  const result: any = await getIsvTokenInner()
111
111
  if (!result.success) {
112
112
  const channel = getPageChannel()
113
113
  if (channel === PageChannel.TYPE_ISV_PACK_SAMPLE) {
114
114
  console.log('getIsvToken打包校验中获取token失败')
115
115
  if (window['isvTokenFailCallback']) {
116
116
  window['isvTokenFailCallback'](result.error)
117
117
  console.log('浏览器中调用isvTokenFailCallback结束')
118
118
  }
119
119
  }
120
120
  } else {
121
121
  token = result.data
122
122
  }
123
123
  return token
124
124
  return new Promise((resolve) => {
125
125
  fetchGateway(
126
126
  'isvObfuscator',
127
127
  {
128
128
  url: window.location.href,
129
129
  id: 'shopisv',
130
130
  },
131
131
  {},
132
132
  )
133
133
  .then((data: any) => {
134
134
  console.log('fetchGateway isvObfuscator data:' + JSON.stringify(data))
135
135
  if (
136
136
  data?.statusCode == 200 &&
137
137
  data?.data?.errcode === 0 &&
138
138
  data?.data?.token
139
139
  ) {
140
140
  resolve({
141
141
  success: true,
142
142
  data: data?.data?.token,
143
143
  })
144
144
  } else {
145
145
  resolve({
146
146
  success: false,
147
147
  error: data,
148
148
  })
149
149
  }
150
150
  })
151
151
  .catch((error: { message: any }) => {
152
152
  console.log('fetchGateway isvObfuscator error:' + error.message)
153
153
  resolve({
154
154
  success: false,
155
155
  error,
156
156
  })
157
157
  })
158
158
  })
159
159
  const defaultParams = {
160
160
  appid: '100',
161
161
  returnurl: window.location.href,
162
162
  }
163
163
  const params = Object.assign({}, defaultParams, options)
164
164
  params.returnurl = encodeURIComponent(params.returnurl)
165
165
  const loginUrl = `${domain.mobileLogin}/user/login.action?${serialize(
166
166
  params,
167
167
  )}`
168
168
  console.log('loginUrl:', loginUrl)
169
169
  window.location.href = loginUrl
@@ -0,0 +1 @@
1
+ import * as WXAPP_LOGIN from '../wxapp/common/login/login.js'
@@ -1 +1 @@
1
- import React from 'react'
2
1
  code: 'isvModuleError',
3
2
  msg: opt,
4
3
  })
5
4
  if(this.props.customErrorIsvFloorModule){
6
5
  return this.props.customErrorIsvFloorModule
7
6
  }
7
+ import React from 'react'
8
8
  getBundleUrl,
9
9
  formatPackResult,
10
10
  getTaroVersion
11
11
  const floorLoadWay = floorData?.floorExtInfo?.floorLoadWay
12
12
  const floorKind = floorData?.floorExtInfo?.floorKind
13
13
  const isRemoteLoadFloor = floorLoadWay === 2
14
14
  const modularPackResult = floorData?.floorExtInfo?.modularPackResult
15
15
  const modularPackResultObj = formatPackResult(modularPackResult)
16
16
  const bundleUrl = getBundleUrl(modularPackResultObj)
17
17
  const taroVersion = getTaroVersion(modularPackResultObj)
18
18
  msg: `店铺h5楼层隐藏不显示。原因:模块js执行异常,楼层过滤。`,
19
19
  floorIdx: floorData?.floorIdx,
20
20
  moduleDesignerType: floorData?.floorExtInfo?.moduleDesignerType,
21
21
  floorLoadWay,
22
22
  floorKind,
23
23
  modularPackResult: {
24
24
  bundleUrl,
25
25
  taroVersion
26
26
  },
27
27
  }
28
28
  const sgmCode = isRemoteLoadFloor ? (floorKind === FLOOR_KIND.PDC_SYSTEM_MODULE ? SgmCustomCode.SYSTEMPDCMODULE_JS : SgmCustomCode.REMOTEMODULE_JS) : SgmCustomCode.SYSTEMMODULE_JS
29
29
  code: getSgmCustomCode(handleSgmCodeTaroVersion(sgmCode)),
30
30
  msg: opt,
31
31
  })
32
32
  if(this.props.customErrorIsvFloorModule){
33
33
  return this.props.customErrorIsvFloorModule
34
34
  }
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
1
+ import Taro from '@tarojs/taro'
2
2
  showDayToSecondState,
@@ -0,0 +1 @@
1
+ import React from 'react'
2
  return (
1
3
  <ScrollView
2
4
  scrollX
3
5
  enhanced
4
6
  showScrollbar={false}
5
7
  {...otherProps}
6
8
  className={classNames(
7
9
  className,
8
10
  {
9
11
  [customScrollViewStyle[
10
12
  'd-custom-ios-mini-extend-border-radius'
11
13
  ]]:
12
14
  isIosDevice &&
13
15
  isJdMin &&
14
16
  scrollX &&
15
17
  style['borderRadius'],
16
18
  },
17
19
  {
18
20
  [customScrollViewStyle[
19
21
  'd-custom-ios-h5-extend-border-radius'
20
22
  ]]: isIosDevice,
21
23
  },
22
24
  {
23
25
  [customScrollViewStyle['d-custom-mini-hide-scroll']]:
24
26
  isJdMin,
25
27
  },
26
28
  )}
27
29
  style={style}
28
30
  >
29
31
  {children}
30
32
  </ScrollView>
31
33
  )
@@ -16,3 +16,10 @@
16
16
  width: 0;
17
17
  }
18
18
  }
19
+
20
+ .d-custom-mini-hide-scroll {
21
+ &::-webkit-scrollbar {
22
+ display: none;
23
+ width: 0;
24
+ }
25
+ }