jufubao-mall 2.0.44-beta1 → 2.0.44-beta3

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-mall",
3
- "version": "2.0.44-beta1",
3
+ "version": "2.0.44-beta3",
4
4
  "private": false,
5
5
  "description": "聚福宝商城业务组件插件包",
6
6
  "main": "index.js",
@@ -66,17 +66,9 @@
66
66
  </view>
67
67
  <view class="shop_addr">
68
68
  <view class="addr_foot">
69
- <view id="textRef">{{shopInfo.brand_about}}福司令渠道门店品牌描述内容福司令渠道门店品牌描述内容
70
- 福司令渠道门店品牌描述内容福司令渠道门店品牌描述内容
71
- 福司令渠道门店品牌描述品牌描述描述福司令渠道门店品牌描述品牌描述描述福司令渠道门店品牌描述品牌描述描述
72
-
73
-
69
+ <view id="textRef" class="textRef">{{shopInfo.brand_about}}
74
70
  </view>
75
- <view id="textRefHidden">{{shopInfo.brand_about}}福司令渠道门店品牌描述内容福司令渠道门店品牌描述内容
76
- 福司令渠道门店品牌描述内容福司令渠道门店品牌描述内容
77
- 福司令渠道门店品牌描述品牌描述描述福司令渠道门店品牌描述品牌描述描述福司令渠道门店品牌描述品牌描述描述
78
-
79
-
71
+ <view id="textRefHidden" class="textRefHidden">{{shopInfo.brand_about}}
80
72
  </view>
81
73
  <view v-if="isTextOverflow" class="addr_more" @click="handleShowBrandDetail">品牌详情<xd-font-icon style="margin-left: 4rpx;" size="22" icon="iconxiangyou_xian"></xd-font-icon> </view>
82
74
  </view>
@@ -141,7 +133,7 @@
141
133
  </view>
142
134
  <!-- 二维码 -->
143
135
  <view class="qrcode_box" v-if="shopInfo&&shopInfo.show_qrcode&&!is_plus_site&&showTake==='Y'">
144
- <qrcode-show :show_qrcode="shopInfo.show_qrcode" :shop_id="shopInfo.shop_id" :layoutInfo="layoutInfo"></qrcode-show>
136
+ <qrcode-show :show_qrcode="shopInfo.show_qrcode" :shop_id="shopInfo.shop_id" :layoutInfo="layoutInfo" :xnamespace="xnamespace" :brandLogo="brandLogo"></qrcode-show>
145
137
  </view>
146
138
  <!-- 二维码 -->
147
139
  <view v-if="isShowCodeProduct && productList.length" class="code_product_wrap">
@@ -209,8 +201,6 @@
209
201
  <template>
210
202
  <view class="brand_detail_box">
211
203
  {{shopInfo.brand_about}}
212
- 福司令渠道门店品牌描述内容福司令渠道门店品牌描述内容
213
- 福司令渠道门店品牌描述品牌描述描述福司令渠道门店品牌描述品牌描述描述福司令渠道门店品牌描述品牌描述描述
214
204
  </view>
215
205
  </template>
216
206
  </xd-down-drawer>
@@ -235,6 +225,10 @@
235
225
  import { mapState } from 'vuex';
236
226
  import Color from 'color'
237
227
  export default {
228
+ // #ifdef MP-WEIXIN
229
+ options: { styleIsolation: 'shared' },
230
+ // #endif
231
+
238
232
  name: "JfbMallShop",
239
233
  components: {
240
234
  XdFontIcon,
@@ -326,6 +320,7 @@
326
320
  differ: "",
327
321
  isTextOverflow:false,
328
322
  showBrandDetailDialog:false,
323
+ brandLogo:'',
329
324
  }
330
325
  },
331
326
  watch: {
@@ -449,11 +444,11 @@
449
444
  },
450
445
  },
451
446
  created() {
452
- this.init(this.container);
453
447
  this.is_plus_site = this.projectAttr.headers['X-Site-Group']==="vip";
454
448
  this.alphaColor = Color(this.mainColor).alpha(0.1).toString();
455
449
  this.isPreview = this.$configProject.isPreview;
456
450
  console.log(this.isPreview, 'isPreview')
451
+ this.init(this.container);
457
452
  },
458
453
  mounted() {
459
454
  this.$nextTick(()=>{
@@ -464,6 +459,16 @@
464
459
  },
465
460
  methods: {
466
461
  onJfbLoad(options) {
462
+ if (options["x-params"]) {
463
+ try {
464
+ let params = JSON.parse(Base64.decode(options["x-params"]));
465
+ console.log(params, 'params')
466
+ this.brandLogo = params["qrcode_logo"];
467
+
468
+ } catch (e) {
469
+ console.warn(options["x-params"]);
470
+ }
471
+ }
467
472
  this.options = options;
468
473
  //设置业务请求代码
469
474
  this.setNameSpace(options);
@@ -482,6 +487,7 @@
482
487
  if(this.$configProject.isPreview) urlParams['brand_id'] = 'test1';
483
488
 
484
489
  this.uiBaiduAk = this.baiduAk || this.$settings.baiduAk;
490
+ console.log(this.xnamespace,'xnamespace')
485
491
  let params = {
486
492
  ...urlParams,
487
493
  city_code: this.stateCity.city_code,
@@ -511,8 +517,8 @@
511
517
  this.shopInfo = shopInfo;
512
518
  this.mapCenter = {lng: shopInfo.longitude, lat: shopInfo.latitude}
513
519
  this.initBaidu = true;
514
- this.checkTextOverflow();
515
520
  this.$nextTick(() => {
521
+ this.checkTextOverflow();
516
522
  if(this.isShowCodeProduct){
517
523
  this.p_getProductList();
518
524
  }
@@ -552,7 +558,7 @@
552
558
  }else{
553
559
  this.showTake = gCPVal(container, 'showTake', 'Y');
554
560
  }
555
- console.log("this.showTake", this.showTake)
561
+ console.log("this.showTake",this.takeBtnName,this.takeName, this.showTake)
556
562
  this.takeRemark = getContainerPropsValue(container, 'content.takeRemark', '');
557
563
  this.takePath = getContainerPropsValue(container, 'content.takePath', {value: ""}).value;
558
564
  this.showMovie = gCPVal(container, 'showMovie', ['Y',"N"], {isOld: true});
@@ -647,14 +653,14 @@
647
653
 
648
654
  // 获取元素位置信息
649
655
  query.select('#textRef').fields({
656
+ rect: true,
650
657
  size: true,
651
- scrollOffset: true
652
658
  }, (res) => {
653
659
  if (!res) return;
654
660
  const hiddenQuery = uni.createSelectorQuery().in(this)
655
661
  hiddenQuery.select('#textRefHidden').fields({
662
+ rect: true,
656
663
  size: true,
657
- scrollOffset: true
658
664
  }, (hiddenRes) => {
659
665
  if (!hiddenRes) return;
660
666
  console.log('元素尺寸:', res);
@@ -840,7 +846,7 @@
840
846
  margin-top: 20rpx;
841
847
  position: relative;
842
848
  }
843
- #textRef{
849
+ .textRef{
844
850
  display: -webkit-box;
845
851
  -webkit-box-orient: vertical;
846
852
  -webkit-line-clamp: 3;
@@ -848,7 +854,7 @@
848
854
  line-height: 40rpx;
849
855
  width: 100%;
850
856
  }
851
- #textRefHidden{
857
+ .textRefHidden{
852
858
  position: absolute;
853
859
  top: 0;
854
860
  left: 0;
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <view class="body-qrcode">
3
- <show-qp v-if="show_qrcode==='QP'" :shop_id="shop_id" :layoutInfo="layoutInfo"></show-qp>
4
- <show-card v-if="show_qrcode==='CARD'" :shop_id="shop_id" :layoutInfo="layoutInfo"></show-card>
3
+ <show-qp v-if="show_qrcode==='QP'" :shop_id="shop_id" :layoutInfo="layoutInfo" :xnamespace="xnamespace"></show-qp>
4
+ <show-card v-if="show_qrcode==='CARD'" :shop_id="shop_id" :layoutInfo="layoutInfo" :xnamespace="xnamespace" :brandLogo="brandLogo"></show-card>
5
5
  </view>
6
6
  </template>
7
7
 
@@ -21,6 +21,10 @@
21
21
  type:Boolean,
22
22
  default: false
23
23
  },
24
+ brandLogo: {
25
+ type: String,
26
+ default: ''
27
+ },
24
28
  show_qrcode: {
25
29
  type: String,
26
30
  default: ''
@@ -33,6 +37,10 @@
33
37
  type: Object,
34
38
  default: () => {}
35
39
  },
40
+ xnamespace:{
41
+ type: String,
42
+ default: ''
43
+ }
36
44
  },
37
45
  data(){
38
46
  return {
@@ -44,7 +52,7 @@
44
52
  }
45
53
  },
46
54
  created() {
47
- console.log(this.layoutInfo,'layoutInfo')
55
+ console.log(this.layoutInfo,this.brandLogo,'layoutInfo')
48
56
  },
49
57
  methods:{
50
58
 
@@ -12,7 +12,7 @@
12
12
  :style="{width: '280rpx', height: '280rpx'}"
13
13
  :src="info.card_qrcode"
14
14
  ></image>
15
- <!-- <image v-if="isBrandLogo" class="logo-icon" :src="brandLogo"></image> -->
15
+ <image v-if="isBrandLogo" class="logo-icon" :src="brandLogoReal"></image>
16
16
  </view>
17
17
  <view style="display:flex;align-items: center;justify-content: center;z-index: 111;position: relative;">
18
18
  <view v-if="timeStr">{{ timeStr }}后自动刷新</view>
@@ -43,8 +43,8 @@
43
43
  </xd-no-data>
44
44
  </view>
45
45
  <view class="qrcode_choose" @click="handleChooseCard">
46
- <view class="qrcode_choose_name"><xd-font-icon style="margin-right: 4rpx;" size="30" icon="iconpiao"></xd-font-icon>{{card_name}}</view>
47
- <view><xd-font-icon style="margin-left: 4rpx;" size="22" icon="iconxiangyou_xian"></xd-font-icon></view>
46
+ <view class="qrcode_choose_name"><xd-font-icon style="margin-right: 24rpx;" size="32" icon="iconpiao"></xd-font-icon>{{card_name}}</view>
47
+ <view class="qrcode_choose_icon"><xd-font-icon style="margin-left: 4rpx;" size="22" icon="iconxiangyou_xian"></xd-font-icon></view>
48
48
  </view>
49
49
  <xd-down-drawer
50
50
  :show.sync="showCardDialog"
@@ -57,7 +57,7 @@
57
57
  <view v-for="(item,index) in cardTypeData" :key="index" :style="[activeIndex===index?activityType:'']" @click="handleChangeType(index)">{{item.label}}</view>
58
58
  </view>
59
59
  <view class="ticket_content">
60
- <view class="ticket_list" :key="renderChecked">
60
+ <view class="ticket_list" :key="renderChecked" v-if="showCardList.length">
61
61
  <view
62
62
  class="ticket_item"
63
63
  v-for="ticket in showCardList"
@@ -113,12 +113,29 @@
113
113
  </view>
114
114
  </view>
115
115
  </view>
116
+ <view v-else>
117
+ <xd-no-data height="600rpx" :scaleSize=2>
118
+ <slot>
119
+ <view class="empty_txt">
120
+ 暂无可用票券
121
+ </view>
122
+ </slot>
123
+ </xd-no-data>
124
+ </view>
116
125
  <view class="bottom_btn" v-if="showCardDialog" :style="{bottom: layoutInfo.bottom+'rpx'}">
117
126
  <xd-button
118
127
  width="670rpx"
119
128
  type="primary"
120
129
  radius="40rpx"
121
- :disabled="!checkedCards.length"
130
+ v-if="checkedCards.length"
131
+ @click="handleChooseConfirm"
132
+ >确定</xd-button>
133
+ <xd-button
134
+ width="670rpx"
135
+ type="primary"
136
+ radius="40rpx"
137
+ v-else
138
+ :disabled="true"
122
139
  @click="handleChooseConfirm"
123
140
  >确定</xd-button>
124
141
  </view>
@@ -151,10 +168,6 @@
151
168
  XdButton,
152
169
  },
153
170
  props:{
154
- isBrandLogo: {
155
- type:Boolean,
156
- default: false
157
- },
158
171
  shop_id: {
159
172
  type: Number,
160
173
  default: null
@@ -163,6 +176,10 @@
163
176
  type: Object,
164
177
  default: () => {}
165
178
  },
179
+ brandLogo:{
180
+ type: String,
181
+ default: ''
182
+ },
166
183
  },
167
184
  computed:{
168
185
  activityType(){
@@ -181,6 +198,13 @@
181
198
  if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
182
199
  if (this.$configProject['isPreview']) this.init(value)
183
200
  },
201
+ showCardDialog(val){
202
+ if(!val){
203
+ this.checkedCards=[];
204
+ this.chooseData=[];
205
+ this.card_name='请选择票券';
206
+ }
207
+ }
184
208
  },
185
209
  data(){
186
210
  return {
@@ -209,6 +233,13 @@
209
233
  activeIndex:0,
210
234
  card_number:'',
211
235
  successPath:'',
236
+ isBrandLogo:false,
237
+ //#ifdef H5
238
+ brandLogoReal:'//img.jufubao.cn/common/jufubao_logo.png?v=1.0.0',
239
+ //#endif
240
+ //#ifdef MP-WEIXIN
241
+ brandLogoReal:'https://img.jufubao.cn/common/jufubao_logo.png?v=1.0.0',
242
+ //#endif
212
243
  }
213
244
  },
214
245
  created() {
@@ -216,6 +247,13 @@
216
247
  this.getCardList('');
217
248
  }
218
249
  },
250
+ mounted(){
251
+ console.log(this.brandLogo,'brandLogo')
252
+ if(this.brandLogo){
253
+ //品牌logo
254
+ this.brandLogoReal = this.brandLogo;
255
+ }
256
+ },
219
257
  beforeDestroy(){
220
258
  this.timeStr = ""
221
259
  if (this.timeer) {
@@ -235,16 +273,20 @@
235
273
  }
236
274
  }).then(res => {
237
275
  console.log(res,'res')
276
+ this.showCardList = res.list;
277
+ console.log(this.showCardList,'showCardList')
278
+ this.renderChecked = Date.now();
238
279
  if(!res.list.length){
239
280
  this.card_name = '无可用票券'
240
281
  return;
241
282
  }
242
- this.showCardList = res.list;
243
- this.renderChecked = Date.now();
283
+
244
284
  }).catch(err => {});
245
285
  },
246
286
  handleRefresh(){
247
-
287
+ clearInterval(this.timeer);
288
+ this.detail();
289
+ this.refrush();
248
290
  },
249
291
  handleChooseCard(){
250
292
  this.showCardDialog = true;
@@ -275,6 +317,13 @@
275
317
  this.activeIndex = index;
276
318
  },
277
319
  handleChooseConfirm(){
320
+ this.timeStr = ""
321
+ if (this.timeer) {
322
+ clearTimeout(this.timeer);
323
+ }
324
+ if (this.refrushTimeer) {
325
+ clearTimeout(this.refrushTimeer);
326
+ }
278
327
  this.card_number = this.chooseData[0].card_number;
279
328
  if(this.$configProject.isPreview) {
280
329
  this.timeStr = "01分19秒"
@@ -297,6 +346,10 @@
297
346
  if (res && res.card_point) {
298
347
  res["other_card_point"] = this.$xdUniHelper.divisionFloatNumber(res.other_card_point, 100);
299
348
  }
349
+ //显示按钮
350
+ if (res["is_show_qrcode_logo"] === "Y") {
351
+ this.isBrandLogo = true;
352
+ }
300
353
  this.info = res;
301
354
  this.card_name = '已选卡号'+res.card_number;
302
355
  this.showCardDialog = false;
@@ -487,9 +540,15 @@
487
540
  color: #666666;
488
541
  border-top: 1px solid #F8F8F8;
489
542
  &_name{
543
+ font-size: unit(28,rpx);
490
544
  display: flex;
491
545
  justify-content: flex-start;
492
546
  }
547
+ &_icon{
548
+ display: flex;
549
+ justify-content: center;
550
+ align-items: center;
551
+ }
493
552
  }
494
553
  .ticket_title{
495
554
  line-height: 100rpx;
@@ -574,5 +633,16 @@
574
633
  line-height: 72rpx;
575
634
  }
576
635
  }
636
+ .logo-icon {
637
+ width: unit(80, rpx) !important;
638
+ height: unit(80, rpx) !important;
639
+ position: absolute;
640
+ top: 50%;
641
+ left: 50%;
642
+ transform: translate(-50rpx, -50rpx);
643
+ }
644
+ }
645
+ ::v-deep .xd-up-drawer{
646
+ z-index: 9999!important;
577
647
  }
578
648
  </style>
@@ -89,7 +89,7 @@
89
89
  // import componentsMixins from "@/mixins/componentsMixins";
90
90
  import extsMixins from "@/mixins/extsMixins";
91
91
  import {isWechat,isWechatTools} from "@/utils/xd.base";
92
- import { getContainerPropsValue, gCPVal, toProductDetail } from "@/utils/xd.base";
92
+ import { getContainerPropsValue , toProductDetail, gCPVal} from "@/utils/xd.base";
93
93
  import { mapState } from "vuex";
94
94
  export default {
95
95
  name: "JfbCashierEasyPay",
@@ -121,7 +121,6 @@
121
121
  hasCreateOrder: false,
122
122
  payChannels: [],
123
123
  channel_provider_id: "",
124
- xnamespace: "",
125
124
 
126
125
  paySortList: [],
127
126
  tempList: [],
@@ -140,6 +139,10 @@
140
139
  type: Object,
141
140
  default: () => {}
142
141
  },
142
+ xnamespace:{
143
+ type: String,
144
+ default: ""
145
+ },
143
146
  },
144
147
  computed: {
145
148
  ...mapState({
@@ -197,7 +200,8 @@
197
200
  * @description 监听事件变化
198
201
  * @param container {object} 业务组件对象自己
199
202
  */
200
- init(container) {
203
+ async init(container) {
204
+ console.log(this.xnamespace,'xnamespace1111')
201
205
  this.successPath = getContainerPropsValue(container, 'content.successPath', {value: ""}).value;
202
206
  },
203
207
  handleRefreshCode(){
@@ -715,7 +719,7 @@
715
719
  bottom: 0;
716
720
  left: 0;
717
721
  right: 0;
718
- z-index: 3000;
722
+ z-index: 9999;
719
723
  .deduct_mask{
720
724
  position: absolute;
721
725
  top: 0;