jufubao-base 1.0.56 → 1.0.61-beta1001

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 (32) hide show
  1. package/package.json +2 -2
  2. package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +19 -1
  3. package/src/components/JfbBaseCardDetailEntry/Api.js +58 -0
  4. package/src/components/JfbBaseCardDetailEntry/Attr.js +30 -0
  5. package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +812 -0
  6. package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntryLess.less +80 -0
  7. package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntryMixin.js +30 -0
  8. package/src/components/JfbBaseCardDetailEntry/Mock.js +106 -0
  9. package/src/components/JfbBaseCardDetailEntry/XdEditPwd.vue +299 -0
  10. package/src/components/JfbBaseCardDetailEntry/XdPwPay.vue +214 -0
  11. package/src/components/JfbBaseCardDisabledEntry/Api.js +12 -7
  12. package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +39 -12
  13. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +37 -1
  14. package/src/components/JfbBaseCardInfoEntry/Api.js +71 -0
  15. package/src/components/JfbBaseCardInfoEntry/Attr.js +37 -0
  16. package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +661 -0
  17. package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntryLess.less +80 -0
  18. package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntryMixin.js +30 -0
  19. package/src/components/JfbBaseCardInfoEntry/Mock.js +122 -0
  20. package/src/components/JfbBaseCardMergeEntry/Api.js +61 -0
  21. package/src/components/JfbBaseCardMergeEntry/Attr.js +237 -0
  22. package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntry.vue +443 -0
  23. package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntryLess.less +80 -0
  24. package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntryMixin.js +30 -0
  25. package/src/components/JfbBaseCardMergeEntry/Mock.js +32 -0
  26. package/src/components/JfbBaseCardShiftEntry/Api.js +51 -0
  27. package/src/components/JfbBaseCardShiftEntry/Attr.js +237 -0
  28. package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntry.vue +476 -0
  29. package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntryLess.less +80 -0
  30. package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntryMixin.js +30 -0
  31. package/src/components/JfbBaseCardShiftEntry/Mock.js +5 -0
  32. package/src/mixins/colorCardMixins.js +1 -1
@@ -0,0 +1,214 @@
1
+ <template>
2
+ <xd-dailog
3
+ :width="width"
4
+ :title="title"
5
+ :show.sync="uiShow"
6
+ :cancel="false"
7
+ :confirm="false"
8
+ :showClose="showClose"
9
+ @close="handleClose"
10
+ >
11
+ <view class="xd-pw-pay">
12
+ <view class="xd-pw-pay__header">
13
+ <view
14
+ v-for="(item,index) in textList"
15
+ :key="index"
16
+ class="xd-pw-pay__header-item">
17
+ {{item.label}}
18
+ <view v-if="item.value" class="xd-pw-pay__header-item-price">
19
+ <xd-unit
20
+ :price="item.value"
21
+ :iocnSize="0.32"
22
+ >
23
+ </xd-unit>
24
+ </view>
25
+ </view>
26
+ </view>
27
+ <view>
28
+ <view class="input-wrap">
29
+ <input
30
+ class="input1"
31
+ type="number"
32
+ v-for="(item, index) in input_len"
33
+ :style="{fontSize: '32rpx'}"
34
+ @tap="onInput"
35
+ :password="password"
36
+ :key="index"
37
+ :value="input_val.length >= index + 1 ? input_val[index] : ''"
38
+ :focus="false"
39
+ />
40
+ </view>
41
+ <!-- 实际监听 -->
42
+ <input class="input2"
43
+ type="number"
44
+ v-if="isFocus"
45
+ @blur="blurInput"
46
+ @input="setInput"
47
+ v-model="input_val"
48
+ :maxlength="input_len"
49
+ :focus="true"
50
+ />
51
+
52
+ <view
53
+ class="forget-pw"
54
+ v-if="forget"
55
+ @click="handleForget"
56
+ >
57
+ 忘记密码
58
+ </view>
59
+ </view>
60
+ </view>
61
+ </xd-dailog>
62
+ </template>
63
+
64
+ <script>
65
+ import XdUnit from "@/components/XdUnit/XdUnit";
66
+ import XdDailog from "@/components/XdDailog/XdDailog";
67
+
68
+ export default {
69
+ name: "XdPwPay",
70
+ components: {XdUnit, XdDailog},
71
+ comments: {
72
+ XdDailog
73
+ },
74
+ props: {
75
+ input_len: {
76
+ type: Number,
77
+ default: 6
78
+ }, //密码长度
79
+ password: {
80
+ type: Boolean,
81
+ default: true
82
+ },
83
+ width: {
84
+ type: Number | String,
85
+ default: '50%',
86
+ },
87
+ title: {
88
+ type: String,
89
+ default: '标题',
90
+ },
91
+ show: {
92
+ type: Boolean,
93
+ default: true,
94
+ },
95
+ textList: {
96
+ type: Array,
97
+ default: []
98
+ },
99
+ forget: {
100
+ type: Boolean,
101
+ default: true
102
+ },
103
+ showClose: {
104
+ type: Boolean,
105
+ default: false
106
+ }
107
+ },
108
+ data() {
109
+ return {
110
+ isFocus: false,
111
+ input_val: '', // 验证码的值
112
+ uiShow: false
113
+ }
114
+ },
115
+ watch: {
116
+ show(newVal) {
117
+ if (newVal === false) {
118
+ this.input_val = ''
119
+ this.isFocus = true
120
+ }
121
+ this.uiShow = newVal;
122
+
123
+ },
124
+
125
+ uiShow(value) {
126
+ this.$emit('update:show', value);
127
+ }
128
+ },
129
+ created() {
130
+ if (this.show) {
131
+ this.input_val = ''
132
+ this.isFocus = true
133
+ this.uiShow = this.show;
134
+ }
135
+ },
136
+ methods: {
137
+ onInput() {
138
+ this.isFocus = true;
139
+ },
140
+ setInput(e) {
141
+
142
+ // this.input_val = e.detail.value;
143
+ if (this.input_val.length == 6) {
144
+ this.$emit('onSubmit', this.input_val)
145
+ }
146
+ },
147
+ blurInput() {
148
+ this.isFocus = false;
149
+ },
150
+ handleForget() {
151
+ this.$emit('onForget')
152
+ },
153
+ handleClose() {
154
+ this.$emit('update:show', this.show);
155
+ this.$emit('onClose')
156
+ },
157
+ clearPwd() {
158
+ this.input_val = ''
159
+ }
160
+ }
161
+ }
162
+ </script>
163
+
164
+ <style scoped lang="less">
165
+ .xd-pw-pay {
166
+ padding: unit(20, rpx);
167
+ font-size: @xd-font-size-lg;
168
+ }
169
+
170
+ .xd-pw-pay__header {
171
+ padding: unit(20, rpx) 0;
172
+
173
+ &-item {
174
+ margin-bottom: unit(20, rpx);
175
+
176
+ &-price {
177
+ display: flex;
178
+ justify-content: center;
179
+ margin-top: unit(20, rpx)
180
+ }
181
+ }
182
+ }
183
+
184
+ .input-wrap {
185
+ display: flex;
186
+ justify-content: space-around;
187
+ align-items: center;
188
+ margin-top: unit(40, rpx);
189
+
190
+ .input1 {
191
+ display: flex;
192
+ width: unit(60, rpx);
193
+ height: unit(60, rpx);
194
+ justify-content: space-around;
195
+ text-align: center;
196
+ border: 1px solid #9b9ba5;
197
+ }
198
+ }
199
+
200
+ .input2 {
201
+ width: unit(10, rpx);
202
+ height: unit(10, rpx);
203
+ position: absolute;
204
+ top: unit(0, rpx);
205
+ left: unit(-750, rpx);
206
+ min-height: 0
207
+ }
208
+
209
+ .forget-pw {
210
+ text-align: right;
211
+ margin-top: unit(20, rpx);
212
+ color: #ccc
213
+ }
214
+ </style>
@@ -1,13 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  /**
4
- * @description API模型
5
- * 建议:Ffff=>模块 Xxxx=>自定义名字
6
- * 获取单记录(getByIdFfffXxxx)
7
- * 获取列表记录(getByListFfffXxxx)
8
- * 添加列表记录(addFfffXxxxx)
9
- * 删除列表记录(removeFfffXxxxx|deleteFfffXxxx)
10
- * 更新列表记录(updateFfffXxxxx)
4
+ * @description api
11
5
  * @type {*[]}
12
6
  */
13
7
  module.exports = [
@@ -31,4 +25,15 @@ module.exports = [
31
25
  params: {},
32
26
  disabled: true,
33
27
  },
28
+ {
29
+ mapFnName: 'batchDisabledCardUnbindEntry',
30
+ isRule: false,
31
+ title: '批量解绑卡',
32
+ prefix: 'list',
33
+ path: '/card/v1/card-bind/batch-unbind-card',
34
+ data: {
35
+ card_numbers: ['卡号(英文逗号分隔)', 'String', '必选'],
36
+ },
37
+ disabled: true,
38
+ },
34
39
  ];
@@ -38,12 +38,6 @@
38
38
  <text>券号:</text>
39
39
  <text>{{item.card_number}}</text>
40
40
  </view>
41
- <view @click.stop="toDetail(item)" v-if="0">
42
- <view>
43
- <xd-font-icon icon="iconerweima" width="56" height="56" size="50" color="#fff"></xd-font-icon>
44
- </view>
45
- <view>点击查看</view>
46
- </view>
47
41
  </div>
48
42
  <view class="card-list__date">
49
43
  <text>有效期:</text>
@@ -71,8 +65,16 @@
71
65
  </view>
72
66
  </view>
73
67
  </view>
68
+ <view v-else>
69
+ <view class="jfb-base-card-disabled-entry__body-empty">
70
+ <view class="jfb-base-card-disabled-entry__body-empty-wrap">
71
+ <image :src="emptyBg"></image>
72
+ 暂无票券
73
+ </view>
74
+ </view>
75
+ </view>
74
76
  <view class="bottom_btn-mask"></view>
75
- <view class="bottom_btn" :style="prod_bottom">
77
+ <view v-if="disableList&&disableList.length>0" class="bottom_btn" :style="prod_bottom">
76
78
  <xd-button
77
79
  width="680rpx"
78
80
  radius="50rpx"
@@ -111,6 +113,9 @@ export default {
111
113
  prod_bottom() {
112
114
  return this.fixedStyle({height: 0, zIndex: 111});
113
115
  },
116
+ emptyBg() {
117
+ return this.getNoData();
118
+ },
114
119
  },
115
120
  watch: {
116
121
  container(value) {
@@ -118,8 +123,8 @@ export default {
118
123
  },
119
124
  },
120
125
  created() {
126
+ console.log(this.getNoData(),'this.getNoData()this.getNoData()');
121
127
  this.init(this.container);
122
-
123
128
  },
124
129
  methods: {
125
130
  onJfbLoad(options) {
@@ -166,10 +171,10 @@ export default {
166
171
  let cardIds = this.disableList.map(item=>{
167
172
  return item.card_number + ''
168
173
  });
169
- jfbRootExec("disabledCardUnbindEntry", {vm: this, data: {card_number: cardIds.join(','),},})
174
+ jfbRootExec("batchDisabledCardUnbindEntry", {vm: this, data: {card_numbers: cardIds.join(','),},})
170
175
  .then((res) => {
171
176
  this.$xdAlert({
172
- content: "解绑成功",
177
+ content: "全部失效票券已解绑",
173
178
  close: () => {
174
179
  this.getCardList();
175
180
  },
@@ -177,7 +182,6 @@ export default {
177
182
  })
178
183
  .catch((err) => {
179
184
  this.$xdLog.catch(err);
180
- console.log(err, "err");
181
185
  });
182
186
  }
183
187
  },
@@ -204,7 +208,7 @@ export default {
204
208
  })
205
209
  .then((res) => {
206
210
  this.$xdAlert({
207
- content: "解绑成功",
211
+ content: "票券已解绑",
208
212
  close: () => {
209
213
  this.getCardList();
210
214
  },
@@ -318,6 +322,29 @@ export default {
318
322
  }
319
323
  }
320
324
 
325
+ &-empty {
326
+ color: #888;
327
+ font-size: unit(24,rpx);
328
+ height: 60vh;
329
+ display: flex;
330
+ align-items: center;
331
+ justify-content: center;
332
+
333
+ &-wrap {
334
+ display: flex;
335
+ flex-direction: column;
336
+
337
+ & > image {
338
+ width: unit(460,rpx);
339
+ height: unit(400,rpx);
340
+ }
341
+ }
342
+
343
+ & > view {
344
+ text-align: center;
345
+ }
346
+ }
347
+
321
348
  &-disabled {
322
349
  font-size: unit(28, rpx);
323
350
  color: #b8b7be;
@@ -120,7 +120,8 @@
120
120
  :style="{ color: warningColor }"
121
121
  v-if="tabIndex === 2"
122
122
  >* 目前仅支持电影票兑换券进行转换</view>
123
- <view
123
+ <view v-if="showList.length>0">
124
+ <view
124
125
  v-if="tabIndex === 2 || tabIndex === 1"
125
126
  class="jfb-base-card-entry__body-card"
126
127
  >
@@ -204,6 +205,15 @@
204
205
  </view>
205
206
  </view>
206
207
  </view>
208
+ </view>
209
+ <view v-else>
210
+ <view class="jfb-base-card-entry__body-empty">
211
+ <view class="jfb-base-card-entry__body-empty-wrap">
212
+ <image :src="emptyBg"></image>
213
+ 暂无票券
214
+ </view>
215
+ </view>
216
+ </view>
207
217
  <view
208
218
  v-if="showDisabled==='Y'"
209
219
  @click="handleToDisabled"
@@ -263,6 +273,9 @@ export default {
263
273
  showList(){
264
274
  return this.tabIndex === 1 ? this.cardList: this.changeList
265
275
  },
276
+ emptyBg() {
277
+ return this.getNoData();
278
+ },
266
279
  },
267
280
  filters:{
268
281
  cutstr(val){
@@ -605,6 +618,29 @@ export default {
605
618
  padding: unit(30, rpx) unit(26, rpx);
606
619
  color: #333;
607
620
 
621
+ &-empty {
622
+ color: #888;
623
+ font-size: unit(24,rpx);
624
+ height: 60vh;
625
+ display: flex;
626
+ align-items: center;
627
+ justify-content: center;
628
+
629
+ &-wrap {
630
+ display: flex;
631
+ flex-direction: column;
632
+
633
+ & > image {
634
+ width: unit(460,rpx);
635
+ height: unit(400,rpx);
636
+ }
637
+ }
638
+
639
+ & > view {
640
+ text-align: center;
641
+ }
642
+ }
643
+
608
644
  &-dialog {
609
645
  position: fixed;
610
646
  top: 0;
@@ -0,0 +1,71 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description API模型
5
+ * 建议:Ffff=>模块 Xxxx=>自定义名字
6
+ * 获取单记录(getByIdFfffXxxx)
7
+ * 获取列表记录(getByListFfffXxxx)
8
+ * 添加列表记录(addFfffXxxxx)
9
+ * 删除列表记录(removeFfffXxxxx|deleteFfffXxxx)
10
+ * 更新列表记录(updateFfffXxxxx)
11
+ * @type {*[]}
12
+ */
13
+ module.exports = [
14
+ {
15
+ mapFnName: 'qrcodeCardBindEntry',
16
+ isRule: false,
17
+ title: '根据二维码绑定卡',
18
+ prefix: 'qrcode',
19
+ path: '/card/v1/card-bind/bind-card-by-qrcode',
20
+ data: {
21
+ card_qrcode: ['二维码内容', 'String', '必选'],
22
+ },
23
+ disabled: true,
24
+ },
25
+ {
26
+ mapFnName: 'getByPwdCardDetailEntry',
27
+ isRule: false,
28
+ title: '根据卡号密码获得卡信息',
29
+ prefix: 'detal',
30
+ path: '/card/v1/card-bind/get-card-by-password',
31
+ data: {
32
+ card_number: ['卡号', 'String', '必选'],
33
+ card_password: ['卡号密码', 'String', '必选']
34
+ },
35
+ disabled: true,
36
+ },
37
+ {
38
+ mapFnName: 'getByQrCardDetailEntry',
39
+ isRule: false,
40
+ title: '根据二维码获得卡信息',
41
+ prefix: 'detal',
42
+ path: '/card/v1/card-bind/get-card-by-qrcode',
43
+ data: {
44
+ card_qrcode: ['二维码', 'String', '必选'],
45
+ },
46
+ disabled: true,
47
+ },
48
+ {
49
+ mapFnName: 'pwdCardBindEntry',
50
+ isRule: false,
51
+ title: '根据卡号密码绑定卡',
52
+ prefix: 'pwd',
53
+ path: '/card/v1/card-bind/bind-card-by-password',
54
+ data: {
55
+ card_number: ['卡号', 'String', '必选'],
56
+ card_password: ['密码', 'String', '可选'],
57
+ },
58
+ disabled: true,
59
+ },
60
+ {
61
+ mapFnName: 'qrCardBindEntry',
62
+ isRule: false,
63
+ title: '根据二维码绑定卡',
64
+ prefix: 'qrcode',
65
+ path: '/card/v1/card-bind/bind-card-by-qrcode',
66
+ data: {
67
+ card_qrcode: ['二维码', 'String', '必选'],
68
+ },
69
+ disabled: true,
70
+ },
71
+ ];
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+
3
+ export default {
4
+ style: [],
5
+ advanced: [],
6
+ content: [
7
+ {
8
+ label: '卡绑定成功回跳地址:', //label
9
+ ele: 'xd-select-pages-path', //package 名称
10
+ valueKey: 'back_url', //form[valueKey]
11
+ placeholder: '请选择卡绑定成功回跳地址',
12
+ value: null,
13
+ setting: {
14
+ router: XdBus.getParentApi('getPagesTree'),
15
+ },
16
+ inline: false,
17
+ },
18
+ {
19
+ label: '券号框自定义文案:',
20
+ ele: 'el-input',
21
+ type: 'text',
22
+ valueKey: 'card_num_placeholder',
23
+ value: '',
24
+ placeholder: '请输入券号框自定义文案',
25
+ className: 'input80'
26
+ },
27
+ {
28
+ label: '密码框自定义文案:',
29
+ ele: 'el-input',
30
+ type: 'text',
31
+ valueKey: 'card_pwd_placeholder',
32
+ value: '',
33
+ placeholder: '请输入密码框自定义文案',
34
+ className: 'input80'
35
+ },
36
+ ],
37
+ };