jufubao-base 1.0.30-beta2 → 1.0.30-beta4

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.
@@ -8,11 +8,11 @@
8
8
  */
9
9
  const getPackagePath = (threePackagePath, packname = 'gxd-commands-bussiness')=>{
10
10
  if(packname === 'gxd-commands-bussiness') {
11
- return `/Users/shiyonggao/home/root/Base-Jufubao/xd-commands-bussiness/${threePackagePath}`;
11
+ return `/Users/shiyonggao/Desktop/code/BASE/UNIAPP/xd-commands-bussiness/${threePackagePath}`;
12
12
  }
13
13
 
14
14
  if (packname === 'gxd-uni-library-editx') {
15
- return `/Users/shiyonggao/home/root/Base-Jufubao/xd-uni-library-editx/${threePackagePath}`;
15
+ return `/Users/shiyonggao/Desktop/code/BASE/UNIAPP/xd-uni-library-editx/${threePackagePath}`;
16
16
  }
17
17
 
18
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.30-beta2",
3
+ "version": "1.0.30-beta4",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -308,6 +308,18 @@ export default {
308
308
  if (this.isCheck(address)) {
309
309
  return;
310
310
  }
311
+ if(!address.latitude||!address.longitude) {
312
+ this.$xdConfirm({
313
+ content: "因版本升级,为了确保您能正常收货,请重新选取所在地区!",
314
+ zIndex: 3200,
315
+ isClose: false,
316
+ cancel: false,
317
+ showClose: false,
318
+ confirmText: "我知道了",
319
+ $vm: this
320
+ });
321
+ return
322
+ }
311
323
  let params = this.getParams(address);
312
324
  console.log(params, "321321321");
313
325
  params["tag"] = 0;
@@ -319,6 +319,10 @@ export default {
319
319
  },
320
320
 
321
321
  watch: {
322
+ receipt_phone(n,o) {
323
+ this.receipt_phone = n.replace(/[-_\s]/g, "");
324
+ console.log(n,'plplplplp');
325
+ },
322
326
  defaultValue() {
323
327
  this.setValue();
324
328
  },
@@ -40,33 +40,33 @@
40
40
  </view>
41
41
  </view>
42
42
  <view class="jfb-base-card-detail__body-residue">
43
- <view class="jfb-base-card-detail__body-residue-wrap">
44
- <view class="jfb-base-card-detail__body-residue-label">
45
- <view :style="{ color: '#242424', fontSize: '28rpx' }"
46
- >剩余元宝</view
47
- >
48
- </view>
49
- <view class="jfb-base-card-detail__body-residue-value">
50
- <xd-unit
51
- iconSize="0.32"
52
- :fontSize="28"
53
- :price="info.card_point"
54
- :is-old="true"
55
- ></xd-unit>
56
- </view>
57
- <view
58
- v-if="info.other_card_point && info.card_point_type !== 1"
59
- class="jfb-base-card-detail__body-residue-reach"
60
- >购买其他物品可抵:{{ info.other_card_point }}</view
61
- >
62
- </view>
63
- <view
64
- class="jfb-base-card-detail__body-residue-business"
65
- v-if="info.card_point_type !== 1"
43
+ <view class="jfb-base-card-detail__body-residue-wrap">
44
+ <view class="jfb-base-card-detail__body-residue-label">
45
+ <view :style="{ color: '#242424', fontSize: '28rpx' }"
46
+ >剩余元宝</view
66
47
  >
67
- 所属业务线:{{ info.main_business_code_name }}
68
- </view>
69
48
  </view>
49
+ <view class="jfb-base-card-detail__body-residue-value">
50
+ <xd-unit
51
+ iconSize="0.32"
52
+ :fontSize="28"
53
+ :price="info.card_point"
54
+ :is-old="true"
55
+ ></xd-unit>
56
+ </view>
57
+ <view
58
+ v-if="info.other_card_point && info.card_point_type !== 1"
59
+ class="jfb-base-card-detail__body-residue-reach"
60
+ >购买其他物品可抵:{{ info.other_card_point }}</view
61
+ >
62
+ </view>
63
+ <view
64
+ class="jfb-base-card-detail__body-residue-business"
65
+ v-if="info.card_point_type !== 1"
66
+ >
67
+ 所属业务线:{{ info.main_business_code_name }}
68
+ </view>
69
+ </view>
70
70
  <view class="jfb-base-card-detail__body-qrcode">
71
71
  <view>
72
72
  <view>
@@ -168,6 +168,7 @@ export default {
168
168
  textList: [],
169
169
  password: "",
170
170
  card_number: "",
171
+ stopTimer: false, //停止轮询
171
172
 
172
173
  userInfo: null, //用户信息
173
174
  brandInfo: null, //brand
@@ -258,6 +259,14 @@ export default {
258
259
  }
259
260
  }
260
261
  },
262
+ onJfbUnload() {
263
+ if (this.timeer) {
264
+ clearTimeout(this.timeer);
265
+ }
266
+ if (this.refrushTimeer) {
267
+ clearTimeout(this.refrushTimeer);
268
+ }
269
+ },
261
270
  onJfbBack(options) {
262
271
  if (this.timeer) {
263
272
  clearTimeout(this.timeer);
@@ -268,24 +277,21 @@ export default {
268
277
  this.$xdUniHelper.navigateBack();
269
278
  },
270
279
  setInval(time) {
271
- if (time === 0) {
272
- this.timeStr = "00分00秒";
273
- } else {
274
- this.timeer = setInterval(() => {
275
- if (time === 0) {
276
- this.timeStr = "";
277
- clearInterval(this.timeer);
278
- this.detail();
279
- } else {
280
- time--;
281
- let f = Math.floor(time / 60);
282
- f = f < 10 ? "0" + f : f;
283
- let m = time % 60;
284
- m = m < 10 ? "0" + m : m;
285
- this.timeStr = `${f}分${m}秒`;
286
- }
287
- }, 1000);
288
- }
280
+ console.log("pppppp", time);
281
+ this.timeer = setInterval(() => {
282
+ if (time === 0) {
283
+ this.timeStr = "00分00秒";
284
+ clearInterval(this.timeer);
285
+ if (!this.stopTimer) this.detail();
286
+ } else {
287
+ time--;
288
+ let f = Math.floor(time / 60);
289
+ f = f < 10 ? "0" + f : f;
290
+ let m = time % 60;
291
+ m = m < 10 ? "0" + m : m;
292
+ this.timeStr = `${f}分${m}秒`;
293
+ }
294
+ }, 1000);
289
295
  },
290
296
  handleUnBindCard() {
291
297
  this.$xdConfirm({
@@ -298,6 +304,9 @@ export default {
298
304
  vm: this,
299
305
  success: (res) => {
300
306
  if (res.confirm) {
307
+ clearTimeout(this.timeer);
308
+ clearTimeout(this.refrushTimeer);
309
+ this.stopTimer = true;
301
310
  jfbRootExec("deleteCardUnbind", {
302
311
  vm: this,
303
312
  data: {
@@ -308,28 +317,27 @@ export default {
308
317
  this.$xdAlert({
309
318
  content: "解绑成功",
310
319
  close: () => {
311
- clearTimeout(this.timeer);
312
- clearTimeout(this.refrushTimeer);
313
- this.$xdUniHelper.navigateTo({
314
- url: this.backUrl,
320
+ this.$xdUniHelper.redirectTo({
321
+ url: this.backUrl || this.settings.index,
315
322
  });
316
323
  },
317
324
  });
318
325
  })
319
326
  .catch((err) => {
320
327
  console.log(err, "err");
328
+ this.stopTimer = false;
321
329
  });
322
330
  }
323
331
  },
324
332
  });
325
333
  },
326
334
  refrush() {
335
+ if (this.stopTimer) return;
327
336
  if (this.time >= this.maxTime) {
328
337
  clearTimeout(this.refrushTimeer);
329
338
  console.log("refrushTimeer.end");
330
339
  return;
331
340
  }
332
-
333
341
  this.time++;
334
342
  let time =
335
343
  this.time >= 5 ? 32 * 1000 : Math.pow(this.date, this.time) * 1000;
@@ -344,17 +352,23 @@ export default {
344
352
  //res[4]['value'] = this.$xdUniHelper.random(20,30);
345
353
  let refrushInfo = this.$xdUniHelper.cloneDeep(this.info);
346
354
  if (res && res !== null && Object.keys(res).length > 0) {
347
- if(res.card_point) {
348
- refrushInfo.card_point = this.$xdUniHelper.divisionFloatNumber(res.card_point, 100);
355
+ if (res.card_point) {
356
+ refrushInfo.card_point = this.$xdUniHelper.divisionFloatNumber(
357
+ res.card_point,
358
+ 100
359
+ );
349
360
  }
350
361
  if (res.other_card_point) {
351
- refrushInfo.other_card_point = this.$xdUniHelper.divisionFloatNumber(res.other_card_point, 100);
362
+ refrushInfo.other_card_point =
363
+ this.$xdUniHelper.divisionFloatNumber(
364
+ res.other_card_point,
365
+ 100
366
+ );
352
367
  }
353
368
  }
354
-
369
+
355
370
  this.info = refrushInfo;
356
371
  this.refrush();
357
-
358
372
  this.show = false;
359
373
  })
360
374
  .catch();
@@ -366,9 +380,8 @@ export default {
366
380
  this.backUrl = getContainerPropsValue(
367
381
  this.container,
368
382
  "content.back_url",
369
- { value: "system/card/card" }
383
+ { value: "" }
370
384
  ).value;
371
- console.log(this.backUrl, "this.backUrl");
372
385
  },
373
386
  /**
374
387
  * @description 获取卡详情
@@ -381,14 +394,21 @@ export default {
381
394
  },
382
395
  })
383
396
  .then((res) => {
384
- if(res && res.card_point) {
385
- res['card_point'] = this.$xdUniHelper.divisionFloatNumber(res.card_point, 100);
397
+ if (res && res.card_point) {
398
+ res["card_point"] = this.$xdUniHelper.divisionFloatNumber(
399
+ res.card_point,
400
+ 100
401
+ );
386
402
  }
387
403
  if (res && res.card_point) {
388
- res['other_card_point'] = this.$xdUniHelper.divisionFloatNumber(res.other_card_point, 100);
404
+ res["other_card_point"] = this.$xdUniHelper.divisionFloatNumber(
405
+ res.other_card_point,
406
+ 100
407
+ );
389
408
  }
390
409
  this.info = res;
391
- this.setInval(Number(this.info["card_qrcode_expire"]));
410
+ console.log(this.info.card_qrcode_expire, "lllll");
411
+ this.setInval(this.info.card_qrcode_expire);
392
412
  this.show = false;
393
413
 
394
414
  //显示按钮
@@ -498,9 +518,9 @@ export default {
498
518
  &-business {
499
519
  padding-top: unit(20, rpx);
500
520
  border-radius: unit(10, rpx);
501
- color: #BA9968;
521
+ color: #ba9968;
502
522
  font-size: unit(20, rpx);
503
- line-height: unit(30,rpx);
523
+ line-height: unit(30, rpx);
504
524
  }
505
525
 
506
526
  &-label {
@@ -1072,8 +1072,8 @@ export default {
1072
1072
  });
1073
1073
  return;
1074
1074
  }
1075
- this.$xdUniHelper.navigateTo({
1076
- url: `${this.payPath}?order_id=${this.info.pay_info.pay_order_id}`,
1075
+ this.$xdUniHelper.redirectTo({
1076
+ url: `${this.payPath}?order_id=${this.info.pay_info.pay_order_id}&main_order_id=${this.main_order_id}`,
1077
1077
  });
1078
1078
  },
1079
1079
  handleAction(item) {
@@ -377,7 +377,7 @@ export default {
377
377
  });
378
378
  return;
379
379
  }
380
- this.$xdUniHelper.navigateTo({
380
+ this.$xdUniHelper.redirectTo({
381
381
  url: `${this.payPath}?order_id=${item.pay_order_id}&main_order_id=${item.main_order_id}`,
382
382
  });
383
383
  }