jufubao-base 1.0.56-beta5 → 1.0.56-beta6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.56-beta5",
3
+ "version": "1.0.56-beta6",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -143,7 +143,7 @@
143
143
  <text>券号:</text>
144
144
  <text>{{item.card_number}}</text>
145
145
  </view>
146
- <view @click.stop="toDetail(item)">
146
+ <view @click.stop="toDetail(item)" v-if="0">
147
147
  <view>
148
148
  <xd-font-icon icon="iconerweima" width="56" height="56" size="50" color="#fff"></xd-font-icon>
149
149
  </view>
@@ -161,16 +161,32 @@
161
161
  <view class="card-list__other" v-if="item.other_card_point && item.card_point_type !== 1">
162
162
  <view><text>购买其他物品可抵:</text><text>{{item.other_card_point}}</text></view>
163
163
  </view>
164
- <view class="card-list__entry" v-if="item.entry.length === 1">
164
+ <view class="card-list__entry" v-if="item.entries.length === 1">
165
165
  <view :style="{color: mainColor}">{{login_name}}</view>
166
166
  </view>
167
- <view class="card-list__nodata" v-if="item.entry.length === 0">暂无支持服务列表</view>
168
- <view class="card-list__entrys" v-if="item.entry.length > 1">
169
- <view>
170
- <view></view>
171
- <view></view>
167
+ <view class="card-list__nodata" v-if="item.entries.length === 0">暂无支持服务列表</view>
168
+ <view class="card-list__entrys" v-if="item.entries.length > 1">
169
+ <view class="card-list__entrys-title">
170
+ <view>可兑换权益</view>
171
+ <view>
172
+ <text>查看详情</text>
173
+ <xd-font-icon icon="iconxiangyou_xian" color="#999" size="20"></xd-font-icon>
174
+ </view>
175
+ </view>
176
+ <view class="card-list__entrys-list">
177
+ <scroll-view scroll-x class="card-list__entrys-scroll">
178
+ <view class="card-list__entrys-item">
179
+ <view v-for="(entry,idx) in item.entries" :key="idx">
180
+ <view><image :src="entry.image_url"></image></view>
181
+ <view>{{entry|cutstr}}</view>
182
+ <view>
183
+ <text>去兑换</text>
184
+ <xd-font-icon icon="iconxiangyou_xian" color="#999" size="20"></xd-font-icon>
185
+ </view>
186
+ </view>
187
+ </view>
188
+ </scroll-view>
172
189
  </view>
173
- <div></div>
174
190
  </view>
175
191
  </view>
176
192
 
@@ -212,6 +228,7 @@ import extsMixins from "@/mixins/extsMixins";
212
228
  import { mapState, mapActions } from "vuex";
213
229
  import { getContainerPropsValue, isWechat } from "@/utils/xd.base";
214
230
  import XdNoticeBar from "@/components/XdNoticeBar/XdNoticeBar";
231
+ import getServiceUrl from "@/common/getServiceUrl";
215
232
  import { Base64 } from "js-base64";
216
233
  const Color = require("color");
217
234
 
@@ -230,6 +247,12 @@ export default {
230
247
  jfbAuthorize: (state) => state.jfbAuthorize,
231
248
  }),
232
249
  },
250
+ filters:{
251
+ cutstr(val){
252
+ if(typeof val.entry_name === 'string') return val.entry_name.slice(0,4);
253
+ return ''
254
+ }
255
+ },
233
256
  watch: {
234
257
  tabIndex(newVal, oldVal) {
235
258
  if (newVal === 1) {
@@ -338,6 +361,7 @@ export default {
338
361
  let support = [];
339
362
  codes.map(bus=>{
340
363
  allEntry.map(it=>{
364
+ it['image_url'] = getServiceUrl(it['image_url'])
341
365
  if(bus === it['business_code']){
342
366
  support.push(it);
343
367
  }
@@ -350,7 +374,7 @@ export default {
350
374
  list.map(item=>{
351
375
  //设置卡片样式
352
376
  item['theme'] = this.getCardThemes(item['card_type_name']);
353
- item['entry'] = this.getEntry(item['business_codes'], allEntry)
377
+ item['entries'] = this.getEntry(item['business_codes'], allEntry)
354
378
  });
355
379
  return list
356
380
  },
@@ -689,7 +713,7 @@ export default {
689
713
 
690
714
 
691
715
  &__title {
692
- height: unit(46, rpx);
716
+ height: unit(56, rpx);
693
717
  display: flex;
694
718
  justify-content: flex-start;
695
719
  align-items: center;
@@ -697,7 +721,7 @@ export default {
697
721
  & > view {
698
722
  padding: 0 unit(80, rpx);
699
723
  font-size: unit(24, rpx);
700
- line-height: unit(46, rpx);
724
+ line-height: unit(56, rpx);
701
725
  background: rgba(102, 102, 102, 0.4);
702
726
  color: #fff;
703
727
  border-radius: 0 0 unit(16, rpx) 0;
@@ -706,7 +730,7 @@ export default {
706
730
  }
707
731
 
708
732
  &__content {
709
- padding: unit(20, rpx) unit(40, rpx) 0;
733
+ padding: unit(10, rpx) unit(40, rpx) 0;
710
734
  height: unit(86, rpx);
711
735
  display: flex;
712
736
  justify-content: space-between;
@@ -797,12 +821,101 @@ export default {
797
821
  }
798
822
  }
799
823
 
824
+ &__entrys {
825
+ margin: unit(20, rpx) unit(20, rpx) 0;
826
+ padding: unit(30, rpx);
827
+ border-radius: unit(16, rpx);
828
+ background: rgba(255, 255, 255, 1);
829
+ box-shadow: 0 unit(4, rpx) unit(8, rpx) rgba(156, 62, 0, 0.11);
830
+
831
+ &-title {
832
+ display: flex;
833
+ justify-content: space-between;
834
+ align-items: center;
835
+
836
+
837
+ & > view:first-child {
838
+ font-size: unit(28, rpx);
839
+ font-weight: 500;
840
+ flex: 1;
841
+ }
842
+
843
+ & > view:nth-child(2) {
844
+ display: flex;
845
+ justify-content: flex-start;
846
+ align-items: center;
847
+ flex-shrink: 0;
848
+ font-size: unit(20, rpx);
849
+ color: #999;
850
+ }
851
+ }
852
+
853
+ &-scroll {
854
+
855
+ }
856
+
857
+ &-item {
858
+ display: flex;
859
+ justify-content: flex-start;
860
+ align-items: center;
861
+ flex-flow: nowrap;
862
+ margin-left: unit(-16, rpx);
863
+ padding-top: unit(20, rpx);
864
+
865
+ & > view {
866
+ width: unit(120, rpx);
867
+ margin-right: unit(10, rpx);
868
+ flex-shrink: 0;
869
+ display: flex;
870
+ justify-content: center;
871
+ flex-direction: column;
872
+ align-items: center;
873
+
874
+ & > view:first-child {
875
+ width: unit(76, rpx);
876
+ height: unit(76, rpx);
877
+ overflow: hidden;
878
+
879
+ & > image {
880
+ height: 100%;
881
+ width: 100%;
882
+ }
883
+ }
884
+
885
+ & > view:nth-child(2) {
886
+ margin-top: unit(10, rpx);
887
+ font-size: unit(24, rpx);
888
+ line-height: unit(36, rpx);
889
+ margin-bottom: unit(10, rpx);
890
+ }
891
+
892
+ & > view:nth-child(3) {
893
+ display: flex;
894
+ justify-content: flex-start;
895
+ align-items: center;
896
+ flex-shrink: 0;
897
+ font-size: unit(20, rpx);
898
+ color: #999;
899
+ }
900
+
901
+ &:last-child {
902
+ margin-right: 0;
903
+ }
904
+
905
+ }
906
+
907
+
908
+ }
909
+ }
910
+
911
+
800
912
  & > view {
801
913
  width: unit(700, rpx);
802
914
  min-height: unit(410, rpx);
803
915
  position: relative;
804
916
  border-radius: unit(16, rpx);
805
917
  background-size: 100%;
918
+ padding-bottom: unit(10, rpx);
806
919
  }
807
920
  }
808
921
  </style>
@@ -285,6 +285,7 @@ export default {
285
285
  this.init(this.container);
286
286
  this.base = this.jfbAuthorize.getBasePath(this);
287
287
  this.site_logo = getServiceUrl(this.projectAttr["site_logo"]);
288
+ this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.create.done')
288
289
  },
289
290
 
290
291
  methods: {
@@ -295,30 +296,40 @@ export default {
295
296
  url: `/pages/content/content?${params}`
296
297
  })
297
298
  },
299
+
300
+
298
301
  onJfbLoad(options) {
299
302
  this.redirect_url = options.redirect_url ? Base64.decode(options.redirect_url): '';
300
303
  // #ifdef MP-WEIXIN
301
304
  this.authWxMpListProviders();
302
305
  // #endif
303
-
306
+
307
+ this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.onJfbLoad.start')
308
+
304
309
  // #ifdef H5
305
- this.authH5ListProviders();
310
+ try{
311
+ this.authH5ListProviders();
312
+ }catch (error) {
313
+ this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.onJfbLoad.error');
314
+ this.$xdLog.setARMSError(error);
315
+ }
316
+
306
317
  //#endif
307
318
 
308
- if (options.isDebug === "1") {
309
- getAllPath(this, "main/play/index");
310
- getDomainAllPath(this, "main/play/index");
311
- getLocalJumpOutSiteCallbackUrl(
312
- this,
313
- { customParams: 1 },
314
- false,
315
- "main/play/index"
316
- );
317
-
318
- getAllPath(this);
319
- getDomainAllPath(this);
320
- getLocalJumpOutSiteCallbackUrl(this, { customParams: 1 }, false);
321
- }
319
+ // if (options.isDebug === "1") {
320
+ // getAllPath(this, "main/play/index");
321
+ // getDomainAllPath(this, "main/play/index");
322
+ // getLocalJumpOutSiteCallbackUrl(
323
+ // this,
324
+ // { customParams: 1 },
325
+ // false,
326
+ // "main/play/index"
327
+ // );
328
+ //
329
+ // getAllPath(this);
330
+ // getDomainAllPath(this);
331
+ // getLocalJumpOutSiteCallbackUrl(this, { customParams: 1 }, false);
332
+ // }
322
333
  },
323
334
 
324
335
  /**
@@ -448,6 +459,7 @@ export default {
448
459
  * @description h5获取登陆方式
449
460
  */
450
461
  authH5ListProviders() {
462
+ this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.onJfbLoad.loading.')
451
463
  let providers = this.projectAttr["login_providers"] || [
452
464
  "62fde99f2583a19c58fd937b",
453
465
  "62fde9432583a19c58fd937a",
@@ -459,7 +471,7 @@ export default {
459
471
  if (/^(@site_domain@).+$/.test(redirect_url)) {
460
472
  redirect_url = redirect_url.replace(/@site_domain@/, location.origin)
461
473
  }
462
- console.warn(`authH5ListProviders.redirect.url: ${redirect_url}`);
474
+
463
475
  try {
464
476
  let redirectURL = new URL(redirect_url);
465
477
  redirect_url = redirectURL.href;
@@ -467,13 +479,17 @@ export default {
467
479
  redirect_url = location.origin + this.base + redirect_url;
468
480
  }
469
481
 
482
+
470
483
  let params = {
471
484
  providers: providers.join(","),
472
485
  callback_url: redirect_url,
473
486
  phone_number_login_url: location.origin + this.base + this.phone_number_login_url,
474
487
  phone_number_collect_url: location.origin + this.base + this.phone_number_collect_url,
475
488
  error_callback_url: location.origin + this.base + this.error_callback_url,
476
- }
489
+ };
490
+
491
+ this.$xdLog.setProject('JfbBaseLogin', 'JfbBaseLogin.onJfbLoad.loading..');
492
+
477
493
  jfbRootExec("listSiteProvider", {
478
494
  vm: this,
479
495
  data: params,
@@ -483,7 +499,7 @@ export default {
483
499
  })
484
500
  .catch((error) => {
485
501
  if (this.$xdUniHelper.checkVarType(error) === 'object') {
486
- this.$xdLog.setARMSCustomError('list_site_provider_error', {...params, fn:'listSiteProvider'})
502
+ this.$xdLog.setARMSCustomError('list_site_provider_error', {...params, fn:'listSiteProvider', error})
487
503
  } else {
488
504
  this.$xdLog.setARMSError(error)
489
505
  }