jufubao-base 1.0.61-beta1011 → 1.0.61-beta1013

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.61-beta1011",
3
+ "version": "1.0.61-beta1013",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -531,7 +531,7 @@ export default {
531
531
  .catch(() => this.$xdHideLoading());
532
532
  },
533
533
 
534
- onShow(options) {
534
+ onJfbShow(options) {
535
535
  this.onJfbLoad(options);
536
536
  },
537
537
 
@@ -66,7 +66,7 @@
66
66
  >
67
67
  进入业务板块
68
68
  </view>
69
- <view style="display:flex;align-content:center;justify-content:center">
69
+ <view style="display:flex;align-content:center;justify-content:flex-start">
70
70
  <view class="jfb-base-card-detail-entry__body-business-content">
71
71
  <view
72
72
  class="jfb-base-card-detail-entry__body-business-content-item"
@@ -21,62 +21,64 @@
21
21
  v-if="cardList && cardList.length > 0"
22
22
  class="jfb-base-card-entry__body-card"
23
23
  >
24
- <view
25
- v-for="(item,index) in cardList"
26
- class="card-list"
27
- :data-card="item.card_number"
28
- :data-index="index"
29
- :data-top="item.top"
30
- :key="item.card_number"
31
- v-if="setCardItemShow(item,index)"
32
- :style="{
33
- background: item['theme']['color'],
34
- backgroundSize: '100%'
35
- }"
36
- >
37
- <view class="card-list-warp" :style="{backgroundImage: 'url('+ item['theme']['image'] +')'}">
38
- <view class="card-list__title">
39
- <view>{{item['card_type_name']}}</view>
40
- </view>
41
- <div class="card-list__content">
42
- <view>
43
- <text>券号:</text>
44
- <text>{{item.card_number}}</text>
24
+ <template v-for="(item,index) in cardList">
25
+ <view
26
+ class="card-list"
27
+ :data-card="item.card_number"
28
+ :data-index="index"
29
+ :data-top="item.top"
30
+ :key="item.card_number"
31
+ v-if="setCardItemShow(item,index)"
32
+ :style="{
33
+ background: item['theme']['color'],
34
+ backgroundSize: '100%'
35
+ }"
36
+ >
37
+ <view class="card-list-warp" :style="{backgroundImage: 'url('+ item['theme']['image'] +')'}">
38
+ <view class="card-list__title">
39
+ <view>{{item['card_type_name']}}</view>
45
40
  </view>
46
- </div>
47
- <view class="card-list__date">
48
- <text>有效期:</text>
49
- <text>--</text>
50
- </view>
51
- <view class="card-list__yue">
52
- <text>余额:</text>
53
- <text>--</text>
54
- </view>
55
- <view class="card-list__other" v-if="item.other_card_point && item.card_point_type === 2 ">
56
- <view>
57
- <text>购买其他物品可抵:</text>
41
+ <div class="card-list__content">
42
+ <view>
43
+ <text>券号:</text>
44
+ <text>{{item.card_number}}</text>
45
+ </view>
46
+ </div>
47
+ <view class="card-list__date">
48
+ <text>有效期:</text>
58
49
  <text>--</text>
59
50
  </view>
60
- </view>
61
- <template>
62
- <view class="card-list__entry" v-if="item.entries.length > 0">
63
- <view
64
- @click.stop="handleUnBindCard(item)"
65
- :style="{color: item['theme']['color']}"
66
- >解绑</view>
51
+ <view class="card-list__yue">
52
+ <text>余额:</text>
53
+ <text>--</text>
54
+ </view>
55
+ <view class="card-list__other" v-if="item.other_card_point && item.card_point_type === 2 ">
56
+ <view>
57
+ <text>购买其他物品可抵:</text>
58
+ <text>--</text>
59
+ </view>
67
60
  </view>
68
- <view class="card-list__nodata" v-else>暂无支持服务列表</view>
69
- </template>
61
+ <template>
62
+ <view class="card-list__entry" v-if="item.entries.length > 0">
63
+ <view
64
+ @click.stop="handleUnBindCard(item)"
65
+ :style="{color: item['theme']['color']}"
66
+ >解绑</view>
67
+ </view>
68
+ <view class="card-list__nodata" v-else>暂无支持服务列表</view>
69
+ </template>
70
+ </view>
70
71
  </view>
71
- </view>
72
- <view
73
- class="card-content-empty card-list"
74
- v-else
75
- :style="{
72
+ <view
73
+ class="card-content-empty card-list"
74
+ v-else
75
+ :data-card="item.card_number"
76
+ :style="{
76
77
  height: item.height + 'px',
77
78
  backgroundImage: 'url('+ cardItem +')'
78
79
  }"
79
- ></view>
80
+ ></view>
81
+ </template>
80
82
  </view>
81
83
  <view v-if="cardList !== null && cardList.length === 0">
82
84
  <view class="jfb-base-card-disabled-entry__body-empty">
@@ -295,6 +297,7 @@ export default {
295
297
  onJfbBack(options) {
296
298
  console.log("event.onJfbBack", options);
297
299
  },
300
+
298
301
  },
299
302
  };
300
303
  </script>
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
- import {mapState} from "vuex";
2
+ import {mapState,mapMutations} from "vuex";
3
3
 
4
4
  export default {
5
5
  data() {
@@ -28,7 +28,15 @@ export default {
28
28
  ...mapState(['srollPreview'])
29
29
  },
30
30
 
31
+ created() {
32
+ this.setSrollPreview({
33
+ pageWindowPrevStart: 0,
34
+ pageWindowPrevEnd: uni.getSystemInfoSync().safeArea.height,
35
+ });
36
+ },
37
+
31
38
  methods:{
39
+ ...mapMutations(['setSrollPreview']),
32
40
  setCardItemShow({height , top},index){
33
41
  //预览模式只获取10条
34
42
  if(this.$configProject.isPreview) {
@@ -86,7 +94,10 @@ export default {
86
94
  return item
87
95
  });
88
96
  this.cardOrgList = this.$xdUniHelper.cloneDeep(validCardList);
89
- this.cardComputedList = this.cardOrgList.slice(this.cardPageNum,this.cardPageLen);
97
+ this.cardComputedList = this.cardOrgList.slice(
98
+ this.cardPageNum*this.cardPageLen,
99
+ this.cardPageNum*this.cardPageLen + this.cardPageLen
100
+ );
90
101
  this.handleCardComputed(paddingBottom).then().catch();
91
102
  },
92
103
 
@@ -95,7 +106,6 @@ export default {
95
106
  this.cardLoading = true;
96
107
  this.$xdShowLoading({});
97
108
  this.cardPageNum++;
98
- console.log('onJfbReachBottom',this.cardPageNum)
99
109
  this.$nextTick(()=>{
100
110
  setTimeout(()=>{
101
111
  this.cardLoading = false;
@@ -112,6 +122,14 @@ export default {
112
122
  })
113
123
 
114
124
  },
125
+
126
+ onJfbScroll({e}){
127
+ this.setSrollPreview({
128
+ pageWindowPrevStart: e.scrollTop,
129
+ pageWindowPrevEnd:e.scrollTop + uni.getSystemInfoSync().safeArea.height
130
+ })
131
+ },
132
+
115
133
  }
116
134
  }
117
135
 
@@ -663,7 +663,7 @@ export default {
663
663
  })
664
664
  .then((res) => {
665
665
  this.showDisabled = res.is_show_invalid_card_entrance;
666
- res.list.map((item) => {
666
+ res.list = res.list.map((item) => {
667
667
  return {
668
668
  ...item,
669
669
  card_point: this.$xdUniHelper.divisionFloatNumber(
@@ -683,15 +683,12 @@ export default {
683
683
  this.hasChangeStatus = this.getCardGroupItem(this.ajaxCardList.list.filter((item) => {
684
684
  return item["is_exchange"] === "Y";
685
685
  }), res['site_entry_settings']).length > 0;
686
+
686
687
  this.$xdHideLoading();
687
688
  })
688
689
  .catch(() => this.$xdHideLoading());
689
690
  },
690
691
 
691
- onShow(options) {
692
- this.onJfbLoad(options);
693
- },
694
-
695
692
  onJfbUpdate(data) {
696
693
  this.getContent();
697
694
  },
@@ -93,7 +93,7 @@
93
93
  style="
94
94
  display: flex;
95
95
  align-content: center;
96
- justify-content: center;
96
+ justify-content: flex-start;
97
97
  "
98
98
  >
99
99
  <view class="jfb-base-card-info-entry__body-business-content">
@@ -289,7 +289,7 @@ export default {
289
289
  }
290
290
  });
291
291
  if(res && res.site_entry_settings && res.site_entry_settings.length>0) {
292
- res.site_entry_settings = res.site_entry_settings.filter(item=>{
292
+ temp.site_entry_settings = res.site_entry_settings.filter(item=>{
293
293
  item['image_url'] = getServiceUrl(item['image_url'])
294
294
  return res.business_codes.includes(item.business_code)
295
295
  })
@@ -326,7 +326,7 @@ export default {
326
326
  }
327
327
  });
328
328
  if(res && res.site_entry_settings && res.site_entry_settings.length>0) {
329
- res.site_entry_settings = res.site_entry_settings.filter(item=>{
329
+ temp.site_entry_settings = res.site_entry_settings.filter(item=>{
330
330
  item['image_url'] = getServiceUrl(item['image_url'])
331
331
  return res.business_codes.includes(item.business_code)
332
332
  })
@@ -85,12 +85,12 @@
85
85
  let { inCallback } = options;
86
86
  if (inCallback) inCallback = Base64.decode(inCallback);
87
87
  this.inCallback = inCallback || this.settings.index;
88
-
88
+
89
89
  let params = {is_all: 'Y'};
90
90
  if (options['jfb_business_code']) {
91
91
  params['card_business_code'] = options['jfb_business_code'];
92
92
  }
93
-
93
+
94
94
  jfbRootExec("getListCardBind", {
95
95
  vm: this,
96
96
  data: params,
@@ -179,26 +179,9 @@
179
179
  );
180
180
  }
181
181
  },
182
- onJfbScroll(options) {
183
- console.log('event.onJfbScroll', options)
184
- },
185
- onJfbReachBottom(options) {
186
- console.log('event.onJfbReachBottom', options)
187
- },
182
+
188
183
  onJfbShow(options) {
189
- console.log('event.onJfbShow', options)
190
- },
191
- onJfbHide(options) {
192
- console.log('event.onJfbHide', options)
193
- },
194
- onJfbBack(options) {
195
- console.log('event.onJfbBack', options)
196
- },
197
- onJfbUpdate(...data) {
198
- console.log('event.onJfbUpdate', data)
199
- },
200
- onJfbCustomEvent(options) {
201
- console.log('event.onJfbReachBottom', options)
184
+ this.onJfbLoad(options);
202
185
  },
203
186
  }
204
187
  }