@conecli/cone-render 0.10.1-shop-beta.11 → 0.10.1-shop-beta.13

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 (78) hide show
  1. package/README.md +1 -1
  2. package/dist/common/const.ts +1 -1
  3. package/dist/common/index.dynamic.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/jssdk.ts +1 -1
  9. package/dist/common/token/index.h5.ts +1 -1
  10. package/dist/common/wxappApi.ts +1 -1
  11. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  12. package/dist/components/base/CountDown/index.tsx +1 -1
  13. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  14. package/dist/components/base/Dialog/index.dynamic.module.scss +126 -0
  15. package/dist/components/base/Dialog/index.dynamic.tsx +1 -0
  16. package/dist/components/base/DynamicTest/index.dynamic.module.scss +15 -0
  17. package/dist/components/base/DynamicTest/index.module.scss +16 -0
  18. package/dist/components/base/DynamicTest/index.tsx +1 -0
  19. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  20. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  21. package/dist/components/base/JdLoading/index.module.scss +2 -0
  22. package/dist/components/base/JdLoading/index.tsx +1 -1
  23. package/dist/components/base/LazyLoadImage/index.tsx +1 -1
  24. package/dist/components/base/NetworkDataError/const.ts +1 -1
  25. package/dist/components/base/NetworkDataError/index.module.scss +116 -70
  26. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  27. package/dist/components/base/Price/Base/index.dynamic.module.scss +63 -0
  28. package/dist/components/base/Price/Base/index.dynamic.tsx +1 -0
  29. package/dist/components/base/Price/Base/index.module.scss +6 -0
  30. package/dist/components/base/Price/Base/index.tsx +1 -1
  31. package/dist/components/base/Price/Double/index.dynamic.module.scss +172 -0
  32. package/dist/components/base/Price/Double/index.dynamic.tsx +1 -0
  33. package/dist/components/base/Price/Double/index.module.scss +6 -0
  34. package/dist/components/base/Price/Double/index.tsx +1 -1
  35. package/dist/components/debug/DebugLayout/index.module.scss +2 -2
  36. package/dist/config/env.ts +1 -1
  37. package/dist/interface/common.ts +1 -1
  38. package/dist/interface/component.ts +1 -1
  39. package/dist/interface/jumpEventReport.ts +1 -1
  40. package/dist/jumpEventReport/const.ts +1 -1
  41. package/dist/jumpEventReport/index.dynamic.ts +1 -0
  42. package/dist/jumpEventReport/index.h5.ts +1 -1
  43. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  44. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  45. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  46. package/dist/jumpEventReport/web.base.ts +1 -1
  47. package/dist/jumpEventReport/web.jd.ts +1 -1
  48. package/dist/language/zh_CN.json +162 -0
  49. package/dist/open/api/index.ts +1 -1
  50. package/dist/open/api/shopMember.dynamic.ts +1 -0
  51. package/dist/open/api/shopMember.ts +1 -1
  52. package/dist/open/components/index.dynamic.ts +1 -0
  53. package/dist/open/components/index.ts +1 -1
  54. package/dist/sass/app.dynamic.scss +306 -0
  55. package/dist/service/fetchGateway.h5.ts +1 -0
  56. package/dist/service/fetchGateway.ts +1 -1
  57. package/dist/service/fetchGateway.weapp.ts +1 -1
  58. package/dist/service/fetchJsonp.h5.ts +1 -0
  59. package/dist/service/fetchJsonp.ts +1 -1
  60. package/dist/service/http/colorSign.dynamic.ts +1 -0
  61. package/dist/service/http/http.ts +1 -1
  62. package/dist/service/requestServer.h5.ts +1 -1
  63. package/dist/service/requestServer.ts +1 -1
  64. package/dist/service/requestServer.weapp.ts +1 -1
  65. package/dist/utils/connectNativeJsBridge.dynamic.ts +1 -0
  66. package/dist/utils/connectNativeJsBridge.ts +1 -1
  67. package/dist/utils/h5Utils.ts +1 -1
  68. package/dist/utils/index.h5.ts +1 -1
  69. package/dist/utils/index.ts +1 -1
  70. package/dist/utils/index.weapp.ts +1 -1
  71. package/dist/utils/intersectionObserver.ts +1 -1
  72. package/dist/utils/jumpExtMapUtil.ts +1 -0
  73. package/dist/utils/log.ts +1 -0
  74. package/dist/utils/utils.ts +1 -1
  75. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  76. package/dist/wxapp/common/user_info.js +1 -1
  77. package/package.json +51 -31
  78. /package/dist/utils/{jumpExtMapUtil.js → jumpExtMapUtil.h5.ts} +0 -0
@@ -0,0 +1 @@
1
+ import global from '../../common'
2
  public fmInfo: {
1
3
  eid?: string
2
4
  fp?: string
3
5
  jsToken?: string
4
6
  sdkToken?: string
5
7
  }
6
8
  constructor() {
7
9
  this.fmInfo = {}
8
10
  }
9
11
 
10
12
  async getFmInfo() {
11
13
  return this.fmInfo;
12
14
  }
13
15
 
14
16
  paramsSign(data) {
15
17
  return Promise.resolve(data)
16
18
  }
@@ -1 +1 @@
1
- import Taro, { RequestTask } from '@tarojs/taro'
2
1
  jsonHeader = 'application/json;charset=utf-8',
3
2
  formDataHeader = 'application/x-www-form-urlencoded',
4
3
  public fmInfo: {
5
4
  eid?: string
6
5
  fp?: string
7
6
  jsToken?: string
8
7
  sdkToken?: string
9
8
  }
10
9
  public api: ServiceInterFace.HttpApi
11
10
  constructor() {
12
11
  this._init()
13
12
  this.api = api
14
13
  }
15
14
  _init(): void {
16
15
  httpInterceptors.forEach((item) => {
17
16
  Taro.addInterceptor((chain) => item(chain))
18
17
  })
19
18
  }
20
19
 
21
20
  get(
22
21
  url: string,
23
22
  data: any = null,
24
23
  otherOptions = {},
25
24
  ): Promise<Taro.request.SuccessCallbackResult<any>> {
26
25
  return this.request({ url, data, method: 'GET', ...otherOptions })
27
26
  }
28
27
 
29
28
  post(
30
29
  url: string,
31
30
  data: any = null,
32
31
  otherOptions = {},
33
32
  ): Promise<Taro.request.SuccessCallbackResult<any>> {
34
33
  return this.request({ url, data, method: 'POST', ...otherOptions })
35
34
  }
36
35
 
37
36
  async request({
38
37
  url,
39
38
  method = 'POST',
40
39
  timeout = 7000,
41
40
  isColorVerify = false,
42
41
  ...otherOptions
43
42
  }): Promise<Taro.request.SuccessCallbackResult<any>> {
44
43
  const { header: otherHeader, ...otherOpts } = otherOptions
45
44
  const header = {
46
45
  'content-type':
47
46
  method === 'POST'
48
47
  ? RequestHeaderContentType.formDataHeader
49
48
  : RequestHeaderContentType.jsonHeader,
50
49
  ...otherHeader,
51
50
  }
52
51
  const getReqData = otherOptions.data
53
52
  if (url === this.api.apiFunc && typeof getReqData === 'object') {
54
53
  const { functionId } = getReqData
55
54
  console.log('获取当前是否需要color加固', isColorVerify, functionId)
56
55
  if (isColorVerify) {
57
56
  const { h5st } = await colorSign.paramsSign(getReqData)
58
57
  h5st && (getReqData.h5st = encodeURI(h5st))
59
58
  console.log(`${functionId}的apiReq_h5st===>:${h5st}`)
60
59
  }
61
60
  const { jsToken } = await colorSign.getFmInfo()
62
61
  jsToken && (getReqData['x-api-eid-token'] = jsToken)
63
62
  }
64
63
  const param: any = {
65
64
  url,
66
65
  method,
67
66
  timeout,
68
67
  header,
69
68
  credentials: 'include',
70
69
  ...otherOpts,
71
70
  }
72
71
  const requestTask = Taro.request(param)
73
72
  const requestTimeoutPromise =
74
73
  new Promise<ServiceInterFace.RequestPromiseRes>((resolve) => {
75
74
  setTimeout(() => {
76
75
  resolve({
77
76
  statusCode: 500,
78
77
  resTimeoutState: true,
79
78
  errMsg: 'request timeout',
80
79
  })
81
80
  }, timeout)
82
81
  })
83
82
  return Promise.race([requestTask, requestTimeoutPromise]).then(
84
83
  (res: any) => {
85
84
  if (res && res.statusCode === 500 && res.resTimeoutState) {
86
85
  console.warn('request 请求超时 url:' + url)
87
86
  requestTask.abort && requestTask.abort()
88
87
  }
89
88
  return res
90
89
  },
91
90
  )
92
91
  }
92
+ import Taro from '@tarojs/taro'
93
93
  jsonHeader = 'application/json;charset=utf-8',
94
94
  formDataHeader = 'application/x-www-form-urlencoded',
95
95
  public fmInfo: {
96
96
  eid?: string
97
97
  fp?: string
98
98
  jsToken?: string
99
99
  sdkToken?: string
100
100
  }
101
101
  public api: ServiceInterFace.HttpApi
102
102
  constructor() {
103
103
  this._init()
104
104
  this.api = api
105
105
  }
106
106
  _init(): void {
107
107
  !isDynamic && httpInterceptors.forEach((item) => {
108
108
  Taro.addInterceptor((chain) => item(chain))
109
109
  })
110
110
  }
111
111
 
112
112
  get(
113
113
  url: string,
114
114
  data: any = null,
115
115
  otherOptions = {},
116
116
  ): Promise<Taro.request.SuccessCallbackResult<any>> {
117
117
  return this.request({ url, data, method: 'GET', ...otherOptions })
118
118
  }
119
119
 
120
120
  post(
121
121
  url: string,
122
122
  data: any = null,
123
123
  otherOptions = {},
124
124
  ): Promise<Taro.request.SuccessCallbackResult<any>> {
125
125
  return this.request({ url, data, method: 'POST', ...otherOptions })
126
126
  }
127
127
 
128
128
  async request({
129
129
  url,
130
130
  method = 'POST',
131
131
  timeout = 7000,
132
132
  isColorVerify = false,
133
133
  ...otherOptions
134
134
  }): Promise<Taro.request.SuccessCallbackResult<any>> {
135
135
  const { header: otherHeader, ...otherOpts } = otherOptions
136
136
  const header = {
137
137
  'content-type':
138
138
  method === 'POST'
139
139
  ? RequestHeaderContentType.formDataHeader
140
140
  : RequestHeaderContentType.jsonHeader,
141
141
  ...otherHeader,
142
142
  }
143
143
  const getReqData = otherOptions.data
144
144
  if (url === this.api.apiFunc && typeof getReqData === 'object') {
145
145
  const { functionId } = getReqData
146
146
  console.log('获取当前是否需要color加固', isColorVerify, functionId)
147
147
  if (isColorVerify) {
148
148
  const { h5st } = await colorSign.paramsSign(getReqData)
149
149
  h5st && (getReqData.h5st = encodeURI(h5st))
150
150
  console.log(`${functionId}的apiReq_h5st===>:${h5st}`)
151
151
  }
152
152
  const { jsToken } = await colorSign.getFmInfo()
153
153
  jsToken && (getReqData['x-api-eid-token'] = jsToken)
154
154
  }
155
155
  const param: any = {
156
156
  url,
157
157
  method,
158
158
  timeout,
159
159
  header,
160
160
  credentials: 'include',
161
161
  ...otherOpts,
162
162
  }
163
163
  const requestTask = Taro.request(param)
164
164
  const requestTimeoutPromise =
165
165
  new Promise<ServiceInterFace.RequestPromiseRes>((resolve) => {
166
166
  setTimeout(() => {
167
167
  resolve({
168
168
  statusCode: 500,
169
169
  resTimeoutState: true,
170
170
  errMsg: 'request timeout',
171
171
  })
172
172
  }, timeout)
173
173
  })
174
174
  return Promise.race([requestTask, requestTimeoutPromise]).then(
175
175
  (res: any) => {
176
176
  if (res && res.statusCode === 500 && res.resTimeoutState) {
177
177
  console.warn('request 请求超时 url:' + url)
178
178
  requestTask.abort && requestTask.abort()
179
179
  }
180
180
  return res
181
181
  },
182
182
  )
183
183
  }