jufubao-base 1.0.116-beta13 → 1.0.116-beta15

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.116-beta13",
3
+ "version": "1.0.116-beta15",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -125,7 +125,9 @@
125
125
  is_entity_card_invalid: flag ? "Y" : "N"
126
126
  }
127
127
  }).then(res => {
128
-
128
+ this.cardChecked = flag;
129
+ }).catch(err => {
130
+ this.cardChecked = !flag;
129
131
  })
130
132
  },
131
133
  p_getUserInfo(){
@@ -284,13 +284,16 @@
284
284
  class="jfb-base-order-detail__body-card jfb-base-order-detail__body-cashier"
285
285
  >
286
286
  <view class="jfb-base-order-detail__body-cashier-text">{{info.codes[0].show_type === "qrcode" ? "二维码" : "条形码" }}</view>
287
- <image
288
- :style="{
289
- height: info.codes[0].show_type === 'qrcode' ? '50vw' : '25vw',
290
- width: info.codes[0].show_type === 'qrcode' ? '50vw' : '85vw',
291
- }"
292
- :src="info.codes[0].code_url"
293
- ></image>
287
+ <view style="position: relative">
288
+ <image
289
+ :style="{
290
+ height: info.codes[0].show_type === 'qrcode' ? '50vw' : '25vw',
291
+ width: info.codes[0].show_type === 'qrcode' ? '50vw' : '85vw',
292
+ }"
293
+ :src="info.codes[0].code_url"
294
+ ></image>
295
+ <image v-if="info.codes[0].logo&&info.codes[0].show_type === 'qrcode'" class="logo-icon" :src="info.codes[0].logo"></image>
296
+ </view>
294
297
  <view class="jfb-base-order-detail__body-cashier-text">
295
298
  {{ info.codes[0].can_read_code }}
296
299
  </view>
@@ -751,7 +754,17 @@
751
754
  height: showType === 'qrcode' ? '70vw' : '35vw',
752
755
  }"
753
756
  >
754
- <image mode="aspectFit" :src="codeSrc"></image>
757
+ <view style="position: relative">
758
+ <image :src="codeSrc" mode="aspectFit"></image>
759
+ <image v-if="logo&&showType === 'qrcode'" :src="logo" style="
760
+ width: 100rpx;
761
+ height: 100rpx;
762
+ position: absolute;
763
+ top: 50%;
764
+ left: 50%;
765
+ transform: translate(-50rpx, -50rpx);">
766
+ </image>
767
+ </view>
755
768
  </view>
756
769
  </xd-dailog>
757
770
  </view>
@@ -828,6 +841,7 @@ export default {
828
841
  bottom: 0,
829
842
  },
830
843
  is_hot: "Y",
844
+ logo: ""
831
845
  };
832
846
  },
833
847
  watch: {
@@ -980,6 +994,9 @@ export default {
980
994
  res.codes =
981
995
  res.codes &&
982
996
  res.codes.map((item) => {
997
+ if(item.logo) {
998
+ item.logo = getServiceUrl(item.logo)
999
+ }
983
1000
  if (item.show_type === "qrcode" || item.show_type === "barcode") {
984
1001
  let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
985
1002
  item.code_url = reg.test(item.code_url)? item.code_url:`${this.brandInfo['api_host']}${item.code_url}`
@@ -1125,6 +1142,7 @@ export default {
1125
1142
  handleShowCode(item) {
1126
1143
  this.codeSrc = item.code_url;
1127
1144
  this.showType = item.show_type;
1145
+ this.logo = item.logo;
1128
1146
  console.log(this.codeSrc, "this.codeSrc");
1129
1147
  this.showCode = true;
1130
1148
  },
@@ -1257,6 +1275,13 @@ export default {
1257
1275
  .jfb-base-order-detail {
1258
1276
  &__body {
1259
1277
  color: #333;
1278
+ .logo-icon {
1279
+ width: unit(100, rpx) !important;
1280
+ height: unit(100, rpx) !important;
1281
+ position: absolute;
1282
+ top: 50%;
1283
+ transform: translate(-50rpx, -50rpx);
1284
+ }
1260
1285
  &-show {
1261
1286
  display: flex;
1262
1287
  justify-content: center;
@@ -88,13 +88,16 @@
88
88
  >
89
89
  <view class="jfb-base-success__body-cashier-text"
90
90
  >{{info.codes[0].show_type === "qrcode" ? "二维码" : "条形码" }}</view>
91
- <image
92
- :style="{
93
- height: info.codes[0].show_type === 'qrcode' ? '50vw' : '25vw',
94
- width: info.codes[0].show_type === 'qrcode' ? '50vw' : '85vw',
95
- }"
96
- :src="info.codes[0].code_url"
97
- ></image>
91
+ <view style="position: relative">
92
+ <image
93
+ :style="{
94
+ height: info.codes[0].show_type === 'qrcode' ? '50vw' : '25vw',
95
+ width: info.codes[0].show_type === 'qrcode' ? '50vw' : '85vw',
96
+ }"
97
+ :src="info.codes[0].code_url"
98
+ ></image>
99
+ <image v-if="info.codes[0].logo&&info.codes[0].show_type === 'qrcode'" class="logo-icon" :src="info.codes[0].logo"></image>
100
+ </view>
98
101
  <view class="jfb-base-success__body-cashier-text">
99
102
  {{ info.codes[0].can_read_code }}
100
103
  </view>
@@ -309,7 +312,17 @@
309
312
  class="jfb-base-success__body-dialog"
310
313
  :style="{ height: showType === 'qrcode' ? '70vw' : '35vw' }"
311
314
  >
312
- <image :src="codeSrc" mode="aspectFit"></image>
315
+ <view style="position: relative">
316
+ <image :src="codeSrc" mode="aspectFit"></image>
317
+ <image v-if="logo&&showType === 'qrcode'" :src="logo" style="
318
+ width: 100rpx;
319
+ height: 100rpx;
320
+ position: absolute;
321
+ top: 50%;
322
+ left: 50%;
323
+ transform: translate(-50rpx, -50rpx);">
324
+ </image>
325
+ </view>
313
326
  </view>
314
327
  </xd-dailog>
315
328
  </view>
@@ -329,6 +342,7 @@ import XdSuccess from "@/components/XdSuccess/XdSuccess";
329
342
  import { getContainerPropsValue } from "@/utils/xd.base";
330
343
  import XdContentXss from "@/components/XdContentXss/XdContentXss";
331
344
  import StyleForm from "@/utils/StyleForm";
345
+ import getServiceUrl from "@/common/getServiceUrl";
332
346
  import { Base64 } from "js-base64";
333
347
  import { getNoUrl } from "@/utils/nourl";
334
348
  import { mapState } from "vuex";
@@ -386,6 +400,7 @@ export default {
386
400
 
387
401
  showCode: false,
388
402
  codeSrc: "",
403
+ logo: "",
389
404
  ...styleForm.getDataItem(),
390
405
  };
391
406
  },
@@ -417,6 +432,7 @@ export default {
417
432
  handleShowCode(item) {
418
433
  this.codeSrc = item.code_url;
419
434
  this.showType = item.show_type;
435
+ this.logo = item.logo;
420
436
  this.showCode = true;
421
437
  },
422
438
  /**
@@ -545,6 +561,9 @@ export default {
545
561
  info.codes =
546
562
  info.codes &&
547
563
  info.codes.map((item) => {
564
+ if(item.logo) {
565
+ item.logo = getServiceUrl(item.logo)
566
+ }
548
567
  if (item.show_type === "qrcode" || item.show_type === "barcode") {
549
568
  let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
550
569
  if (!reg.test(item.code_url)) item.code_url = `${this.brandInfo["api_host"]}${item.code_url}`;
@@ -672,6 +691,13 @@ export default {
672
691
 
673
692
  .jfb-base-success {
674
693
  &__body {
694
+ .logo-icon {
695
+ width: unit(100, rpx) !important;
696
+ height: unit(100, rpx) !important;
697
+ position: absolute;
698
+ top: 50%;
699
+ transform: translate(-50rpx, -50rpx);
700
+ }
675
701
  &-card {
676
702
  padding: unit(30, rpx);
677
703
  }