jufubao-base 1.0.119 → 1.0.121

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",
3
+ "version": "1.0.121",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -0,0 +1,70 @@
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: 'sendMsgConPhone',
16
+ title: '发送验证码',
17
+ path: '/common/v1/valid_code/sms/send',
18
+ isRule: false,
19
+ data: {
20
+ phone_number: ['手机号', 'String', '必选'],
21
+ biz_name: ['业务名称', 'String', '必选']
22
+ },
23
+ isConsole: true,
24
+ disabled: true,
25
+ },
26
+ {
27
+ mapFnName: 'getCouponPhoneList', //自定义方法名字(必选)
28
+ title: '获取优惠券列表',
29
+ path: '/sms-coupon/v1/activity-prizes-user/list',
30
+ isRule: false,
31
+ params: {
32
+ distribution_method: ['发放方式 entry=主动发放, homed=首页发放,paid=消费后发放,card_binded=绑定卡后发放', 'String', '选填'],
33
+ namespace: ['业务线', 'String', '必填'],
34
+ },
35
+ isConsole: true,
36
+ disabled: true,
37
+ },
38
+ {
39
+ mapFnName: 'getAllCouponPhone', //自定义方法名字(必选)
40
+ title: '领取优惠券',
41
+ path: '/sms-coupon/v1/activity-prizes-user/set',
42
+ isRule: false,
43
+ params: {
44
+ distribution_method: ['发放方式 entry=主动发放, homed=首页发放,paid=消费后发放,card_binded=绑定卡后发放', 'String', '选填'],
45
+ namespace: ['业务线', 'String', '必填'],
46
+ },
47
+ isConsole: true,
48
+ disabled: true,
49
+ },
50
+ {
51
+ mapFnName: 'getCouponPhoneResult', //自定义方法名字(必选)
52
+ title: '轮询查询活动结果',
53
+ path: '/sms-coupon/v1/activity-prizes-user/get',
54
+ isRule: false,
55
+ params: {
56
+ tmp_order_number: ['tmp_order_number', 'String', '选填'],
57
+ },
58
+ isConsole: true,
59
+ disabled: true,
60
+ },
61
+ {
62
+ mapFnName: 'getUserPhone',
63
+ title: '获取用户信息',
64
+ path: '/passport/v1/user/get',
65
+ isRule: false,
66
+ params: {},
67
+ isConsole: true,
68
+ disabled: true,
69
+ },
70
+ ];
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description 当表单组件中有联动操作时候,使用方法进行返回
5
+ */
6
+ export default {
7
+ style: [],
8
+ content: [],
9
+ advanced: [],
10
+ };
@@ -0,0 +1,543 @@
1
+ <template>
2
+ <view
3
+ class="jfb-base-con-phone"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx: isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-base-con-phone__edit"
10
+ :class="{ editx: isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-base-con-phone__edit-icon" @click="delEdit">删除</view>
14
+ </view>
15
+ <!-- #endif -->
16
+ <view class="jfb-base-con-phone__body" v-if="done">
17
+ <view v-if="has_times === 'Y'">
18
+ <view
19
+ class="jfb-base-con-phone__body-wrap"
20
+ :style="{
21
+ height: topHeight + 'rpx',
22
+ width: topWidth + 'rpx',
23
+ backgroundImage: `url(${background})`,
24
+ backgroundSize: '100% 100%',
25
+ }"
26
+ >
27
+ <view v-if="showCode" class="jfb-base-con-phone__body-wrap-input">
28
+ <view>
29
+ <input
30
+ @input="filterSpaces"
31
+ v-model="phoneNumber"
32
+ placeholder="请输入手机号"
33
+ type="text"
34
+ />
35
+ </view>
36
+ <view
37
+ class="jfb-base-con-phone__body-wrap-input-code"
38
+ style="margin-bottom: 54rpx"
39
+ >
40
+ <input
41
+ v-model="valid_code"
42
+ placeholder="请输入验证码"
43
+ type="text"
44
+ />
45
+ <XdButton
46
+ :disabled="disabled"
47
+ class="jfb-base-con-phone__body-wrap-input-code-btn"
48
+ type="primary"
49
+ :bg-color="mainColor"
50
+ size="small"
51
+ @click="handleSendCode"
52
+ >{{ message }}</XdButton
53
+ >
54
+ </view>
55
+ <XdButton
56
+ type="primary"
57
+ :bg-color="mainColor"
58
+ width="360rpx"
59
+ radius="20rpx"
60
+ size="small"
61
+ :disabled="!phoneNumber || !valid_code"
62
+ @click="handleConfirm"
63
+ >确认领取</XdButton
64
+ >
65
+ </view>
66
+ <view v-else class="jfb-base-con-phone__body-wrap-input">
67
+ <view class="jfb-base-con-phone__body-wrap-input-phone">
68
+ <view class="jfb-base-con-phone__body-wrap-input-phone-change">
69
+ <view>当前登录手机号</view>
70
+ <XdButton
71
+ style="margin: 0"
72
+ type="primary"
73
+ :bg-color="mainColor"
74
+ size="small"
75
+ @click="showCode = true"
76
+ >切换手机号</XdButton
77
+ >
78
+ </view>
79
+ <view>{{ showOhoneNumber }}</view>
80
+ </view>
81
+ <XdButton
82
+ type="primary"
83
+ :bg-color="mainColor"
84
+ width="360rpx"
85
+ radius="20rpx"
86
+ size="small"
87
+ @click="handleConfirm"
88
+ >直接领取</XdButton
89
+ >
90
+ </view>
91
+ </view>
92
+ <view
93
+ :style="{
94
+ height: bottomHeight + 'rpx',
95
+ width: bottomWidth + 'rpx',
96
+ backgroundImage: `url(${used_background})`,
97
+ backgroundSize: '100% 100%',
98
+ }"
99
+ >
100
+ <view
101
+ v-if="showBtn === 'Y'"
102
+ class="jfb-base-con-phone__body-wrap-btn"
103
+ >
104
+ <XdButton
105
+ size="small"
106
+ type="primary"
107
+ :bg-color="mainColor"
108
+ radius="20rpx"
109
+ @click="handleTo(btnOneUrl)"
110
+ >{{ btnOneName }}</XdButton
111
+ >
112
+ <XdButton
113
+ size="small"
114
+ type="primary"
115
+ :bg-color="mainColor"
116
+ radius="20rpx"
117
+ @click="handleTo(btnTwoUrl)"
118
+ >{{ btnTwoName }}</XdButton
119
+ >
120
+ </view>
121
+ </view>
122
+ </view>
123
+ <view
124
+ :style="{
125
+ height: layoutInfo.bodyMinHeightRpx + 'rpx',
126
+ }"
127
+ v-else
128
+ class="empty_data"
129
+ >
130
+ <image :src="emptyBg"></image>
131
+ {{ errmessage }}
132
+ </view>
133
+ </view>
134
+ </view>
135
+ </template>
136
+
137
+ <script>
138
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
139
+ import XdButton from "@/components/XdButton/XdButton";
140
+ import { jfbRootExec } from "@/utils/xd.event";
141
+ import JfbBaseConPhoneMixin from "./JfbBaseConPhoneMixin";
142
+ import { getContainerPropsValue, getImageInfo } from "@/utils/xd.base";
143
+ import componentsMixins from "@/mixins/componentsMixins";
144
+ import extsMixins from "@/mixins/extsMixins";
145
+ import { mapState } from "vuex";
146
+ import colorCardMixins from "@/mixins/colorCardMixins";
147
+ import getServiceUrl from "@/common/getServiceUrl";
148
+
149
+ export default {
150
+ name: "JfbBaseConPhone",
151
+ components: {
152
+ XdFontIcon,
153
+ XdButton,
154
+ },
155
+ computed: {
156
+ ...mapState(["pageBusinessCode"]),
157
+ emptyBg() {
158
+ return this.getNoData();
159
+ },
160
+ },
161
+ mixins: [componentsMixins, extsMixins, JfbBaseConPhoneMixin, colorCardMixins],
162
+ data() {
163
+ return {
164
+ showCode: true,
165
+ phoneNumber: "", //手机号
166
+ valid_code: "", //验证码
167
+ btnOneName: "",
168
+ btnOneUrl: "",
169
+ btnTwoName: "",
170
+ btnTwoUrl: "",
171
+ message: "发送验证码",
172
+ countdownTimer: null,
173
+ timeRemaining: 120,
174
+ disabled: false,
175
+ background: "",
176
+ method: "entry",
177
+ options: {},
178
+ activity_id: "",
179
+ done: false,
180
+ has_times: "N",
181
+ errmessage: "",
182
+ showOhoneNumber: "", //仅用于展示
183
+ order_num: null,
184
+ maxTime: 5, //最长轮询2的N次方(秒)
185
+ date: 2, //时间底数
186
+ time: 0, //时间幂指数
187
+ timeer: null,
188
+ topHeight: "",
189
+ topWidth: "750",
190
+ used_background: "",
191
+ bottomHeight: "",
192
+ bottomWidth: "750",
193
+ showBtn: "N",
194
+ };
195
+ },
196
+ watch: {
197
+ container(value) {
198
+ this.init(value);
199
+ },
200
+ },
201
+ created() {
202
+ console.log(this.layoutInfo, "layoutInfo");
203
+ this.init(this.container);
204
+ },
205
+ destroyed() {
206
+ if (this.timeer) {
207
+ clearTimeout(this.timeer);
208
+ }
209
+ },
210
+ methods: {
211
+ async onJfbLoad(options) {
212
+ await jfbRootExec("getUserPhone", {
213
+ vm: this,
214
+ data: {},
215
+ }).then((res) => {
216
+ this.showOhoneNumber = res.phone_number;
217
+ if (this.showOhoneNumber) {
218
+ this.showCode = false;
219
+ }
220
+ });
221
+ this.options = options;
222
+ this.activity_id = options.activity_id;
223
+ this.method = options.distribution_method
224
+ ? options.distribution_method
225
+ : "phone";
226
+ await this.getList();
227
+ },
228
+ filterSpaces(event) {
229
+ // 使用replace方法去除用户输入的空格
230
+ let value = event.target.value.replace(/\s+/g, "");
231
+ // 更新数据以移除空格
232
+ this.phoneNumber = value;
233
+ // 将处理后的值反映到视图
234
+ event.target.value = value;
235
+ },
236
+ validatePhoneNumber(phoneNumber) {
237
+ // 定义手机号正则表达式
238
+ const regex = /^1[3-9]\d{9}$/;
239
+
240
+ // 检查输入的手机号是否符合格式
241
+ if (phoneNumber.match(regex)) {
242
+ return true;
243
+ } else {
244
+ return false;
245
+ }
246
+ },
247
+ getList() {
248
+ jfbRootExec("getCouponPhoneList", {
249
+ vm: this,
250
+ data: {
251
+ ...this.options,
252
+ distribution_method: this.method,
253
+ namespace: this.pageBusinessCode,
254
+ activity_id: this.activity_id,
255
+ },
256
+ })
257
+ .then(async (res) => {
258
+ console.log(res, "res");
259
+ this.has_times = res.has_times;
260
+ this.showBtn = res.phone_button;
261
+ this.btnOneName = res.button_name_one;
262
+ this.btnTwoName = res.button_name_two;
263
+ this.btnOneUrl = res.button_url_one;
264
+ this.btnTwoUrl = res.button_url_two;
265
+ let image = await getImageInfo(getServiceUrl(res.background));
266
+ let image1 = await getImageInfo(getServiceUrl(res.used_background));
267
+ console.log({ ...image }, "imageimage");
268
+ this.topHeight = image.imgHeight / this.$rpxNum;
269
+ this.topWidth = '100%';
270
+ this.bottomHeight = image1.imgHeight / this.$rpxNum;
271
+ this.bottomWidth = '100%';
272
+ this.background = getServiceUrl(res.background);
273
+ this.used_background = getServiceUrl(res.used_background);
274
+ this.errmessage = res.message;
275
+ this.done = true;
276
+ })
277
+ .catch((err) => {
278
+ console.log(err, "err");
279
+ });
280
+ },
281
+ /**
282
+ * @description 监听事件变化
283
+ * @param container {object} 业务组件对象自己
284
+ */
285
+ init(container) {},
286
+ handleTo(url) {
287
+ this.$xdUniHelper.navigateTo({
288
+ url: url,
289
+ });
290
+ },
291
+ handleSendCode() {
292
+ if (this.phoneNumber.length < 11) {
293
+ uni.showToast({
294
+ title: "请输入11位手机号",
295
+ icon: "none",
296
+ });
297
+ return;
298
+ }
299
+ if (!this.validatePhoneNumber(this.phoneNumber)) {
300
+ uni.showToast({
301
+ title: "手机号格式不正确",
302
+ icon: "none",
303
+ });
304
+ return;
305
+ }
306
+ // 发送验证码的异步操作
307
+ uni.showToast({
308
+ title: "发送中",
309
+ icon: "loading",
310
+ });
311
+ jfbRootExec("sendMsgConPhone", {
312
+ vm: this,
313
+ data: {
314
+ phone_number: this.phoneNumber,
315
+ biz_name: "login",
316
+ },
317
+ }).then((res) => {
318
+ this.startCountdown();
319
+ });
320
+ },
321
+ startCountdown() {
322
+ // 设置剩余时间
323
+ this.timeRemaining = 120;
324
+ // 设置定时器,每秒执行一次
325
+ this.countdownTimer = setInterval(() => {
326
+ // 每秒减少1
327
+ this.timeRemaining--;
328
+ // 更新显示
329
+ this.message = `${this.timeRemaining}s`;
330
+ // 禁用按钮
331
+ this.disabled = true;
332
+ // 如果时间小于等于0,则重新开始
333
+ if (this.timeRemaining <= 0) {
334
+ this.message = "重新发送";
335
+ this.disabled = false;
336
+ // 清除定时器
337
+ clearInterval(this.countdownTimer);
338
+ // 重新设置时间
339
+ this.timeRemaining = 120;
340
+ }
341
+ }, 1000);
342
+ },
343
+ handleConfirm() {
344
+ this.$xdShowLoading({});
345
+ jfbRootExec("getAllCouponPhone", {
346
+ vm: this,
347
+ data: {
348
+ ...this.options,
349
+ distribution_method: this.method,
350
+ namespace: this.pageBusinessCode,
351
+ activity_id: this.activity_id,
352
+ phone: this.showCode ? this.phoneNumber : null,
353
+ valid_code: this.showCode ? this.valid_code : null,
354
+ biz_name: "login",
355
+ },
356
+ })
357
+ .then((res) => {
358
+ if (res.code == 400) {
359
+ this.$xdHideLoading();
360
+ this.$xdAlert({
361
+ content: res.message,
362
+ zIndex: 3200,
363
+ time: 2000,
364
+ isClose: false,
365
+ });
366
+ this.getList();
367
+ return;
368
+ }
369
+ this.order_num = res.tmp_order_number;
370
+ setTimeout(() => {
371
+ this.getResult();
372
+ }, 1000);
373
+ })
374
+ .catch((err) => {
375
+ console.log(err, "err");
376
+ });
377
+ },
378
+ getResult() {
379
+ jfbRootExec("getCouponPhoneResult", {
380
+ vm: this,
381
+ data: {
382
+ ...this.options,
383
+ tmp_order_number: this.order_num,
384
+ },
385
+ })
386
+ .then((res) => {
387
+ if (res.status_type === "success") {
388
+ this.order_num = null;
389
+ this.$xdHideLoading();
390
+ this.$xdAlert({
391
+ content: "领取成功",
392
+ zIndex: 3200,
393
+ time: 2000,
394
+ isClose: false,
395
+ });
396
+ this.getList();
397
+ if (this.timeer) {
398
+ this.time = 0;
399
+ clearTimeout(this.timeer);
400
+ }
401
+ return;
402
+ }
403
+ if (res.status_type === "error") {
404
+ this.$xdHideLoading();
405
+ this.$xdAlert({
406
+ content: res.message,
407
+ zIndex: 3200,
408
+ time: 2000,
409
+ isClose: false,
410
+ });
411
+ if (res.code == 400) {
412
+ this.getList();
413
+ }
414
+ if (this.timeer) {
415
+ this.time = 0;
416
+ clearTimeout(this.timeer);
417
+ }
418
+ return;
419
+ }
420
+
421
+ this.timeer = setTimeout(() => {
422
+ this.getResult();
423
+ if (this.time > 5) {
424
+ this.$xdLog.setARMSInfo(
425
+ { message: "领取中" },
426
+ `pay_${res.status_type}`
427
+ );
428
+ }
429
+ this.time++;
430
+ }, Math.pow(this.date, this.time > this.maxTime ? this.maxTime : this.time) * 1000);
431
+ })
432
+ .catch((err) => {
433
+ this.$xdHideLoading();
434
+ console.log(err, "err");
435
+ });
436
+ },
437
+ onJfbShow() {
438
+ if (this.timeer) {
439
+ clearTimeout(this.timeer);
440
+ }
441
+ this.time = 0;
442
+ if (this.order_num) this.getResult();
443
+ },
444
+
445
+ onJfbUnload() {
446
+ if (this.timeer) {
447
+ clearTimeout(this.timeer);
448
+ }
449
+ },
450
+
451
+ onJfbBack(options) {
452
+ if (this.timeer) {
453
+ clearTimeout(this.timeer);
454
+ }
455
+ if (this.$configProject.isPreview) return;
456
+ this.$xdUniHelper.navigateBack();
457
+ },
458
+ },
459
+ };
460
+ </script>
461
+
462
+ <style scoped lang="less">
463
+ @import "./JfbBaseConPhoneLess.less";
464
+
465
+ .jfb-base-con-phone {
466
+ &__body {
467
+ .empty_data {
468
+ text-align: center;
469
+ color: #999999;
470
+ font-size: 28rpx;
471
+ display: flex;
472
+ flex-direction: column;
473
+ align-items: center;
474
+ justify-content: center;
475
+ & > image {
476
+ width: unit(400, rpx);
477
+ height: unit(400, rpx);
478
+ }
479
+ }
480
+ &-wrap {
481
+ display: flex;
482
+ justify-content: flex-end;
483
+ align-items: center;
484
+ flex-direction: column;
485
+ &-input {
486
+ border-radius: 40rpx;
487
+ background: rgba(255, 255, 255, 0.5);
488
+ padding: 70rpx 60rpx;
489
+ position: relative;
490
+ bottom: 120rpx;
491
+ input {
492
+ margin-bottom: 26rpx;
493
+ font-size: 28rpx;
494
+ background: #fff;
495
+ border-radius: 16rpx;
496
+ padding: 30rpx;
497
+ width: 540rpx;
498
+ }
499
+ &-code {
500
+ position: relative;
501
+ &-btn {
502
+ position: absolute;
503
+ right: 10rpx;
504
+ top: 20rpx;
505
+ }
506
+ }
507
+ &-phone {
508
+ padding: 30rpx;
509
+ width: 540rpx;
510
+ background: #fff;
511
+ border-radius: 16rpx;
512
+ margin-bottom: 32rpx;
513
+ & > view:nth-child(2) {
514
+ border-radius: 40rpx;
515
+ background: #f2f2f2;
516
+ display: flex;
517
+ justify-content: center;
518
+ align-items: center;
519
+ padding: 16rpx 120rpx 16rpx 120rpx;
520
+ margin-top: 30rpx;
521
+ }
522
+ &-change {
523
+ display: flex;
524
+ justify-content: space-between;
525
+ align-items: center;
526
+ & > view:first-child {
527
+ color: #999999;
528
+ font-size: 28rpx;
529
+ }
530
+ }
531
+ }
532
+ }
533
+ &-btn {
534
+ display: flex;
535
+ justify-content: space-around;
536
+ align-items: center;
537
+ width: 750rpx;
538
+ padding-top: 40rpx;
539
+ }
540
+ }
541
+ }
542
+ }
543
+ </style>
@@ -0,0 +1,80 @@
1
+ /**
2
+ * @desc 获取绝对路径完整地址
3
+ * @param @path
4
+ **/
5
+ //例如:https://image.jufubao.cn/20220501010108/image/bg/default_gonghui_bg.png
6
+ @basePath: 'business/';
7
+ @doMain: '//sandbox-img.jufubao.cn/';
8
+
9
+ .getBusinessImageUrl(@path, @size: 'size8') {
10
+ @url: "@{doMain}@{basePath}@{path}?x-oss-process=style/@{size}";
11
+ background-image: url(@url);
12
+ }
13
+
14
+ //start
15
+ .jfb-base-con-phone {
16
+ border: 1px dashed rgba(0, 0, 0, 0);
17
+ box-sizing: border-box;
18
+ min-height: unit(50, rpx);
19
+
20
+ &__body{
21
+ position: relative;
22
+ overflow: hidden;
23
+ z-index: 2
24
+ }
25
+
26
+ &.editx {
27
+ position: relative;
28
+ border: 1px dashed blue;
29
+ box-sizing: border-box;
30
+ z-index: 3
31
+
32
+ }
33
+
34
+ &:hover {
35
+ border: 1px dashed blue;
36
+ }
37
+
38
+ &.noBorder {
39
+ border-color: rgba(0,0,0,0);
40
+ border-width: 0;
41
+ }
42
+
43
+
44
+ &__edit {
45
+ cursor: pointer;
46
+ position: absolute;
47
+ right: unit(0, rpx);
48
+ top: unit(-52, rpx);
49
+ height: unit(50, rpx);
50
+ line-height: unit(50, rpx);
51
+ display: flex;
52
+ justify-content: center;
53
+ align-items: center;
54
+ background: rgba(0, 0, 0, .6);
55
+ border-radius: unit(10, rpx);
56
+ box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
57
+ color: #fff;
58
+ font-size: unit(22, rpx);
59
+
60
+ &-icon{
61
+ padding: 0 unit(20, rpx);
62
+ }
63
+
64
+ &.editx {
65
+ box-sizing: border-box;
66
+
67
+ }
68
+ }
69
+ }
70
+ //end
71
+
72
+
73
+ /**notPreview**/
74
+ .jfb-base-con-phone {
75
+ &:before {
76
+ content: " ";
77
+ display: table;
78
+ }
79
+ }
80
+ /**endNotPreview**/
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+
4
+ //@AttrImport
5
+ import Attr from "./Attr";
6
+ //@EndAttrImport
7
+
8
+
9
+ export default {
10
+ data() {
11
+ return {
12
+ //#ifdef H5
13
+
14
+ //@AttrData
15
+ Attr:{}, //对外开发编辑属性
16
+ //@EndAttrData
17
+
18
+ // #endif
19
+ cssRoot: 'jfb-base-con-phone'
20
+ }
21
+ },
22
+ created() {
23
+
24
+ //@AttrDataCreated
25
+ this.Attr = this.$xdUniHelper.customClone(Attr);
26
+ //@EndAttrDataCreated
27
+
28
+
29
+ },
30
+ }
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ getCouponPhoneList: {
5
+ "list":[
6
+ {"prize_id":153,"prize_name":"满50减50","prize_type":"满减券","prize_num":1,"can_take":"Y","is_over":"N","can_take_num":"P","today_times":1,"today_num":0,"total_times":1,"total_num":0,"remain_card_count":55},
7
+ {"prize_id":153,"prize_name":"满50减50","prize_type":"满减券","prize_num":1,"can_take":"Y","is_over":"N","can_take_num":"P","today_times":1,"today_num":0,"total_times":1,"total_num":0,"remain_card_count":55},
8
+ {"prize_id":153,"prize_name":"满50减50","prize_type":"满减券","prize_num":1,"can_take":"Y","is_over":"N","can_take_num":"P","today_times":1,"today_num":0,"total_times":1,"total_num":0,"remain_card_count":55}
9
+ ],
10
+ "background":"//sandbox-img.jufubao.cn/uploads/20231204/96b801e0dc27422c183dc90d905dd2ed.jpg",
11
+ "used_up_url": "",
12
+ "has_times": "Y",
13
+ "can_take":"Y",
14
+ "message":"",
15
+ "app_coupon_url":"//sandbox-img.jufubao.cn/uploads/20231205/fee9b644b83495c9ba8a4db277600b54.jpg",
16
+ "app_activity_button":"//sandbox-img.jufubao.cn/uploads/20231207/35f3065b2b2bc3fc2dda73d7b5b9eae8.jpg",
17
+ "app_coupon_button_bg_url":"//sandbox-img.jufubao.cn/uploads/20231212/026a3ea901f87f51b531d06c24604676.png",
18
+ "app_coupon_button_see_url": "//sandbox-img.jufubao.cn/uploads/20231212/026a3ea901f87f51b531d06c24604676.png",
19
+ "app_coupon_invalid_url":"//sandbox-img.jufubao.cn/uploads/20231208/8b153ce4870686a37295c16fbc992235.jpg",
20
+ "rule":"<p>打发&middot;</p>",
21
+ "request_id":"a2603f2a480485f4"
22
+ },
23
+ getAllCouponPhone: {
24
+ "request_id": "5987aa28c709d4ef"
25
+ }
26
+ }
@@ -12,7 +12,7 @@
12
12
  */
13
13
  module.exports = [
14
14
  {
15
- mapFnName: 'getUserInfo',
15
+ mapFnName: 'getBaseUserInfo',
16
16
  title: '获取用户信息',
17
17
  path: '/passport/v1/user/get',
18
18
  params: {},
@@ -21,7 +21,7 @@ module.exports = [
21
21
  disabled: true,
22
22
  },
23
23
  {
24
- mapFnName: 'getCardUserSetting',
24
+ mapFnName: 'getBaseCardUserSetting',
25
25
  title: '获取用户卡券配置',
26
26
  path: '/card/v1/card-bind/get-card-user-setting',
27
27
  params: {},
@@ -8,10 +8,11 @@ export default {
8
8
  content: (data) => {
9
9
  return [
10
10
  {
11
- label: '绑定手机号地址:', //label
12
- ele: 'xd-select-pages-path', //package 名称
13
- valueKey: 'bind_phone_url', //form[valueKey]
14
- value: data['bind_phone_url'] || {},
11
+ label: '绑定手机号地址:',
12
+ ele: 'xd-select-pages-path',
13
+ valueKey: 'bind_phone_url',
14
+ value: data['bind_phone_url'] || null,
15
+ //groupKey:'advanced',
15
16
  setting: {
16
17
  router: XdBus.getParentApi('getPagesTree')
17
18
  },
@@ -22,6 +22,7 @@
22
22
  style="margin-bottom: 8rpx;"
23
23
  @click="handleToShowSwitch"
24
24
  >
25
+
25
26
  <view v-if="!showSwitch">去配置</view>
26
27
  <view v-else class="switch_wrap">
27
28
  <view :style="{
@@ -91,8 +92,6 @@
91
92
  },
92
93
  created() {
93
94
  this.init(this.container);
94
-
95
- //todo
96
95
  },
97
96
  methods: {
98
97
  onJfbLoad(options) {
@@ -131,7 +130,7 @@
131
130
  })
132
131
  },
133
132
  p_getUserInfo(){
134
- jfbRootExec("getUserInfo", {
133
+ jfbRootExec("getBaseUserInfo", {
135
134
  vm: this,
136
135
  data: {
137
136
 
@@ -146,7 +145,7 @@
146
145
  })
147
146
  },
148
147
  getCardConfig(){
149
- jfbRootExec("getCardUserSetting", {
148
+ jfbRootExec("getBaseCardUserSetting", {
150
149
  vm: this,
151
150
  data: {}
152
151
  }).then(res => {
@@ -173,27 +172,6 @@
173
172
  })
174
173
  }
175
174
  },
176
- onJfbScroll(options) {
177
- console.log('event.onJfbScroll', options)
178
- },
179
- onJfbReachBottom(options) {
180
- console.log('event.onJfbReachBottom', options)
181
- },
182
- onJfbShow(options) {
183
- console.log('event.onJfbShow', options)
184
- },
185
- onJfbHide(options) {
186
- console.log('event.onJfbHide', options)
187
- },
188
- onJfbBack(options) {
189
- console.log('event.onJfbBack', options)
190
- },
191
- onJfbUpdate(...data) {
192
- console.log('event.onJfbUpdate', data)
193
- },
194
- onJfbCustomEvent(options) {
195
- console.log('event.onJfbReachBottom', options)
196
- },
197
175
  }
198
176
  }
199
177
 
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
- aaaa: {}
4
+ getBaseUserInfo: {"user_name":"","user_code":"pK60goP5om","nickname":"braveboy","real_name":"","head_url":"https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/DYAIOgq83epC3zrUbrbh1n7JAiaws8JKK0zk6Q91FNH10ticgWoVENlwnZPfdyxTicEqBnjnwd7RzJmQwicfQG0D1A\/132","province_code":"","city_code":"","province_name":"","city_name":"","sex":"","sex_name":"未知","birthday_date":"","phone_number":"151****8397","show_user_name":"braveboy","request_id":"863a1276dc972043"},
5
+ getBaseCardUserSetting:{"user_id":0,"is_entity_card_invalid":"","request_id":"8ddfd81488f33522"}
5
6
  }