jufubao-base 1.0.159-beta8 → 1.0.159

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 (90) hide show
  1. package/package.json +1 -1
  2. package/src/common/authorize.js +70 -201
  3. package/src/components/JfbBaseAddress/JfbBaseAddress.vue +6 -7
  4. package/src/components/JfbBaseAfterOrderDetail/JfbBaseAfterOrderDetail.vue +3 -5
  5. package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderList.vue +2 -3
  6. package/src/components/JfbBaseBack/JfbBaseBack.vue +8 -10
  7. package/src/components/JfbBaseBackground/JfbBaseBackground.vue +2 -3
  8. package/src/components/JfbBaseBlock/JfbBaseBlock.vue +2 -3
  9. package/src/components/JfbBaseCard/JfbBaseCard.vue +6 -10
  10. package/src/components/JfbBaseCardBindV2/JfbBaseCardBindV2.vue +26 -57
  11. package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +15 -14
  12. package/src/components/JfbBaseCardDetailEntry/Attr.js +0 -22
  13. package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +423 -390
  14. package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabled.vue +4 -4
  15. package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +9 -7
  16. package/src/components/JfbBaseCardEntry/Attr.js +1 -22
  17. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +33 -86
  18. package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +19 -36
  19. package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +4 -9
  20. package/src/components/JfbBaseCardMerge/JfbBaseCardMerge.vue +3 -4
  21. package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntry.vue +18 -23
  22. package/src/components/JfbBaseCardShift/JfbBaseCardShift.vue +11 -4
  23. package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntry.vue +19 -16
  24. package/src/components/JfbBaseCardSweepInfo/JfbBaseCardSweepInfo.vue +2 -3
  25. package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +18 -34
  26. package/src/components/JfbBaseCardV3/JfbBaseCardV3.vue +14 -14
  27. package/src/components/JfbBaseCity/JfbBaseCity.vue +2 -3
  28. package/src/components/JfbBaseClear/JfbBaseClear.vue +2 -3
  29. package/src/components/JfbBaseConDialog/Api.js +13 -1
  30. package/src/components/JfbBaseConDialog/JfbBaseConDialog.vue +79 -20
  31. package/src/components/JfbBaseConDialog/XdCouCardBind.vue +223 -133
  32. package/src/components/JfbBaseConList/Api.js +13 -1
  33. package/src/components/JfbBaseConList/Attr.js +11 -0
  34. package/src/components/JfbBaseConList/JfbBaseConList.vue +355 -123
  35. package/src/components/JfbBaseConList/Mock.js +1 -1
  36. package/src/components/JfbBaseConPhone/JfbBaseConPhone.vue +2 -3
  37. package/src/components/JfbBaseEntry/Attr.js +0 -22
  38. package/src/components/JfbBaseEntry/JfbBaseEntry.vue +16 -80
  39. package/src/components/JfbBaseExpressDetail/JfbBaseExpressDetail.vue +4 -3
  40. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +20 -31
  41. package/src/components/JfbBaseFastLink/XdFastNav.vue +2 -2
  42. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +1 -0
  43. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +2 -3
  44. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +11 -28
  45. package/src/components/JfbBaseLoginForgetPwd/JfbBaseLoginForgetPwd.vue +9 -7
  46. package/src/components/JfbBaseLoginSetPwd/JfbBaseLoginSetPwd.vue +6 -9
  47. package/src/components/JfbBaseMapOverlay/JfbBaseMapOverlay.vue +5 -19
  48. package/src/components/JfbBaseMapOverlay/XdMapOverlay.vue +37 -52
  49. package/src/components/JfbBaseMapSearch/JfbBaseMapSearch.vue +2 -3
  50. package/src/components/JfbBaseMergeUserCard/JfbBaseMergeUserCard.vue +27 -28
  51. package/src/components/JfbBaseMultipleExpress/JfbBaseMultipleExpress.vue +5 -5
  52. package/src/components/JfbBaseMy/JfbBaseMy.vue +3 -3
  53. package/src/components/JfbBaseMySetting/JfbBaseMySetting.vue +4 -6
  54. package/src/components/JfbBaseNotice/Attr.js +2 -0
  55. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +14 -36
  56. package/src/components/JfbBaseNotice/XdNoticeBar.vue +1 -17
  57. package/src/components/JfbBaseNoticeBottom/JfbBaseNoticeBottom.vue +2 -3
  58. package/src/components/JfbBaseNoticeTop/JfbBaseNoticeTop.vue +2 -3
  59. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +31 -20
  60. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +4 -9
  61. package/src/components/JfbBasePay/JfbBasePay.vue +2 -3
  62. package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollect.vue +7 -22
  63. package/src/components/JfbBasePhoneLogin/JfbBasePhoneLogin.vue +7 -23
  64. package/src/components/JfbBasePoster/JfbBasePoster.vue +18 -118
  65. package/src/components/JfbBasePoster/MoreScreen.vue +37 -155
  66. package/src/components/JfbBasePosterBigSmall/Attr.js +4 -1
  67. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +67 -191
  68. package/src/components/JfbBasePosterEntry/JfbBasePosterEntry.vue +20 -90
  69. package/src/components/JfbBasePosterType/FourScreen.vue +18 -162
  70. package/src/components/JfbBasePosterType/JfbBasePosterType.vue +35 -0
  71. package/src/components/JfbBaseRecharge/JfbBaseRecharge.vue +4 -4
  72. package/src/components/JfbBaseRechargeOrder/JfbBaseRechargeOrder.vue +4 -3
  73. package/src/components/JfbBaseRechargeOrderDetail/JfbBaseRechargeOrderDetail.vue +7 -4
  74. package/src/components/JfbBaseRechargeSuccess/JfbBaseRechargeSuccess.vue +9 -6
  75. package/src/components/JfbBaseSearch/JfbBaseSearch.vue +2 -3
  76. package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +4 -5
  77. package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +2 -3
  78. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +3 -5
  79. package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +3 -4
  80. package/src/components/JfbBaseVideo/JfbBaseVideo.vue +11 -14
  81. package/src/components/JfbBaseVideo/XdVideo.vue +4 -0
  82. package/src/components/JfbBaseWallet/JfbBaseWallet.vue +2 -3
  83. package/src/components/JfbBaseWalletDetail/JfbBaseWalletDetail.vue +8 -5
  84. package/src/components/JfbBaseWalletEffective/JfbBaseWalletEffective.vue +8 -5
  85. package/src/components/JfbBaseWalletIndex/JfbBaseWalletIndex.vue +17 -7
  86. package/src/components/JfbBaseWalletItem/JfbBaseWalletItem.vue +21 -13
  87. package/src/components/JfbBaseWebview/JfbBaseWebview.vue +3 -4
  88. package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorize.vue +4 -5
  89. package/src/components/JfbBaseWxAuthorizeError/JfbBaseWxAuthorizeError.vue +4 -3
  90. package/src/mixins/colorCardMixins.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.159-beta8",
3
+ "version": "1.0.159",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -4,9 +4,13 @@
4
4
  import cookie from "@/common/cookie";
5
5
  //#endif
6
6
  import storage from "@/common/storage";
7
+
7
8
  const settings = require('./../../settings');
9
+ import Vue from 'vue';
10
+
8
11
  let __jfbAuthorize = null;
9
12
  import store from "@/store";
13
+
10
14
  import {Base64} from 'js-base64';
11
15
 
12
16
  class JfbAuthorize {
@@ -26,25 +30,14 @@ class JfbAuthorize {
26
30
  this.jumpToTimer = null;
27
31
  this.maxTime = 10;
28
32
 
29
- //从地址栏中获取登录链接(webview)
30
- //#ifdef H5
31
- this.jfbLoginPath = cookie.get(`jfb-login-path-${this.siteId}`);
32
- this.jfbCardPath = cookie.get(`jfb-card-path-${this.siteId}`);
33
- this.jfbHost = cookie.get(`jfb-host-${this.siteId}`);
34
- this.jfbDir = cookie.get(`jfb-dir-${this.siteId}`);
35
- this.jfbAppType= cookie.get(`jfb-app-type-${this.siteId}`) || '';
36
- //#endif
37
-
38
-
39
33
  this.config = Object.assign({}, {
40
34
  'user': 'JFB-CSRF-TOKEN-{siteID}',
35
+ 'card': 'JFB-CARD-TOKEN-{siteID}',
41
36
  'refresh': 'JFB-REFRESH-TOKEN-{siteID}',
42
37
  'access': 'JFB-ACCESS-TOKEN',
43
- 'userAll':'JFB-USER-ALL-{siteID}',
44
- 'card': 'JFB-CARD-TOKEN-{siteID}',
45
38
  'bizCode': 'JFB-CARD-CODE-{siteID}',
46
- 'cardExpire': 'JFB-CARD-EXPIRE-{siteID}',
47
- }, settings.token ? settings.token : {}) ;
39
+ 'userAll':'JFB-USER-ALL-{siteID}',
40
+ }, settings.token ? settings.token : {});
48
41
  }
49
42
 
50
43
  doMain() {
@@ -109,7 +102,7 @@ class JfbAuthorize {
109
102
  cookie.remove(codeKey, {domain: this.doMain()});
110
103
  //#endif
111
104
  storage.remove(key);
112
- if(key === 'card') storage.remove(codeKey);
105
+ storage.remove(codeKey);
113
106
  }
114
107
 
115
108
  /**
@@ -143,202 +136,100 @@ class JfbAuthorize {
143
136
  }
144
137
 
145
138
  /**
146
- * @description 检查是否在微信小程序webview环境下面
147
- * @return {boolean}
139
+ * @description 跳转到卡登陆页面
140
+ * @param $vm {Vue}
141
+ * @param callbackUrl {String} 返回参数
148
142
  */
149
- checkEnv(){
150
- return window['__wxjs_environment'] === 'miniprogram'
151
- }
152
143
 
153
- isCheckJfbWxDir(path){
154
- path = path.replace('@site_domain@', '').split('/');
155
- return path.length === 5 && path[1] === this.jfbDir;
156
- }
144
+ jumpToCardLogin($vm, callbackUrl) {
145
+ let redirect_url = '';
146
+ if (store.state.configProject.platform === 'mp.weixin') {
147
+ redirect_url = $vm['$xdUniHelper'].parseURL().source;
148
+ }
149
+ if (store.state.configProject.platform === 'h5') {
150
+ redirect_url = $vm.$route.fullPath;
151
+ }
157
152
 
158
- /**
159
- * @description 判断当前传入地址是否当前应用下面地址
160
- * @param url
161
- * @return {boolean} true =>不同应用 false=>相同应用
162
- */
163
- checkUrlIsNotCameDir(url) {
164
- const urlArr = url.replace('@site_domain@', '').split('/');//pages/loading/loading | @site_domain@/$dir/main/mall/index
165
- console.log('checkUrlIsNotCameDir.url', url,urlArr)
166
- console.log('checkUrlIsNotCameDir.project', store.state.brandInfo)
167
- return urlArr.length === 5 && urlArr[1] !== store.state.brandInfo.deploy_dir;
168
- }
169
153
 
170
- //#ifdef MP-WEIXIN
171
- wxJumpToPath($vm,redirect_url, path, type = 'login'){
172
- //微信小程序只能跳转应用内的地址
173
- if(this.checkUrlIsNotCameDir(path)) {
174
- let message = '请设置正确设置用户登录地址,微信小程序只能使用应用内地址';
175
- if(type === 'card') message = '请设置正确设置用户票券登录地址,微信小程序只能使用应用内地址'
176
- $vm.$xdAlert({content: message,time:4000})
177
- throw new Error(message);
154
+ //登陆地址与当前项目不再同一个app中处理
155
+ //#ifdef H5
156
+ if (!this.checkUrlIsCameDir(this.cardPath)) {
157
+ redirect_url = `@site_domain@/${store.state.brandInfo.deploy_dir}${redirect_url}`
178
158
  }
159
+ //#endif
179
160
 
180
- let key = 'redirect_url';
181
- let business_code = '';
182
-
183
- if(type === 'card'){
184
- key = 'inCallback';
161
+ if (callbackUrl) redirect_url = callbackUrl;
185
162
 
186
- //设置过滤业务线
187
- if(store.state.pageBusinessCode) {
188
- business_code = `&jfb_business_code=${store.state.pageBusinessCode}`;
189
- }
163
+ if (!this.cardPath) {
164
+ console.error(this.cardPath);
165
+ $vm.$xdAlert({
166
+ content: "请设置卡登陆页面地址"
167
+ })
168
+ throw new Error('请设置卡登陆页面地址');
190
169
  }
191
170
 
192
- let dir = store.state.brandInfo.deploy_dir;
193
- let newPath = path.replace(`@site_domain@/${dir}/`, '/');
171
+ //设置页面过滤卡
172
+ let business_code = '';
173
+ if(store.state.pageBusinessCode) {
174
+ business_code = `&jfb_business_code=${store.state.pageBusinessCode}`;
175
+ }
194
176
 
195
- return newPath + `?${key}=${Base64.encodeURI(redirect_url)}${business_code}`;
196
- }
197
- //#endif
198
-
199
- delPathSpParams($vm,redirect_url){
200
- redirect_url = redirect_url.replace(`@site_domain@`, '')
201
- let project = store.state.brandInfo;
202
- let newPath = $vm.$xdUniHelper.parseURL(redirect_url);
203
- let newParams = newPath.params;
204
- if(newParams.ts) delete newParams.ts;
205
- if(newParams.vs) delete newParams.vs;
206
- if(newParams['lcdh']) delete newParams.lcdh;
207
- if($vm.$xdUniHelper.isEmpty(newParams)) return `https://${project.host}${newPath.path}`
208
- return `https://${project.host}${newPath.path}?${$vm.$xdUniHelper.jsonToParams(newParams)}`
177
+ $vm['$xdUniHelper'].redirectTo({
178
+ url: this.cardPath + `?inCallback=${Base64.encodeURI(redirect_url)}${business_code}`,
179
+ });
209
180
  }
210
181
 
211
- getCardPath(CardPath,redirect_url,business_code){
212
- return CardPath + `?inCallback=${Base64.encodeURI(redirect_url)}${business_code}`;
182
+ checkUrlIsCameDir(url) {
183
+ url = url.replace('@site_domain@', '').split('/');
184
+ console.log('checkUrlIsCameDir', url)
185
+ console.log('checkUrlIsCameDir', store.state.brandInfo)
186
+ return url.length === 5 && url[1] === store.state.brandInfo.deploy_dir;
213
187
  }
214
188
 
215
-
216
189
  /**
217
190
  * @description 跳转到用户登陆页面
218
191
  * @param $vm {Vue}
219
192
  * @param isRedirect {boolean}
220
193
  */
221
194
  jumpToUserLogin($vm,isRedirect = true) {
222
-
223
195
  let redirect_url = '';
224
- let LoginPath = '';
225
-
226
- //设置登录成功回跳地址
227
- if(isRedirect) {
228
- if (store.state.configProject.platform === 'mp.weixin') redirect_url = $vm['$xdUniHelper'].parseURL().source;
229
- if (store.state.configProject.platform === 'h5') redirect_url = $vm.$route.fullPath;
196
+ if (store.state.configProject.platform === 'mp.weixin') {
197
+ redirect_url = $vm['$xdUniHelper'].parseURL().source;
230
198
  }
231
-
232
- //无配置登录地址地址提示
233
- if (!this.LoginPath) {
234
- $vm.$xdAlert({content: "请设置用户登陆页面地址"})
235
- throw new Error('请设置用户登陆页面地址');
199
+ if (store.state.configProject.platform === 'h5') {
200
+ redirect_url = $vm.$route.fullPath;
236
201
  }
237
-
238
-
239
- //#ifdef MP-WEIXIN
240
- LoginPath = this.wxJumpToPath($vm,redirect_url, this.LoginPath);
241
- //#endif
202
+ if(!isRedirect) redirect_url = '';
242
203
 
243
204
  //#ifdef H5
244
205
  //登陆地址与当前项目不再同一个app中处理
245
- if(!this.checkUrlIsNotCameDir(this.LoginPath)) {
246
- if(redirect_url) redirect_url = `@site_domain@/${store.state.brandInfo.deploy_dir}${redirect_url}`;
247
- else redirect_url = `@site_domain@/${store.state.brandInfo.deploy_dir}/`;
248
- }
249
-
250
- //判断redirect_url是否为登陆地址?
251
- if (redirect_url.indexOf(this.LoginPath) === -1) {
252
- LoginPath = this.LoginPath + `?redirect_url=${Base64.encodeURI(redirect_url)}`;
253
- }
254
-
255
- //微信小程序webview环境直接返回小程序进行登录
256
- if(this.checkEnv() && this.jfbLoginPath) {
257
- //返回链接处理
258
- if(redirect_url){
259
- redirect_url = this.delPathSpParams($vm,redirect_url)
206
+ if(!this.checkUrlIsCameDir(this.LoginPath)) {
207
+ if(redirect_url) {
208
+ redirect_url = `@site_domain@/${store.state.brandInfo.deploy_dir}${redirect_url}`;
260
209
  }
261
-
262
- LoginPath = this.jfbLoginPath.replace(`@site_domain@/${this.jfbDir}/`, '/');
263
- const jumpTo = LoginPath + `?redirect_url=${Base64.encodeURI(redirect_url)}`;
264
- $vm['$xdUniHelper'].redirectTo({
265
- url: `/pages/jumptomp/jumptomp?callback=${Base64.encodeURI(jumpTo)}`
266
- });
267
- return
268
- }
269
- //#endif
270
-
271
- $vm['$xdUniHelper'].redirectTo({
272
- url: LoginPath,
273
- });
274
- }
275
-
276
- /**
277
- * @description 跳转到卡登陆页面
278
- * @param $vm {Vue}
279
- * @param callbackUrl {String} 返回参数
280
- */
281
- jumpToCardLogin($vm, callbackUrl) {
282
- let redirect_url = '';
283
- let CardPath = ''; //登录地址
284
- let jumpPath = ''; //跳转地址
285
-
286
- //设置返回地址
287
- if (store.state.configProject.platform === 'mp.weixin') redirect_url = $vm['$xdUniHelper'].parseURL().source;
288
- if (store.state.configProject.platform === 'h5') redirect_url = $vm.$route.fullPath;
289
-
290
-
291
- //#ifdef MP-WEIXIN
292
- if (callbackUrl) redirect_url = callbackUrl;
293
- jumpPath = this.wxJumpToPath($vm, redirect_url, this.cardPath, 'card');
294
- //#endif
295
-
296
- //#ifdef H5
297
- CardPath = this.cardPath;
298
-
299
- //当有callbackUrl参数时候,redirect_url地址直接使用callbackUrl参数
300
- if (callbackUrl) redirect_url = callbackUrl;
301
-
302
- //设置过滤业务线
303
- let business_code = ''
304
- if(store.state.pageBusinessCode) {
305
- business_code = `&jfb_business_code=${store.state.pageBusinessCode}`;
306
- }
307
-
308
- //微信小程序webview模式处理(需要跳回微信小程序进行登录)
309
- if(this.checkEnv()) {
310
- if(this.jfbAppType === 'wxmp') {
311
- const jumpTo = this.getCardPath(this.jfbCardPath, redirect_url, business_code)
312
- $vm['$xdUniHelper'].redirectTo({
313
- url: `/pages/jumptomp/jumptomp?callback=${Base64.encodeURI(jumpTo)}`
314
- })
315
- return;
316
- }
317
- else if(this.jfbAppType === 'h5') {
318
- CardPath = this.jfbCardPath;
210
+ else {
211
+ redirect_url = `@site_domain@/${store.state.brandInfo.deploy_dir}/`;
319
212
  }
320
213
  }
214
+ //#endif
321
215
 
322
- //无配置卡券登录页面
323
- if (!CardPath) {
324
- $vm.$xdAlert({content: "请设置卡登陆页面地址"})
325
- throw new Error('请设置卡登陆页面地址');
216
+ //判断是否有登陆地址
217
+ let LoginPath = redirect_url;
218
+ if (LoginPath.indexOf(this.LoginPath) === -1) {
219
+ LoginPath = this.LoginPath + `?redirect_url=${Base64.encodeURI(redirect_url)}`;
326
220
  }
327
221
 
328
- //登陆地址与当前项目不再同一个app中处理
329
- if (!this.checkEnv()) {
330
- if(!this.checkUrlIsNotCameDir(this.cardPath)) {
331
- redirect_url = `@site_domain@/${store.state.brandInfo.deploy_dir}${redirect_url}`
332
- }
222
+ if (!this.LoginPath) {
223
+ console.error(this.LoginPath);
224
+ $vm.$xdAlert({
225
+ content: "请设置用户登陆页面地址"
226
+ })
227
+ throw new Error('请设置用户登陆页面地址');
333
228
  }
334
229
 
335
- jumpPath = this.getCardPath(CardPath, redirect_url, business_code)
336
- //#endif
337
-
338
- //跳转到其他应用
339
- console.warn(`jumpToCardLogin.path=${jumpPath}`);
230
+ console.warn(`jumpToUserLogin.redirect.url: ${redirect_url} , login: ${LoginPath}`)
340
231
  $vm['$xdUniHelper'].redirectTo({
341
- url: jumpPath,
232
+ url: LoginPath,
342
233
  });
343
234
  }
344
235
 
@@ -384,7 +275,7 @@ class JfbAuthorize {
384
275
  }
385
276
  return false;
386
277
  }
387
- //当前登录卡券有业务线线
278
+ //
388
279
  else{
389
280
  let bizCodeArr = bizCode.split(',');
390
281
  let currentBizCode = store.state.xnamespace;
@@ -476,6 +367,7 @@ class JfbAuthorize {
476
367
  * @param cb {Function|null}
477
368
  */
478
369
  setAllToken(result, cb = null) {
370
+
479
371
  //#ifdef MP-WEIXIN
480
372
  if(result['csrf_token_expire_in']) result['csrf_token_expire_in'] = Number(result['csrf_token_expire_in']);
481
373
  if(result['access_token_expire_in']) result['access_token_expire_in'] = Number(result['access_token_expire_in']);
@@ -488,23 +380,14 @@ class JfbAuthorize {
488
380
  //#endif
489
381
  }
490
382
 
491
- /**
492
- * @description 客户端设置所有卡登录信息
493
- * @param result
494
- * @param cb {Function|null}
495
- */
496
383
  setCardToken(result,cb){
497
384
  //#ifdef MP-WEIXIN
498
- if(result['card_expire_in']) result['card_expire_in'] = Number(result['card_expire_in']);
499
- this.setToken('card',result['card_token'],{expires: result['card_expire_in'] / 60 / 60})
500
- this.setToken('bizCode',result['business_codes'],{expires: result['card_expire_in'] / 60 / 60})
501
- this.setToken('cardExpire',result['card_expire_time'],{expires: result['card_expire_in'] / 60 / 60})
502
385
  if (typeof cb === 'function') cb();
503
386
  //#endif
504
387
  }
505
388
 
506
389
  /**
507
- * @description 客户端删除用户所有token
390
+ * @description 客户端删除所有token
508
391
  * @param cb {Function|null}
509
392
  */
510
393
  removeAllToken(cb = null) {
@@ -513,22 +396,8 @@ class JfbAuthorize {
513
396
  this.removeToken('access');
514
397
  this.removeToken('refresh');
515
398
  this.removeToken('userAll');
516
- if (typeof cb === 'function') cb();
517
399
  //#endif
518
400
  }
519
- /**
520
- * @description 客户端删除用户所卡券信息
521
- * @param cb {Function|null}
522
- */
523
- removeAllCardToken(cb=null){
524
- //#ifdef MP-WEIXIN
525
- this.removeToken('card');
526
- this.removeToken('bizCode');
527
- this.removeToken('cardExpire');
528
- if (typeof cb === 'function') cb();
529
- //#endif
530
- }
531
-
532
401
  }
533
402
 
534
403
  /**
@@ -193,9 +193,8 @@ export default {
193
193
  },
194
194
  },
195
195
  watch: {
196
- container(value,oldValue) {
197
- if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
198
- if (this.$configProject['isPreview']) this.init(value)
196
+ container(value) {
197
+ this.init(value);
199
198
  },
200
199
  showAddress(val) {
201
200
  if (val === false) this.defaultValue = null;
@@ -328,7 +327,7 @@ export default {
328
327
  // cancel: false,
329
328
  // showClose: false,
330
329
  // confirmText: "我知道了",
331
- // styles: this.styles,
330
+ // $vm: this
332
331
  // });
333
332
  // return
334
333
  // }
@@ -459,7 +458,7 @@ export default {
459
458
  cancel: false,
460
459
  showClose: false,
461
460
  confirmText: "我知道了",
462
- styles: this.styles,
461
+ $vm: this
463
462
  });
464
463
  return;
465
464
  }
@@ -470,7 +469,7 @@ export default {
470
469
  data: {
471
470
  address_nnid: item.address_nnid,
472
471
  is_select: "Y",
473
- version: this.version
472
+ version: this.version
474
473
  },
475
474
  })
476
475
  .then((res) => {
@@ -526,7 +525,7 @@ export default {
526
525
  handleDel(item) {
527
526
  console.log("handleDel", item);
528
527
  this.$xdConfirm({
529
- styles: this.styles,
528
+ $vm: this,
530
529
  content: "确定删除当前配送地址吗?",
531
530
  width: "80%",
532
531
  success: (res) => {
@@ -178,9 +178,8 @@ export default {
178
178
  };
179
179
  },
180
180
  watch: {
181
- container(value,oldValue) {
182
- if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
183
- if (this.$configProject['isPreview']) this.init(value)
181
+ container(value) {
182
+ this.init(value);
184
183
  },
185
184
  },
186
185
  computed: {
@@ -275,9 +274,8 @@ export default {
275
274
  // #ifndef H5
276
275
  uni.setClipboardData({
277
276
  data: text,
278
- showToast: false,
279
277
  success: () => {
280
- //this.$xdAlert({ content: "复制成功" });
278
+ this.$xdAlert({ content: "复制成功" });
281
279
  },
282
280
  });
283
281
  // #endif
@@ -162,9 +162,8 @@ export default {
162
162
  };
163
163
  },
164
164
  watch: {
165
- container(value,oldValue) {
166
- if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
167
- if (this.$configProject['isPreview']) this.init(value)
165
+ container(value) {
166
+ this.init(value);
168
167
  },
169
168
  },
170
169
  computed: {
@@ -55,9 +55,8 @@
55
55
  }
56
56
  },
57
57
  watch: {
58
- container(value,oldValue) {
59
- if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
60
- if (this.$configProject['isPreview']) this.init(value)
58
+ container(value) {
59
+ this.init(value)
61
60
  }
62
61
  },
63
62
  created() {
@@ -67,7 +66,7 @@
67
66
  this.init(this.container);
68
67
  },
69
68
  methods: {
70
-
69
+
71
70
  /**
72
71
  * @description 监听事件变化
73
72
  * @param container {object} 业务组件对象自己
@@ -81,7 +80,7 @@
81
80
  this.shadow = (e.scrollTop > this.height ? this.height : e.scrollTop)/100;
82
81
  this.opacity = opacity < this.minOpacity ? this.minOpacity : opacity;
83
82
  },
84
-
83
+
85
84
  onJfbBack() {
86
85
  this.$xdUniHelper.navigateBack();
87
86
  }
@@ -103,7 +102,7 @@
103
102
  height: unit(90, rpx);
104
103
  padding: 0 unit(10, rpx);
105
104
  position: relative;
106
-
105
+
107
106
  &-icon {
108
107
  width: 1em;
109
108
  height: 1em;
@@ -113,13 +112,12 @@
113
112
  display: flex;
114
113
  justify-content: center;
115
114
  align-content: center;
116
- align-items: center;
117
115
  flex-shrink: 0;
118
116
  position: relative;
119
117
  z-index: 2;
120
118
  background: #fff;
121
119
  }
122
-
120
+
123
121
  &-text {
124
122
  font-size: unit(54, rpx);
125
123
  padding-right: 1em;
@@ -127,7 +125,7 @@
127
125
  position: relative;
128
126
  z-index: 2;
129
127
  color: #666;
130
-
128
+
131
129
  & > view {
132
130
  width: 100%;
133
131
  text-align: center;
@@ -135,7 +133,7 @@
135
133
  font-size: unit(32, rpx);
136
134
  }
137
135
  }
138
-
136
+
139
137
  &-bg {
140
138
  background: #fff;
141
139
  position: absolute;
@@ -41,9 +41,8 @@ export default {
41
41
  };
42
42
  },
43
43
  watch: {
44
- container(value,oldValue) {
45
- if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
46
- if (this.$configProject['isPreview']) this.init(value)
44
+ container(value) {
45
+ this.init(value);
47
46
  },
48
47
  },
49
48
  destroyed() {
@@ -43,9 +43,8 @@
43
43
  }
44
44
  },
45
45
  watch: {
46
- container(value,oldValue) {
47
- if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
48
- if (this.$configProject['isPreview']) this.init(value)
46
+ container(value) {
47
+ this.init(value)
49
48
  }
50
49
  },
51
50
  created() {
@@ -75,7 +75,6 @@
75
75
  :style="{ background: noticeBackgroundColor }"
76
76
  >
77
77
  <xd-notice-bar
78
- style="width: 100%"
79
78
  :showIcon="true"
80
79
  :scrollable="true"
81
80
  :speed="20"
@@ -255,7 +254,7 @@ export default {
255
254
  if(this.login_text_color) style['color'] = this.login_text_color;
256
255
  if(this.login_text_bg_color) style['backgroundColor'] = this.login_text_bg_color;
257
256
  if(this.login_text_radius) style['borderRadius'] = this.login_text_radius + 'rpx'
258
- return this.styleObjectToString(style);
257
+ return style;
259
258
  },
260
259
  lookStyle(){
261
260
  let style = { backgroundColor: this.cardLayout === '2'? '' : this.mainColor};
@@ -263,7 +262,7 @@ export default {
263
262
  if(this.look_text_color) style['color'] = this.look_text_color;
264
263
  if(this.look_text_bg_color) style['backgroundColor'] = this.look_text_bg_color;
265
264
  if(this.look_text_radius) style['borderRadius'] = this.look_text_radius + 'rpx';
266
- return this.styleObjectToString(style);
265
+ return style;
267
266
  }
268
267
  },
269
268
  watch: {
@@ -282,10 +281,9 @@ export default {
282
281
  })
283
282
 
284
283
  },
285
- container(value,oldValue) {
286
- if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
287
- if (this.$configProject['isPreview']) this.init(value)
288
- },
284
+ container(value) {
285
+ this.init(value)
286
+ }
289
287
  },
290
288
  data() {
291
289
  return {
@@ -410,9 +408,7 @@ export default {
410
408
  })
411
409
  .then((res) => {
412
410
  if (res.list.length > 0) {
413
- if(res.list && res.list.length > 0) {
414
- this.notice = this.$xdUniHelper.filterHtml(res.list[0].content);
415
- }
411
+ this.notice = res.list[0].content;
416
412
  this.noticeStatus = true;
417
413
  }
418
414
  })