jufubao-mall 2.0.44-beta2 → 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-beta2",
3
+ "version": "2.0.44-beta3",
4
4
  "private": false,
5
5
  "description": "聚福宝商城业务组件插件包",
6
6
  "main": "index.js",
@@ -66,9 +66,9 @@
66
66
  </view>
67
67
  <view class="shop_addr">
68
68
  <view class="addr_foot">
69
- <view id="textRef">{{shopInfo.brand_about}}
69
+ <view id="textRef" class="textRef">{{shopInfo.brand_about}}
70
70
  </view>
71
- <view id="textRefHidden">{{shopInfo.brand_about}}
71
+ <view id="textRefHidden" class="textRefHidden">{{shopInfo.brand_about}}
72
72
  </view>
73
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>
74
74
  </view>
@@ -133,7 +133,7 @@
133
133
  </view>
134
134
  <!-- 二维码 -->
135
135
  <view class="qrcode_box" v-if="shopInfo&&shopInfo.show_qrcode&&!is_plus_site&&showTake==='Y'">
136
- <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>
137
137
  </view>
138
138
  <!-- 二维码 -->
139
139
  <view v-if="isShowCodeProduct && productList.length" class="code_product_wrap">
@@ -201,8 +201,6 @@
201
201
  <template>
202
202
  <view class="brand_detail_box">
203
203
  {{shopInfo.brand_about}}
204
- 福司令渠道门店品牌描述内容福司令渠道门店品牌描述内容
205
- 福司令渠道门店品牌描述品牌描述描述福司令渠道门店品牌描述品牌描述描述福司令渠道门店品牌描述品牌描述描述
206
204
  </view>
207
205
  </template>
208
206
  </xd-down-drawer>
@@ -227,6 +225,10 @@
227
225
  import { mapState } from 'vuex';
228
226
  import Color from 'color'
229
227
  export default {
228
+ // #ifdef MP-WEIXIN
229
+ options: { styleIsolation: 'shared' },
230
+ // #endif
231
+
230
232
  name: "JfbMallShop",
231
233
  components: {
232
234
  XdFontIcon,
@@ -318,6 +320,7 @@
318
320
  differ: "",
319
321
  isTextOverflow:false,
320
322
  showBrandDetailDialog:false,
323
+ brandLogo:'',
321
324
  }
322
325
  },
323
326
  watch: {
@@ -456,6 +459,16 @@
456
459
  },
457
460
  methods: {
458
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
+ }
459
472
  this.options = options;
460
473
  //设置业务请求代码
461
474
  this.setNameSpace(options);
@@ -474,6 +487,7 @@
474
487
  if(this.$configProject.isPreview) urlParams['brand_id'] = 'test1';
475
488
 
476
489
  this.uiBaiduAk = this.baiduAk || this.$settings.baiduAk;
490
+ console.log(this.xnamespace,'xnamespace')
477
491
  let params = {
478
492
  ...urlParams,
479
493
  city_code: this.stateCity.city_code,
@@ -503,8 +517,8 @@
503
517
  this.shopInfo = shopInfo;
504
518
  this.mapCenter = {lng: shopInfo.longitude, lat: shopInfo.latitude}
505
519
  this.initBaidu = true;
506
- this.checkTextOverflow();
507
520
  this.$nextTick(() => {
521
+ this.checkTextOverflow();
508
522
  if(this.isShowCodeProduct){
509
523
  this.p_getProductList();
510
524
  }
@@ -639,14 +653,14 @@
639
653
 
640
654
  // 获取元素位置信息
641
655
  query.select('#textRef').fields({
656
+ rect: true,
642
657
  size: true,
643
- scrollOffset: true
644
658
  }, (res) => {
645
659
  if (!res) return;
646
660
  const hiddenQuery = uni.createSelectorQuery().in(this)
647
661
  hiddenQuery.select('#textRefHidden').fields({
662
+ rect: true,
648
663
  size: true,
649
- scrollOffset: true
650
664
  }, (hiddenRes) => {
651
665
  if (!hiddenRes) return;
652
666
  console.log('元素尺寸:', res);
@@ -832,7 +846,7 @@
832
846
  margin-top: 20rpx;
833
847
  position: relative;
834
848
  }
835
- #textRef{
849
+ .textRef{
836
850
  display: -webkit-box;
837
851
  -webkit-box-orient: vertical;
838
852
  -webkit-line-clamp: 3;
@@ -840,7 +854,7 @@
840
854
  line-height: 40rpx;
841
855
  width: 100%;
842
856
  }
843
- #textRefHidden{
857
+ .textRefHidden{
844
858
  position: absolute;
845
859
  top: 0;
846
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>
@@ -44,7 +44,7 @@
44
44
  </view>
45
45
  <view class="qrcode_choose" @click="handleChooseCard">
46
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><xd-font-icon style="margin-left: 4rpx;" size="22" icon="iconxiangyou_xian"></xd-font-icon></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"
@@ -127,7 +127,15 @@
127
127
  width="670rpx"
128
128
  type="primary"
129
129
  radius="40rpx"
130
- :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"
131
139
  @click="handleChooseConfirm"
132
140
  >确定</xd-button>
133
141
  </view>
@@ -160,10 +168,6 @@
160
168
  XdButton,
161
169
  },
162
170
  props:{
163
- isBrandLogo: {
164
- type:Boolean,
165
- default: false
166
- },
167
171
  shop_id: {
168
172
  type: Number,
169
173
  default: null
@@ -172,6 +176,10 @@
172
176
  type: Object,
173
177
  default: () => {}
174
178
  },
179
+ brandLogo:{
180
+ type: String,
181
+ default: ''
182
+ },
175
183
  },
176
184
  computed:{
177
185
  activityType(){
@@ -190,6 +198,13 @@
190
198
  if(JSON.stringify(value) === JSON.stringify(oldValue)) return;
191
199
  if (this.$configProject['isPreview']) this.init(value)
192
200
  },
201
+ showCardDialog(val){
202
+ if(!val){
203
+ this.checkedCards=[];
204
+ this.chooseData=[];
205
+ this.card_name='请选择票券';
206
+ }
207
+ }
193
208
  },
194
209
  data(){
195
210
  return {
@@ -218,6 +233,13 @@
218
233
  activeIndex:0,
219
234
  card_number:'',
220
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
221
243
  }
222
244
  },
223
245
  created() {
@@ -225,6 +247,13 @@
225
247
  this.getCardList('');
226
248
  }
227
249
  },
250
+ mounted(){
251
+ console.log(this.brandLogo,'brandLogo')
252
+ if(this.brandLogo){
253
+ //品牌logo
254
+ this.brandLogoReal = this.brandLogo;
255
+ }
256
+ },
228
257
  beforeDestroy(){
229
258
  this.timeStr = ""
230
259
  if (this.timeer) {
@@ -317,6 +346,10 @@
317
346
  if (res && res.card_point) {
318
347
  res["other_card_point"] = this.$xdUniHelper.divisionFloatNumber(res.other_card_point, 100);
319
348
  }
349
+ //显示按钮
350
+ if (res["is_show_qrcode_logo"] === "Y") {
351
+ this.isBrandLogo = true;
352
+ }
320
353
  this.info = res;
321
354
  this.card_name = '已选卡号'+res.card_number;
322
355
  this.showCardDialog = false;
@@ -511,6 +544,11 @@
511
544
  display: flex;
512
545
  justify-content: flex-start;
513
546
  }
547
+ &_icon{
548
+ display: flex;
549
+ justify-content: center;
550
+ align-items: center;
551
+ }
514
552
  }
515
553
  .ticket_title{
516
554
  line-height: 100rpx;
@@ -595,6 +633,14 @@
595
633
  line-height: 72rpx;
596
634
  }
597
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
+ }
598
644
  }
599
645
  ::v-deep .xd-up-drawer{
600
646
  z-index: 9999!important;
@@ -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({
@@ -198,6 +201,7 @@
198
201
  * @param container {object} 业务组件对象自己
199
202
  */
200
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;