jufubao-base 1.0.216 → 1.0.218-beta1

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.
Files changed (28) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseCard/Attr.js +35 -0
  3. package/src/components/JfbBaseCard/JfbBaseCard.vue +121 -22
  4. package/src/components/JfbBaseCard/Mock.js +9 -4
  5. package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabled.vue +26 -5
  6. package/src/components/JfbBaseCardDisabled/Mock.js +4 -2
  7. package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +19 -1
  8. package/src/components/JfbBaseCardDisabledEntry/Mock.js +2 -0
  9. package/src/components/JfbBaseCardEntry/Attr.js +35 -0
  10. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +154 -118
  11. package/src/components/JfbBaseCardEntry/Mock.js +22 -1
  12. package/src/components/JfbBaseCardV2/Attr.js +35 -0
  13. package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +118 -39
  14. package/src/components/JfbBaseCardV2/Mock.js +12 -6
  15. package/src/components/JfbBaseCardV3/Attr.js +35 -0
  16. package/src/components/JfbBaseCardV3/JfbBaseCardV3.vue +23 -1
  17. package/src/components/JfbBaseHeader/Attr.js +58 -1
  18. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +22 -1
  19. package/src/components/JfbBaseNoticeDialog/Api.js +58 -0
  20. package/src/components/JfbBaseNoticeDialog/Attr.js +48 -0
  21. package/src/components/JfbBaseNoticeDialog/JfbBaseNoticeDialog.vue +111 -0
  22. package/src/components/JfbBaseNoticeDialog/JfbBaseNoticeDialogLess.less +79 -0
  23. package/src/components/JfbBaseNoticeDialog/JfbBaseNoticeDialogMixin.js +30 -0
  24. package/src/components/JfbBaseNoticeDialog/Mock.js +13 -0
  25. package/src/components/JfbBaseTfkCardLogin/Attr.js +35 -0
  26. package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +21 -1
  27. package/src/components/JfbBaseUserCenter/Attr.js +35 -0
  28. package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +38 -16
@@ -137,6 +137,7 @@
137
137
  v-if="subTabIndex === 2&&tabIndex === 1"
138
138
  >* 目前仅支持电影票兑换券进行转换</view>
139
139
  <view class="card-content">
140
+ <!--loading-->
140
141
  <view v-if="loadingCardList" class="jfb-base-card-entry__body-card skeleton-card">
141
142
  <view v-for="i in 3" class="card-list" :key="i">
142
143
  <view class="card-list-warp">
@@ -164,126 +165,124 @@
164
165
  </view>
165
166
  </view>
166
167
  </view>
167
-
168
+ <!--loading-->
169
+ <!--content-->
168
170
  <template v-else>
169
- <view
170
- v-if="tabIndex === 1 && (cardList && cardList.length > 0)"
171
- class="jfb-base-card-entry__body-card"
172
- >
171
+ <!--content card-->
172
+ <view v-if="tabIndex === 1 && (cardList && cardList.length > 0)" class="jfb-base-card-entry__body-card">
173
173
  <template v-if="cardType==='default'">
174
- <view
175
- v-for="(item,index) in cardList"
176
- :data-index="item.card_number"
177
- :data-idx="index"
178
- :data-top="item.top"
179
- class="card-list"
180
- :key="item.card_number"
181
- @click="toDetail(item)"
182
- v-if="setCardItemShow(item,index)"
183
- :style="{
174
+ <template v-for="(item,index) in cardList">
175
+ <view
176
+ :data-index="item.card_number"
177
+ :data-idx="index"
178
+ :data-top="item.top"
179
+ class="card-list"
180
+ :key="item.card_number"
181
+ @click="toDetail(item)"
182
+ v-if="setCardItemShow(item,index)"
183
+ :style="{
184
184
  background: item['theme']['color'],
185
185
  backgroundSize: '100%',
186
186
  height: subTabIndex !== 3 ? item.height + 'px' : '300rpx'
187
187
  }"
188
- >
189
- <view class="card-list-warp" :style="{backgroundImage: 'url('+ item['theme']['image'] +')'}">
190
- <view class="card-list__title">
191
- <view>
192
- <view>{{item['card_type_name']}}</view>
193
- <view v-if="item['is_login'] === 'Y'"><text></text><text>已登录</text></view>
194
- </view>
195
- </view>
196
- <view class="card-list__content">
197
- <view>
198
- <text>券号:</text>
199
- <text>{{item.card_number}}{{showIndex?(':' + index):''}}</text>
188
+ >
189
+ <view class="card-list-warp" :style="{backgroundImage: 'url('+ item['theme']['image'] +')'}">
190
+ <view class="card-list__title">
191
+ <view>
192
+ <view :style="{backgroundColor: mainColor}" class="gifted" v-if="item['is_gift'] === 'Y'">赠</view>
193
+ <view>{{item['card_type_name']}}</view>
194
+ <view class="logined" v-if="item['is_login'] === 'Y'"><text></text><text>已登录</text></view>
195
+ </view>
200
196
  </view>
201
- <view @click.stop="toDetail(item)" v-if="subTabIndex !== 3&&isShowCode === 'Y'&&!force">
197
+ <view class="card-list__content">
202
198
  <view>
203
- <xd-font-icon icon="iconerweima" width="56" height="56" size="50" color="#fff"></xd-font-icon>
199
+ <text>券号:</text>
200
+ <text>{{item.card_number}}{{showIndex?(':' + index):''}}</text>
201
+ </view>
202
+ <view @click.stop="toDetail(item)" v-if="subTabIndex !== 3&&isShowCode === 'Y'&&!force">
203
+ <view>
204
+ <xd-font-icon icon="iconerweima" width="56" height="56" size="50" color="#fff"></xd-font-icon>
205
+ </view>
206
+ <view>点击查看</view>
204
207
  </view>
205
- <view>点击查看</view>
206
208
  </view>
207
- </view>
208
- <view class="card-list__date">
209
- <text>有效期:</text>
210
- <text>{{item.end_time}}</text>
211
- </view>
212
- <view class="card-list__yue">
213
- <text>余额:</text>
214
- <text>{{item.card_point}} {{ item.unit }}</text>
215
- </view>
216
- <view class="card-list__other" v-if="item.other_card_point && item.card_point_type === 2">
217
- <view><text>购买其他物品可抵:</text><text>{{item.other_card_point}} {{ item.unit }}</text></view>
218
- </view>
219
- <template v-if="subTabIndex === 1">
220
- <view class="card-list__entry" v-if="item.is_login==='N'&&force">
221
- <view
222
- @click.stop="handleBindLogin(item,item['entries'][0])"
223
- :style="{
209
+ <view class="card-list__date">
210
+ <text>有效期:</text>
211
+ <text>{{item.end_time}}</text>
212
+ </view>
213
+ <view class="card-list__yue">
214
+ <text>余额:</text>
215
+ <text>{{item.card_point}} {{ item.unit }}</text>
216
+ </view>
217
+ <view class="card-list__other" v-if="item.other_card_point && item.card_point_type === 2">
218
+ <view><text>购买其他物品可抵:</text><text>{{item.other_card_point}} {{ item.unit }}</text></view>
219
+ </view>
220
+ <template v-if="subTabIndex === 1">
221
+ <view class="card-list__entry" v-if="item.is_login==='N'&&force">
222
+ <view
223
+ @click.stop="handleBindLogin(item,item['entries'][0])"
224
+ :style="{
224
225
  background: '#fff',
225
226
  color: item['theme']['color']}"
226
- >
227
- 登录
227
+ >登录</view>
228
228
  </view>
229
- </view>
230
- <view class="card-list__entry" v-if="item.entries.length === 1&&!force">
231
- <view
232
- @click.stop="handleBindLogin(item,item['entries'][0])"
233
- :style="{color: item['theme']['color']}"
234
- >进入{{item['entries'][0]['entry_name']}}</view>
235
- </view>
236
- <view class="card-list__nodata" v-if="item.entries.length === 0&&!force">暂无支持服务列表</view>
237
- <view class="card-list__entrys" v-if="item.entries.length > 1&&!force" @click.stop>
238
- <view class="card-list__entrys-title">
239
- <view>可兑换权益</view>
240
- <view @click.stop="toDetail(item, false)">
241
- <text>查看详情</text>
242
- <xd-font-icon icon="iconxiangyou_xian" color="#999" size="20"></xd-font-icon>
243
- </view>
229
+ <view class="card-list__entry" v-if="item.entries.length === 1&&!force">
230
+ <view
231
+ @click.stop="handleBindLogin(item,item['entries'][0])"
232
+ :style="{color: item['theme']['color']}"
233
+ >进入{{item['entries'][0]['entry_name']}}</view>
244
234
  </view>
245
- <view class="card-list__entrys-list">
246
- <scroll-view scroll-x class="card-list__entrys-scroll">
247
- <view class="card-list__entrys-item">
248
- <view
249
- v-for="(entry,idx) in item.entries"
250
- :key="idx"
251
- @click.stop="handleBindLogin(item, entry)"
252
- >
253
- <view><image :src="entry.image_url"></image></view>
254
- <view>{{entry|cutstr}}</view>
255
- <view>
256
- <text>去兑换</text>
257
- <xd-font-icon icon="iconxiangyou_xian" color="#999" size="20"></xd-font-icon>
235
+ <view class="card-list__nodata" v-if="item.entries.length === 0&&!force">暂无支持服务列表</view>
236
+ <view class="card-list__entrys" v-if="item.entries.length > 1&&!force" @click.stop>
237
+ <view class="card-list__entrys-title">
238
+ <view>可兑换权益</view>
239
+ <view @click.stop="toDetail(item, false)">
240
+ <text>查看详情</text>
241
+ <xd-font-icon icon="iconxiangyou_xian" color="#999" size="20"></xd-font-icon>
242
+ </view>
243
+ </view>
244
+ <view class="card-list__entrys-list">
245
+ <scroll-view scroll-x class="card-list__entrys-scroll">
246
+ <view class="card-list__entrys-item">
247
+ <view
248
+ v-for="(entry,idx) in item.entries"
249
+ :key="idx"
250
+ @click.stop="handleBindLogin(item, entry)"
251
+ >
252
+ <view><image :src="entry.image_url"></image></view>
253
+ <view>{{entry|cutstr}}</view>
254
+ <view>
255
+ <text>去兑换</text>
256
+ <xd-font-icon icon="iconxiangyou_xian" color="#999" size="20"></xd-font-icon>
257
+ </view>
258
258
  </view>
259
259
  </view>
260
- </view>
261
- </scroll-view>
260
+ </scroll-view>
261
+ </view>
262
262
  </view>
263
+ </template>
264
+ <view class="card-list__entry" v-else-if="subTabIndex===2">
265
+ <view
266
+ @click.stop="handleBindLogin(item,item['entries'][0])"
267
+ :style="{color: item['theme']['color']}"
268
+ >票券转换</view>
263
269
  </view>
264
- </template>
265
- <view class="card-list__entry" v-else-if="subTabIndex===2">
266
- <view
267
- @click.stop="handleBindLogin(item,item['entries'][0])"
268
- :style="{color: item['theme']['color']}"
269
- >票券转换</view>
270
270
  </view>
271
271
  </view>
272
- </view>
273
- <view
274
- class="card-content-empty card-list"
275
- :data-index="item.card_number"
276
- :data-idx="index"
277
- :data-top="item.top"
278
- v-else
279
- :style="{
272
+ <view
273
+ class="card-content-empty card-list"
274
+ :data-index="item.card_number"
275
+ :data-idx="index"
276
+ :data-top="item.top"
277
+ v-else
278
+ :style="{
280
279
  height: item.height + 'px',
281
280
  backgroundImage: 'url('+ (tabIndex===2 || item.entries.length <= 1 ? cardItem: cardItemEntry) +')'
282
281
  }"
283
- ></view>
282
+ ></view>
283
+ </template>
284
284
  </template>
285
285
  <template v-if="cardType==='style2'">
286
-
287
286
  <view v-for="(item,index) in cardList" :key="item.card_number">
288
287
  <xd-card-new
289
288
  :item="item"
@@ -297,43 +296,50 @@
297
296
  </view>
298
297
  </template>
299
298
  </view>
299
+ <!--content card-->
300
+ <!--content coupon-->
300
301
  <view v-if="tabIndex===2&&(couponList&&couponList.length)">
301
302
  <view v-if="couponList.length" class="coupon_list">
302
- <CusCouponItem v-for="(item, i) in couponList" :key="i"
303
- style="margin-bottom:20rpx"
304
- :couponRadius="couponRadius"
305
- :couponImageUrl="couponImageUrl"
306
- :couponTitleBgColor="couponTitleBgColor"
307
- :couponUseBtnPadding="couponUseBtnPadding"
308
- :couponBtnRadius="couponBtnRadius"
309
- :couponBtnTextStyle="couponBtnTextStyle"
310
- :couponLeftBgColor="couponLeftBgColor"
311
- :item="item"
312
- :mainColor="mainColor"
313
- @useCoupon="handleBindLogin(item,item['entries'][0])"
314
- @toDetail="toDetail(item)"
315
- ></CusCouponItem>
316
- </view>
317
- <view v-else>
318
- 暂无数据
319
- </view>
303
+ <CusCouponItem v-for="(item, i) in couponList" :key="i"
304
+ style="margin-bottom:20rpx"
305
+ :couponRadius="couponRadius"
306
+ :couponImageUrl="couponImageUrl"
307
+ :couponTitleBgColor="couponTitleBgColor"
308
+ :couponUseBtnPadding="couponUseBtnPadding"
309
+ :couponBtnRadius="couponBtnRadius"
310
+ :couponBtnTextStyle="couponBtnTextStyle"
311
+ :couponLeftBgColor="couponLeftBgColor"
312
+ :item="item"
313
+ :mainColor="mainColor"
314
+ @useCoupon="handleBindLogin(item,item['entries'][0])"
315
+ @toDetail="toDetail(item)"
316
+ ></CusCouponItem>
317
+ </view>
318
+ <view v-else>暂无数据</view>
320
319
  </view>
320
+ <!--content coupon-->
321
+ <!--no data-->
321
322
  <view v-else-if="cardList !== null && cardList.length === 0">
322
323
  <view class="jfb-base-card-entry__body-empty">
323
324
  <view class="jfb-base-card-entry__body-empty-wrap">
324
325
  <image :src="emptyBg"></image>
325
- 暂无票券
326
+ <view style="display:flex;align-items: center;justify-content: center;">
327
+ 暂无票券 <view v-if="isShowBuy==='Y'" class="buy_new" @click="toBuyNew" :style="{color: mainColor}"><view>{{buy_name}}</view> <xd-font-icon size="20" icon="iconxiangyou_xian"></xd-font-icon></view>
328
+ </view>
326
329
  </view>
327
330
  </view>
328
331
  </view>
332
+ <!--no data-->
329
333
  </template>
330
-
334
+ <!--content-->
335
+ <!--disabled-->
331
336
  <view
332
337
  v-if="showDisabled==='Y'"
333
338
  @click="handleToDisabled"
334
339
  class="jfb-base-card-entry__body-disabled"
335
340
  >已失效票券>>></view>
336
341
  </view>
342
+ <!--disabled-->
337
343
  <view class="jfb-base-card-entry__body-dialog" v-if="dialogEvent">
338
344
  <view class="jfb-base-card-entry__body-dialog-content">
339
345
  <image
@@ -580,6 +586,9 @@ export default {
580
586
 
581
587
  cardBgColor: "",
582
588
  cardFontColor: "",
589
+ buy_new_url: '',
590
+ isShowBuy: "",
591
+ buy_name: ""
583
592
  };
584
593
  },
585
594
  created() {
@@ -635,6 +644,9 @@ export default {
635
644
  this.couponImageUrl = getContainerPropsValue(container, "content.couponImageUrl", "");
636
645
  this.cardBgColor = getContainerPropsValue(container, "content.cardBgColor", "");
637
646
  this.cardFontColor = getContainerPropsValue(container, "content.cardFontColor", "");
647
+ this.isShowBuy = getContainerPropsValue(container, "content.isShowBuy", "N");
648
+ this.buy_name = getContainerPropsValue(container, "content.buy_name", "购买新卡");
649
+ this.buy_new_url = getContainerPropsValue(container,"content.buy_new_url",{value: ""}).value;
638
650
  if(this.isPreview) {
639
651
  this.tabIndex = this.isShowCoupon==='Y'?2:1;
640
652
  }
@@ -989,6 +1001,12 @@ export default {
989
1001
  .catch(() => this.$xdHideLoading());
990
1002
  },
991
1003
 
1004
+ toBuyNew() {
1005
+ this.$xdUniHelper.navigateTo({
1006
+ url: `${this.buy_new_url}`,
1007
+ });
1008
+ },
1009
+
992
1010
  onJfbUpdate(data) {
993
1011
  this.getContent();
994
1012
  },
@@ -1019,6 +1037,14 @@ export default {
1019
1037
  align-items: center;
1020
1038
  justify-content: center;
1021
1039
 
1040
+ .buy_new {
1041
+ display: flex;
1042
+ margin-left: 8rpx;
1043
+ & > view:first-child {
1044
+ margin-right: 8rpx;
1045
+ }
1046
+ }
1047
+
1022
1048
  &-wrap {
1023
1049
  display: flex;
1024
1050
  flex-direction: column;
@@ -1190,11 +1216,11 @@ export default {
1190
1216
  justify-content: center;
1191
1217
  align-items: center;
1192
1218
 
1193
- .skeleton-card &{
1219
+ .skeleton-card & {
1194
1220
  .skeleton-item(120rpx, 50rpx, 0 0 16rpx 0, #EEEEEE);
1195
1221
  }
1196
1222
 
1197
- & > view:nth-child(2) {
1223
+ & > view.logined {
1198
1224
  height: 36rpx;
1199
1225
  line-height: 36rpx;
1200
1226
  background-color: rgb(41, 203, 151);
@@ -1218,8 +1244,18 @@ export default {
1218
1244
  }
1219
1245
  }
1220
1246
 
1221
- }
1247
+ & > view.gifted {
1248
+ margin-top: -2rpx;
1249
+ font-size: 18rpx;
1250
+ padding: 2rpx 10rpx;
1251
+ border-radius: 8rpx;
1252
+ line-height:26rpx;
1253
+ height: 26rpx;
1254
+ color: #fff;
1255
+ margin-right: 18rpx;
1256
+ }
1222
1257
 
1258
+ }
1223
1259
  }
1224
1260
 
1225
1261
  &__content {
@@ -17,6 +17,7 @@ module.exports = {
17
17
  "is_transfering":"Y",
18
18
  "card_point_type": 1,
19
19
  "is_login":'Y',
20
+ "is_gift":"Y",
20
21
  "business_codes": ["health"]
21
22
  }, {
22
23
  "card_number": "121000100000028",
@@ -31,6 +32,7 @@ module.exports = {
31
32
  "is_exchange": "N",
32
33
  "is_transfering":"Y",
33
34
  "card_point_type": 1,
35
+ "is_gift":"N",
34
36
  "business_codes": ["health"]
35
37
  }, {
36
38
  "card_number": "101001000005192",
@@ -45,6 +47,7 @@ module.exports = {
45
47
  "is_exchange": "N",
46
48
  "is_transfering":"Y",
47
49
  "card_point_type": 1,
50
+ "is_gift":"N",
48
51
  "business_codes": ["movie", "market", "cake", "book", "video", "play", "health", "small", "travel", "supermarket", "food"]
49
52
  }, {
50
53
  "card_number": "101001000008421",
@@ -59,6 +62,7 @@ module.exports = {
59
62
  "is_exchange": "N",
60
63
  "is_transfering":"N",
61
64
  "is_login":'Y',
65
+ "is_gift":'Y',
62
66
  "card_point_type": 1,
63
67
  "business_codes": ["cake"]
64
68
  }, {
@@ -73,9 +77,26 @@ module.exports = {
73
77
  "other_card_point": 0,
74
78
  "is_exchange": "Y",
75
79
  "is_transfering":"N",
80
+ "is_gift":'Y',
76
81
  "card_point_type": 1,
77
82
  "business_codes": ["movie", "market", "cake"]
78
- }, {
83
+ },
84
+ {
85
+ "card_number": "171003500000383",
86
+ "card_point": 100000,
87
+ "card_type": "39",
88
+ "card_type_name": "一对一次卡(无限制)",
89
+ "unit": "次",
90
+ "end_time": "2024-08-31",
91
+ "is_valid": "Y",
92
+ "main_business_code_name": "",
93
+ "other_card_point": 0,
94
+ "is_exchange": "Y",
95
+ "is_transfering":"N",
96
+ "is_gift":'N',
97
+ "card_point_type": 1,
98
+ "business_codes": ["movie", "market", "cake"]
99
+ },{
79
100
  "card_number": "101001000007175",
80
101
  "card_point": 9998700,
81
102
  "card_type": "27",
@@ -44,6 +44,29 @@ export default {
44
44
  inline: false,
45
45
  notice: '当未设置文案时候,前台页面显示为"<span style="color:red">查看</span>",建议不超过<span style="color:red">4</span>个汉字'
46
46
  },
47
+ {
48
+ label: "无票券时是否展示购买新卡入口:",
49
+ ele: "xd-radio",
50
+ valueKey: "isShowBuy",
51
+ value: data.isShowBuy || "N",
52
+ list: [
53
+ { label: "展示", value: "Y" },
54
+ { label: "隐藏", value: "N" }
55
+ ],
56
+ groupKey: "content",
57
+ },
58
+ {
59
+ label: '购买新卡文案:',
60
+ ele: 'el-input',
61
+ type: 'text',
62
+ valueKey: 'buy_name',
63
+ groupKey:'content',
64
+ value: data.buy_name || '',
65
+ placeholder: '请输入购买新卡文案',
66
+ className: 'input80',
67
+ inline: false,
68
+ notice: '当未设置文案时,页面默认展示为"<span style="color:red">购买新卡</span>",建议不超过<span style="color:red">4</span>个汉字'
69
+ },
47
70
  {
48
71
  label: '填充设置:',
49
72
  ele: 'xd-margin-padding',
@@ -105,6 +128,18 @@ export default {
105
128
  },
106
129
  inline: false,
107
130
  },
131
+ {
132
+ label: '购买新卡地址:',
133
+ ele: 'xd-select-pages-path',
134
+ valueKey: 'buy_new_url',
135
+ groupKey:'advanced',
136
+ placeholder: '请选择购买新卡地址',
137
+ value: data.buy_new_url || null,
138
+ setting: {
139
+ router: XdBus.getParentApi('getPagesTree'),
140
+ },
141
+ inline: false,
142
+ },
108
143
  ].filter(i=>i)
109
144
  },
110
145
  advanced: [