@conecli/cone-render 0.9.1-shop2.3 → 0.9.1-shop2.4

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 (60) hide show
  1. package/dist/common/const.ts +1 -1
  2. package/dist/common/index.h5.ts +1 -1
  3. package/dist/common/index.jd.ts +1 -1
  4. package/dist/common/index.ts +1 -1
  5. package/dist/common/index.weapp.ts +1 -1
  6. package/dist/common/jssdk.ts +1 -0
  7. package/dist/common/pageType.ts +1 -0
  8. package/dist/common/token/index.h5.ts +1 -1
  9. package/dist/common/token/token.jd.ts +1 -1
  10. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  11. package/dist/components/base/Exposure/index.h5.tsx +1 -1
  12. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  13. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  14. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  15. package/dist/components/base/InViewRender/index.tsx +1 -1
  16. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  17. package/dist/components/base/LazyLoadImage/const.ts +1 -1
  18. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  19. package/dist/components/base/MobileCommonHeader/index.module.scss +9 -0
  20. package/dist/components/base/MobileCommonHeader/index.tsx +1 -0
  21. package/dist/components/base/NetworkDataError/const.ts +1 -1
  22. package/dist/components/base/NetworkDataError/index.module.scss +4 -0
  23. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  24. package/dist/components/base/Price/Double/index.tsx +1 -1
  25. package/dist/components/base/Price/index.tsx +1 -1
  26. package/dist/components/decorate/DecorateFloorModule/index.module.scss +21 -2
  27. package/dist/components/decorate/DecorateFloorModule/index.tsx +1 -1
  28. package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
  29. package/dist/components/isv/Floor/index.tsx +1 -1
  30. package/dist/components/remoteFloorItem.tsx +1 -1
  31. package/dist/interface/common.ts +1 -1
  32. package/dist/interface/component.ts +1 -1
  33. package/dist/jumpEventReport/const.ts +1 -1
  34. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  35. package/dist/jumpEventReport/index.weapp.ts +1 -1
  36. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  37. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  38. package/dist/jumpEventReport/web/report.ts +1 -1
  39. package/dist/jumpEventReport/web.base.ts +1 -1
  40. package/dist/jumpEventReport/web.jd.ts +1 -1
  41. package/dist/jumpEventReport/web.jdb.ts +1 -1
  42. package/dist/jumpEventReport/web.jdjch.ts +1 -1
  43. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  44. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  45. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  46. package/dist/open/api/environment.ts +1 -1
  47. package/dist/open/api/index.ts +1 -1
  48. package/dist/open/api/track.ts +1 -1
  49. package/dist/open/components/index.ts +1 -1
  50. package/dist/service/fetchGateway.ts +1 -1
  51. package/dist/service/http/const.ts +1 -1
  52. package/dist/service/requestServer.ts +1 -1
  53. package/dist/utils/connectNativeJsBridge.ts +1 -1
  54. package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
  55. package/dist/utils/h5Utils.ts +1 -1
  56. package/dist/utils/index.h5.ts +1 -1
  57. package/dist/utils/index.ts +1 -1
  58. package/dist/utils/index.weapp.ts +1 -1
  59. package/dist/utils/utils.ts +1 -1
  60. package/package.json +1 -1
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  floorVideInfo: {},
3
2
  public config: object
4
3
  this.config = {}
5
4
  return new Promise((resolve, reject) => {
6
5
  if (typeof jd !== 'undefined' && jd.requestWebCookie) {
7
6
  jd.requestWebCookie({
8
7
  needpin: 1,
9
8
  success: (res) => {
10
9
  console.log(res)
11
10
  const { ticket, pt_pin } = res
12
11
  console.log('requestWebCookie.success', res)
13
12
  this.info.userInfo = {
14
13
  pin: pt_pin,
15
14
  encodePin: encodeURIComponent(pt_pin),
16
15
  ptkey: ticket,
17
16
  }
18
17
  this.miniAppLogInstance &&
19
18
  this.miniAppLogInstance.set({
20
19
  account: pt_pin,
21
20
  })
22
21
  this.info.loginState = true
23
22
  resolve(res)
24
23
  },
25
24
  fail(res) {
26
25
  console.log('requestWebCookie.fail', res)
27
26
  reject(res)
28
27
  },
29
28
  })
30
29
  } else {
31
30
  resolve({
32
31
  pin: '',
33
32
  ptkey: '',
34
33
  mock: true
35
34
  })
36
35
  }
37
36
  })
38
37
  this.checkLoginStatus().then(res => {
39
38
  console.log(
40
39
  'jdLoadCheckStatusAndLogin hasUserLogined.success: ',
41
40
  res,
42
41
  )
43
42
  resolve(res)
44
43
  }).catch(err => {
45
44
  console.warn(
46
45
  'jdLoadCheckStatusAndLogin hasUserLogined.fail: ',
47
46
  err,
48
47
  )
49
48
  this.toLogin().then(res => {
50
49
  resolve(res)
51
50
  }).catch(err => {
52
51
  reject(err)
53
52
  })
54
53
  })
55
54
  return this.checkStatusAndLoginPromise
56
55
  return new Promise((resolve,reject) => {
57
56
  if (typeof jd !== 'undefined' && jd.hasUserLogined) {
58
57
  jd.hasUserLogined({
59
58
  success: (res) => {
60
59
  console.log('hasUserLogined.success: ', res)
61
60
  if (res.status === 1) {
62
61
  this.getLoginCookie()
63
62
  resolve(res)
64
63
  }else {
65
64
  reject(res)
66
65
  }
67
66
  },
68
67
  fail: (res) => {
69
68
  console.warn('hasUserLogined.fail: ', res)
70
69
  reject(res)
71
70
  },
72
71
  })
73
72
  } else {
74
73
  reject(false)
75
74
  }
76
75
  })
76
+ import Taro from '@tarojs/taro'
77
77
  floorVideInfo: {},
78
78
  productVideInfo: {},
79
79
  pageIdxHeightInfo: {
80
80
  list: []
81
81
  },
82
82
  shopInfo: {},
83
83
  openAppData: {}
84
84
  public config: object
85
85
  this.config = {}
86
86
  return new Promise((resolve, reject) => {
87
87
  if (typeof jd !== 'undefined' && jd.requestWebCookie) {
88
88
  jd.requestWebCookie({
89
89
  needpin: 1,
90
90
  success: (res) => {
91
91
  console.log(res)
92
92
  const { ticket, pt_pin } = res
93
93
  console.log('requestWebCookie.success', res)
94
94
  this.info.userInfo = {
95
95
  pin: pt_pin,
96
96
  encodePin: encodeURIComponent(pt_pin),
97
97
  ptkey: ticket,
98
98
  }
99
99
  this.miniAppLogInstance &&
100
100
  this.miniAppLogInstance.set({
101
101
  account: pt_pin,
102
102
  })
103
103
  this.info.loginState = true
104
104
  resolve(res)
105
105
  },
106
106
  fail(res) {
107
107
  console.log('requestWebCookie.fail', res)
108
108
  reject(res)
109
109
  },
110
110
  })
111
111
  } else {
112
112
  resolve({
113
113
  pin: '',
114
114
  ptkey: '',
115
115
  mock: true
116
116
  })
117
117
  }
118
118
  })
119
119
  this.checkLoginStatus().then(res => {
120
120
  console.log(
121
121
  'jdLoadCheckStatusAndLogin hasUserLogined.success: ',
122
122
  res,
123
123
  )
124
124
  resolve(res)
125
125
  }).catch(err => {
126
126
  console.warn(
127
127
  'jdLoadCheckStatusAndLogin hasUserLogined.fail: ',
128
128
  err,
129
129
  )
130
130
  this.toLogin().then(res => {
131
131
  resolve(res)
132
132
  }).catch(err => {
133
133
  reject(err)
134
134
  })
135
135
  })
136
136
  return this.checkStatusAndLoginPromise
137
137
  return new Promise((resolve,reject) => {
138
138
  if (typeof jd !== 'undefined' && jd.hasUserLogined) {
139
139
  jd.hasUserLogined({
140
140
  success: (res) => {
141
141
  console.log('hasUserLogined.success: ', res)
142
142
  if (res.status === 1) {
143
143
  this.getLoginCookie()
144
144
  resolve(res)
145
145
  }else {
146
146
  reject(res)
147
147
  }
148
148
  },
149
149
  fail: (res) => {
150
150
  console.warn('hasUserLogined.fail: ', res)
151
151
  reject(res)
152
152
  },
153
153
  })
154
154
  } else {
155
155
  reject(false)
156
156
  }
157
157
  })
158
158
 
159
159
  getAddressCachePromise = () => {
160
160
  return Promise.reject("该方法只在APP内适用")
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  floorVideInfo: {},
3
2
  public config: {
4
3
  [key: string]: any
5
4
  }
6
5
  public lazyContainer: CommonInterFace.lazyContainer
7
6
  this.config = {}
8
7
 
9
8
  getLoginCookie(updateKey = 'wxapp') {
10
9
  return new Promise((resolve) => {
11
10
  console.log("开始获取更新wxapp中的cookie信息", updateKey)
12
11
  if(this.config.wqCookie && this.config.wqCookieStr && this.config.getWqCookieKey === updateKey){
13
12
  console.log("已有存储wxapp中的cookie信息,直接返回",this.config)
14
13
  resolve({
15
14
  wqCookie: this.config.wqCookie,
16
15
  wqCookieStr: this.config.wqCookieStr,
17
16
  })
18
17
  }else {
19
18
  if (isPublishToWxapp) {
20
19
  const getWxappCookieObj = getTaroStorageKeyValue('cookies') || null
21
20
  if (getWxappCookieObj) {
22
21
  const getCookieObj = getWxappCookieObj['_data']
23
22
  const { wqCookie, wqCookieStr } = getWxAppCookieStr(getCookieObj)
24
23
  const { pin = '', visitkey = '-1', wq_unionid = '', wxapp_openid = '' } = wqCookie
25
24
  this.info.loginState = true
26
25
  this.info.userInfo.wqCookie = wqCookieStr
27
26
  this.info.userInfo.wqVisitkey = visitkey
28
27
  console.log('获取用户完整cookie信息', getCookieObj)
29
28
  const getUserAddress = this.wxAppUserInfoInstance.getAddress()
30
29
  console.log('获取微信用户地址信息', getUserAddress)
31
30
  if (getUserAddress) {
32
31
  this.info.pageInfo.address = getUserAddress?.areaId
33
32
  this.info.pageInfo.addressCommaStr = this.info.pageInfo
34
33
  .address
35
34
  ? this.info.pageInfo.address.replace(/_/g, ',')
36
35
  : ''
37
36
  this.info.pageInfo.un_area = this.info.pageInfo.address
38
37
  Taro.eventCenter.trigger(
39
38
  TaroEventType.USER_AREA_UPDATE,
40
39
  this.info.pageInfo.address,
41
40
  )
42
41
  }
43
42
  if(this.miniAppLogInstance){
44
43
  this.miniAppLogInstance.set({
45
44
  account: pin,
46
45
  unionid: wq_unionid,
47
46
  openid: wxapp_openid,
48
47
  })
49
48
  }
50
49
  this.config.wqCookie = wqCookie
51
50
  this.config.wqCookieStr = wqCookieStr
52
51
  this.config.getWqCookieKey = updateKey
53
52
  console.log("解析wxapp中的cookie信息成功,返回后存储",this.config)
54
53
  resolve({
55
54
  wqCookie,
56
55
  wqCookieStr,
57
56
  })
58
57
  }else {
59
58
  console.log("解析wxapp中的cookie信息异常,返回异常结果",this.config)
60
59
  resolve({
61
60
  wqCookie: false,
62
61
  wqCookieStr: false,
63
62
  })
64
63
  }
65
64
  }else {
66
65
  resolve({
67
66
  wqCookie: false,
68
67
  wqCookieStr: false,
69
68
  })
70
69
  }
71
70
  }
72
71
  })
73
72
  }
74
73
  return this.getLoginCookie()
74
+ import Taro from '@tarojs/taro'
75
75
  floorVideInfo: {},
76
76
  productVideInfo: {},
77
77
  pageIdxHeightInfo: {
78
78
  list: []
79
79
  },
80
80
  openAppData: {}
81
81
  public config: {
82
82
  [key: string]: any
83
83
  }
84
84
  public lazyContainer: CommonInterFace.lazyContainer
85
85
  this.config = {}
86
86
 
87
87
  getLoginCookie(updateKey = 'wxapp') {
88
88
  return new Promise((resolve) => {
89
89
  console.log("开始获取更新wxapp中的cookie信息", updateKey)
90
90
  if(this.config.wqCookie && this.config.wqCookieStr && this.config.getWqCookieKey === updateKey){
91
91
  console.log("已有存储wxapp中的cookie信息,直接返回",this.config)
92
92
  resolve({
93
93
  wqCookie: this.config.wqCookie,
94
94
  wqCookieStr: this.config.wqCookieStr,
95
95
  })
96
96
  }else {
97
97
  if (isPublishToWxapp) {
98
98
  const getWxappCookieObj = getTaroStorageKeyValue('cookies') || null
99
99
  if (getWxappCookieObj) {
100
100
  const getCookieObj = getWxappCookieObj['_data']
101
101
  const { wqCookie, wqCookieStr } = getWxAppCookieStr(getCookieObj)
102
102
  const { pin = '', visitkey = '-1', wq_unionid = '', wxapp_openid = '' } = wqCookie
103
103
  this.info.loginState = true
104
104
  this.info.userInfo.wqCookie = wqCookieStr
105
105
  this.info.userInfo.wqVisitkey = visitkey
106
106
  console.log('获取用户完整cookie信息', getCookieObj)
107
107
  const getUserAddress = this.wxAppUserInfoInstance.getAddress()
108
108
  console.log('获取微信用户地址信息', getUserAddress)
109
109
  if (getUserAddress) {
110
110
  this.info.pageInfo.address = getUserAddress?.areaId
111
111
  this.info.pageInfo.addressCommaStr = this.info.pageInfo
112
112
  .address
113
113
  ? this.info.pageInfo.address.replace(/_/g, ',')
114
114
  : ''
115
115
  this.info.pageInfo.un_area = this.info.pageInfo.address
116
116
  Taro.eventCenter.trigger(
117
117
  TaroEventType.USER_AREA_UPDATE,
118
118
  this.info.pageInfo.address,
119
119
  )
120
120
  }
121
121
  if(this.miniAppLogInstance){
122
122
  this.miniAppLogInstance.set({
123
123
  account: pin,
124
124
  unionid: wq_unionid,
125
125
  openid: wxapp_openid,
126
126
  })
127
127
  }
128
128
  this.config.wqCookie = wqCookie
129
129
  this.config.wqCookieStr = wqCookieStr
130
130
  this.config.getWqCookieKey = updateKey
131
131
  console.log("解析wxapp中的cookie信息成功,返回后存储",this.config)
132
132
  resolve({
133
133
  wqCookie,
134
134
  wqCookieStr,
135
135
  })
136
136
  }else {
137
137
  console.log("解析wxapp中的cookie信息异常,返回异常结果",this.config)
138
138
  resolve({
139
139
  wqCookie: false,
140
140
  wqCookieStr: false,
141
141
  })
142
142
  }
143
143
  }else {
144
144
  resolve({
145
145
  wqCookie: false,
146
146
  wqCookieStr: false,
147
147
  })
148
148
  }
149
149
  }
150
150
  })
151
151
  }
152
152
  return this.getLoginCookie()
153
153
 
154
154
  getAddressCachePromise = () => {
155
155
  return Promise.reject("该方法只在APP内适用")
156
156
  }
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  WXAPP_SUBS_GUIDER
3
2
  floorVideInfo: {},
4
3
  public config: {
5
4
  [key: string]: any
6
5
  }
7
6
  this.config = {}
8
7
  this.wxAppSubsGuider = WXAPP_SUBS_GUIDER
9
8
  console.log('=================>', 'updateBusinessDomainAndApi')
10
9
 
11
10
  setTimeout(() => {
12
11
  console.log("微信app登录返回成功后,后台会写入cookie,有延迟,这里延迟500ms去获取最新cookie")
13
12
  this.getLoginCookie(`${Date.now()}`)
14
13
  },500)
15
14
  this.getLoginCookie(`${Date.now()}`)
16
15
  setTimeout(() => {
17
16
  console.log("微信强制登录后,后台会写入cookie,有延迟,这里延迟500ms去获取最新cookie")
18
17
  this.getLoginCookie(`${Date.now()}`)
19
18
  },500)
20
19
  return new Promise((resolve) => {
21
20
  console.log("开始获取更新wxapp中的cookie信息", updateKey)
22
21
  if(this.config.wqCookie && this.config.wqCookieStr && this.config.getWqCookieKey === updateKey){
23
22
  console.log("已有存储wxapp中的cookie信息,直接返回",this.config)
24
23
  resolve({
25
24
  wqCookie: this.config.wqCookie,
26
25
  wqCookieStr: this.config.wqCookieStr,
27
26
  })
28
27
  }else {
29
28
  if (isPublishToWxapp) {
30
29
  const getWxappCookieObj = getTaroStorageKeyValue('cookies') || null
31
30
  if (getWxappCookieObj) {
32
31
  const getCookieObj = getWxappCookieObj['_data']
33
32
  const { wqCookie, wqCookieStr } = getWxAppCookieStr(getCookieObj)
34
33
  const { pin = '', visitkey = '-1', wq_unionid = '', wxapp_openid = '' } = wqCookie
35
34
  this.info.loginState = true
36
35
  this.info.userInfo.wqCookie = wqCookieStr
37
36
  this.info.userInfo.wqVisitkey = visitkey
38
37
  console.log('获取用户完整cookie信息', getCookieObj)
39
38
  const getUserAddress = this.wxAppUserInfoInstance.getAddress()
40
39
  console.log('获取微信用户地址信息', getUserAddress)
41
40
  if (getUserAddress) {
42
41
  this.info.pageInfo.address = getUserAddress?.areaId
43
42
  this.info.pageInfo.addressCommaStr = this.info.pageInfo
44
43
  .address
45
44
  ? this.info.pageInfo.address.replace(/_/g, ',')
46
45
  : ''
47
46
  this.info.pageInfo.un_area = this.info.pageInfo.address
48
47
  Taro.eventCenter.trigger(
49
48
  TaroEventType.USER_AREA_UPDATE,
50
49
  this.info.pageInfo.address,
51
50
  )
52
51
  }
53
52
  if(this.miniAppLogInstance){
54
53
  this.miniAppLogInstance.set({
55
54
  account: pin,
56
55
  unionid: wq_unionid,
57
56
  openid: wxapp_openid,
58
57
  })
59
58
  }
60
59
  this.config.wqCookie = wqCookie
61
60
  this.config.wqCookieStr = wqCookieStr
62
61
  this.config.getWqCookieKey = updateKey
63
62
  console.log("解析wxapp中的cookie信息成功,返回后存储",this.config)
64
63
  resolve({
65
64
  wqCookie,
66
65
  wqCookieStr,
67
66
  })
68
67
  }else {
69
68
  console.log("解析wxapp中的cookie信息异常,返回异常结果",this.config)
70
69
  resolve({
71
70
  wqCookie: false,
72
71
  wqCookieStr: false,
73
72
  })
74
73
  }
75
74
  }else {
76
75
  resolve({
77
76
  wqCookie: false,
78
77
  wqCookieStr: false,
79
78
  })
80
79
  }
81
80
  }
82
81
  })
82
+ import Taro from '@tarojs/taro'
83
83
  WXAPP_SUBS_GUIDER
84
84
  floorVideInfo: {},
85
85
  productVideInfo: {},
86
86
  pageIdxHeightInfo: {
87
87
  list: []
88
88
  },
89
89
  shopInfo: {},
90
90
  openAppData: {}
91
91
  public config: {
92
92
  [key: string]: any
93
93
  }
94
94
  this.config = {}
95
95
  this.wxAppSubsGuider = WXAPP_SUBS_GUIDER
96
96
  console.log('=================>', 'updateBusinessDomainAndApi')
97
97
 
98
98
  setTimeout(() => {
99
99
  console.log("微信app登录返回成功后,后台会写入cookie,有延迟,这里延迟500ms去获取最新cookie")
100
100
  this.getLoginCookie(`${Date.now()}`)
101
101
  },500)
102
102
  this.getLoginCookie(`${Date.now()}`)
103
103
  setTimeout(() => {
104
104
  console.log("微信强制登录后,后台会写入cookie,有延迟,这里延迟500ms去获取最新cookie")
105
105
  this.getLoginCookie(`${Date.now()}`)
106
106
  },500)
107
107
  return new Promise((resolve) => {
108
108
  console.log("开始获取更新wxapp中的cookie信息", updateKey)
109
109
  if(this.config.wqCookie && this.config.wqCookieStr && this.config.getWqCookieKey === updateKey){
110
110
  console.log("已有存储wxapp中的cookie信息,直接返回",this.config)
111
111
  resolve({
112
112
  wqCookie: this.config.wqCookie,
113
113
  wqCookieStr: this.config.wqCookieStr,
114
114
  })
115
115
  }else {
116
116
  if (isPublishToWxapp) {
117
117
  const getWxappCookieObj = getTaroStorageKeyValue('cookies') || null
118
118
  if (getWxappCookieObj) {
119
119
  const getCookieObj = getWxappCookieObj['_data']
120
120
  const { wqCookie, wqCookieStr } = getWxAppCookieStr(getCookieObj)
121
121
  const { pin = '', visitkey = '-1', wq_unionid = '', wxapp_openid = '' } = wqCookie
122
122
  this.info.loginState = true
123
123
  this.info.userInfo.wqCookie = wqCookieStr
124
124
  this.info.userInfo.wqVisitkey = visitkey
125
125
  console.log('获取用户完整cookie信息', getCookieObj)
126
126
  const getUserAddress = this.wxAppUserInfoInstance.getAddress()
127
127
  console.log('获取微信用户地址信息', getUserAddress)
128
128
  if (getUserAddress) {
129
129
  this.info.pageInfo.address = getUserAddress?.areaId
130
130
  this.info.pageInfo.addressCommaStr = this.info.pageInfo
131
131
  .address
132
132
  ? this.info.pageInfo.address.replace(/_/g, ',')
133
133
  : ''
134
134
  this.info.pageInfo.un_area = this.info.pageInfo.address
135
135
  Taro.eventCenter.trigger(
136
136
  TaroEventType.USER_AREA_UPDATE,
137
137
  this.info.pageInfo.address,
138
138
  )
139
139
  }
140
140
  if(this.miniAppLogInstance){
141
141
  this.miniAppLogInstance.set({
142
142
  account: pin,
143
143
  unionid: wq_unionid,
144
144
  openid: wxapp_openid,
145
145
  })
146
146
  }
147
147
  this.config.wqCookie = wqCookie
148
148
  this.config.wqCookieStr = wqCookieStr
149
149
  this.config.getWqCookieKey = updateKey
150
150
  console.log("解析wxapp中的cookie信息成功,返回后存储",this.config)
151
151
  resolve({
152
152
  wqCookie,
153
153
  wqCookieStr,
154
154
  })
155
155
  }else {
156
156
  console.log("解析wxapp中的cookie信息异常,返回异常结果",this.config)
157
157
  resolve({
158
158
  wqCookie: false,
159
159
  wqCookieStr: false,
160
160
  })
161
161
  }
162
162
  }else {
163
163
  resolve({
164
164
  wqCookie: false,
165
165
  wqCookieStr: false,
166
166
  })
167
167
  }
168
168
  }
169
169
  })
170
170
 
171
171
  getAddressCachePromise = () => {
172
172
  return Promise.reject("该方法只在APP内适用")
173
173
  }
@@ -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',