jufubao-base 1.0.119-beta13 → 1.0.119-beta14

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.119-beta13",
3
+ "version": "1.0.119-beta14",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -8,99 +8,94 @@ export default {
8
8
  content: (data) => {
9
9
  return [
10
10
  {
11
- label: '背景颜色:', //label
12
- ele: 'xd-color', //package 名称
13
- valueKey: 'bgcolor', //form[valueKey]
14
- value: data.bgcolor || '', //v-model
15
- placeholder: '请输入占位框背景颜色',
16
- classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
17
- rules: [
11
+ label: '更改分类label(可排序):',
12
+ ele: 'xd-set-sort-label',
13
+ valueKey: 'newLabel',
14
+ value: data['newLabel'] || null,
15
+ disabled: false,
16
+ defaultValue: data['newLabel'],
17
+ list: [
18
18
  {
19
- required: true,
20
- message: '请输入占位框背景颜色',
21
- trigger: 'blur'
19
+ icon: "iconpiao",
20
+ label: "票券",
21
+ value: 'card',
22
+ sort: 1
22
23
  },
24
+ {
25
+ icon: "iconyuanbao",
26
+ label: "元宝",
27
+ value: 'wallet',
28
+ sort: 2
29
+ },
30
+ {
31
+ icon: "iconjifenjilu",
32
+ label: "积分",
33
+ value: 'score',
34
+ sort: 3
35
+ },
36
+ ]
37
+ },
38
+ {
39
+ label: '是否展示票券入口:',
40
+ ele: 'xd-radio',
41
+ valueKey: 'isCard',
42
+ value: data['isCard'] || 'Y',
43
+ list: [
44
+ { "label": "是", "value": 'Y' },
45
+ { "label": "否", "value": 'N' },
23
46
  ]
24
47
  },
25
48
  {
26
- label: '选中路径:', //label
27
- ele: 'xd-select-pages-path', //package 名称
28
- valueKey: 'select-pages-path', //form[valueKey]
29
- value: data['select-pages-path'] || {},
49
+ label: '票券跳转路径:',
50
+ ele: 'xd-select-pages-path',
51
+ valueKey: 'cardPath',
52
+ value: data['cardPath'] || {},
30
53
  setting: {
31
54
  router: XdBus.getParentApi('getPagesTree')
32
55
  },
33
56
  inline: false,
34
57
  },
35
- data.bgcolor && {
36
- label: '高度:', //label
37
- ele: 'el-input', //package 名称
38
- type: 'number',
39
- valueKey: 'height', //form[valueKey]
40
- value: data.height || 100, //v-model
41
- placeholder: '请输入占位框高度,单位像素,默认:10px',
42
- className: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
43
- rules: [
44
- {
45
- required: true,
46
- message: '请输入占位框高度',
47
- trigger: 'blur'
48
- },
58
+ {
59
+ label: '是否展示元宝入口:',
60
+ ele: 'xd-radio',
61
+ valueKey: 'isYuanbao',
62
+ value: data['isYuanbao'] || 'Y',
63
+ list: [
64
+ { "label": "是", "value": 'Y' },
65
+ { "label": "否", "value": 'N' },
49
66
  ]
50
67
  },
51
68
  {
52
- label: '', //label
53
- ele: 'slot', //package 名称
54
- slot: 'is_reference',
55
- },
56
- ].filter(i=>i)
57
- },
58
- advanced: [
59
- {
60
- label: '背景颜色:', //label
61
- ele: 'xd-color', //package 名称
62
- valueKey: 'bgcolor', //form[valueKey]
63
- value: '', //v-model
64
- placeholder: '请输入占位框背景颜色',
65
- classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
66
- rules: [
67
- {
68
- required: true,
69
- message: '请输入占位框背景颜色',
70
- trigger: 'blur'
69
+ label: '元宝跳转路径:',
70
+ ele: 'xd-select-pages-path',
71
+ valueKey: 'yuanbaoPath',
72
+ value: data['yuanbaoPath'] || {},
73
+ setting: {
74
+ router: XdBus.getParentApi('getPagesTree')
71
75
  },
72
- ]
73
- },
74
- {
75
- label: '选中路径:', //label
76
- ele: 'xd-select-pages-path', //package 名称
77
- valueKey: 'select-pages-path', //form[valueKey]
78
- value: null,
79
- setting: {
80
- router: XdBus.getParentApi('getPagesTree')
76
+ inline: false,
77
+ },
78
+ {
79
+ label: '是否展示积分入口:',
80
+ ele: 'xd-radio',
81
+ valueKey: 'isIntegral',
82
+ value: data['isIntegral'] || 'Y',
83
+ list: [
84
+ { "label": "是", "value": 'Y' },
85
+ { "label": "否", "value": 'N' },
86
+ ]
81
87
  },
82
- inline: false,
83
- },
84
- {
85
- label: '高度:', //label
86
- ele: 'el-input', //package 名称
87
- type: 'number',
88
- valueKey: 'height', //form[valueKey]
89
- value: null, //v-model
90
- placeholder: '请输入占位框高度,单位像素,默认:10px',
91
- classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
92
- rules: [
93
- {
94
- required: true,
95
- message: '请输入占位框高度',
96
- trigger: 'blur'
88
+ {
89
+ label: '积分跳转路径:',
90
+ ele: 'xd-select-pages-path',
91
+ valueKey: 'integralPath',
92
+ value: data['integralPath'] || {},
93
+ setting: {
94
+ router: XdBus.getParentApi('getPagesTree')
97
95
  },
98
- ]
99
- },
100
- {
101
- label: '', //label
102
- ele: 'slot', //package 名称
103
- slot: 'is_reference',
104
- },
105
- ],
96
+ inline: false,
97
+ },
98
+ ].filter(i => i)
99
+ },
100
+ advanced: [],
106
101
  };
@@ -2,109 +2,305 @@
2
2
  <view
3
3
  class="jfb-base-wallet"
4
4
  @click="handleEditxSelect"
5
- :class="{ editx : isEditx && active }"
5
+ :class="{ editx: isEditx && active }"
6
6
  >
7
7
  <!--#ifdef H5-->
8
8
  <view
9
9
  class="jfb-base-wallet__edit"
10
- :class="{ editx : isEditx && active }"
10
+ :class="{ editx: isEditx && active }"
11
11
  v-if="isEditx && active"
12
12
  >
13
13
  <view class="jfb-base-wallet__edit-icon" @click="delEdit">删除</view>
14
14
  </view>
15
15
  <!-- #endif -->
16
16
  <view class="jfb-base-wallet__body">
17
- <view>测试插件( {{containerId}} )</view>
17
+ <view class="jfb-base-wallet__body-title">我的账户</view>
18
+ <view class="jfb-base-wallet__body-type">
19
+ <view
20
+ :style="{
21
+ marginRight: index === showType.length - 1 ? '0' : '36rpx',
22
+ }"
23
+ v-for="(item, index) in showType"
24
+ @click="handleJumpTo(item)"
25
+ :key="index"
26
+ class="jfb-base-wallet__body-type-item"
27
+ >
28
+ <XdFontIcon :icon="item.icon"></XdFontIcon>
29
+ <view>{{ item.label }}</view>
30
+ </view>
31
+ </view>
18
32
  </view>
19
33
  </view>
20
34
  </template>
21
35
 
22
36
  <script>
23
- import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
24
- import { jfbRootExec } from "@/utils/xd.event";
25
- import JfbBaseWalletMixin from "./JfbBaseWalletMixin";
26
- import { getContainerPropsValue } from "@/utils/xd.base";
27
- import componentsMixins from "@/mixins/componentsMixins";
28
- import extsMixins from "@/mixins/extsMixins";
29
- export default {
30
- name: "JfbBaseWallet",
31
- components: {
32
- XdFontIcon
33
- },
34
- mixins: [
35
- componentsMixins, extsMixins, JfbBaseWalletMixin
36
- ],
37
- data() {
38
- return {
37
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
38
+ import { jfbRootExec } from "@/utils/xd.event";
39
+ import JfbBaseWalletMixin from "./JfbBaseWalletMixin";
40
+ import { getContainerPropsValue } from "@/utils/xd.base";
41
+ import componentsMixins from "@/mixins/componentsMixins";
42
+ import extsMixins from "@/mixins/extsMixins";
43
+ export default {
44
+ name: "JfbBaseWallet",
45
+ components: {
46
+ XdFontIcon,
47
+ },
48
+ mixins: [componentsMixins, extsMixins, JfbBaseWalletMixin],
49
+ data() {
50
+ return {
51
+ typeList: [
52
+ {
53
+ icon: "iconpiao",
54
+ label: "票券",
55
+ value: "card",
56
+ },
57
+ {
58
+ icon: "iconyuanbao",
59
+ label: "元宝",
60
+ value: "wallet",
61
+ },
62
+ {
63
+ icon: "iconjifenjilu",
64
+ label: "积分",
65
+ value: "score",
66
+ },
67
+ ],
68
+ newLabel: [],
69
+ isPreview: false,
70
+ isCard: "Y",
71
+ isYuanbao: "Y",
72
+ isIntegral: "Y",
73
+ cardPath: "",
74
+ yuanbaoPath: "",
75
+ integralPath: "",
76
+ };
77
+ },
78
+ watch: {
79
+ container(value) {
80
+ this.init(value);
81
+ },
82
+ newLabel: {
83
+ deep: true,
84
+ handler(n, o) {
85
+ if (this.isPreview) {
86
+ // 遍历tabs,找到newLabel中value与item1.value相同的项,将其赋值给item1.label
87
+ this.typeList.forEach((item1, index) => {
88
+ const item2 = this.newLabel.find(
89
+ (item) => item.value === item1.value
90
+ );
39
91
 
40
- //todo
92
+ if (item2) {
93
+ item1.label = item2.newLabel || item1.label;
94
+ item1.sort = item2.sort;
95
+ }
96
+ });
97
+ this.tabs.sort((a, b) => a.sort - b.sort);
98
+ }
99
+ },
100
+ },
101
+ isCard(n, o) {
102
+ if (n === "Y") {
103
+ let flag = this.showType.find((item) => item.value === "card");
104
+ if (!flag) {
105
+ this.showType.push({
106
+ icon: "iconpiao",
107
+ label: "票券",
108
+ value: "card",
109
+ });
110
+ }
111
+ } else {
112
+ let flagIndex = this.showType.findIndex(
113
+ (item) => item.value === "card"
114
+ );
115
+ if (flagIndex !== -1) {
116
+ this.showType.splice(flagIndex, 1);
117
+ }
41
118
  }
42
119
  },
43
- watch: {
44
- container(value) {
45
- this.init(value)
120
+ isYuanbao(n, o) {
121
+ if (n === "Y") {
122
+ let flag = this.showType.find((item) => item.value === "wallet");
123
+ if (!flag) {
124
+ this.showType.push({
125
+ icon: "iconyuanbao_mian",
126
+ label: "元宝",
127
+ value: "wallet",
128
+ });
129
+ }
130
+ } else {
131
+ let flagIndex = this.showType.findIndex(
132
+ (item) => item.value === "wallet"
133
+ );
134
+ if (flagIndex !== -1) {
135
+ this.showType.splice(flagIndex, 1);
136
+ }
46
137
  }
47
138
  },
48
- created() {
49
- this.init(this.container);
50
-
51
- //todo
139
+ isIntegral(n, o) {
140
+ if (n === "Y") {
141
+ let flag = this.showType.find((item) => item.value === "score");
142
+ if (!flag) {
143
+ this.showType.push({
144
+ icon: "iconyiwancheng1",
145
+ label: "积分",
146
+ value: "score",
147
+ });
148
+ }
149
+ } else {
150
+ let flagIndex = this.showType.findIndex(
151
+ (item) => item.value === "score"
152
+ );
153
+ if (flagIndex !== -1) {
154
+ this.showType.splice(flagIndex, 1);
155
+ }
156
+ }
52
157
  },
53
- methods: {
54
- onJfbLoad(options) {
158
+ },
159
+ computed: {
160
+ showType() {
161
+ this.typeList.forEach((item1, index) => {
162
+ const item2 = this.newLabel.find((item) => item.value === item1.value);
55
163
 
56
- // jfbRootExec('baiduUserLogin', {
164
+ if (item2) {
165
+ item1.label = item2.newLabel || item1.label;
166
+ item1.sort = item2.sort;
167
+ }
168
+ });
169
+ this.typeList.sort((a, b) => a.sort - b.sort);
170
+ return this.typeList;
171
+ },
172
+ },
173
+ created() {
174
+ this.init(this.container);
175
+ this.isPreview = this.$configProject.isPreview;
57
176
 
58
- // vm: this,// data: {
177
+ //todo
178
+ },
179
+ methods: {
180
+ onJfbLoad(options) {
181
+ // jfbRootExec('baiduUserLogin', {
182
+ // vm: this,// data: {
183
+ // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
184
+ // }
185
+ // }).then().catch()
186
+ },
187
+ /**
188
+ * @description 监听事件变化
189
+ * @param container {object} 业务组件对象自己
190
+ */
191
+ init(container) {
192
+ this.newLabel = getContainerPropsValue(container, "content.newLabel", []);
193
+ this.isCard = getContainerPropsValue(container, "content.isCard", "Y");
194
+ this.isYuanbao = getContainerPropsValue(
195
+ container,
196
+ "content.isYuanbao",
197
+ "Y"
198
+ );
199
+ this.isIntegral = getContainerPropsValue(
200
+ container,
201
+ "content.isIntegral",
202
+ "Y"
203
+ );
204
+ this.cardPath = getContainerPropsValue(container, "content.cardPath", {
205
+ value: "",
206
+ }).value;
59
207
 
60
- // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
208
+ this.yuanbaoPath = getContainerPropsValue(
209
+ container,
210
+ "content.yuanbaoPath",
211
+ { value: "" }
212
+ ).value;
61
213
 
62
- // }
214
+ this.integralPath = getContainerPropsValue(
215
+ container,
216
+ "content.integralPath",
217
+ { value: "" }
218
+ ).value;
219
+ },
220
+ handleJumpTo(item) {
221
+ console.log(item, "ppppp");
222
+ switch (item.value) {
223
+ case "card":
224
+ this.$xdUniHelper.navigateTo({
225
+ url: this.cardPath,
226
+ });
227
+ break;
63
228
 
64
- // }).then().catch()
65
- },
66
- /**
67
- * @description 监听事件变化
68
- * @param container {object} 业务组件对象自己
69
- */
70
- init(container) {
229
+ case "wallet":
230
+ this.$xdUniHelper.navigateTo({
231
+ url:`${this.yuanbaoPath}?type=wallet`,
232
+ });
233
+ break;
71
234
 
72
- //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
73
-
74
- //this.height = getContainerPropsValue(container, 'content.height', 10);
75
- },
76
- onJfbScroll(options) {
77
- console.log('event.onJfbScroll', options)
78
- },
79
- onJfbReachBottom(options) {
80
- console.log('event.onJfbReachBottom', options)
81
- },
82
- onJfbShow(options) {
83
- console.log('event.onJfbShow', options)
84
- },
85
- onJfbHide(options) {
86
- console.log('event.onJfbHide', options)
87
- },
88
- onJfbBack(options) {
89
- console.log('event.onJfbBack', options)
90
- },
91
- onJfbUpdate(...data) {
92
- console.log('event.onJfbUpdate', data)
93
- },
94
- onJfbCustomEvent(options) {
95
- console.log('event.onJfbReachBottom', options)
96
- },
97
- }
98
- }
235
+ case "score":
236
+ this.$xdUniHelper.navigateTo({
237
+ url: `${this.integralPath}?type=score`,
238
+ });
239
+ break;
99
240
 
241
+ default:
242
+ break;
243
+ }
244
+ },
245
+ onJfbScroll(options) {
246
+ console.log("event.onJfbScroll", options);
247
+ },
248
+ onJfbReachBottom(options) {
249
+ console.log("event.onJfbReachBottom", options);
250
+ },
251
+ onJfbShow(options) {
252
+ console.log("event.onJfbShow", options);
253
+ },
254
+ onJfbHide(options) {
255
+ console.log("event.onJfbHide", options);
256
+ },
257
+ onJfbBack(options) {
258
+ console.log("event.onJfbBack", options);
259
+ },
260
+ onJfbUpdate(...data) {
261
+ console.log("event.onJfbUpdate", data);
262
+ },
263
+ onJfbCustomEvent(options) {
264
+ console.log("event.onJfbReachBottom", options);
265
+ },
266
+ },
267
+ };
100
268
  </script>
101
269
 
102
270
  <style scoped lang="less">
103
- @import "./JfbBaseWalletLess.less";
271
+ @import "./JfbBaseWalletLess.less";
104
272
 
105
- .jfb-base-wallet {
106
- &__body{
273
+ .jfb-base-wallet {
274
+ &__body {
275
+ &-title {
276
+ padding: 20rpx;
277
+ }
278
+ &-type {
279
+ display: flex;
280
+ border-radius: 20rpx;
281
+ background: rgba(255, 255, 255, 1);
282
+ border: 1rpx solid rgba(238, 238, 238, 1);
283
+ padding: 32rpx 48rpx 32rpx 48rpx;
284
+ margin: 0 20rpx 0;
107
285
 
286
+ &-item {
287
+ color: #999999;
288
+ flex: 1;
289
+ display: flex;
290
+ flex-direction: column;
291
+ align-items: center;
292
+ justify-content: center;
293
+ font-size: 24rpx;
294
+ border: 2rpx solid #eeeeee;
295
+ border-radius: 16rpx;
296
+ background: #ffffff;
297
+ padding: 16rpx 0;
298
+ margin-right: 36rpx;
299
+ & > view:nth-child(2) {
300
+ margin-top: 12rpx;
301
+ }
302
+ }
108
303
  }
109
304
  }
305
+ }
110
306
  </style>
@@ -12,47 +12,12 @@
12
12
  */
13
13
  module.exports = [
14
14
  {
15
- mapFnName: 'getByIdFilmSquate', //自定义方法名字(必选)
16
- title: '获取电影广场列表',
17
- path: '/api/account/film/list-film-square',
15
+ mapFnName: 'getRecordDetail', //自定义方法名字(必选)
16
+ title: '获取明细详情',
17
+ path: '/pay/v1/wallet/trade-record-detail',
18
18
  isRule: false,
19
19
  params: {
20
- last_key: ['当前页', 'Number', '必选'],
21
- page_size: ['每页数量', 'Number', '必选'],
22
- },
23
- isConsole: true,
24
- disabled: true,
25
- },
26
- {
27
- mapFnName: 'updateFilmPaiqiDate', //自定义方法名字(必选)
28
- title: '更新排期',
29
- path: '/api/account/film/paiqi-date',
30
- isRule: false,
31
- params: {
32
- film_id: ['电影id', 'Number', '必选'],
33
- cinema_id: ['影院id', 'Number', '必选'],
34
- },
35
- isConsole: true,
36
- disabled: true,
37
- },
38
- {
39
- mapFnName: 'removeFilmAddress', //自定义方法名字(必选)
40
- title: '删除我的配送地址',
41
- path: '/api/account/film/paiqi-date',
42
- isRule: false,
43
- params: {
44
- film_id: ['电影id', 'Number', '必选'],
45
- },
46
- isConsole: true,
47
- disabled: true,
48
- },
49
- {
50
- mapFnName: 'addFilmcart', //自定义方法名字(必选)
51
- title: '添加购物车',
52
- path: '/api/account/film/paiqi-date',
53
- isRule: false,
54
- params: {
55
- film_id: ['电影id', 'Number', '必选'],
20
+ trade_id: ['记录ID', 'String', '必选'],
56
21
  },
57
22
  isConsole: true,
58
23
  disabled: true,