jufubao-base 1.0.116-beta10 → 1.0.116-beta12

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-beta10",
3
+ "version": "1.0.116-beta12",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -16,7 +16,7 @@
16
16
  </view>
17
17
  <!-- #endif -->
18
18
  <view class="jfb-base-card-detail-entry__body" v-if="info!==null">
19
- <view class="card-list" :style="{
19
+ <!-- <view class="card-list" :style="{
20
20
  background: headerBg['color'],
21
21
  backgroundSize: '100%'
22
22
  }">
@@ -40,23 +40,44 @@
40
40
  <view><text>购买其他物品可抵:</text><text>{{info.other_card_point}} {{ info.unit }}</text></view>
41
41
  </view>
42
42
  </view>
43
- </view>
44
- <view class="jfb-base-card-detail-entry__body-qrcode">
45
- <view>
46
- <view>
47
- <image mode="aspectFit" :src="info.barcode"></image>
43
+ </view> -->
44
+ <view class="qrcode_card">
45
+ <view class="jfb-base-card-detail-entry__body-qrcode">
46
+ <view class="qrcode_card-title">
47
+ <xd-font-icon style="margin-right: 24rpx;" icon="iconsaoma-02" size="32"></xd-font-icon>
48
+ 向商家付款
49
+ </view>
50
+ <view class="barcode_wrap">
51
+ <view>
52
+ <image mode="aspectFit" :src="info.barcode"></image>
53
+ </view>
54
+ </view>
55
+ <view class="qrcode_wrap" style="position: relative">
56
+ <image
57
+ :style="{width: '300rpx', height: '300rpx'}"
58
+ :src="info.card_qrcode"
59
+ ></image>
60
+ <image v-if="isBrandLogo" class="logo-icon" :src="brandLogo"></image>
61
+ </view>
62
+ <!-- <view :style="{marginTop: '20rpx'}" v-if="timeStr">消费二维码,有效期为{{ info["card_qrcode_expire"] / 60 }}分钟</view> -->
63
+ <view v-if="timeStr">{{ timeStr }}后自动刷新</view>
64
+ <view class="refresh_wrap" @click="handleRefresh">
65
+ <xd-font-icon icon="iconshuaxin"
66
+ style="margin-right: 24rpx;"
67
+ size="28"></xd-font-icon> 刷新二维码
48
68
  </view>
49
69
  </view>
50
- <view style="position: relative">
51
- <image
52
- :style="{width: '300rpx', height: '300rpx'}"
53
- :src="info.card_qrcode"
54
- ></image>
55
- <image v-if="isBrandLogo" class="logo-icon" :src="brandLogo"></image>
70
+ <view class="card_info">
71
+ <view class="card_type">{{ info['card_type_name'] }}</view>
72
+ <view class="card_sec">券号:{{ info.card_number }}</view>
73
+ <view class="card_sec">有效期:{{ info.end_time }}</view>
74
+ <view class="card_sec">余额:{{ info.card_point }}{{ info.unit }}</view>
75
+ <view class="card_other" v-if="info.other_card_point && info.card_point_type === 2">
76
+ <text>购买其他物品可抵:</text><text>{{info.other_card_point}} {{ info.unit }}</text>
77
+ </view>
56
78
  </view>
57
- <view :style="{marginTop: '20rpx'}" v-if="timeStr">消费二维码,有效期为{{ info["card_qrcode_expire"] / 60 }}分钟</view>
58
- <view v-if="timeStr">距离刷新还有{{ timeStr }}</view>
59
79
  </view>
80
+
60
81
  <view
61
82
  v-if="info.site_entry_settings&&info.site_entry_settings.length>0"
62
83
  class="jfb-base-card-detail-entry__body-business"
@@ -287,6 +308,11 @@ export default {
287
308
  // this.$refs["pwPay"].clearPwd();
288
309
  });
289
310
  },
311
+ handleRefresh(){
312
+ clearInterval(this.timeer);
313
+ this.detail();
314
+ // this.refrush();
315
+ },
290
316
  refrush() {
291
317
  if (this.stopTimer) return;
292
318
  if (this.time >= this.maxTime) {
@@ -558,6 +584,37 @@ export default {
558
584
  .jfb-base-card-detail-entry {
559
585
  &__body {
560
586
  color: #333;
587
+
588
+ .qrcode_card{
589
+ background-color: #FF2121;
590
+ border-radius: 24rpx;
591
+ padding: 24rpx;
592
+ &-title{
593
+ display: flex;
594
+ font-size: 32rpx;
595
+ }
596
+ .card_info{
597
+ color: #FFFFFF;
598
+ font-size: 28rpx;
599
+ padding-left: 40rpx;
600
+ .card_type{
601
+ font-size: 40rpx;
602
+ font-weight: 600;
603
+ margin-top: 70rpx;
604
+ }
605
+ .card_sec{
606
+ margin: 12rpx 0;
607
+ }
608
+ .card_other{
609
+ background-color: rgba(255,255,255, 0.2);
610
+ border-radius: 8rpx;
611
+ padding: 8rpx 20rpx;
612
+ display: inline-block;
613
+ }
614
+ }
615
+ }
616
+
617
+
561
618
  .logo-icon {
562
619
  width: unit(100, rpx) !important;
563
620
  height: unit(100, rpx) !important;
@@ -784,9 +841,20 @@ export default {
784
841
  line-height: unit(36, rpx);
785
842
  background: #fff;
786
843
  border-radius: unit(16,rpx);
787
- margin-top: unit(24, rpx);
788
- padding: unit(20,rpx) unit(70,rpx) unit(70,rpx) unit(70,rpx);
844
+ padding: unit(20,rpx) unit(70,rpx) 0 unit(70,rpx);
789
845
  color: #000;
846
+ position: relative;
847
+ &::after{
848
+ content: " ";
849
+ position: absolute;
850
+ left: 0;
851
+ bottom: -40rpx;
852
+ width: 100%;
853
+ height: 100rpx;
854
+ background: #FFFFFF;
855
+ border-radius: 100%;
856
+ z-index: 1;
857
+ }
790
858
 
791
859
  & > view {
792
860
  // margin-bottom: unit(20, rpx);
@@ -795,8 +863,21 @@ export default {
795
863
  margin-bottom: 0;
796
864
  }
797
865
  }
866
+ .refresh_wrap{
867
+ width: 300rpx;
868
+ height: 80rpx;
869
+ display: flex;
870
+ align-items: center;
871
+ border: 1px solid #999999;
872
+ color: #999999;
873
+ border-radius: 40rpx;
874
+ justify-content: center;
875
+ margin: 36rpx auto 0;
876
+ position: relative;
877
+ z-index: 10;
878
+ }
798
879
 
799
- & > view:nth-child(1) {
880
+ .barcode_wrap {
800
881
  display: flex;
801
882
  justify-content: center;
802
883
  align-items: center;
@@ -819,7 +900,7 @@ export default {
819
900
  }
820
901
  }
821
902
 
822
- & > view:nth-child(2) {
903
+ .qrcode_wrap {
823
904
  display: flex;
824
905
  justify-content: center;
825
906
  align-items: center;
@@ -45,6 +45,7 @@
45
45
  content-align="left"
46
46
  labelPosition="left"
47
47
  labelAlign="left"
48
+ v-if="0"
48
49
  >
49
50
  <view class="flex align-center">
50
51
  <xd-form-input
@@ -207,13 +208,13 @@ export default {
207
208
  this.$set(this.mergeForm, "valid_token", valid_token);
208
209
  },
209
210
  handleToSubmit() {
210
- if (!this.mergeForm.valid_code) {
211
- uni.showToast({
212
- title: "验证码不能为空!",
213
- icon: "none",
214
- });
215
- return;
216
- }
211
+ // if (!this.mergeForm.valid_code) {
212
+ // uni.showToast({
213
+ // title: "验证码不能为空!",
214
+ // icon: "none",
215
+ // });
216
+ // return;
217
+ // }
217
218
  this.$xdConfirm({
218
219
  title: "是否确认合并卡",
219
220
  isHtml: true,
@@ -237,8 +238,8 @@ export default {
237
238
  data: {
238
239
  from_card_number: this.mergeForm.from_card_number,
239
240
  to_card_number: this.mergeForm.to_card_number,
240
- valid_code: this.mergeForm.valid_code,
241
- valid_token: this.mergeForm.valid_token
241
+ // valid_code: this.mergeForm.valid_code,
242
+ // valid_token: this.mergeForm.valid_token
242
243
  },
243
244
  })
244
245
  .then((res) => {
@@ -69,7 +69,7 @@ export default {
69
69
  className: 'input80',
70
70
  },
71
71
  {
72
- label: '展示商品个数:',
72
+ label: '展示商品总数:',
73
73
  ele: 'el-input',
74
74
  type: 'number',
75
75
  valueKey: 'number',
@@ -16,11 +16,15 @@
16
16
  </view>
17
17
  <!-- #endif -->
18
18
  <view class="jfb-base-con-flash-home__body">
19
- <view class="jfb-base-con-flash-home__body-wrap">
19
+ <view
20
+ :style="{ flexDirection: position === 1 ? 'row' : 'row-reverse' }"
21
+ class="jfb-base-con-flash-home__body-wrap"
22
+ >
20
23
  <view
21
24
  :style="{
22
25
  backgroundImage: `url(${secondBackground})`,
23
26
  backgroundSize: '100% 100%',
27
+ marginRight: position === 1 ? '0' : '20rpx',
24
28
  }"
25
29
  class="jfb-base-con-flash-home__body-wrap-session"
26
30
  >
@@ -38,38 +42,43 @@
38
42
  </view>
39
43
  </view>
40
44
  <swiper
41
- :vertical="true"
42
- :autoplay="false"
45
+ :vertical="productShowType === 'top'"
46
+ :autoplay="productShowType !== 'regular'"
43
47
  class="jfb-base-con-flash-home__body-wrap-product"
48
+ :style="{
49
+ marginRight: position === 1 ? '0' : '20rpx',
50
+ }"
44
51
  >
45
- <swiper-item v-for="(item, index) in 5" :key="index">
46
- <view class="jfb-base-con-flash-home__body-wrap-product-item">
47
- <image
48
- src="https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac"
49
- ></image>
50
- <view class="jfb-base-con-flash-home__body-wrap-product-item-name"
51
- >方家铺子中宁四星红枸杞250g</view
52
- >
53
- <view class="prod_price" v-if="isPrice === 'Y'">
54
- <xd-unit
55
- :price="200"
56
- :isOld="false"
57
- color="#000000"
58
- :iconSize="0.3"
59
- :fontSize="38"
60
- />
61
- <!-- todo -->
52
+ <swiper-item v-for="(item, index) in product_group" :key="index">
53
+ <view class="jfb-base-con-flash-home__body-wrap-product-group">
54
+ <view v-for="(SItem, SIndex) in item" :key="SIndex">
62
55
  <view
63
- v-if="
64
- isShowDiscount === 'Y' &&
65
- checkDiscountPrice({
66
- market_price: 1200,
67
- sale_price: 1000,
68
- })
69
- "
70
- class="prod_oldPrice"
71
- >原价:{{ dividePrice(1200) }}</view
56
+ class="jfb-base-con-flash-home__body-wrap-product-group-item"
57
+ :style="{
58
+ marginLeft: SIndex === 0&&position === 2 ? '0' : '20rpx',
59
+ }"
72
60
  >
61
+ <image :src="SItem.img"></image>
62
+ <view
63
+ class="jfb-base-con-flash-home__body-wrap-product-group-item-name"
64
+ >{{ SItem.name }}</view
65
+ >
66
+ <view class="prod_price" v-if="isPrice === 'Y'">
67
+ <xd-unit
68
+ :price="SItem.sale_price"
69
+ :isOld="false"
70
+ color="#000000"
71
+ :iconSize="0.14"
72
+ :fontSize="20"
73
+ />
74
+ <!-- todo -->
75
+ <view
76
+ v-if="isShowDiscount === 'Y' && checkDiscountPrice(SItem)"
77
+ class="prod_oldPrice"
78
+ >原价:{{ dividePrice(SItem.market_price) }}</view
79
+ >
80
+ </view>
81
+ </view>
73
82
  </view>
74
83
  </view>
75
84
  </swiper-item>
@@ -106,6 +115,74 @@ export default {
106
115
  textColor: "",
107
116
  textBgColor: "",
108
117
  isPrice: "Y",
118
+ productList: [
119
+ {
120
+ img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
121
+ name: "方家铺子中宁四星红枸杞250g",
122
+ market_price: 1200,
123
+ sale_price: 1000,
124
+ },
125
+ {
126
+ img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
127
+ name: "方家铺子中宁四星红枸杞250g",
128
+ market_price: 1200,
129
+ sale_price: 1000,
130
+ },
131
+ {
132
+ img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
133
+ name: "方家铺子中宁四星红枸杞250g",
134
+ market_price: 1200,
135
+ sale_price: 1000,
136
+ },
137
+ {
138
+ img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
139
+ name: "方家铺子中宁四星红枸杞250g",
140
+ market_price: 1200,
141
+ sale_price: 1000,
142
+ },
143
+ {
144
+ img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
145
+ name: "方家铺子中宁四星红枸杞250g",
146
+ market_price: 1200,
147
+ sale_price: 1000,
148
+ },
149
+ {
150
+ img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
151
+ name: "方家铺子中宁四星红枸杞250g",
152
+ market_price: 1200,
153
+ sale_price: 1000,
154
+ },
155
+ {
156
+ img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
157
+ name: "方家铺子中宁四星红枸杞250g",
158
+ market_price: 1200,
159
+ sale_price: 1000,
160
+ },
161
+ {
162
+ img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
163
+ name: "方家铺子中宁四星红枸杞250g",
164
+ market_price: 1200,
165
+ sale_price: 1000,
166
+ },
167
+ {
168
+ img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
169
+ name: "方家铺子中宁四星红枸杞250g",
170
+ market_price: 1200,
171
+ sale_price: 1000,
172
+ },
173
+ {
174
+ img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
175
+ name: "方家铺子中宁四星红枸杞250g",
176
+ market_price: 1200,
177
+ sale_price: 1000,
178
+ },
179
+ {
180
+ img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
181
+ name: "方家铺子中宁四星红枸杞250g",
182
+ market_price: 1200,
183
+ sale_price: 1000,
184
+ },
185
+ ],
109
186
  };
110
187
  },
111
188
  watch: {
@@ -113,6 +190,16 @@ export default {
113
190
  this.init(value);
114
191
  },
115
192
  },
193
+ computed: {
194
+ product_group() {
195
+ let groupedProducts = [];
196
+ for (let i = 0; i < this.productList.length; i += 3) {
197
+ let group = this.productList.slice(i, i + 3);
198
+ groupedProducts.push(group);
199
+ }
200
+ return groupedProducts;
201
+ },
202
+ },
116
203
  created() {
117
204
  this.init(this.container);
118
205
 
@@ -214,11 +301,15 @@ export default {
214
301
 
215
302
  .jfb-base-con-flash-home {
216
303
  &__body {
304
+ uni-swiper {
305
+ height: 258rpx !important;
306
+ }
217
307
  &-wrap {
218
308
  display: flex;
309
+ padding: 20rpx 0 20rpx 20rpx;
219
310
  &-session {
220
- width: 84px;
221
- height: 129px;
311
+ width: 168rpx;
312
+ height: 258rpx;
222
313
  border-radius: 8rpx;
223
314
  display: flex;
224
315
  flex-direction: column-reverse;
@@ -249,33 +340,42 @@ export default {
249
340
  &-product {
250
341
  display: flex;
251
342
  flex: 1;
252
- &-item {
253
- width: 84px;
254
- height: 129px;
255
- border-radius: 8rpx;
256
- background: rgba(255, 255, 255, 1);
343
+ &-group {
257
344
  display: flex;
258
- flex-direction: column;
259
- justify-content: flex-start;
260
- align-items: center;
261
- image {
262
- width: 168rpx;
263
- height: 168rpx;
264
- }
265
- &-name {
266
- font-size: 14rpx;
267
- color: #333;
268
- text-align: left;
269
- vertical-align: top;
345
+ &-item {
346
+ width: 152rpx;
347
+ height: 240rpx;
348
+ border-radius: 8rpx;
349
+ padding: 0 0 15rpx 6rpx;
350
+ background: rgba(255, 255, 255, 1);
351
+ display: flex;
352
+ flex-direction: column;
353
+ justify-content: flex-start;
354
+ align-items: center;
355
+ margin-left: 20rpx;
356
+ box-shadow: 0px 8rpx 16rpx rgba(0, 0, 0, 0.1);
357
+ image {
358
+ width: 168rpx;
359
+ height: 168rpx;
360
+ }
361
+ &-name {
362
+ font-size: 14rpx;
363
+ color: #333;
364
+ text-align: left;
365
+ vertical-align: top;
366
+ }
270
367
  }
271
368
  }
272
369
  }
273
370
  .prod_price {
274
371
  display: flex;
275
372
  align-items: center;
373
+ margin-top: 18rpx;
374
+ width: 100%;
375
+ justify-content: flex-start;
276
376
 
277
377
  .prod_oldPrice {
278
- font-size: 20rpx;
378
+ font-size: 14rpx;
279
379
  text-decoration: line-through;
280
380
  color: #888888;
281
381
  margin-left: 10rpx;
@@ -15,7 +15,7 @@
15
15
  <!-- #endif -->
16
16
  <view class="jfb-base-con-phone__body" v-if="done">
17
17
  <view
18
- v-if="couponList && couponList.length > 0"
18
+ v-if="has_times==='Y'"
19
19
  class="jfb-base-con-phone__body-wrap"
20
20
  :style="{
21
21
  height: layoutInfo.bodyMinHeightRpx + 'rpx',
@@ -162,7 +162,7 @@ export default {
162
162
  options: {},
163
163
  activity_id: "",
164
164
  done: false,
165
- couponList: [],
165
+ has_times: 'N',
166
166
  errmessage: "",
167
167
  showOhoneNumber: "", //仅用于展示
168
168
  order_num: null,
@@ -216,7 +216,7 @@ export default {
216
216
  })
217
217
  .then((res) => {
218
218
  console.log(res, "res");
219
- this.couponList = [{}] || res.list;
219
+ this.has_times = res.has_times;
220
220
  this.showBtn = res.phone_button;
221
221
  this.btnOneName = res.button_name_one;
222
222
  this.btnTwoName = res.button_name_two;
@@ -1,5 +1,26 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
- aaaa: {}
4
+ getCouponPhoneList: {
5
+ "list":[
6
+ {"prize_id":153,"prize_name":"满50减50","prize_type":"满减券","prize_num":1,"can_take":"Y","is_over":"N","can_take_num":"P","today_times":1,"today_num":0,"total_times":1,"total_num":0,"remain_card_count":55},
7
+ {"prize_id":153,"prize_name":"满50减50","prize_type":"满减券","prize_num":1,"can_take":"Y","is_over":"N","can_take_num":"P","today_times":1,"today_num":0,"total_times":1,"total_num":0,"remain_card_count":55},
8
+ {"prize_id":153,"prize_name":"满50减50","prize_type":"满减券","prize_num":1,"can_take":"Y","is_over":"N","can_take_num":"P","today_times":1,"today_num":0,"total_times":1,"total_num":0,"remain_card_count":55}
9
+ ],
10
+ "background":"//sandbox-img.jufubao.cn/uploads/20231204/96b801e0dc27422c183dc90d905dd2ed.jpg",
11
+ "used_up_url": "",
12
+ "has_times": "Y",
13
+ "can_take":"Y",
14
+ "message":"",
15
+ "app_coupon_url":"//sandbox-img.jufubao.cn/uploads/20231205/fee9b644b83495c9ba8a4db277600b54.jpg",
16
+ "app_activity_button":"//sandbox-img.jufubao.cn/uploads/20231207/35f3065b2b2bc3fc2dda73d7b5b9eae8.jpg",
17
+ "app_coupon_button_bg_url":"//sandbox-img.jufubao.cn/uploads/20231212/026a3ea901f87f51b531d06c24604676.png",
18
+ "app_coupon_button_see_url": "//sandbox-img.jufubao.cn/uploads/20231212/026a3ea901f87f51b531d06c24604676.png",
19
+ "app_coupon_invalid_url":"//sandbox-img.jufubao.cn/uploads/20231208/8b153ce4870686a37295c16fbc992235.jpg",
20
+ "rule":"<p>打发&middot;</p>",
21
+ "request_id":"a2603f2a480485f4"
22
+ },
23
+ getAllCouponPhone: {
24
+ "request_id": "5987aa28c709d4ef"
25
+ }
5
26
  }
@@ -17,8 +17,12 @@
17
17
  minHeight: layoutInfo.bodyMinHeightRpx + 'rpx'
18
18
  }">
19
19
  <view class="setting_list">
20
- <xd-list-item label="已绑实体卡是否失效" listIcon="icongongxiang" paddingLR="50rpx" paddingTB="32rpx">
21
- <xd-switch :checked="cardChecked" size="small" @change="handleCardChecked"></xd-switch>
20
+ <xd-list-item label="已绑实体卡是否失效" :showRight="!showSwitch" listIcon="icongongxiang"
21
+ paddingLR="50rpx" paddingTB="32rpx"
22
+ @click="handleToShowSwitch"
23
+ >
24
+ <view v-if="!showSwitch">去配置</view>
25
+ <xd-switch v-else :checked="cardChecked" size="small" @change="handleCardChecked"></xd-switch>
22
26
  </xd-list-item>
23
27
  <xd-list-item :showRight="!phone_number" label="绑定手机号" listIcon="iconshouji01"
24
28
  paddingLR="50rpx" paddingTB="32rpx"
@@ -64,6 +68,7 @@
64
68
  return {
65
69
  cardChecked: false,
66
70
  phone_number: "",
71
+ showSwitch: true,
67
72
 
68
73
  //面板
69
74
  bind_phone_url: "", //绑定手机号跳转地址
@@ -98,6 +103,11 @@
98
103
  });
99
104
  }
100
105
  },
106
+ handleToShowSwitch(){
107
+ if(!this.showSwitch){
108
+ this.showSwitch = true;
109
+ }
110
+ },
101
111
  handleCardChecked(flag){
102
112
  jfbRootExec("setCardUserSetting", {
103
113
  vm: this,
@@ -126,11 +136,12 @@
126
136
  getCardConfig(){
127
137
  jfbRootExec("getCardUserSetting", {
128
138
  vm: this,
129
- data: {
130
-
131
- }
139
+ data: {}
132
140
  }).then(res => {
133
141
  let is_entity_card_invalid = res.is_entity_card_invalid; //Y失效 N: 有效
142
+ if(is_entity_card_invalid === ""){
143
+ this.showSwitch = false;
144
+ }
134
145
  this.cardChecked = is_entity_card_invalid === "Y";
135
146
  })
136
147
  },