jufubao-base 1.0.63-beta1 → 1.0.63-beta201

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.63-beta1",
3
+ "version": "1.0.63-beta201",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -262,6 +262,8 @@ export default {
262
262
  },
263
263
  data() {
264
264
  return {
265
+ options: {},
266
+
265
267
  //提示文案
266
268
  noticeBackgroundColor: "",
267
269
  notice: "",
@@ -473,14 +475,15 @@ export default {
473
475
  },
474
476
 
475
477
  onJfbLoad(options) {
478
+ this.options = options;
476
479
  let { inCallback } = options;
477
- if (inCallback) {
478
- this.$storage.set("inCallback", inCallback, 0.05);
479
- inCallback = Base64.decode(inCallback);
480
- } else {
481
- inCallback = this.$storage.get("inCallback");
482
- if (inCallback) {
480
+ if(!inCallback) this.$storage.remove("inCallback"); //作为入口
481
+ else {
482
+ this.$storage.set("inCallback", inCallback);
483
+ try{
483
484
  inCallback = Base64.decode(inCallback);
485
+ }catch (e){
486
+ inCallback = null;
484
487
  }
485
488
  }
486
489
 
@@ -10,10 +10,11 @@ export default {
10
10
  cardOrgList:[], //原始数据
11
11
  cardList:null, //计算后的卡列表
12
12
  cardPageNum: 0, //当前页面
13
- cardPageLen: 5, //每页获取数据调试
13
+ cardPageLen: 10, //每页获取数据调试
14
14
  cardComputedList:[], //当前获取的数据列表
15
15
  cardLoading: false, //加载状态值设置
16
16
  cardNextTop: 0, //计算到每一个节点的距离顶部Top值
17
+ cardIndex: 0,
17
18
  contentStatus: false, //内容框是否已经进行过计算距离顶部Top值状态
18
19
  hasContent: true, //是否可以进行继续加载状态
19
20
 
@@ -76,10 +77,13 @@ export default {
76
77
  })[0];
77
78
  card['height'] = item.height;
78
79
  card['top'] = this.cardNextTop;
79
- this.cardNextTop = this.cardNextTop + card['height'] + (paddingBottom * this.$rpxNum)
80
+ card['index'] = this.cardIndex;
81
+ this.cardNextTop = this.cardNextTop + card['height'] + (paddingBottom * this.$rpxNum);
82
+ this.cardIndex++;
80
83
  return card
81
84
  });
82
85
  this.cardList = (this.cardList||[]).concat(arr);
86
+ this.cardPageNum++;
83
87
  this.$xdHideLoading();
84
88
  }).exec();
85
89
  })
@@ -98,6 +102,9 @@ export default {
98
102
  this.cardPageNum*this.cardPageLen,
99
103
  this.cardPageNum*this.cardPageLen + this.cardPageLen
100
104
  );
105
+ if(this.cardComputedList.length < this.cardPageLen) {
106
+ this.hasContent = false;
107
+ }
101
108
  this.handleCardComputed(paddingBottom).then().catch();
102
109
  },
103
110
 
@@ -105,7 +112,6 @@ export default {
105
112
  if(this.cardLoading || !this.hasContent || this.cardPageNum ===0) return;
106
113
  this.cardLoading = true;
107
114
  this.$xdShowLoading({});
108
- this.cardPageNum++;
109
115
  this.$nextTick(()=>{
110
116
  setTimeout(()=>{
111
117
  this.cardLoading = false;
@@ -118,6 +124,7 @@ export default {
118
124
  if(this.cardComputedList.length < this.cardPageLen) {
119
125
  this.hasContent = false;
120
126
  }
127
+ this.cardPageNum++;
121
128
  },500)
122
129
  })
123
130
 
@@ -386,11 +386,13 @@ export default {
386
386
  },
387
387
  tabIndex(){
388
388
  this.clearDefault();
389
- this.handleCardInit(this.ajaxCardList, this.tabIndex === 1);
389
+ this.onJfbLoad(this.options);
390
390
  }
391
391
  },
392
392
  data() {
393
393
  return {
394
+ options:{},
395
+
394
396
  //提示文案
395
397
  noticeBackgroundColor: "",
396
398
  notice: "",
@@ -414,6 +416,7 @@ export default {
414
416
  disabledUrl: "",
415
417
  //cardLayout: "1", //票券布局
416
418
  showDisabled: 'Y',
419
+ showCardList: false,
417
420
 
418
421
  //活动
419
422
  dialogEvent: false,
@@ -623,14 +626,15 @@ export default {
623
626
  },
624
627
 
625
628
  onJfbLoad(options) {
629
+ this.options = options;
626
630
  let { inCallback } = options;
627
- if (inCallback) {
628
- this.$storage.set("inCallback", inCallback, 0.05);
629
- inCallback = Base64.decode(inCallback);
630
- } else {
631
- inCallback = this.$storage.get("inCallback");
632
- if (inCallback) {
631
+ if(!inCallback) this.$storage.remove("inCallback"); //作为入口
632
+ else {
633
+ this.$storage.set("inCallback", inCallback);
634
+ try{
633
635
  inCallback = Base64.decode(inCallback);
636
+ }catch (e){
637
+ inCallback = null;
634
638
  }
635
639
  }
636
640
 
@@ -667,13 +671,12 @@ export default {
667
671
  };
668
672
  });
669
673
  this.ajaxCardList = res;
670
- this.handleCardInit(this.ajaxCardList, this.tabIndex === 1);
671
-
672
-
673
674
  this.hasChangeStatus = this.getCardGroupItem(this.ajaxCardList.list.filter((item) => {
674
675
  return item["is_exchange"] === "Y";
675
676
  }), res['site_entry_settings']).length > 0;
676
677
 
678
+
679
+ this.handleCardInit(this.ajaxCardList, this.tabIndex === 1);
677
680
  this.$xdHideLoading();
678
681
  })
679
682
  .catch(() => this.$xdHideLoading());
@@ -91,7 +91,7 @@
91
91
  import componentsMixins from "@/mixins/componentsMixins";
92
92
  import extsMixins from "@/mixins/extsMixins";
93
93
  import {Base64} from "js-base64";
94
-
94
+
95
95
  export default {
96
96
  name: "JfbBaseCardV2",
97
97
  components: {
@@ -137,14 +137,23 @@
137
137
  methods: {
138
138
  onJfbLoad(options) {
139
139
  let { inCallback } = options;
140
- if (inCallback) inCallback = Base64.decode(inCallback);
140
+ if(!inCallback) this.$storage.remove("inCallback"); //作为入口
141
+ else {
142
+ this.$storage.set("inCallback", inCallback);
143
+ try{
144
+ inCallback = Base64.decode(inCallback);
145
+ }catch (e){
146
+ inCallback = null;
147
+ }
148
+ }
141
149
  this.inCallback = inCallback || this.settings.index;
142
-
150
+
151
+
143
152
  let params = {is_all: 'Y'};
144
153
  if (options['jfb_business_code']) {
145
154
  params['card_business_code'] = options['jfb_business_code'];
146
155
  }
147
-
156
+
148
157
  jfbRootExec("getListCardBind", {
149
158
  vm: this,
150
159
  data: params,
@@ -211,11 +220,11 @@
211
220
  url: `${this.cardInfoPath}?card_number=${item["card_number"]}`,
212
221
  });
213
222
  },
214
-
223
+
215
224
  onJfbBack(options) {
216
225
  this.$xdUniHelper.navigateBack()
217
226
  },
218
-
227
+
219
228
  }
220
229
  }
221
230
 
@@ -231,13 +240,13 @@
231
240
  right: 0;
232
241
  left: 0;
233
242
  background: #FFFFFF;
234
-
235
-
243
+
244
+
236
245
  padding: 0 unit(24, rpx);
237
246
  box-sizing: border-box;
238
247
  box-shadow: 0px 0px 8rpx 0px rgba(179, 193, 196, 0.5);
239
248
  z-index: 111;
240
-
249
+
241
250
  &>view {
242
251
  width: 100%;
243
252
  display: flex;
@@ -44,6 +44,7 @@
44
44
  import { getContainerPropsValue } from "@/utils/xd.base";
45
45
  import componentsMixins from "@/mixins/componentsMixins";
46
46
  import extsMixins from "@/mixins/extsMixins";
47
+ import {Base64} from "js-base64";
47
48
  export default {
48
49
  name: "JfbBaseCardV3",
49
50
  components: {
@@ -83,7 +84,15 @@
83
84
  methods: {
84
85
  onJfbLoad(options) {
85
86
  let { inCallback } = options;
86
- if (inCallback) inCallback = Base64.decode(inCallback);
87
+ if(!inCallback) this.$storage.remove("inCallback"); //作为入口
88
+ else {
89
+ this.$storage.set("inCallback", inCallback);
90
+ try{
91
+ inCallback = Base64.decode(inCallback);
92
+ }catch (e){
93
+ inCallback = null;
94
+ }
95
+ }
87
96
  this.inCallback = inCallback || this.settings.index;
88
97
 
89
98
  let params = {is_all: 'Y'};
@@ -43,7 +43,7 @@
43
43
  class="get_code"
44
44
  @click="reGetCode"
45
45
  :style="{ color: mainColor }"
46
- >{{ time ? time + "秒后获取" : "获取验证码" }}</view
46
+ >{{ jfbTimeer ? jfbTimeer + "秒后获取" : "获取验证码" }}</view
47
47
  >
48
48
  </view>
49
49
  </xd-form-item>
@@ -79,7 +79,7 @@
79
79
  class="jump_collect"
80
80
  @click="jumpCollect"
81
81
  >跳过</view>
82
-
82
+
83
83
  <!-- <view
84
84
  class="not_login"
85
85
  :style="{color: mainColor}"
@@ -121,7 +121,7 @@ export default {
121
121
  phone_number: "",
122
122
  verification_code: "",
123
123
  },
124
- time: 0,
124
+ jfbTimeer: 0,
125
125
  interval: null,
126
126
  provider_id: "",
127
127
  callback_url: "",
@@ -160,7 +160,7 @@ export default {
160
160
  url: `/pages/content/content?${params}`
161
161
  })
162
162
  },
163
-
163
+
164
164
  onJfbLoad(options) {
165
165
  this.provider_id = options.provider_id;
166
166
  this.callback_url = options.callback_url;
@@ -174,7 +174,11 @@ export default {
174
174
  //this.height = getContainerPropsValue(container, 'content.height', 10);
175
175
  },
176
176
  reGetCode() {
177
- if (this.time > 0) return;
177
+ this.$xdLog.setProject('get.code.handle', {
178
+ time: this.time,
179
+ jfbTimeer: this.jfbTimeer
180
+ });
181
+ if (this.jfbTimeer > 0) return;
178
182
  const { phone_number } = this.accountForm;
179
183
  if (!/^1[3-9]\d{9}$/.test(phone_number)) {
180
184
  uni.showToast({
@@ -193,10 +197,10 @@ export default {
193
197
  },
194
198
  }).then((res) => {
195
199
  this.$xdHideLoading()
196
- this.time = 120;
200
+ this.jfbTimeer = 120;
197
201
  this.interval = setInterval(() => {
198
- this.time--;
199
- if (this.time == 0) {
202
+ this.jfbTimeer--;
203
+ if (this.jfbTimeer == 0) {
200
204
  clearTimeout(this.interval);
201
205
  }
202
206
  }, 1000);
@@ -216,7 +220,7 @@ export default {
216
220
  const { provider_id } = this;
217
221
  const { phone_number, verification_code } = this.accountForm;
218
222
  if (!phone_number || !verification_code) return uni.showToast({ title: "手机号跟验证码不能为空", icon: "none" });
219
-
223
+
220
224
  this.$xdShowLoading({})
221
225
  jfbRootExec("phoneCollect", {
222
226
  vm: this,
@@ -237,7 +241,7 @@ export default {
237
241
  this.$xdLog.catch(error)
238
242
  });
239
243
  },
240
-
244
+
241
245
  onJfbBack(options) {
242
246
  this.$xdUniHelper.navigateBack();
243
247
  },
@@ -48,7 +48,7 @@
48
48
  class="get_code"
49
49
  @click="reGetCode"
50
50
  :style="{color: mainColor}"
51
- >{{time ? time + '秒后获取':'获取验证码'}}</view>
51
+ >{{jfbTimeer ? jfbTimeer + '秒后获取':'获取验证码'}}</view>
52
52
  </view>
53
53
  </xd-form-item>
54
54
  </xd-form>
@@ -100,7 +100,7 @@
100
100
  import XdFormInput from "@/components/XdFormInput/XdFormInput";
101
101
  import XdButton from "@/components/XdButton/XdButton";
102
102
  import XdFormCheckbox from "@/components/XdFormCheckbox/XdFormCheckbox"
103
-
103
+
104
104
  export default {
105
105
  name: "JfbBasePhoneLogin",
106
106
  components: {
@@ -119,7 +119,7 @@
119
119
  phone_number: '',
120
120
  verification_code: '',
121
121
  },
122
- time: 0,
122
+ jfbTimeer: 0,
123
123
  interval: null,
124
124
  auth_code: "",
125
125
  provider_id: "",
@@ -157,7 +157,7 @@
157
157
  url: `/pages/content/content?${params}`
158
158
  })
159
159
  },
160
-
160
+
161
161
  onJfbLoad(options) {
162
162
  this.auth_code = options.auth_code;
163
163
  this.provider_id = options.provider_id;
@@ -172,7 +172,11 @@
172
172
  //this.height = getContainerPropsValue(value, 'content.height', 10);
173
173
  },
174
174
  reGetCode(){
175
- if(this.time > 0) return;
175
+ this.$xdLog.setProject('get.code.handle', {
176
+ time: this.time,
177
+ jfbTimeer: this.jfbTimeer
178
+ });
179
+ if(this.jfbTimeer > 0) return;
176
180
  const { phone_number } = this.accountForm;
177
181
  if(!/^1[3-9]\d{9}$/.test(phone_number)){
178
182
  uni.showToast({
@@ -191,10 +195,10 @@
191
195
  }
192
196
  }).then(res => {
193
197
  this.$xdHideLoading()
194
- this.time = 120;
198
+ this.jfbTimeer = 120;
195
199
  this.interval = setInterval(() => {
196
- this.time--;
197
- if(this.time == 0){
200
+ this.jfbTimeer--;
201
+ if(this.jfbTimeer == 0){
198
202
  clearTimeout(this.interval);
199
203
  }
200
204
  }, 1000)
@@ -275,11 +279,11 @@
275
279
  margin-left: unit(20,rpx) !important;
276
280
  }
277
281
  }
278
-
282
+
279
283
  .form-group {
280
284
  padding: 40rpx 70rpx;
281
285
  }
282
-
286
+
283
287
  .get_code {
284
288
  color: @xd-base-color;
285
289
  font-size: 24rpx;
@@ -291,32 +295,32 @@
291
295
  color: #A6A6A6;
292
296
  }
293
297
  }
294
-
298
+
295
299
  /deep/ .uni-easyinput__placeholder-class {
296
300
  font-size: 26rpx;
297
301
  color: #D4D4D4;
298
302
  }
299
-
303
+
300
304
  .phone-login-type {
301
305
  display: flex;
302
306
  color: #808080;
303
307
  font-size: 32rpx;
304
308
  padding: 20rpx 70rpx;
305
309
  align-items: center;
306
-
310
+
307
311
  ._item {
308
312
  margin: 0 30rpx;
309
313
  position: relative;
310
314
  line-height: 2;
311
-
315
+
312
316
  &:first-child {
313
317
  margin-left: 0;
314
318
  }
315
-
319
+
316
320
  &.active {
317
321
  color: #383838;
318
322
  font-size: 36rpx;
319
-
323
+
320
324
  text {
321
325
  position: absolute;
322
326
  height: 6rpx;
@@ -329,15 +333,15 @@
329
333
  }
330
334
  }
331
335
  }
332
-
336
+
333
337
  .forget_password {
334
338
  font-size: 24rpx;
335
339
  color: #A6A6A6;
336
340
  text-align: right;
337
341
  margin: 20rpx 70rpx 0 0;
338
-
342
+
339
343
  }
340
-
344
+
341
345
  .not_login {
342
346
  position: fixed;
343
347
  width: 100%;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ module.exports = [
4
+ {
5
+ mapFnName: 'getListVideoContent', //自定义方法名字(必选)
6
+ title: '获取内容',
7
+ path: '/cms/v1/ad-content',
8
+ isRule: false,
9
+ params: {
10
+ scene: ['使用场景', 'String', '选填'],
11
+ container_id: ['插件ID', 'String', '必填'],
12
+ page_id: ['页面ID', 'String', '必填'],
13
+ page_size: ['记录条数', 'Number', '必填'],
14
+ },
15
+ isConsole: true,
16
+ disabled: true,
17
+ },
18
+
19
+ ];