gxd-uni-library-editx 1.0.82 → 1.0.83-beta2

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": "gxd-uni-library-editx",
3
- "version": "1.0.82",
3
+ "version": "1.0.83-beta2",
4
4
  "private": false,
5
5
  "description": "聚福宝基础插件专用库",
6
6
  "main": "index.js",
@@ -146,6 +146,7 @@
146
146
  <view
147
147
  class="scan_icon"
148
148
  @click="doScanCode"
149
+
149
150
  >
150
151
  <xd-font-icon icon="iconsaoma"></xd-font-icon>
151
152
  </view>
@@ -216,9 +217,10 @@ import XdForm from "@/components/XdForm/XdForm"
216
217
  import XdFormItem from "@/components/XdFormItem/XdFormItem"
217
218
  import XdFormInput from "@/components/XdFormInput/XdFormInput"
218
219
  import {
219
- getParentsStyle, //获取页面风格单个键值值
220
- getParentsStyles //获取页面风格列表
221
- } from '@/utils/xd.base';
220
+ getParentsStyle, //获取页面风格单个键值值
221
+ getParentsStyles, //获取页面风格列表
222
+ isQrCode
223
+ } from '@/utils/xd.base';
222
224
 
223
225
  export default {
224
226
  name: "XdCardPay",
@@ -322,7 +324,8 @@ export default {
322
324
  renderChecked: "renderChecked",
323
325
 
324
326
  total_price: "",
325
- style: {}
327
+ style: {},
328
+ isQrCode: false,
326
329
  }
327
330
  },
328
331
  computed: {
@@ -352,7 +355,7 @@ export default {
352
355
  },
353
356
  },
354
357
  async created(){
355
-
358
+ this.isQrCode = isQrCode(this);
356
359
  this.switchValidToken();
357
360
  this.style = await getParentsStyles(this.$parent);
358
361
  console.log(this.style,'this.style');
@@ -425,7 +428,7 @@ export default {
425
428
  });
426
429
  })
427
430
  },
428
-
431
+
429
432
  //选择卡券
430
433
  handlerTicketSelect(flat, ticket, options){
431
434
  if(flat){ //选择卡券,重新调用接口获取 selectedCardList, neePayPrice
@@ -493,7 +496,7 @@ export default {
493
496
  }
494
497
 
495
498
  },
496
-
499
+
497
500
  filterMGinfo(list){
498
501
  //深拷贝
499
502
  if(this.$xdUniHelper.checkVarType(list) === 'object'
@@ -508,7 +511,7 @@ export default {
508
511
  if (list.card_password) list.card_password = list.card_password.substr(0, 2) + '********' + list.card_password.substr(-3);
509
512
  return list;
510
513
  }
511
-
514
+
512
515
  //array
513
516
  return list.map(item => {
514
517
  if(item.card_use_certificate) item.card_use_certificate = item.card_use_certificate.substr(0, 2) + '********' + item.card_use_certificate.substr(-3);
@@ -517,7 +520,7 @@ export default {
517
520
  return item
518
521
  });
519
522
  },
520
-
523
+
521
524
  //添加新卡券
522
525
  addNewCard(options={}){
523
526
  const { cardForm, total_price, submitCardList } = this;
@@ -556,10 +559,10 @@ export default {
556
559
  res: resOptions
557
560
  },'add_card');
558
561
  this.$xdHideLoading();
559
-
562
+
560
563
  //成功回调
561
564
  let {selected_card_list=[], need_pay_price, is_need_pop} = res;
562
-
565
+
563
566
  if(is_need_pop){
564
567
  this.useCardPop(res).then((select_content) => {
565
568
  if(select_content) this.addNewCard({select_content});
@@ -574,7 +577,7 @@ export default {
574
577
  let filterCard = selected_card_list.filter(item => !r_cards.includes(item.card_number));
575
578
  //重合的卡券列表
576
579
  let repeatCardList = selected_card_list.filter(item => r_cards.includes(item.card_number));
577
-
580
+
578
581
  if(repeatCardList.length > 0){
579
582
  for(let i = 0; i < repeatCardList.length; i++){
580
583
  let repeatCard = repeatCardList[i];
@@ -616,7 +619,7 @@ export default {
616
619
  this.switchValidToken();
617
620
  })
618
621
  },
619
-
622
+
620
623
  handleConfirmAllWxPay(){
621
624
  if(!this.payThird){
622
625
  this.$xdAlert({content: "请选择兑换方式"});
@@ -824,7 +827,7 @@ export default {
824
827
  box-sizing: border-box;
825
828
  margin: 30rpx auto;
826
829
  font-size: 28rpx;
827
-
830
+
828
831
  .icon{
829
832
  width: 64rpx;
830
833
  height: 64rpx;
@@ -137,6 +137,7 @@
137
137
  v-model="cardForm.card_number"
138
138
  />
139
139
  <view
140
+ v-if="isQrCode"
140
141
  class="scan_icon"
141
142
  @click="doScanCode"
142
143
  >
@@ -207,9 +208,10 @@ import XdForm from "@/components/XdForm/XdForm"
207
208
  import XdFormItem from "@/components/XdFormItem/XdFormItem"
208
209
  import XdFormInput from "@/components/XdFormInput/XdFormInput"
209
210
  import {
210
- getParentsStyle, //获取页面风格单个键值值
211
- getParentsStyles //获取页面风格列表
212
- } from '@/utils/xd.base';
211
+ getParentsStyle, //获取页面风格单个键值值
212
+ getParentsStyles, //获取页面风格列表
213
+ isQrCode
214
+ } from '@/utils/xd.base';
213
215
 
214
216
  export default {
215
217
  name: "XdCardPayChose",
@@ -318,7 +320,8 @@ export default {
318
320
  renderChecked: "renderChecked",
319
321
 
320
322
  total_price: "",
321
- style: {}
323
+ style: {},
324
+ isQrCode: false,
322
325
  }
323
326
  },
324
327
  computed: {
@@ -349,6 +352,7 @@ export default {
349
352
 
350
353
  },
351
354
  async created(){
355
+ this.isQrCode = isQrCode(this);
352
356
  this.switchValidToken();
353
357
  this.style = await getParentsStyles(this.$parent);
354
358
  console.log(this.style,'this.style');
@@ -729,6 +729,44 @@ export function parsePackName(appName, flag = true) {
729
729
  else return arr;
730
730
  }
731
731
 
732
+ /**
733
+ * 判断是否为第三方登录方式
734
+ * @return {{isThird: boolean, isICB: boolean}}
735
+ */
736
+ export function isThirdLogin(){
737
+ const ua = navigator.userAgent
738
+ return {
739
+ isThird: /^.+(fullversion|elife).+$/i.test(ua),
740
+ isICB:/^.+(fullversion|elife).+$/i.test(ua)
741
+ }
742
+ }
743
+
744
+ /**
745
+ * @description 是否支持扫一扫功能
746
+ * @param $vm {VUE}
747
+ * @param isOpen {Boolean} 默认值:true
748
+ */
749
+ export function isQrCode($vm,isOpen=true){
750
+ //关闭显示扫一扫功能
751
+ if(isOpen === false) return false;
752
+
753
+ //预览模式显示扫一扫功能
754
+ if($vm.$configProject.isPreview === true) return true;
755
+
756
+ //是否为工商银行
757
+ if(isThirdLogin().isICB) return true;
758
+
759
+ //微信环境|企业微信环境|微信开发者工具
760
+ if(isWechat() || isWechatWork()||isWechatTools()) return true;
761
+
762
+ //微信小程序
763
+ if (settings.platform === 'mp-weixin') {
764
+ return
765
+ }
766
+
767
+ return false
768
+ }
769
+
732
770
 
733
771
 
734
772
 
@@ -104,7 +104,9 @@ window['__bl'] = window['__bl'] || {};
104
104
  function aliInit(){
105
105
  let isAddressDebug = window.location.href.indexOf('closeLog=1') !==-1;
106
106
  let xTestClose= window.location.href.indexOf('x-test=jfb-close-ali') !==-1;
107
- if(settings['aliDisabled'] === true || settings.isDebug || isAddressDebug || xTestClose) {
107
+ let debugHostArray = ['sandbox-website-01.jufubao.cn']
108
+ let siteDebug = debugHostArray.includes(window.location.host);
109
+ if(settings['aliDisabled'] === true || settings.isDebug || isAddressDebug || xTestClose || siteDebug) {
108
110
  window['__addBehaviorArray'] = [];
109
111
  window['__addBehaviorArrayTimer'] = null;
110
112
 
@@ -136,7 +138,6 @@ function aliInit(){
136
138
  }
137
139
  return
138
140
  }
139
-
140
141
  window['__bl'] = BrowserLogger['singleton'](config);
141
142
  }
142
143