jufubao-base 1.0.56-beta2005 → 1.0.56-beta2007

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.
@@ -21,27 +21,121 @@
21
21
  style="position: relative"
22
22
  v-if="info !== null"
23
23
  >
24
- <view>
24
+ <view
25
+ class="jfb-base-card-shift-entry__body-header"
26
+ :style="{
27
+ background: headerBg.color,
28
+ backgroundSize: '100%',
29
+ }"
30
+ >
25
31
  <view
26
- class="jfb-base-card-shift-entry__body-info"
32
+ class="jfb-base-card-shift-entry__body-header-wrap"
33
+ :style="{
34
+ backgroundImage: `url(${headerBg.image})`,
35
+ }"
36
+ >
37
+ <view class="jfb-base-card-shift-entry__body-header__title">
38
+ <view>
39
+ <xd-font-icon
40
+ size="40"
41
+ color="#fff"
42
+ icon="iconzhuanhuanshitu"
43
+ style="margin-right:10rpx"
44
+ ></xd-font-icon>
45
+ {{info.card_type_name}}
46
+ </view>
47
+ </view>
48
+ <view class="jfb-base-card-shift-entry__body-header-item">
49
+ <view>券名:</view>
50
+ <view>{{info.card_type_name}}</view>
51
+ </view>
52
+ <view
53
+ style="padding-bottom: 0px"
54
+ class="jfb-base-card-shift-entry__body-header-item"
55
+ >
56
+ <view>券号:</view>
57
+ <view>{{info.card_number}}</view>
58
+ </view>
59
+ </view>
60
+ </view>
61
+ <!-- 转换之前 -->
62
+ <view
63
+ class="jfb-base-card-shift-entry__body-content"
64
+ >
65
+ <view
66
+ :class="
67
+ item.key === 'other_card_point'
68
+ ? 'jfb-base-card-shift-entry__body-content-special'
69
+ : 'jfb-base-card-shift-entry__body-content-item'
70
+ "
27
71
  v-for="(item, index) in valueKey"
28
72
  :key="index"
29
73
  >
30
- <view class="jfb-base-card-shift-entry__body-info-label">{{item.label }}</view>
31
- <view class="jfb-base-card-shift-entry__body-info-value">{{info[item.key]}}</view>
32
- </view>
33
- <view class="jfb-base-card-shift-entry__body-tips" v-if="notice">
34
- <xd-content-xss :html="notice"></xd-content-xss>
74
+ <view> {{ item.label }}</view>
75
+ <xd-unit v-if="item.type === 'price'&&info.unit==='点'" fontSize="28" :price="info[item.key]">
76
+ </xd-unit>
77
+ <view :style="{color:mainColor,fontWeight:500}" v-else-if="item.type === 'price'&&info.unit==='次'">
78
+ {{ info[item.key] }}
79
+ <text>{{info.unit}}</text>
80
+ </view>
81
+ <view style="color: #333; font-weight: 500" v-else>
82
+ {{ info[item.key] }}
83
+ <text v-if="item.type === 'type'">券</text>
84
+ </view>
35
85
  </view>
36
86
  </view>
37
- <view :style="{height:bottomHeight+100+'rpx'}"></view>
38
- <view class="jfb-base-card-shift-entry__body-footer" :style="prod_bottom">
39
- <view class="jfb-base-card-shift-entry__body-agree">
40
- <xd-radio size="small" v-model="isCheck"></xd-radio>
41
- <view>我已经阅读和同意积分转换规则</view>
87
+ <!-- 转换剩余 -->
88
+ <view
89
+ class="jfb-base-card-shift-entry__body-content"
90
+ :style="{background:changeBg}"
91
+ >
92
+ <view class="jfb-base-card-shift-entry__body-content-title">
93
+ <xd-font-icon
94
+ size="32"
95
+ :color="mainColor"
96
+ icon="iconrepository-xialaxuanxiangdown"
97
+ ></xd-font-icon>
98
+ <view>转换后预估票券额度</view>
99
+ </view>
100
+ <view
101
+ :class="
102
+ item.key === 'other_card_point'
103
+ ? 'jfb-base-card-shift-entry__body-content-special'
104
+ : 'jfb-base-card-shift-entry__body-content-item'
105
+ "
106
+ v-for="(item, index) in changeValueKey"
107
+ :key="index"
108
+ >
109
+ <view> {{ item.label }}: </view>
110
+ <xd-unit v-if="item.type === 'price'&&info.unit==='点'" fontSize="28" :price="info[item.key]">
111
+ </xd-unit>
112
+ <view :style="{color:mainColor,fontWeight:500}" v-else-if="item.type === 'price'&&info.unit==='次'">
113
+ {{ info[item.key] }}
114
+ <text>{{info.unit}}</text>
115
+ </view>
116
+ <view style="color: #333; font-weight: 500" v-else>
117
+ {{ info[item.key] }}
118
+ <text v-if="item.type === 'type'">券</text>
119
+ </view>
42
120
  </view>
43
- <xd-button type="primary" width="360rpx" @click="handleChange">立即转换</xd-button>
44
121
  </view>
122
+ <!-- 注意事项 -->
123
+ <view class="jfb-base-card-shift-entry__body-tips">
124
+ <view style="text-align:center;padding-bottom:24rpx;color:#333;font-weight:500">注意事项</view>
125
+ <xd-content-xss :html="notice"></xd-content-xss>
126
+ </view>
127
+ <view :style="{height: '100rpx'}"></view>
128
+ <!-- 靠底支付 -->
129
+ <view class="fixe_bottom" :style="prod_bottom">
130
+ <xd-button
131
+ @click="handleChange"
132
+ width="500rpx"
133
+ radius="8rpx"
134
+ size="small"
135
+ type="primary">
136
+ 转换
137
+ </xd-button>
138
+ </view>
45
139
  <xd-dailog
46
140
  class="dialog"
47
141
  title=""
@@ -49,19 +143,24 @@
49
143
  :showClose="false"
50
144
  :confirm="false"
51
145
  :cancel="false"
146
+ :radius="20"
52
147
  >
53
148
  <view class="jfb-base-card-shift-entry__body-success">
54
- <xd-font-icon
55
- size="100"
56
- color="#52C41A"
149
+ <view class="jfb-base-card-shift-entry__body-success-title">
150
+ <xd-font-icon
151
+ size="48"
152
+ :color="mainColor"
57
153
  icon="icondui-01"
58
154
  ></xd-font-icon>
59
- <view class="jfb-base-card-shift-entry__body-success-title">转换成功</view>
155
+ <text :style="{color:mainColor,marginLeft:'20rpx'}">转换成功</text>
156
+ </view>
60
157
  <view class="jfb-base-card-shift-entry__body-success-content">
61
- 您已成功将 {{ card_number }} 转换为
62
- {{ changeNumber }}已自动帮您绑定成功,可在卡列表查询
158
+ 已成功将 <text style="color:#333;padding: 0 16rpx">{{ card_number }}</text> 转换成为
159
+ <text style="color:#333;padding: 0 16rpx">{{ changeNumber }}</text>可在券包中查看
63
160
  </view>
64
- <xd-button type="primarys" width="360rpx" @click="handleToLink">返回列表</xd-button>
161
+ <xd-button type="primarys" width="360rpx" @click="handleToLink"
162
+ >返回列表</xd-button
163
+ >
65
164
  </view>
66
165
  </xd-dailog>
67
166
  </view>
@@ -76,9 +175,11 @@ import XdDailog from "@/components/XdDailog/XdDailog";
76
175
  import { jfbRootExec } from "@/utils/xd.event";
77
176
  import JfbBaseCardShifEntrytMixin from "./JfbBaseCardShiftEntryMixin";
78
177
  import componentsMixins from "@/mixins/componentsMixins";
178
+ import colorCardMixins from "@/mixins/colorCardMixins";
79
179
  import extsMixins from "@/mixins/extsMixins";
80
180
  import { getContainerPropsValue } from "@/utils/xd.base";
81
181
  import XdContentXss from '@/components/XdContentXss/XdContentXss'
182
+ const Color = require("color");
82
183
 
83
184
  export default {
84
185
  name: "JfbBaseCardShiftEntry",
@@ -89,62 +190,64 @@ export default {
89
190
  XdDailog,
90
191
  XdContentXss
91
192
  },
92
- mixins: [JfbBaseCardShifEntrytMixin, componentsMixins, extsMixins],
193
+ mixins: [JfbBaseCardShifEntrytMixin, componentsMixins, extsMixins,colorCardMixins],
93
194
  data() {
94
195
  return {
95
196
  info: null,
96
197
  valueKey: [
97
198
  {
98
- label: "票券名称",
99
- key: "card_type_name",
100
- },
101
- {
102
- label: "票券号码",
103
- key: "card_number",
199
+ label: "票券余额",
200
+ key: "card_point",
201
+ type: "price",
104
202
  },
105
203
  {
106
- label: "票券剩余",
107
- key: "card_point",
204
+ label: "购买其他物品可抵",
205
+ key: "other_card_point",
206
+ type: "price",
108
207
  },
109
208
  {
110
- label: "票券转换",
111
- key: "exchange_card_type_name",
209
+ label: "有效期限",
210
+ key: "end_time",
211
+ type: "normal",
112
212
  },
213
+ ],
214
+ changeValueKey: [
113
215
  {
114
- label: "转换剩余",
216
+ label: "票券余额",
115
217
  key: "exchange_card_point",
218
+ type: "price",
116
219
  },
220
+ {
221
+ label: "购买其他物品可抵",
222
+ key: "other_card_point",
223
+ type: "price",
224
+ }
117
225
  ],
118
226
  card_number: "",
119
227
  changeNumber: "",
120
228
  success: false,
121
- isCheck: false,
122
229
  notice: "",
123
230
 
124
231
  //页面跳转地址
125
232
  backUrl: "",
126
- bottomHeight: 120
233
+ bottomHeight: 120,
234
+ changeBg: ''
127
235
  };
128
236
  },
129
237
  computed: {
130
238
  prod_bottom() {
131
- return this.fixedStyle({ height: this.bottomHeight, zIndex: 111 });
239
+ return this.fixedStyle({height: 0, zIndex: 111});
132
240
  },
133
241
  },
134
242
  created() {
243
+ this.changeBg = Color(this.warningColor).alpha(0.2).toString();
135
244
  this.backUrl = getContainerPropsValue(this.container, "content.back_url", {
136
245
  value: "",
137
246
  }).value;
138
247
  },
139
248
  methods: {
140
249
  handleChange() {
141
- if (!this.isCheck) {
142
- this.$xdAlert({
143
- content: "请先同意转换规则",
144
- });
145
- return;
146
- }
147
- jfbRootExec("changeCardBind", {
250
+ jfbRootExec("changeCardBindEntry", {
148
251
  vm: this,
149
252
  data: {
150
253
  card_number: this.card_number,
@@ -162,7 +265,7 @@ export default {
162
265
  });
163
266
  },
164
267
  getContent() {
165
- jfbRootExec("getListGiftNewsContent", {
268
+ jfbRootExec("getListGiftNewsContentEntry", {
166
269
  vm: this,
167
270
  data: {
168
271
  page_id: this.pageAttr["page_id"], //页面ID
@@ -171,19 +274,22 @@ export default {
171
274
  },
172
275
  })
173
276
  .then((res) => {
174
- if(res.list && res.list.length > 0) {
175
- this.notice = res.list[0].content;
176
- }
277
+ this.notice = res.list[0].content;
177
278
  })
178
279
  .catch((error) => {
179
- this.$xdLog.catch(error)
280
+ console.error(error);
180
281
  });
181
282
  },
182
283
 
183
284
  onJfbLoad(options) {
184
285
  this.card_number = options.card_number;
185
286
  this.getContent();
186
- jfbRootExec("getByIdCardDetailEntry", {vm: this, data: {card_number: this.card_number}})
287
+ jfbRootExec("getByIdCardDetailEntry", {
288
+ vm: this,
289
+ data: {
290
+ card_number: this.card_number,
291
+ },
292
+ })
187
293
  .then((res) => {
188
294
  let temp = {};
189
295
  Object.keys(res).map((key) => {
@@ -193,11 +299,10 @@ export default {
193
299
  temp[key] = res[key];
194
300
  }
195
301
  });
302
+ this.headerBg = this.getCardThemes(res);
196
303
  this.info = temp;
197
304
  })
198
- .catch((err) => {
199
- this.$xdLog.catch(err)
200
- });
305
+ .catch((err) => {});
201
306
  },
202
307
  onJfbUpdate(data) {
203
308
  this.getContent();
@@ -218,32 +323,94 @@ export default {
218
323
 
219
324
  &__body {
220
325
  color: #333;
221
- &-info {
222
- display: flex;
223
- align-items: center;
224
- justify-content: flex-start;
225
- font-size: unit(26, rpx);
226
- padding: unit(40, rpx);
227
- border-bottom: unit(2, rpx) solid #eeeeee;
326
+ margin: unit(26, rpx);
327
+ &-header {
328
+ border-radius: unit(16, rpx);
329
+ font-size: unit(40, rpx);
330
+ font-weight: 700;
331
+ padding: unit(88,rpx) unit(32, rpx) unit(48, rpx) unit(32, rpx);
332
+ color: #fff;
333
+ position: relative;
334
+
335
+ &__title {
336
+ height: unit(56, rpx);
337
+ display: flex;
338
+ justify-content: flex-start;
339
+ align-items: center;
340
+ position: absolute;
341
+ top: 0;
342
+ left: 0;
343
+
344
+ & > view {
345
+ padding: 0 unit(80, rpx);
346
+ font-size: unit(24, rpx);
347
+ line-height: unit(56, rpx);
348
+ background: rgba(102, 102, 102, 0.4);
349
+ color: #fff;
350
+ border-radius:unit(16, rpx) 0 unit(16, rpx) 0;
351
+ display: flex;
352
+ }
353
+
354
+ }
355
+
356
+ &-wrap {
357
+ width: unit(700, rpx);
358
+ border-radius: unit(16, rpx);
359
+ background-size: 100%;
360
+ }
361
+
362
+ &-item {
363
+ display: flex;
364
+ justify-content: flex-start;
365
+ align-content: center;
366
+ padding-bottom: unit(32, rpx);
367
+ }
368
+ }
369
+
370
+ &-content {
228
371
  background: #fff;
372
+ border-radius: unit(16, rpx);
373
+ padding: unit(38, rpx) 0;
374
+ margin-top: unit(24, rpx);
229
375
 
230
- &-label {
231
- width: unit(120, rpx);
232
- color: #a6a6a6;
233
- margin-right: unit(70, rpx);
234
- text-align: center;
376
+ &-title {
377
+ display: flex;
378
+ flex-direction: column;
379
+ justify-content: center;
380
+ align-items: center;
381
+ font-weight: 500;
382
+ margin-bottom: unit(32,rpx);
383
+ }
384
+
385
+ &-item {
386
+ display: flex;
387
+ color: #666;
388
+ justify-content: space-between;
389
+ align-content: center;
390
+ font-size: unit(28, rpx);
391
+ padding: unit(16, rpx) unit(48, rpx);
235
392
  }
236
393
 
237
- &-value {
238
- flex: 1;
394
+ &-special {
395
+ display: flex;
396
+ color: #666;
397
+ justify-content: space-between;
398
+ font-size: unit(24, rpx);
399
+ padding: unit(18, rpx) unit(24, rpx);
400
+ margin: 0 unit(24, rpx);
401
+ border-radius: unit(16, rpx);
402
+ background: #f9f9f9;
403
+ align-content: center;
239
404
  }
240
405
  }
241
406
 
242
407
  &-tips {
243
- font-size: unit(24, rpx);
244
- padding: unit(60, rpx);
245
- color: #bbb;
246
- background: #f9f9f9;
408
+ font-size: unit(28, rpx);
409
+ padding: unit(28, rpx);
410
+ color: #666;
411
+ background: #fff;
412
+ border-radius: unit(16,rpx);
413
+ margin-top: unit(24,rpx);
247
414
  }
248
415
 
249
416
  &-agree {
@@ -260,30 +427,40 @@ export default {
260
427
  }
261
428
  }
262
429
 
263
- &-footer {
264
- position: fixed;
265
- left: 0;
266
- right: 0;
267
- // bottom: unit(120,rpx) !important;
268
- height: unit(100, rpx);
269
- }
430
+ .fixe_bottom{
431
+ display: flex;
432
+ align-items: center;
433
+ justify-content: space-between;
434
+ height: unit(100, rpx);
435
+ padding: 0 unit(40, rpx);
436
+ background: #FFF;
437
+ box-shadow: 0 0 unit(16, rpx) rgba(0,0,0,.05);
438
+ .flex_l{
439
+ display: flex;
440
+ align-items: center;
441
+ font-size: unit(32,rpx);
442
+ }
443
+ }
270
444
 
271
445
  &-success {
272
446
  padding: unit(70, rpx);
273
447
  &-title {
274
- font-size: unit(42, rpx);
275
- color: #242424;
448
+ font-size: unit(32, rpx);
449
+ display: flex;
450
+ align-items: center;
451
+ justify-content: center;
276
452
  }
277
453
 
278
454
  &-content {
279
- font-size: unit(32, rpx);
280
- color: #5a5a5a;
455
+ font-size: unit(28, rpx);
456
+ color: #666;
281
457
  text-align: center;
282
458
  line-height: unit(42, rpx);
283
459
  margin: unit(50, rpx) 0;
284
460
  }
285
461
  }
286
462
 
463
+
287
464
  .dialog ::v-deep .xd-dailog__body-content {
288
465
  padding: 0;
289
466
  }
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ getByIdCardDetailEntry:{"card_number":"171003500000390","card_point":900,"card_type_name":"一对一次卡(无限制)","end_time":"2024-09-30","card_status":"Y","card_status_name":"开启","card_qrcode":"\/\/sandbox-apis.jufubao.cn\/common\/v1\/image\/qrcode?code_content=h.161.4tzflzciaovkl5e","barcode":"\/\/sandbox-apis.jufubao.cn\/common\/v1\/image\/barcode?code_content=h.161.4tzflzciaovkl5e","card_qrcode_expire":600,"unit":"次","main_business_code_name":"","other_card_point":0,"is_exchange":"Y","exchange_card_type_name":"福券","exchange_card_point":26730,"card_point_type":1,"is_show_qrcode_logo":"Y","is_can_unbind":"Y","site_entry_settings":[],"business_codes":["movie","cake","video"],"request_id":"e27d6887c093c381"}
5
+ }