jufubao-base 1.0.18 → 1.0.20

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 (36) hide show
  1. package/package.json +3 -2
  2. package/src/components/JfbBaseBlock/JfbBaseBlockMixin.js +1 -1
  3. package/src/components/JfbBaseCard/JfbBaseCard.vue +33 -49
  4. package/src/components/JfbBaseCard/JfbBaseCardMixin.js +1 -1
  5. package/src/components/JfbBaseCardBind/JfbBaseCardBind.vue +1 -0
  6. package/src/components/JfbBaseCardBind/JfbBaseCardBindMixin.js +1 -1
  7. package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +6 -3
  8. package/src/components/JfbBaseCardDetail/JfbBaseCardDetailMixin.js +1 -1
  9. package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +21 -15
  10. package/src/components/JfbBaseCardInfo/JfbBaseCardInfoMixin.js +1 -1
  11. package/src/components/JfbBaseCardMy/JfbBaseCardMyMixin.js +1 -1
  12. package/src/components/JfbBaseCardShift/Api.js +11 -0
  13. package/src/components/JfbBaseCardShift/JfbBaseCardShift.vue +3 -2
  14. package/src/components/JfbBaseCardShift/JfbBaseCardShiftMixin.js +1 -1
  15. package/src/components/JfbBaseFooter/Attr.js +82 -0
  16. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +173 -0
  17. package/src/components/{JfbBaseVerificationPay/JfbBaseVerificationPayLess.less → JfbBaseFooter/JfbBaseFooterLess.less} +1 -1
  18. package/src/components/{JfbBaseVerificationBefore/JfbBaseVerificationBeforeMixin.js → JfbBaseFooter/JfbBaseFooterMixin.js} +1 -1
  19. package/src/components/JfbBaseLine/JfbBaseLineMixin.js +1 -1
  20. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +13 -2
  21. package/src/components/JfbBaseLogin/JfbBaseLoginMixin.js +1 -1
  22. package/src/components/JfbBaseSetPwd/JfbBaseSetPwdMixin.js +1 -1
  23. package/src/components/JfbBaseSuccess/Attr.js +68 -0
  24. package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +277 -0
  25. package/src/components/{JfbBaseVerificationBefore/JfbBaseVerificationBeforeLess.less → JfbBaseSuccess/JfbBaseSuccessLess.less} +1 -1
  26. package/src/components/{JfbBaseVerificationPay/JfbBaseVerificationPayMixin.js → JfbBaseSuccess/JfbBaseSuccessMixin.js} +1 -1
  27. package/src/components/JfbBaseTestApi/JfbBaseTestApiMixin.js +1 -1
  28. package/src/components/JfbBaseTestBody/JfbBaseTestBodyMixin.js +1 -1
  29. package/src/components/JfbBaseTestBottom/JfbBaseTestBottomMixin.js +1 -1
  30. package/src/components/JfbBaseTestTop/JfbBaseTestTopMixin.js +1 -1
  31. package/src/components/JfbBaseVerificationBefore/Api.js +0 -16
  32. package/src/components/JfbBaseVerificationBefore/Attr.js +0 -154
  33. package/src/components/JfbBaseVerificationBefore/JfbBaseVerificationBefore.vue +0 -225
  34. package/src/components/JfbBaseVerificationPay/Api.js +0 -88
  35. package/src/components/JfbBaseVerificationPay/Attr.js +0 -154
  36. package/src/components/JfbBaseVerificationPay/JfbBaseVerificationPay.vue +0 -493
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -12,6 +12,7 @@
12
12
  "init.entry": "node ./build/commands/entry.init.js",
13
13
  "update": "node ./commands/update.pack.js",
14
14
  "create": "node ./commands/create.pack.js",
15
+ "change": "node ./commands/change.pack",
15
16
  "release": "node ./commands/npmignore && npm publish",
16
17
  "init": "cross-env isLocal=false node ./commands.js",
17
18
  "init.local": "cross-env isLocal=true node ./commands.js",
@@ -47,7 +48,7 @@
47
48
  "core-js": "^2.6.5",
48
49
  "flyio": "^0.6.2",
49
50
  "gxd-commands-bussiness": "^1.0.6",
50
- "gxd-uni-library": "1.0.40",
51
+ "gxd-uni-library": "1.1.3",
51
52
  "jweixin-module": "^1.6.0",
52
53
  "md5": "^2.3.0",
53
54
  "path-to-regexp": "^6.2.1",
@@ -169,7 +169,7 @@ export default {
169
169
  XdBus.send('onSelectPackage', {
170
170
  containerId: this.containerId,
171
171
  Attr: AttrObj,
172
- container: this.container
172
+ container: this.$xdUniHelper.cloneDeep(this.container)
173
173
  });
174
174
 
175
175
  //绑定选中插件事件
@@ -41,7 +41,7 @@
41
41
  *目前仅支持电影票兑换券进行转换
42
42
  </view>
43
43
  <view class="jfb-base-card__body-card">
44
- <view v-for="(item,index) in cardList" :key="index" @click="handleBindLogin(item)"
44
+ <view v-for="(item,index) in showList" :key="index" @click="handleBindLogin(item)"
45
45
  class="jfb-base-card__body-card-item">
46
46
  <view class="jfb-base-card__body-card-item-left">
47
47
  <xd-font-icon size="55" icon="iconyouhuiquan"></xd-font-icon>
@@ -49,14 +49,10 @@
49
49
  </view>
50
50
  <view class="jfb-base-card__body-card-item-right">
51
51
  <view class="jfb-base-card__body-card-item-right-top">
52
- <view v-if="1">
52
+ <view>
53
53
  <xd-font-icon icon="iconkaquan" size="30" style="margin-right: 10rpx"></xd-font-icon>
54
54
  <view>{{item.card_type_name}}</view>
55
55
  </view>
56
- <view v-else>
57
- <view style="font-size: 48rpx">{{item.card_point}}</view>
58
- <view style="font-size: 18rpx;position: relative;top: 30rpx;margin-left: 5rpx">{{item.unit}}</view>
59
- </view>
60
56
  <view>
61
57
  <view>ID:{{item.card_number}}</view>
62
58
  <view>有效期至:{{item.end_time}}</view>
@@ -64,7 +60,7 @@
64
60
  </view>
65
61
  <view class="jfb-base-card__body-card-item-right-bottom">
66
62
  <view class="jfb-base-card__body-card-item-right-bottom-info">
67
- <view v-if="1" class="jfb-base-card__body-card-item-right-bottom-info-residue">
63
+ <view class="jfb-base-card__body-card-item-right-bottom-info-residue">
68
64
  剩余点数:{{item.card_point}}
69
65
  </view>
70
66
  <view class="jfb-base-card__body-card-item-right-bottom-info-deduction">
@@ -87,14 +83,10 @@
87
83
  </view>
88
84
  <view class="jfb-base-card__body-card-item-right">
89
85
  <view class="jfb-base-card__body-card-item-right-top">
90
- <view v-if="item.unit==='点'">
86
+ <view>
91
87
  <xd-font-icon color="#B8B7BE" icon="iconkaquan" size="30" style="margin-right: 10rpx"></xd-font-icon>
92
88
  <view>{{item.card_type_name}}</view>
93
89
  </view>
94
- <view v-else>
95
- <view style="font-size: 48rpx">{{item.card_point}}</view>
96
- <view style="font-size: 18rpx;position: relative;top: 30rpx;margin-left: 5rpx">{{item.unit}}</view>
97
- </view>
98
90
  <view>
99
91
  <view>ID:{{item.card_number}}</view>
100
92
  <view>有效期至:{{item.end_time}}</view>
@@ -102,7 +94,7 @@
102
94
  </view>
103
95
  <view class="jfb-base-card__body-card-item-right-bottom">
104
96
  <view class="jfb-base-card__body-card-item-right-bottom-info">
105
- <view v-if="item.unit==='点'" class="jfb-base-card__body-card-item-right-bottom-info-residue">
97
+ <view class="jfb-base-card__body-card-item-right-bottom-info-residue">
106
98
  剩余点数:{{item.card_point}}
107
99
  </view>
108
100
  <view class="jfb-base-card__body-card-item-right-bottom-info-deduction">
@@ -139,21 +131,30 @@
139
131
  jwxSDK: state => state.jwxSDK
140
132
  })
141
133
  },
134
+ watch: {
135
+ tabIndex(newVal, oldVal) {
136
+ if (newVal === 1) {
137
+ this.showList = this.cardList
138
+ } else {
139
+ this.showList = this.changeList
140
+ }
141
+ }
142
+ },
142
143
  data() {
143
144
  return {
144
145
  cutIndex: 1,
145
146
  tabIndex: 1,
146
147
  isBack: null, //是否使用返回键
147
148
  cardList: [],
148
- disableList: [],
149
+ showList: [],
150
+ changeList: [], disableList: [],
149
151
  inCallback: null, //内部跳转地址
150
-
151
- //todo
152
152
  }
153
153
  },
154
154
  created() {
155
-
156
- //todo
155
+ let {inCallback} = this.$route.query;
156
+ if (inCallback) inCallback = decodeURIComponent(inCallback);
157
+ this.inCallback = inCallback || this.settings.index;
157
158
  },
158
159
  methods: {
159
160
  handleToLink(path) {
@@ -183,19 +184,7 @@
183
184
  */
184
185
  handleBindLogin(item) {
185
186
  if (this.tabIndex === 1) {
186
- if (this.isBack === 1) {
187
- this.$xdUniHelper.navigateBack();
188
- return;
189
- }
190
-
191
- console.log('$storage.get', this.$storage.get('xd_callback'), this.callback, this.inCallback)
192
- //已经设置了xd_callback,但是callback没有被初始化
193
- if (this.$storage.get('xd_callback') && !this.callback) {
194
- this.$xdLog.push({
195
- '$storage.get': this.$storage.get('xd_callback'),
196
- callbackInit: false
197
- }, 'alert', 'info')
198
- }
187
+ console.log('bindCardLogin', this.inCallback)
199
188
 
200
189
  //无效卡
201
190
  if (item['is_valid'] !== 'Y') {
@@ -208,14 +197,9 @@
208
197
  data: {card_number: item['card_number']}
209
198
  }).then(res => {
210
199
  this.$xdHideLoading();
211
- console.log('bindCardLogin', this.callback, this.inCallback, this.$storage.get('xd_callback'))
212
- if (!this.callback && !this.inCallback && !this.$storage.get('xd_callback')) {
213
- this.$xdUniHelper.navigateTo({
214
- url: `/pages/chose/chose`
215
- });
216
- return
217
- }
218
- console.log('bindCardLogin', this.callback, this.inCallback, this.$storage.get('xd_callback'))
200
+ this.$xdUniHelper.redirectTo({
201
+ url: this.inCallback
202
+ });
219
203
  })
220
204
  .catch(res => {
221
205
  this.$xdHideLoading();
@@ -234,30 +218,30 @@
234
218
  },
235
219
  onJfbLoad(options) {
236
220
  console.log(this.jwxSDK, '000000')
237
- this.$nextTick(() => {
238
- let {inCallback, isBack} = this.$xdUniHelper.parseURL()['params'];
239
- if (inCallback) this.inCallback = decodeURIComponent(inCallback);
240
- if (isBack) this.isBack = Number(isBack);
241
- });
242
-
243
221
  jfbRootExec('getListCardBind', {
244
-
245
222
  vm: this,
246
223
  data: {}
247
-
248
224
  }).then((res) => {
249
- this.cardList = res.filter((item) => {
225
+ this.cardList = res.list.filter((item) => {
250
226
  if (item['is_valide'] !== 'N' && item['card_point'] !== 0) {
251
227
  return true
252
228
  }
253
229
  return false
254
230
  });
255
- this.disableList = res.filter((item) => {
231
+ this.disableList = res.list.filter((item) => {
256
232
  if (item['is_valide'] === 'N' || item['card_point'] === 0) {
257
233
  return true
258
234
  }
259
235
  return false
260
236
  });
237
+ this.changeList = this.cardList.filter(item => {
238
+ if (item['is_exchange'] === 'Y') {
239
+ return true
240
+ }
241
+ return false
242
+ })
243
+
244
+ this.showList = this.cardList
261
245
  }).catch()
262
246
  },
263
247
  onJfbScroll(options) {
@@ -169,7 +169,7 @@ export default {
169
169
  XdBus.send('onSelectPackage', {
170
170
  containerId: this.containerId,
171
171
  Attr: AttrObj,
172
- container: this.container
172
+ container: this.$xdUniHelper.cloneDeep(this.container)
173
173
  });
174
174
 
175
175
  //绑定选中插件事件
@@ -94,6 +94,7 @@
94
94
  },
95
95
  onJfbBack(options) {
96
96
  console.log('event.onJfbBack', options)
97
+ this.$xdUniHelper.navigateBack()
97
98
  },
98
99
  }
99
100
  }
@@ -169,7 +169,7 @@ export default {
169
169
  XdBus.send('onSelectPackage', {
170
170
  containerId: this.containerId,
171
171
  Attr: AttrObj,
172
- container: this.container
172
+ container: this.$xdUniHelper.cloneDeep(this.container)
173
173
  });
174
174
 
175
175
  //绑定选中插件事件
@@ -124,7 +124,7 @@
124
124
  show: false,
125
125
  textList: [],
126
126
  password: '',
127
- card_number: '101001000005479',
127
+ card_number: '',
128
128
 
129
129
  userInfo: null, //用户信息
130
130
  brandInfo: null, //brand
@@ -146,9 +146,11 @@
146
146
  this.brandInfo = getApp().globalData.$xd['brandInfo']
147
147
  // this.download = getBusinessImageUrl('base_download.png')
148
148
  // this.qrcode = getBusinessImageUrl('base_qr.png')
149
- this.init();
150
149
  // this.editPhone = this.userInfo.mobile
151
- // let {card_number} = this.$xdUniHelper.parseURL()['params'];
150
+ let card_number = options.card_number;
151
+ this.card_number = card_number
152
+ this.init();
153
+ console.log(this.card_number,'options')
152
154
  // if (card_number) {
153
155
  // this.card_number = card_number;
154
156
  // if (this.brandInfo['is_enable_pay_password'] === 'N') {
@@ -220,6 +222,7 @@
220
222
  },
221
223
  onJfbBack(options) {
222
224
  console.log('event.onJfbBack', options)
225
+ this.$xdUniHelper.navigateBack()
223
226
  },
224
227
  setInval(time) {
225
228
  if (time === 0) {
@@ -169,7 +169,7 @@ export default {
169
169
  XdBus.send('onSelectPackage', {
170
170
  containerId: this.containerId,
171
171
  Attr: AttrObj,
172
- container: this.container
172
+ container: this.$xdUniHelper.cloneDeep(this.container)
173
173
  });
174
174
 
175
175
  //绑定选中插件事件
@@ -42,6 +42,7 @@
42
42
  <script>
43
43
  import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
44
44
  import {jfbRootExec} from "@/utils/xd.event";
45
+ import {Base64} from 'js-base64'
45
46
  import JfbBaseCardInfoMixin from "./JfbBaseCardInfoMixin";
46
47
  import XdButton from "@/components/XdButton/XdButton";
47
48
 
@@ -100,15 +101,17 @@
100
101
  {
101
102
  vm: this,
102
103
  data: {
103
- card_password: "59009501",
104
- card_number: "101001000005478"
104
+ card_password: this.card_password,
105
+ card_number: this.card_number
105
106
  }
106
107
 
107
108
  }).then((res) => {
108
109
  this.$xdAlert({
109
110
  content: '绑定成功',
110
111
  close: () => {
111
- this.$xdUniHelper.navigateBack()
112
+ this.$xdUniHelper.redirectTo({
113
+ url: '/pages/card/card'
114
+ })
112
115
  }
113
116
  })
114
117
  }).catch()
@@ -117,41 +120,43 @@
117
120
  {
118
121
  vm: this,
119
122
  data: {
120
- card_qrcode: "http://sandbox-c.jufubao.cn/web/wx/card/scan/bind?pa=101001000005479|8178cff8-fe34-11ea-b580-00163e047a75"
123
+ card_qrcode: this.qrcode
121
124
  }
122
125
  }).then((res) => {
123
126
  this.$xdAlert({
124
127
  content: '绑定成功',
125
128
  close: () => {
126
- this.$xdUniHelper.navigateBack()
129
+ this.$xdUniHelper.redirectTo({
130
+ url: '/pages/card/card'
131
+ })
127
132
  }
128
133
  })
129
134
  }).catch()
130
135
  }
131
136
  },
132
137
  onJfbLoad(options) {
133
- this.qrcode = options.qrcode || ''
134
- this.card_number = options.card_number || '101001000005478'
135
- this.card_password = options.pwd || '59009501'
138
+ this.qrcode = options.qrcode
139
+ this.card_number = Base64.decode(options.card_number)
140
+ this.card_password = Base64.decode(options.pwd)
136
141
  if (this.card_password) {
137
142
  jfbRootExec('getByPwdCardDetail',
138
143
  {
139
144
  vm: this,
140
145
  data: {
141
- card_password: "59009501",
142
- card_number: "101001000005478"
146
+ card_password: this.card_password,
147
+ card_number: this.card_number
143
148
  }
144
149
 
145
- }).then((res)=>{
146
- res.is_exchange_name = res.is_exchange==='Y'?'可转换':'不可转换'
147
- this.info = res
150
+ }).then((res) => {
151
+ res.is_exchange_name = res.is_exchange === 'Y' ? '可转换' : '不可转换'
152
+ this.info = res
148
153
  }).catch()
149
- } else if(this.qrcode) {
154
+ } else if (this.qrcode) {
150
155
  jfbRootExec('getByQrCardDetail',
151
156
  {
152
157
  vm: this,
153
158
  data: {
154
- card_qrcode: "http://sandbox-c.jufubao.cn/web/wx/card/scan/bind?pa=101001000005479|8178cff8-fe34-11ea-b580-00163e047a75"
159
+ card_qrcode: this.qrcode
155
160
  }
156
161
  }).then((res) => {
157
162
  res.is_exchange_name = res.is_exchange === 'Y' ? '可转换' : '不可转换'
@@ -174,6 +179,7 @@
174
179
  },
175
180
  onJfbBack(options) {
176
181
  console.log('event.onJfbBack', options)
182
+ this.$xdUniHelper.navigateBack()
177
183
  },
178
184
  }
179
185
  }
@@ -169,7 +169,7 @@ export default {
169
169
  XdBus.send('onSelectPackage', {
170
170
  containerId: this.containerId,
171
171
  Attr: AttrObj,
172
- container: this.container
172
+ container: this.$xdUniHelper.cloneDeep(this.container)
173
173
  });
174
174
 
175
175
  //绑定选中插件事件
@@ -169,7 +169,7 @@ export default {
169
169
  XdBus.send('onSelectPackage', {
170
170
  containerId: this.containerId,
171
171
  Attr: AttrObj,
172
- container: this.container
172
+ container: this.$xdUniHelper.cloneDeep(this.container)
173
173
  });
174
174
 
175
175
  //绑定选中插件事件
@@ -22,4 +22,15 @@ module.exports = [
22
22
  },
23
23
  disabled: true,
24
24
  },
25
+ {
26
+ mapFnName: 'getByIdCardDetail', //自定义方法名字(必选)
27
+ isRule: false,
28
+ title: '获得绑定的卡详情',
29
+ prefix: 'detal',
30
+ path: '/card/v1/card-bind/get-bind-card',
31
+ params: {
32
+ card_number: ['卡号', 'String', '必选'],
33
+ },
34
+ disabled: true,
35
+ },
25
36
  ];
@@ -119,7 +119,7 @@
119
119
  {
120
120
  vm: this,
121
121
  data: {
122
- card_number: '171004000000012',
122
+ card_number: this.card_number,
123
123
  }
124
124
  }).then((res)=>{
125
125
  this.success=true
@@ -133,7 +133,7 @@
133
133
  },
134
134
  onJfbLoad(options) {
135
135
  console.log(this.layoutInfo, options, 8888)
136
- this.card_number = options.card_number || '171004000000012'
136
+ this.card_number = options.card_number
137
137
  jfbRootExec('getByIdCardDetail', {
138
138
  vm: this,
139
139
  data: {
@@ -158,6 +158,7 @@
158
158
  },
159
159
  onJfbBack(options) {
160
160
  console.log('event.onJfbBack', options)
161
+ this.$xdUniHelper.navigateBack()
161
162
  },
162
163
  }
163
164
  }
@@ -169,7 +169,7 @@ export default {
169
169
  XdBus.send('onSelectPackage', {
170
170
  containerId: this.containerId,
171
171
  Attr: AttrObj,
172
- container: this.container
172
+ container: this.$xdUniHelper.cloneDeep(this.container)
173
173
  });
174
174
 
175
175
  //绑定选中插件事件
@@ -0,0 +1,82 @@
1
+ 'use strict';
2
+ export default {
3
+ style: [],
4
+ advanced: [],
5
+ content: [
6
+ {
7
+ label: '', //label
8
+ ele: 'slot', //package 名称
9
+ slot: 'is_reference_title',
10
+ },
11
+ {
12
+ label: '背景颜色:', //label
13
+ ele: 'xd-color', //package 名称
14
+ valueKey: 'bgColor', //form[valueKey]
15
+ value: '#f9f9f9', //v-model
16
+ placeholder: '请选择背景颜色',
17
+ setting: {
18
+ isAlpha: false
19
+ },
20
+ classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
21
+ rules: [
22
+ {
23
+ required: true,
24
+ message: '请选择背景颜色',
25
+ trigger: 'change'
26
+ },
27
+ ]
28
+ },
29
+ {
30
+ label: '菜单文字颜色:', //label
31
+ ele: 'xd-color', //package 名称
32
+ valueKey: 'color', //form[valueKey]
33
+ value: '#333', //v-model
34
+ setting: {
35
+ isAlpha: false
36
+ },
37
+ placeholder: '请选择菜单文字颜色',
38
+ classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
39
+ },
40
+ {
41
+ label: '菜单文字选中颜色:', //label
42
+ ele: 'xd-color', //package 名称
43
+ valueKey: 'selectedColor', //form[valueKey]
44
+ setting: {
45
+ isAlpha: false
46
+ },
47
+ value: '#c00', //v-model
48
+ placeholder: '请选择菜单文字选中颜色',
49
+ classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
50
+ },
51
+ {
52
+ label: '菜单配置:', //label
53
+ ele: 'xd-footer-setting', //package 名称
54
+ valueKey: 'footer-setting', //form[valueKey]
55
+ value: [],
56
+ setting: {
57
+ router: XdBus.getParentData('getPagesTree'),
58
+ },
59
+ handleCustom({action,data}){
60
+ console.log(`handleCustom.${action}`, data);
61
+ if(action === 'number') {
62
+ XdBus.getParentApi('getOptionsNoticeNumber')()
63
+ .then(res => {
64
+ data.cb(res.list)
65
+ })
66
+ .catch();
67
+ }
68
+ },
69
+ inline: false,
70
+ notice: '设置底部菜单的链接地址、标题(最多<sapn style="color: red">五个汉字</sapn>)、ICON图标(<a href="https://www.iconfont.cn/manage/index?spm=a313x.7781069.1998910419.db775f1f3&manage_type=myprojects&projectId=3378319&keyword=&project_type=&page=" style="color: blue" target="_blank">ICONFONT库</a>)、ICON大小(单位:<sapn style="color: red">像素</sapn>)和是否有消息数量显示(无数量显示可以不填写)',
71
+ rules: [
72
+ {required: true, message: '请添加内容', trigger: 'change'},
73
+ ],
74
+ },
75
+ {
76
+ label: '', //label
77
+ ele: 'slot', //package 名称
78
+ slot: 'is_reference',
79
+ },
80
+ ],
81
+ };
82
+