@conecli/cone-render 0.8.34 → 0.8.35

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 (52) 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/components/base/CustomScrollView/index.tsx +1 -1
  7. package/dist/components/base/ExposureSmart/const.ts +1 -0
  8. package/dist/components/base/ExposureSmart/index.h5.module.scss +18 -4
  9. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  10. package/dist/components/base/ExposureSmart/index.module.scss +20 -9
  11. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  12. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  13. package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
  14. package/dist/components/base/InViewRender/index.tsx +1 -1
  15. package/dist/components/base/InViewRender/index.weapp.tsx +1 -1
  16. package/dist/components/base/ItemViewExposureSmart/index.module.scss +8 -0
  17. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -0
  18. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  19. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  20. package/dist/components/base/NetworkDataError/const.ts +1 -1
  21. package/dist/components/base/NetworkDataError/index.module.scss +4 -1
  22. package/dist/components/decorate/DecorateFloorModule/index.tsx +1 -1
  23. package/dist/interface/common.ts +1 -1
  24. package/dist/jumpEventReport/base.ts +1 -1
  25. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  26. package/dist/jumpEventReport/index.h5.ts +1 -1
  27. package/dist/jumpEventReport/index.weapp.ts +1 -1
  28. package/dist/jumpEventReport/web/report.ts +1 -1
  29. package/dist/jumpEventReport/web.base.ts +1 -1
  30. package/dist/jumpEventReport/web.jd.ts +1 -1
  31. package/dist/jumpEventReport/web.jdb.ts +1 -1
  32. package/dist/jumpEventReport/web.jdjch.ts +1 -0
  33. package/dist/libs/taroAppReport.js +2 -2
  34. package/dist/modules/ContainerFloorList/index.h5.module.scss +10 -1
  35. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  36. package/dist/open/api/device.ts +1 -1
  37. package/dist/open/api/track.ts +1 -1
  38. package/dist/open/api/util.ts +1 -1
  39. package/dist/open/components/index.ts +1 -1
  40. package/dist/service/bMallConst.ts +1 -1
  41. package/dist/utils/connectNativeJsBridge.ts +1 -1
  42. package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
  43. package/dist/utils/h5Utils.ts +1 -1
  44. package/dist/utils/index.h5.ts +1 -1
  45. package/dist/utils/index.ts +1 -1
  46. package/dist/utils/index.weapp.ts +1 -1
  47. package/dist/utils/intersectionObserver.ts +1 -1
  48. package/dist/utils/jm-common.js +1 -1
  49. package/dist/utils/utils.ts +1 -1
  50. package/package.json +1 -1
  51. /package/dist/service/{bMallConst.wxapp.ts → bMallConst.weapp.ts} +0 -0
  52. /package/dist/service/http/{colorSign.wxapp.ts → colorSign.weapp.ts} +0 -0
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  urlCookie
3
2
  public config: {
4
3
  [key: string]: any
5
4
  }
6
5
  public lazyContainer: CommonInterFace.lazyContainer
7
6
  this.config = {}
8
7
  pin: cookie.get('pin') || ''
9
8
  })
10
9
  if(!this.checkStatusAndLoginPromise){
11
10
  this.checkStatusAndLoginPromise = new Promise(async (resolve, reject) => {
12
11
  try {
13
12
  const getLoginState = await this.doCheckLoginStateAndForApiCheck()
14
13
  if(getLoginState){
15
14
  resolve(true)
16
15
  }else {
17
16
  this.toLogin(options)
18
17
  reject(false)
19
18
  }
20
19
  }catch (e) {
21
20
  this.toLogin(options)
22
21
  reject(false)
23
22
  }
24
23
  })
25
24
  return this.checkStatusAndLoginPromise
26
25
  }else {
27
26
  return this.checkStatusAndLoginPromise.then(() => {
28
27
  return Promise.resolve(true)
29
28
  }).catch (() => {
30
29
  this.toLogin(options)
31
30
  return Promise.reject(true)
32
31
  })
33
32
  }
34
33
 
35
34
  doCheckLoginStateAndForApiCheck() {
36
35
  if(this.info.loginState){
37
36
  return Promise.resolve(true)
38
37
  }else {
39
38
  return new Promise((resolve, reject) => {
40
39
  if(this.info.isJingGouMiniViewState){
41
40
  const getWqAuthToken = cookie.get("wq_auth_token")
42
41
  if(getWqAuthToken){
43
42
  this.info.loginState = true
44
43
  resolve(true)
45
44
  }else {
46
45
  reject(false)
47
46
  }
48
47
  }else{
49
48
  Taro.request({
50
49
  url: api.isLogin,
51
50
  jsonp:true,
52
51
  timeout: 3000,
53
52
  success: (res) => {
54
53
  const {statusCode,data} = res
55
54
  if (statusCode === 200 && data?.islogin && Number(data.islogin) === 1) {
56
55
  this.info.loginState = true
57
56
  resolve(true);
58
57
  } else {
59
58
  reject(false)
60
59
  }
61
60
  },
62
61
  fail:(err) => {
63
62
  console.log("登录检查异常", err)
64
63
  reject(false)
65
64
  }
66
65
  })
67
66
  }
68
67
  })
69
68
  }
70
69
  }
71
70
 
72
71
  try {
73
72
  const getLoginState = await this.doCheckLoginStateAndForApiCheck()
74
73
  if(getLoginState){
75
74
  const { pin } = await this.getLoginCookie();
76
75
  this.info.userInfo = {
77
76
  pin,
78
77
  encodePin: encodeURIComponent(pin),
79
78
  ptkey: '',
80
79
  }
81
80
  resolve(true)
82
81
  }else {
83
82
  reject(false)
84
83
  }
85
84
  }catch (e) {
86
85
  reject(false)
87
86
  }
88
87
  })
89
88
  if(un_area && un_area.length > 0){
90
89
  this.info.pageInfo.address = un_area
91
90
  this.info.pageInfo.un_area = un_area
92
91
  this.info.pageInfo.addressCommaStr = un_area.replace(/_/g, ',')
93
92
  }
93
+ import Taro from '@tarojs/taro'
94
94
  urlCookie
95
95
  public config: {
96
96
  [key: string]: any
97
97
  }
98
98
  public lazyContainer: CommonInterFace.lazyContainer
99
99
  this.config = {}
100
100
  pin: cookie.get('pin') || ''
101
101
  })
102
102
  if(!this.checkStatusAndLoginPromise){
103
103
  this.checkStatusAndLoginPromise = new Promise(async (resolve, reject) => {
104
104
  try {
105
105
  const getLoginState = await this.doCheckLoginStateAndForApiCheck()
106
106
  if(getLoginState){
107
107
  resolve(true)
108
108
  }else {
109
109
  this.toLogin(options)
110
110
  reject(false)
111
111
  }
112
112
  }catch (e) {
113
113
  this.toLogin(options)
114
114
  reject(false)
115
115
  }
116
116
  })
117
117
  return this.checkStatusAndLoginPromise
118
118
  }else {
119
119
  return this.checkStatusAndLoginPromise.then(() => {
120
120
  return Promise.resolve(true)
121
121
  }).catch (() => {
122
122
  this.toLogin(options)
123
123
  return Promise.reject(true)
124
124
  })
125
125
  }
126
126
 
127
127
  doCheckLoginStateAndForApiCheck() {
128
128
  if(this.info.loginState){
129
129
  return Promise.resolve(true)
130
130
  }else {
131
131
  return new Promise((resolve, reject) => {
132
132
  if(this.info.isJingGouMiniViewState){
133
133
  const getWqAuthToken = cookie.get("wq_auth_token")
134
134
  if(getWqAuthToken){
135
135
  this.info.loginState = true
136
136
  resolve(true)
137
137
  }else {
138
138
  reject(false)
139
139
  }
140
140
  }else{
141
141
  Taro.request({
142
142
  url: api.isLogin,
143
143
  jsonp:true,
144
144
  timeout: 3000,
145
145
  success: (res) => {
146
146
  const {statusCode,data} = res
147
147
  if (statusCode === 200 && data?.islogin && Number(data.islogin) === 1) {
148
148
  this.info.loginState = true
149
149
  resolve(true);
150
150
  } else {
151
151
  reject(false)
152
152
  }
153
153
  },
154
154
  fail:(err) => {
155
155
  console.log("登录检查异常", err)
156
156
  reject(false)
157
157
  }
158
158
  })
159
159
  }
160
160
  })
161
161
  }
162
162
  }
163
163
 
164
164
  try {
165
165
  const getLoginState = await this.doCheckLoginStateAndForApiCheck()
166
166
  if(getLoginState){
167
167
  const { pin } = await this.getLoginCookie();
168
168
  this.info.userInfo = {
169
169
  pin,
170
170
  encodePin: encodeURIComponent(pin),
171
171
  ptkey: '',
172
172
  }
173
173
  resolve(true)
174
174
  }else {
175
175
  reject(false)
176
176
  }
177
177
  }catch (e) {
178
178
  reject(false)
179
179
  }
180
180
  })
181
181
  if(un_area && un_area.length > 0){
182
182
  this.info.pageInfo.address = un_area
183
183
  this.info.pageInfo.un_area = un_area
184
184
  this.info.pageInfo.addressCommaStr = un_area.replace(/_/g, ',')
185
185
  }
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  public config: object
3
2
  this.config = {}
4
3
  return new Promise((resolve, reject) => {
5
4
  if (typeof jd !== 'undefined' && jd.requestWebCookie) {
6
5
  jd.requestWebCookie({
7
6
  needpin: 1,
8
7
  success: (res) => {
9
8
  console.log(res)
10
9
  const { ticket, pt_pin } = res
11
10
  console.log('requestWebCookie.success', res)
12
11
  this.info.userInfo = {
13
12
  pin: pt_pin,
14
13
  encodePin: encodeURIComponent(pt_pin),
15
14
  ptkey: ticket,
16
15
  }
17
16
  this.miniAppLogInstance &&
18
17
  this.miniAppLogInstance.set({
19
18
  account: pt_pin,
20
19
  })
21
20
  this.info.loginState = true
22
21
  resolve(res)
23
22
  },
24
23
  fail(res) {
25
24
  console.log('requestWebCookie.fail', res)
26
25
  reject(res)
27
26
  },
28
27
  })
29
28
  } else {
30
29
  resolve({
31
30
  pin: '',
32
31
  ptkey: '',
33
32
  mock: true
34
33
  })
35
34
  }
36
35
  })
37
36
  this.checkLoginStatus().then(res => {
38
37
  console.log(
39
38
  'jdLoadCheckStatusAndLogin hasUserLogined.success: ',
40
39
  res,
41
40
  )
42
41
  resolve(res)
43
42
  }).catch(err => {
44
43
  console.warn(
45
44
  'jdLoadCheckStatusAndLogin hasUserLogined.fail: ',
46
45
  err,
47
46
  )
48
47
  this.toLogin().then(res => {
49
48
  resolve(res)
50
49
  }).catch(err => {
51
50
  reject(err)
52
51
  })
53
52
  })
54
53
  return this.checkStatusAndLoginPromise
55
54
  return new Promise((resolve,reject) => {
56
55
  if (typeof jd !== 'undefined' && jd.hasUserLogined) {
57
56
  jd.hasUserLogined({
58
57
  success: (res) => {
59
58
  console.log('hasUserLogined.success: ', res)
60
59
  if (res.status === 1) {
61
60
  this.getLoginCookie()
62
61
  resolve(res)
63
62
  }else {
64
63
  reject(res)
65
64
  }
66
65
  },
67
66
  fail: (res) => {
68
67
  console.warn('hasUserLogined.fail: ', res)
69
68
  reject(res)
70
69
  },
71
70
  })
72
71
  } else {
73
72
  reject(false)
74
73
  }
75
74
  })
75
+ import Taro from '@tarojs/taro'
76
76
  public config: object
77
77
  this.config = {}
78
78
  return new Promise((resolve, reject) => {
79
79
  if (typeof jd !== 'undefined' && jd.requestWebCookie) {
80
80
  jd.requestWebCookie({
81
81
  needpin: 1,
82
82
  success: (res) => {
83
83
  console.log(res)
84
84
  const { ticket, pt_pin } = res
85
85
  console.log('requestWebCookie.success', res)
86
86
  this.info.userInfo = {
87
87
  pin: pt_pin,
88
88
  encodePin: encodeURIComponent(pt_pin),
89
89
  ptkey: ticket,
90
90
  }
91
91
  this.miniAppLogInstance &&
92
92
  this.miniAppLogInstance.set({
93
93
  account: pt_pin,
94
94
  })
95
95
  this.info.loginState = true
96
96
  resolve(res)
97
97
  },
98
98
  fail(res) {
99
99
  console.log('requestWebCookie.fail', res)
100
100
  reject(res)
101
101
  },
102
102
  })
103
103
  } else {
104
104
  resolve({
105
105
  pin: '',
106
106
  ptkey: '',
107
107
  mock: true
108
108
  })
109
109
  }
110
110
  })
111
111
  this.checkLoginStatus().then(res => {
112
112
  console.log(
113
113
  'jdLoadCheckStatusAndLogin hasUserLogined.success: ',
114
114
  res,
115
115
  )
116
116
  resolve(res)
117
117
  }).catch(err => {
118
118
  console.warn(
119
119
  'jdLoadCheckStatusAndLogin hasUserLogined.fail: ',
120
120
  err,
121
121
  )
122
122
  this.toLogin().then(res => {
123
123
  resolve(res)
124
124
  }).catch(err => {
125
125
  reject(err)
126
126
  })
127
127
  })
128
128
  return this.checkStatusAndLoginPromise
129
129
  return new Promise((resolve,reject) => {
130
130
  if (typeof jd !== 'undefined' && jd.hasUserLogined) {
131
131
  jd.hasUserLogined({
132
132
  success: (res) => {
133
133
  console.log('hasUserLogined.success: ', res)
134
134
  if (res.status === 1) {
135
135
  this.getLoginCookie()
136
136
  resolve(res)
137
137
  }else {
138
138
  reject(res)
139
139
  }
140
140
  },
141
141
  fail: (res) => {
142
142
  console.warn('hasUserLogined.fail: ', res)
143
143
  reject(res)
144
144
  },
145
145
  })
146
146
  } else {
147
147
  reject(false)
148
148
  }
149
149
  })
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  public config: {
3
2
  [key: string]: any
4
3
  }
5
4
  public lazyContainer: CommonInterFace.lazyContainer
6
5
  this.config = {}
7
6
 
8
7
  getLoginCookie(updateKey = 'wxapp') {
9
8
  return new Promise((resolve) => {
10
9
  console.log("开始获取更新wxapp中的cookie信息", updateKey)
11
10
  if(this.config.wqCookie && this.config.wqCookieStr && this.config.getWqCookieKey === updateKey){
12
11
  console.log("已有存储wxapp中的cookie信息,直接返回",this.config)
13
12
  resolve({
14
13
  wqCookie: this.config.wqCookie,
15
14
  wqCookieStr: this.config.wqCookieStr,
16
15
  })
17
16
  }else {
18
17
  if (isPublishToWxapp) {
19
18
  const getWxappCookieObj = getTaroStorageKeyValue('cookies') || null
20
19
  if (getWxappCookieObj) {
21
20
  const getCookieObj = getWxappCookieObj['_data']
22
21
  const { wqCookie, wqCookieStr } = getWxAppCookieStr(getCookieObj)
23
22
  const { pin = '', visitkey = '-1', wq_unionid = '', wxapp_openid = '' } = wqCookie
24
23
  this.info.loginState = true
25
24
  this.info.userInfo.wqCookie = wqCookieStr
26
25
  this.info.userInfo.wqVisitkey = visitkey
27
26
  console.log('获取用户完整cookie信息', getCookieObj)
28
27
  const getUserAddress = this.wxAppUserInfoInstance.getAddress()
29
28
  console.log('获取微信用户地址信息', getUserAddress)
30
29
  if (getUserAddress) {
31
30
  this.info.pageInfo.address = getUserAddress?.areaId
32
31
  this.info.pageInfo.addressCommaStr = this.info.pageInfo
33
32
  .address
34
33
  ? this.info.pageInfo.address.replace(/_/g, ',')
35
34
  : ''
36
35
  this.info.pageInfo.un_area = this.info.pageInfo.address
37
36
  Taro.eventCenter.trigger(
38
37
  TaroEventType.USER_AREA_UPDATE,
39
38
  this.info.pageInfo.address,
40
39
  )
41
40
  }
42
41
  if(this.miniAppLogInstance){
43
42
  this.miniAppLogInstance.set({
44
43
  account: pin,
45
44
  unionid: wq_unionid,
46
45
  openid: wxapp_openid,
47
46
  })
48
47
  }
49
48
  this.config.wqCookie = wqCookie
50
49
  this.config.wqCookieStr = wqCookieStr
51
50
  this.config.getWqCookieKey = updateKey
52
51
  console.log("解析wxapp中的cookie信息成功,返回后存储",this.config)
53
52
  resolve({
54
53
  wqCookie,
55
54
  wqCookieStr,
56
55
  })
57
56
  }else {
58
57
  console.log("解析wxapp中的cookie信息异常,返回异常结果",this.config)
59
58
  resolve({
60
59
  wqCookie: false,
61
60
  wqCookieStr: false,
62
61
  })
63
62
  }
64
63
  }else {
65
64
  resolve({
66
65
  wqCookie: false,
67
66
  wqCookieStr: false,
68
67
  })
69
68
  }
70
69
  }
71
70
  })
72
71
  }
73
72
  return this.getLoginCookie()
73
+ import Taro from '@tarojs/taro'
74
74
  public config: {
75
75
  [key: string]: any
76
76
  }
77
77
  public lazyContainer: CommonInterFace.lazyContainer
78
78
  this.config = {}
79
79
 
80
80
  getLoginCookie(updateKey = 'wxapp') {
81
81
  return new Promise((resolve) => {
82
82
  console.log("开始获取更新wxapp中的cookie信息", updateKey)
83
83
  if(this.config.wqCookie && this.config.wqCookieStr && this.config.getWqCookieKey === updateKey){
84
84
  console.log("已有存储wxapp中的cookie信息,直接返回",this.config)
85
85
  resolve({
86
86
  wqCookie: this.config.wqCookie,
87
87
  wqCookieStr: this.config.wqCookieStr,
88
88
  })
89
89
  }else {
90
90
  if (isPublishToWxapp) {
91
91
  const getWxappCookieObj = getTaroStorageKeyValue('cookies') || null
92
92
  if (getWxappCookieObj) {
93
93
  const getCookieObj = getWxappCookieObj['_data']
94
94
  const { wqCookie, wqCookieStr } = getWxAppCookieStr(getCookieObj)
95
95
  const { pin = '', visitkey = '-1', wq_unionid = '', wxapp_openid = '' } = wqCookie
96
96
  this.info.loginState = true
97
97
  this.info.userInfo.wqCookie = wqCookieStr
98
98
  this.info.userInfo.wqVisitkey = visitkey
99
99
  console.log('获取用户完整cookie信息', getCookieObj)
100
100
  const getUserAddress = this.wxAppUserInfoInstance.getAddress()
101
101
  console.log('获取微信用户地址信息', getUserAddress)
102
102
  if (getUserAddress) {
103
103
  this.info.pageInfo.address = getUserAddress?.areaId
104
104
  this.info.pageInfo.addressCommaStr = this.info.pageInfo
105
105
  .address
106
106
  ? this.info.pageInfo.address.replace(/_/g, ',')
107
107
  : ''
108
108
  this.info.pageInfo.un_area = this.info.pageInfo.address
109
109
  Taro.eventCenter.trigger(
110
110
  TaroEventType.USER_AREA_UPDATE,
111
111
  this.info.pageInfo.address,
112
112
  )
113
113
  }
114
114
  if(this.miniAppLogInstance){
115
115
  this.miniAppLogInstance.set({
116
116
  account: pin,
117
117
  unionid: wq_unionid,
118
118
  openid: wxapp_openid,
119
119
  })
120
120
  }
121
121
  this.config.wqCookie = wqCookie
122
122
  this.config.wqCookieStr = wqCookieStr
123
123
  this.config.getWqCookieKey = updateKey
124
124
  console.log("解析wxapp中的cookie信息成功,返回后存储",this.config)
125
125
  resolve({
126
126
  wqCookie,
127
127
  wqCookieStr,
128
128
  })
129
129
  }else {
130
130
  console.log("解析wxapp中的cookie信息异常,返回异常结果",this.config)
131
131
  resolve({
132
132
  wqCookie: false,
133
133
  wqCookieStr: false,
134
134
  })
135
135
  }
136
136
  }else {
137
137
  resolve({
138
138
  wqCookie: false,
139
139
  wqCookieStr: false,
140
140
  })
141
141
  }
142
142
  }
143
143
  })
144
144
  }
145
145
  return this.getLoginCookie()
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  public config: {
3
2
  [key: string]: any
4
3
  }
5
4
  this.config = {}
6
5
  console.log('=================>', 'updateBusinessDomainAndApi')
7
6
 
8
7
  setTimeout(() => {
9
8
  console.log("微信app登录返回成功后,后台会写入cookie,有延迟,这里延迟500ms去获取最新cookie")
10
9
  this.getLoginCookie(`${Date.now()}`)
11
10
  },500)
12
11
  this.getLoginCookie(`${Date.now()}`)
13
12
  setTimeout(() => {
14
13
  console.log("微信强制登录后,后台会写入cookie,有延迟,这里延迟500ms去获取最新cookie")
15
14
  this.getLoginCookie(`${Date.now()}`)
16
15
  },500)
17
16
  return new Promise((resolve) => {
18
17
  console.log("开始获取更新wxapp中的cookie信息", updateKey)
19
18
  if(this.config.wqCookie && this.config.wqCookieStr && this.config.getWqCookieKey === updateKey){
20
19
  console.log("已有存储wxapp中的cookie信息,直接返回",this.config)
21
20
  resolve({
22
21
  wqCookie: this.config.wqCookie,
23
22
  wqCookieStr: this.config.wqCookieStr,
24
23
  })
25
24
  }else {
26
25
  if (isPublishToWxapp) {
27
26
  const getWxappCookieObj = getTaroStorageKeyValue('cookies') || null
28
27
  if (getWxappCookieObj) {
29
28
  const getCookieObj = getWxappCookieObj['_data']
30
29
  const { wqCookie, wqCookieStr } = getWxAppCookieStr(getCookieObj)
31
30
  const { pin = '', visitkey = '-1', wq_unionid = '', wxapp_openid = '' } = wqCookie
32
31
  this.info.loginState = true
33
32
  this.info.userInfo.wqCookie = wqCookieStr
34
33
  this.info.userInfo.wqVisitkey = visitkey
35
34
  console.log('获取用户完整cookie信息', getCookieObj)
36
35
  const getUserAddress = this.wxAppUserInfoInstance.getAddress()
37
36
  console.log('获取微信用户地址信息', getUserAddress)
38
37
  if (getUserAddress) {
39
38
  this.info.pageInfo.address = getUserAddress?.areaId
40
39
  this.info.pageInfo.addressCommaStr = this.info.pageInfo
41
40
  .address
42
41
  ? this.info.pageInfo.address.replace(/_/g, ',')
43
42
  : ''
44
43
  this.info.pageInfo.un_area = this.info.pageInfo.address
45
44
  Taro.eventCenter.trigger(
46
45
  TaroEventType.USER_AREA_UPDATE,
47
46
  this.info.pageInfo.address,
48
47
  )
49
48
  }
50
49
  if(this.miniAppLogInstance){
51
50
  this.miniAppLogInstance.set({
52
51
  account: pin,
53
52
  unionid: wq_unionid,
54
53
  openid: wxapp_openid,
55
54
  })
56
55
  }
57
56
  this.config.wqCookie = wqCookie
58
57
  this.config.wqCookieStr = wqCookieStr
59
58
  this.config.getWqCookieKey = updateKey
60
59
  console.log("解析wxapp中的cookie信息成功,返回后存储",this.config)
61
60
  resolve({
62
61
  wqCookie,
63
62
  wqCookieStr,
64
63
  })
65
64
  }else {
66
65
  console.log("解析wxapp中的cookie信息异常,返回异常结果",this.config)
67
66
  resolve({
68
67
  wqCookie: false,
69
68
  wqCookieStr: false,
70
69
  })
71
70
  }
72
71
  }else {
73
72
  resolve({
74
73
  wqCookie: false,
75
74
  wqCookieStr: false,
76
75
  })
77
76
  }
78
77
  }
79
78
  })
79
+ import Taro from '@tarojs/taro'
80
80
  public config: {
81
81
  [key: string]: any
82
82
  }
83
83
  this.config = {}
84
84
  console.log('=================>', 'updateBusinessDomainAndApi')
85
85
 
86
86
  setTimeout(() => {
87
87
  console.log("微信app登录返回成功后,后台会写入cookie,有延迟,这里延迟500ms去获取最新cookie")
88
88
  this.getLoginCookie(`${Date.now()}`)
89
89
  },500)
90
90
  this.getLoginCookie(`${Date.now()}`)
91
91
  setTimeout(() => {
92
92
  console.log("微信强制登录后,后台会写入cookie,有延迟,这里延迟500ms去获取最新cookie")
93
93
  this.getLoginCookie(`${Date.now()}`)
94
94
  },500)
95
95
  return new Promise((resolve) => {
96
96
  console.log("开始获取更新wxapp中的cookie信息", updateKey)
97
97
  if(this.config.wqCookie && this.config.wqCookieStr && this.config.getWqCookieKey === updateKey){
98
98
  console.log("已有存储wxapp中的cookie信息,直接返回",this.config)
99
99
  resolve({
100
100
  wqCookie: this.config.wqCookie,
101
101
  wqCookieStr: this.config.wqCookieStr,
102
102
  })
103
103
  }else {
104
104
  if (isPublishToWxapp) {
105
105
  const getWxappCookieObj = getTaroStorageKeyValue('cookies') || null
106
106
  if (getWxappCookieObj) {
107
107
  const getCookieObj = getWxappCookieObj['_data']
108
108
  const { wqCookie, wqCookieStr } = getWxAppCookieStr(getCookieObj)
109
109
  const { pin = '', visitkey = '-1', wq_unionid = '', wxapp_openid = '' } = wqCookie
110
110
  this.info.loginState = true
111
111
  this.info.userInfo.wqCookie = wqCookieStr
112
112
  this.info.userInfo.wqVisitkey = visitkey
113
113
  console.log('获取用户完整cookie信息', getCookieObj)
114
114
  const getUserAddress = this.wxAppUserInfoInstance.getAddress()
115
115
  console.log('获取微信用户地址信息', getUserAddress)
116
116
  if (getUserAddress) {
117
117
  this.info.pageInfo.address = getUserAddress?.areaId
118
118
  this.info.pageInfo.addressCommaStr = this.info.pageInfo
119
119
  .address
120
120
  ? this.info.pageInfo.address.replace(/_/g, ',')
121
121
  : ''
122
122
  this.info.pageInfo.un_area = this.info.pageInfo.address
123
123
  Taro.eventCenter.trigger(
124
124
  TaroEventType.USER_AREA_UPDATE,
125
125
  this.info.pageInfo.address,
126
126
  )
127
127
  }
128
128
  if(this.miniAppLogInstance){
129
129
  this.miniAppLogInstance.set({
130
130
  account: pin,
131
131
  unionid: wq_unionid,
132
132
  openid: wxapp_openid,
133
133
  })
134
134
  }
135
135
  this.config.wqCookie = wqCookie
136
136
  this.config.wqCookieStr = wqCookieStr
137
137
  this.config.getWqCookieKey = updateKey
138
138
  console.log("解析wxapp中的cookie信息成功,返回后存储",this.config)
139
139
  resolve({
140
140
  wqCookie,
141
141
  wqCookieStr,
142
142
  })
143
143
  }else {
144
144
  console.log("解析wxapp中的cookie信息异常,返回异常结果",this.config)
145
145
  resolve({
146
146
  wqCookie: false,
147
147
  wqCookieStr: false,
148
148
  })
149
149
  }
150
150
  }else {
151
151
  resolve({
152
152
  wqCookie: false,
153
153
  wqCookieStr: false,
154
154
  })
155
155
  }
156
156
  }
157
157
  })
@@ -1 +1 @@
1
- import React, {useRef, useEffect} from 'react'
1
+ import React, {useRef, useEffect} from 'react'
2
2
  isH5AndJdShopView,
3
3
  isAndroidDevice,
4
4
  isIosDevice,
5
5
  isJdApp,
6
6
  isWxMin,
7
7
  isH5AndJdShopViewH5Scroll,
8
8
  isH5,
9
9
  const rootEleNode = isH5 && document ? document.querySelector('body') : null
10
10
  const needShowHighVersion = isH5AndJdShopViewH5Scroll && !(global.info.queryInfo?.downgraded && global.info.queryInfo.downgraded === "true")
11
11
  e && e.stopPropagation()
12
12
  if(!verticalScrolling) {
13
13
  needShowHighVersion && rootEleNode && rootEleNode.classList.add('over-hidden')
14
14
  }
15
15
  e && e.stopPropagation()
16
16
  e && e.stopPropagation()
17
17
  if(!verticalScrolling) {
18
18
  needShowHighVersion && rootEleNode && rootEleNode.classList.add('over-hidden')
19
19
  }
20
20
  if(!verticalScrolling) {
21
21
  needShowHighVersion && rootEleNode && rootEleNode.classList.remove('over-hidden')
22
22
  }
23
23
  <ScrollView
24
24
  scrollX
25
25
  onTouchStart={changeTouchStart}
26
26
  onTouchEnd={changeTouchEnd}
27
27
  onTouchCancel={changeTouchEnd}
28
28
  onTouchMove={changeTouchMove}
29
29
  enhanced
30
30
  showScrollbar={false}
31
31
  style={style}
32
32
  className={classNames(className, {
33
33
  [customScrollViewStyle[
34
34
  'd-custom-ios-h5-extend-border-radius'
35
35
  ]]: isIosDevice,
36
36
  },'J_customScroll')}
37
37
  {...otherProps}
38
38
  >
39
39
  {children}
40
40
  </ScrollView>
41
41
  verticalScrolling: false,
@@ -0,0 +1 @@
1
+ export const TrackType = {
2
  point: 0,
1
3
  floor: 1,