@conecli/cone-render 0.8.19 → 0.8.20-shop-beta.0

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 Taro from '@tarojs/taro'
2
1
  className={classNames(
3
2
  id={`J_floor_${floorItem?.uid}`}
4
3
  key={floorItem.uid}
5
4
  data-floor-uid={floorItem?.uid}
6
5
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ''}
7
6
  floorIndex={floorIndex}
8
7
  floorData={floorItem}
9
8
  layoutLeftRightMargin={containerLayoutLeftRightMargin}
10
9
  containerBorderRadius={item?.borderRadius || 0}
11
10
  updateShopFloorDataFn={updateShopFloorDataFn}
12
11
  loadingEndComponentFn={loadingEndComponentFn}
13
12
  key={floorItem.uid}
14
13
  changeScrollTopFn={changeContainerFloorListScrollTop}
15
14
  builtInComponents={builtInComponents}
16
15
  className={
17
16
  style={{
18
17
  netWorkShowType={NetWorkShowType.PART}
19
18
  netWorkDataType={NETWORK_DATA_TYPE.DATA_ERROR}
19
+ import Taro from '@tarojs/taro'
20
20
  className={classNames(
21
21
  id={`J_floor_${floorItem?.uid}`}
22
22
  key={floorItem.uid}
23
23
  data-floor-uid={floorItem?.uid}
24
24
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ''}
25
25
  floorIndex={floorIndex}
26
26
  floorData={floorItem}
27
27
  layoutLeftRightMargin={containerLayoutLeftRightMargin}
28
28
  containerBorderRadius={item?.borderRadius || 0}
29
29
  updateShopFloorDataFn={updateShopFloorDataFn}
30
30
  loadingEndComponentFn={loadingEndComponentFn}
31
31
  key={floorItem.uid}
32
32
  changeScrollTopFn={changeContainerFloorListScrollTop}
33
33
  builtInComponents={builtInComponents}
34
34
  className={
35
35
  style={{
36
36
  netWorkShowType={NetWorkShowType.PART}
37
37
  netWorkDataType={NETWORK_DATA_TYPE.DATA_ERROR}
38
38
  refreshCallBackFn={updateShopFloorDataFn}
@@ -1 +1 @@
1
- import * as device from './device'
1
+ import * as device from './device'
@@ -1 +1 @@
1
- import { JumpEventReport, JumpEventReportPromise } from '../../jumpEventReport'
1
+ import { JumpEventReport, JumpEventReportPromise } from '../../jumpEventReport'
2
2
  jdJumpToShopHome: (info: object) => void
3
3
  jdJumpToProduct: (skuId: string | null, logEventInfo: object) => void
4
4
  jdJumpConfigUrl: (detail: object, logEventInfo: object) => void
5
5
  jdJumpToShopMemberInfo: (logEventInfo: object) => void
6
6
  jdJumpToShopMemberPointDetail: (logEventInfo: object) => void
7
7
  jdJumpToShopMemberBenefit: (logEventInfo: object) => void
8
8
  jdJumpToShopMemberRule: (logEventInfo: object) => void
9
9
  jdJumpToShopMemberCloseAccount: (
10
10
  venderType: number,
11
11
  logEventInfo: object,
12
12
  ) => void
13
13
  jdJumpToShopMemberPointExchange: (
14
14
  venderType: number,
15
15
  channel: number,
16
16
  levelZeroMenuUrl: string,
17
17
  logEventInfo: object,
18
18
  ) => void
19
19
  jdJumpToShopMemberBonusPurchase: (
20
20
  customerLevel: number,
21
21
  logEventInfo: object,
22
22
  ) => void
23
23
  jdJumpToShopMemberGood: (customerLevel: number, logEventInfo: object) => void
24
24
  jdJumpToBeanDetail: (logEventInfo: object) => void
25
25
  jdJumpToMyRedEnvelope: (logEventInfo: object) => void
26
26
  jdJumpToMyCoupon: (logEventInfo: object) => void
27
27
  jdJumpToTabAllProduct: (shopId: string | number,venderId: string | number,logEventInfo: object) => void
28
28
  jdJumpToTabAllProductInner: (shopId: string | number,venderId: string | number,logEventInfo: object) => void
29
29
  jdJumpToShopHome: () => {},
30
30
  jdJumpToProduct: () => {},
31
31
  jdJumpConfigUrl: () => {},
32
32
  jdJumpToShopMemberInfo: () => {},
33
33
  jdJumpToShopMemberPointDetail: () => {},
34
34
  jdJumpToShopMemberBenefit: () => {},
35
35
  jdJumpToShopMemberRule: () => {},
36
36
  jdJumpToShopMemberCloseAccount: () => {},
37
37
  jdJumpToShopMemberPointExchange: () => {},
38
38
  jdJumpToShopMemberBonusPurchase: () => {},
39
39
  jdJumpToShopMemberGood: () => {},
40
40
  jdJumpToBeanDetail: () => {},
41
41
  jdJumpToMyRedEnvelope: () => {},
42
42
  jdJumpToMyCoupon: () => {},
43
43
  jdJumpToTabAllProductInner: () => {},
44
44
  jdJumpToWeb: (url: string, logEventInfo: object) => void
45
45
  jdJumpToAppMiniProgram: (path: string, logEventInfo: object) => void
46
46
  jdJumpToShopLight: (detail: object) => void
47
47
  jdJumpToAppMiniProgram: () => {},
48
48
  jdJumpToShopLight: () => {},
49
49
  jdJumpToWeb: () => {},
50
50
  [key: string]: any
51
51
  [key: string]: any
52
52
  const {
53
53
  jdJumpToShopHome,
54
54
  jdJumpToProduct,
55
55
  jdJumpConfigUrl,
56
56
  jdJumpToShopMemberInfo,
57
57
  jdJumpToShopMemberPointDetail,
58
58
  jdJumpToShopMemberBenefit,
59
59
  jdJumpToShopMemberRule,
60
60
  jdJumpToShopMemberCloseAccount,
61
61
  jdJumpToShopMemberPointExchange,
62
62
  jdJumpToShopMemberBonusPurchase,
63
63
  jdJumpToShopMemberGood,
64
64
  jdJumpToBeanDetail,
65
65
  jdJumpToMyRedEnvelope,
66
66
  jdJumpToMyCoupon,
67
67
  jdJumpToTabAllProduct,
68
68
  jdJumpToTabAllProductInner,
69
69
  } = JumpEventReport
70
70
  const {
71
71
  jdJumpToAppMiniProgram,
72
72
  jdJumpToShopLight,
73
73
  jdJumpToWeb,
74
74
  jumpWebUrl,
75
75
  jumpMiniPath,
76
76
  } = JumpEventReport
77
77
  Object.assign(business, {
78
78
  jdJumpToShopHome: jdJumpToShopHome.bind(JumpEventReport),
79
79
  jdJumpToProduct: jdJumpToProduct.bind(JumpEventReport),
80
80
  jdJumpConfigUrl: jdJumpConfigUrl.bind(JumpEventReport),
81
81
  jdJumpToShopMemberInfo: jdJumpToShopMemberInfo.bind(JumpEventReport),
82
82
  jdJumpToShopMemberPointDetail:
83
83
  jdJumpToShopMemberPointDetail.bind(JumpEventReport),
84
84
  jdJumpToShopMemberBenefit: jdJumpToShopMemberBenefit.bind(JumpEventReport),
85
85
  jdJumpToShopMemberRule: jdJumpToShopMemberRule.bind(JumpEventReport),
86
86
  jdJumpToShopMemberCloseAccount:
87
87
  jdJumpToShopMemberCloseAccount.bind(JumpEventReport),
88
88
  jdJumpToShopMemberPointExchange:
89
89
  jdJumpToShopMemberPointExchange.bind(JumpEventReport),
90
90
  jdJumpToShopMemberBonusPurchase:
91
91
  jdJumpToShopMemberBonusPurchase.bind(JumpEventReport),
92
92
  jdJumpToShopMemberGood: jdJumpToShopMemberGood.bind(JumpEventReport),
93
93
  jdJumpToBeanDetail: jdJumpToBeanDetail.bind(JumpEventReport),
94
94
  jdJumpToMyRedEnvelope: jdJumpToMyRedEnvelope.bind(JumpEventReport),
95
95
  jdJumpToMyCoupon: jdJumpToMyCoupon.bind(JumpEventReport),
96
96
  jdJumpToTabAllProduct: jdJumpToTabAllProduct.bind(JumpEventReport),
97
97
  jdJumpToTabAllProductInner: jdJumpToTabAllProductInner.bind(JumpEventReport),
98
98
  })
99
99
  Object.assign(side, {
100
100
  jdJumpToAppMiniProgram: jdJumpToAppMiniProgram.bind(JumpEventReport),
101
101
  jdJumpToShopLight: jdJumpToShopLight.bind(JumpEventReport),
102
102
  jdJumpToWeb: jdJumpToWeb.bind(JumpEventReport),
103
103
  jumpWebUrl,
104
104
  jumpMiniPath,
105
105
  })
106
106
  Object.assign(webUrl, jumpWebUrl)
107
107
  Object.assign(minPath, jumpMiniPath)
@@ -0,0 +1 @@
1
+ export enum ShopMemberCardNodeType {
2
 
1
3
  CARD_BANNER = "shopMemberCardVenderCardBanner",
2
4
 
3
5
  CARD_NAME = "shopMemberCardVenderCardName",
4
6
 
5
7
  MEMBERSHIP_LEVEL = "shopMemberCardMembershipLevel",
6
8
 
7
9
  MEMBERSHIP_RULE_ENTRANCE = "shopMemberCardMembershipRuleEntrance",
8
10
 
9
11
  MEMBERSHIP_POINT = "shopMemberCardMembershipPoint"
@@ -0,0 +1 @@
1
+ export const HttpStatus = {
2
  SUCCESS: 200,
1
3
  CREATED: 201,
2
4
  ACCEPTED: 202,
3
5
  CLIENT_ERROR: 400,
4
6
  AUTHENTICATE: 401,
5
7
  FORBIDDEN: 403,
6
8
  NOT_FOUND: 404,
7
9
  SERVER_ERROR: 500,
8
10
  BAD_GATEWAY: 502,
9
11
  SERVICE_UNAVAILABLE: 503,
10
12
  GATEWAY_TIMEOUT: 504
11
13
  [HttpStatus.NOT_FOUND]: "请求资源不存在",
12
14
  [HttpStatus.BAD_GATEWAY]: "服务端异常,请稍后重试",
13
15
  [HttpStatus.FORBIDDEN]: "没有权限访问",
14
16
  [HttpStatus.AUTHENTICATE]: "需要鉴权",
15
17
  [HttpStatus.SUCCESS]: "成功"
@@ -0,0 +1 @@
1
+ import Taro, { RequestTask } from "@tarojs/taro";
2
  jsonHeader = "application/json;charset=utf-8",
1
3
  formDataHeader = "application/x-www-form-urlencoded"
2
4
  constructor() {
3
5
  this._init()
4
6
  }
5
7
  _init(): void {
6
8
  httpInterceptors.forEach((item) => {
7
9
  Taro.addInterceptor((chain) => item(chain))
8
10
  })
9
11
  }
10
12
 
11
13
  get(url: string, data: any = null, otherOptions = {}): Taro.RequestTask<any> {
12
14
  return this.request({url, data, method:"GET", ...otherOptions})
13
15
  }
14
16
 
15
17
  post(
16
18
  url: string,
17
19
  data: any = null,
18
20
  otherOptions = {}
19
21
  ): Taro.RequestTask<any> {
20
22
  return this.request({url, data, method:"POST", ...otherOptions})
21
23
  }
22
24
 
23
25
  request({url, method = "POST", timeout = 7000, ...otherOptions}): RequestTask<any> {
24
26
  const header = {
25
27
  "content-type": method === "POST" ? RequestHeaderContentType.formDataHeader : RequestHeaderContentType.jsonHeader
26
28
  }
27
29
  const requestTask = Taro.request({
28
30
  url,
29
31
  method,
30
32
  timeout,
31
33
  header,
32
34
  credentials: 'include',
33
35
  ...otherOptions,
34
36
  })
35
37
  const requestTimeoutPromise =
36
38
  new Promise<ServiceInterFace.RequestPromiseRes>((resolve) => {
37
39
  setTimeout(() => {
38
40
  resolve({
39
41
  statusCode: 500,
40
42
  resTimeoutState: true,
41
43
  errMsg: 'request timeout',
42
44
  })
43
45
  }, timeout)
44
46
  })
45
47
  return Promise.race([requestTask, requestTimeoutPromise]).then(
46
48
  (res: any) => {
47
49
  if (res && res.statusCode === 500 && res.resTimeoutState) {
48
50
  console.log('request 请求超时 url:' + url)
49
51
  requestTask.abort && requestTask.abort()
50
52
  }
51
53
  return res
52
54
  }
53
55
  )
54
56
  }
@@ -0,0 +1 @@
1
+ import Taro from '@tarojs/taro'
@@ -0,0 +1 @@
1
+ import Taro from '@tarojs/taro'
@@ -0,0 +1 @@
1
+ import Http from './http'
@@ -1 +1 @@
1
- import Taro from "@tarojs/taro";
1
+ import Taro from "@tarojs/taro";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conecli/cone-render",
3
- "version": "0.8.19",
3
+ "version": "0.8.20-shop-beta.0",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist/"
@@ -78,7 +78,7 @@
78
78
  "react": "^18.2.0",
79
79
  "react-content-loader": "^6.2.0",
80
80
  "react-dom": "^18.2.0",
81
- "react-intersection-observer": "^9.1.0",
81
+ "react-intersection-observer": "8.33.1",
82
82
  "react-refresh": "^0.14.0"
83
83
  },
84
84
  "devDependencies": {