jufubao-base 1.0.67-beta201 → 1.0.67

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.67-beta201",
3
+ "version": "1.0.67",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -975,7 +975,8 @@ export default {
975
975
  res.codes &&
976
976
  res.codes.map((item) => {
977
977
  if (item.show_type === "qrcode" || item.show_type === "barcode") {
978
- item.code_url = `${this.brandInfo.api_host}${item.code_url}`;
978
+ let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
979
+ item.code_url = reg.test(item.code_url)? item.code_url:`${this.brandInfo['api_host']}${item.code_url}`
979
980
  }
980
981
  return item;
981
982
  });
@@ -1442,8 +1443,8 @@ export default {
1442
1443
  white-space: nowrap;
1443
1444
  overflow: hidden;
1444
1445
  text-overflow: ellipsis;
1445
-
1446
-
1446
+
1447
+
1447
1448
  &>view {
1448
1449
  white-space: pre-wrap;
1449
1450
  word-wrap: break-word;
@@ -400,13 +400,8 @@ export default {
400
400
  this.isPreview = this.$configProject.isPreview;
401
401
  this.init(this.container);
402
402
  },
403
- destroyed() {
404
- if (this.timeer) {
405
- clearTimeout(this.timeer);
406
- }
407
- },
408
403
  methods: {
409
-
404
+
410
405
  onJfbLoad(options) {
411
406
  this.params = options;
412
407
  this.order_id = options.order_id;
@@ -539,8 +534,7 @@ export default {
539
534
  info.codes.map((item) => {
540
535
  if (item.show_type === "qrcode" || item.show_type === "barcode") {
541
536
  let reg = /^(http:\/\/|https:\/\/|\/\/)+.+$/;
542
- if (!reg.test(item.code_url))
543
- item.code_url = `${this.brandInfo["api_host"]}${item.code_url}`;
537
+ if (!reg.test(item.code_url)) item.code_url = `${this.brandInfo["api_host"]}${item.code_url}`;
544
538
  }
545
539
  return item;
546
540
  });
@@ -563,13 +557,13 @@ export default {
563
557
  });
564
558
  }
565
559
  this.info = info;
566
-
560
+
567
561
  //显示核销信息
568
562
  info['settleInfo'] = null;
569
563
  if(info['settle_info'] && info['settle_info'].length > 0) {
570
564
  info['settleInfo'] = info['settle_info']
571
565
  }
572
-
566
+
573
567
  //订单完成
574
568
  if (this.info.status.status_type === "success") {
575
569
  if (this.timeer) {
@@ -644,6 +638,12 @@ export default {
644
638
  }
645
639
  },
646
640
 
641
+ destroyed() {
642
+ if (this.timeer) {
643
+ clearTimeout(this.timeer);
644
+ }
645
+ },
646
+
647
647
  /**
648
648
  * @description 页面返回按钮
649
649
  * @param options
@@ -676,7 +676,7 @@ export default {
676
676
  white-space: nowrap;
677
677
  overflow: hidden;
678
678
  text-overflow: ellipsis;
679
-
679
+
680
680
  & > view {
681
681
  white-space: pre-wrap;
682
682
  word-wrap: break-word;
@@ -818,13 +818,13 @@ export default {
818
818
  &:last-child {
819
819
  border-bottom:0;
820
820
  }
821
-
821
+
822
822
  &>view:first-child {
823
823
  color: #666;
824
824
  font-size: unit(28, rpx);
825
825
  }
826
826
  }
827
-
827
+
828
828
  margin-bottom: unit(20, rpx);
829
829
  }
830
830
  </style>
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * @description 卡券登陆
5
- * @type {*[]}
6
- */
7
- module.exports = [
8
- {
9
- mapFnName: 'getCouponDialogList', //自定义方法名字(必选)
10
- title: '获取活动弹框列表',
11
- path: '/sms/v1/activity/list',
12
- isRule: false,
13
- params: {
14
- namespace: ['业务线', 'String', '必填'],
15
- },
16
- isConsole: true,
17
- disabled: true,
18
- },
19
- ];
@@ -1,60 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * @description 当表单组件中有联动操作时候,使用方法进行返回
5
- */
6
- export default {
7
- style: [],
8
- content:(data) => {
9
- return [
10
- {
11
- label: '选取优惠券列表路径:', //label
12
- ele: 'xd-select-pages-path', //package 名称
13
- valueKey: 'list_url', //form[valueKey]
14
- placeholder: '请选择优惠券列表路径',
15
- value: data['list_url'] ||null,
16
- setting: {
17
- router: XdBus.getParentApi('getPagesTree'),
18
- },
19
- inline: false,
20
- },
21
- {
22
- label: '活动提示方式:',
23
- ele: 'xd-radio',
24
- valueKey: 'type',
25
- value: data['type']||1,
26
- placeholder: '请选择活动提示方式',
27
- multiple: false,
28
- className: 'input80',
29
- list: [
30
- { label: '弹框', value: 1 },
31
- { label: '切换', value: 2 },
32
- ]
33
- },
34
- {
35
- label: '弹窗间隔:',
36
- ele: 'el-input',
37
- type: 'text',
38
- valueKey: 'time',
39
- value: data.time || '',
40
- placeholder: '请输入弹窗间隔,默认值:3小时',
41
- className: 'input80',
42
- unit: '小时'
43
- },
44
- {
45
- label: '是否隐藏弹框(仅预览模式生效):',
46
- ele: 'xd-radio',
47
- valueKey: 'isHide',
48
- value: data['isHide']||false,
49
- placeholder: '请选择是否隐藏弹框',
50
- multiple: false,
51
- className: 'input80',
52
- list: [
53
- { label: '是', value: true },
54
- { label: '否', value: false },
55
- ]
56
- },
57
- ].filter(i=>i)
58
- },
59
- advanced: [],
60
- };
@@ -1,293 +0,0 @@
1
- <template>
2
- <view
3
- class="jfb-base-con-dialog"
4
- @click="handleEditxSelect"
5
- :class="{
6
- editx: isEditx && active,
7
- noBorder: noBorder,
8
- }"
9
- >
10
- <!--#ifdef H5-->
11
- <view
12
- class="jfb-base-con-dialog__edit"
13
- :class="{ editx: isEditx && active }"
14
- v-if="isEditx && active && !noBorder"
15
- >
16
- <view class="jfb-base-con-dialog__edit-icon" @click="delEdit">删除</view>
17
- </view>
18
- <!-- #endif -->
19
- <view class="jfb-base-con-dialog__body">
20
- <view class="jfb-base-con-dialog__body-dialog" v-if="isShow">
21
- <view class="jfb-base-con-dialog__body-dialog-mask"></view>
22
- <view class="jfb-base-con-dialog__body-dialog-content">
23
- <view class="jfb-base-con-dialog__body-dialog-content-num">
24
- <text>{{ currentIndex + 1 }}/{{ list.length }}</text>
25
- </view>
26
- <view style="display: flex; align-items: center">
27
- <view
28
- @click="handleChange('left')"
29
- v-if="this.type === 2 && this.currentIndex !== 0"
30
- class="jfb-base-con-dialog__body-dialog-content-left"
31
- >
32
- <xd-font-icon icon="iconxiangzuo_xian"></xd-font-icon>
33
- </view>
34
- <view class="jfb-base-con-dialog__body-dialog-content-image">
35
- <image :src="currentImage"></image>
36
- <image @click="handleToList" :src="currentBtnImage"></image>
37
- </view>
38
- <view
39
- v-if="this.type === 2 && this.currentIndex !== list.length - 1"
40
- @click="handleChange('right')"
41
- class="jfb-base-con-dialog__body-dialog-content-right"
42
- >
43
- <xd-font-icon icon="iconxiangyou_xian"></xd-font-icon>
44
- </view>
45
- </view>
46
- <xd-font-icon
47
- @click="handleClose"
48
- class="jfb-base-con-dialog__body-dialog-content-close"
49
- icon="iconguanbi_xian"
50
- color="#fff"
51
- size="64"
52
- ></xd-font-icon>
53
- </view>
54
- </view>
55
- <view
56
- :style="{ background: backgroundColor, color: warningColor }"
57
- class="jfb-base-con-dialog__body-pop"
58
- v-if="isPreview"
59
- >弹框方便编辑(占位),在线上此模块不显</view
60
- >
61
- </view>
62
- </view>
63
- </template>
64
-
65
- <script>
66
- import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
67
- import { jfbRootExec, JfbEvent } from "@/utils/xd.event";
68
- import JfbBaseConDialogMixin from "./JfbBaseConDialogMixin";
69
- import componentsMixins from "@/mixins/componentsMixins";
70
- import extsMixins from "@/mixins/extsMixins";
71
- import { getContainerPropsValue } from "@/utils/xd.base";
72
- import getServiceUrl from "@/common/getServiceUrl";
73
- import colorCardMixins from "@/mixins/colorCardMixins";
74
- const Color = require("color");
75
- import { mapState } from "vuex";
76
- import storage from "@/common/storage";
77
-
78
- export default {
79
- name: "JfbBaseConDialog",
80
- components: {
81
- XdFontIcon,
82
- },
83
- mixins: [componentsMixins, extsMixins, JfbBaseConDialogMixin],
84
- data() {
85
- return {
86
- list_url: "",
87
- list: [],
88
- currentImage: "",
89
- currentBtnImage: "",
90
- currentIndex: 0,
91
- isShow: false,
92
- type: "",
93
- isPreview: false, //是否预览
94
- activity_id: "",
95
- backgroundColor: "",
96
- };
97
- },
98
- computed: {
99
- ...mapState(["pageNamespace"]),
100
- },
101
- watch: {
102
- container(value) {
103
- console.log(value, "aakakakkaka");
104
- this.init(value);
105
- },
106
- },
107
- created() {
108
- this.isPreview = this.$configProject.isPreview;
109
- this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
110
- this.init(this.container);
111
- },
112
- methods: {
113
- init(value) {
114
- this.list_url = getContainerPropsValue(value, "content.list_url", {
115
- value: "",
116
- }).value;
117
- this.type = getContainerPropsValue(value, "content.type", 1);
118
- this.isHide = getContainerPropsValue(value, "content.isHide", false);
119
- this.time = Number(getContainerPropsValue(value, "content.time", 3));
120
- if (this.isPreview) {
121
- this.isShow = !this.isHide;
122
- }
123
- },
124
- getDialogList() {
125
- jfbRootExec("getCouponDialogList", {
126
- vm: this,
127
- data: {
128
- namespace: this.pageNamespace,
129
- },
130
- })
131
- .then((res) => {
132
- console.log(res, "resresres");
133
- this.list = res.list;
134
- this.currentImage = getServiceUrl(
135
- this.list[this.currentIndex].app_activity_url
136
- );
137
- this.currentBtnImage = getServiceUrl(
138
- this.list[this.currentIndex].app_activity_button
139
- );
140
- this.activity_id = this.list[this.currentIndex].activity_id;
141
- this.handlePop();
142
- })
143
- .catch((err) => {
144
- console.log(err, "err");
145
- });
146
- },
147
- handlePop() {
148
- console.log("this.time", this.time * 60 + "分钟");
149
- storage.set(this.containerId, 1, this.time);
150
- this.isShow = true;
151
- },
152
- onJfbLoad(options) {
153
- console.log(11111);
154
- try {
155
- if (!storage.get(this.containerId)) this.getDialogList();
156
- } catch (error) {
157
- console.log(error, "errorerror");
158
- }
159
- },
160
- onJfbUpdate(data) {
161
- storage.remove(this.containerId);
162
- this.getDialogList();
163
- },
164
- handleToList() {
165
- this.$xdUniHelper.navigateTo({
166
- url: `${this.list_url}?activity_id=${this.activity_id}&distribution_method=homed`,
167
- });
168
- },
169
- handleClose() {
170
- //切换下一张,没有下一张,关闭
171
- if (this.currentIndex == this.list.length - 1 || this.type == 2) {
172
- this.isShow = false;
173
- return;
174
- }
175
- this.currentIndex = this.currentIndex + 1;
176
- this.currentImage = getServiceUrl(
177
- this.list[this.currentIndex].app_activity_url
178
- );
179
- this.currentBtnImage = getServiceUrl(
180
- this.list[this.currentIndex].app_activity_button
181
- );
182
- this.activity_id = this.list[this.currentIndex].activity_id;
183
- },
184
- handleChange(type) {
185
- this.currentIndex =
186
- type === "left" ? this.currentIndex - 1 : this.currentIndex + 1;
187
- //不小于0,不大于数组长度
188
- this.currentIndex = Math.max(
189
- 0,
190
- Math.min(this.currentIndex, this.list.length - 1)
191
- );
192
- this.currentImage = getServiceUrl(
193
- this.list[this.currentIndex].app_activity_url
194
- );
195
- this.currentBtnImage = getServiceUrl(
196
- this.list[this.currentIndex].app_activity_button
197
- );
198
- this.activity_id = this.list[this.currentIndex].activity_id;
199
- },
200
- },
201
- };
202
- </script>
203
-
204
- <style scoped lang="less">
205
- @import "./JfbBaseConDialogLess.less";
206
-
207
- .jfb-base-con-dialog {
208
- &__body {
209
- &-pop {
210
- min-height: 100rpx;
211
- text-align: center;
212
- vertical-align: middle;
213
- color: #666;
214
- font-size: unit(24, rpx);
215
- line-height: 100rpx;
216
- }
217
- &-dialog {
218
- position: fixed;
219
- top: 0;
220
- bottom: 0;
221
- left: 0;
222
- right: 0;
223
- z-index: 3000;
224
-
225
- &-mask {
226
- position: absolute;
227
- top: 0;
228
- bottom: 0;
229
- left: 0;
230
- right: 0;
231
- background: rgba(0, 0, 0, 0.5);
232
- }
233
-
234
- &-content {
235
- max-height: unit(1000, rpx);
236
- overflow-y: auto;
237
- overflow-x: hidden;
238
- position: absolute;
239
- top: 50%;
240
- left: 50%;
241
- transform: translate(-50%, -50%);
242
- display: flex;
243
- flex-direction: column;
244
- &-num {
245
- margin: 0 auto;
246
- background: rgba(255, 255, 255, 0.5);
247
- border-radius: unit(40, rpx);
248
- padding: unit(8, rpx) unit(24, rpx);
249
- color: #fff;
250
- font-size: unit(40, rpx);
251
- }
252
- &-close {
253
- margin: 0 auto;
254
- }
255
- &-left {
256
- background: rgba(255, 255, 255, 0.1);
257
- padding: unit(40, rpx) unit(10, rpx);
258
- color: #fff;
259
- border-radius: unit(40, rpx);
260
- }
261
- &-right {
262
- background: rgba(255, 255, 255, 0.1);
263
- padding: unit(40, rpx) unit(10, rpx);
264
- color: #fff;
265
- border-radius: unit(40, rpx);
266
- }
267
- &-image {
268
- min-width: unit(600, rpx);
269
- min-height: unit(800, rpx);
270
- height: unit(800, rpx);
271
- display: flex;
272
- align-items: center;
273
- flex-direction: column;
274
- margin: 20rpx;
275
- position: relative;
276
-
277
- & > image:first-child {
278
- width: 100%;
279
- height: 100%;
280
- }
281
-
282
- & > image:nth-child(2) {
283
- width: unit(448, rpx);
284
- height: unit(70, rpx);
285
- position: absolute;
286
- bottom: unit(100, rpx);
287
- }
288
- }
289
- }
290
- }
291
- }
292
- }
293
- </style>
@@ -1,80 +0,0 @@
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-dialog {
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-dialog {
75
- &:before {
76
- content: " ";
77
- display: table;
78
- }
79
- }
80
- /**endNotPreview**/
@@ -1,30 +0,0 @@
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-dialog'
20
- }
21
- },
22
- created() {
23
-
24
- //@AttrDataCreated
25
- this.Attr = this.$xdUniHelper.customClone(Attr);
26
- //@EndAttrDataCreated
27
-
28
-
29
- },
30
- }
@@ -1,30 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = {
4
- getCouponDialogList: {
5
- "list": [
6
- {
7
- "app_key": "sms-coupon",
8
- "app_activity_url": "//sandbox-img.jufubao.cn/uploads/20231123/b68d9ff61ffe6cada499d8ad809aaa8d.jpg",
9
- "app_activity_button": "//sandbox-img.jufubao.cn/uploads/20231123/d9730115b5e1e8047b2b36e69655e745.jpg",
10
- "background": "background1.png",
11
- "activity_id": 35,
12
- },
13
- {
14
- "app_key": "sms-coupon",
15
- "app_activity_url": "//sandbox-img.jufubao.cn/uploads/20231123/b68d9ff61ffe6cada499d8ad809aaa8d.jpg",
16
- "app_activity_button": "//sandbox-img.jufubao.cn/uploads/20231123/d9730115b5e1e8047b2b36e69655e745.jpg",
17
- "background": "background1.png",
18
- "activity_id": 35,
19
- },
20
- {
21
- "app_key": "sms-coupon",
22
- "app_activity_url": "//sandbox-img.jufubao.cn/uploads/20231123/b68d9ff61ffe6cada499d8ad809aaa8d.jpg",
23
- "app_activity_button": "//sandbox-img.jufubao.cn/uploads/20231123/d9730115b5e1e8047b2b36e69655e745.jpg",
24
- "background": "background1.png",
25
- "activity_id": 35,
26
- }
27
- ],
28
- "request_id": "4b9803ed0ecdc0f6"
29
- }
30
- }
@@ -1,58 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * @description 卡券登陆
5
- * @type {*[]}
6
- */
7
- module.exports = [
8
- {
9
- mapFnName: 'getListBaseNewsContentCoupon', //自定义方法名字(必选)
10
- title: '获取内容',
11
- path: '/cms/v1/news-content',
12
- isRule: false,
13
- params: {
14
- scene: ['使用场景', 'String', '选填'],
15
- container_id: ['插件ID', 'String', '必填'],
16
- page_id: ['页面ID', 'String', '必填'],
17
- page_size: ['记录条数', 'Number', '必填', 1],
18
- code: ['业务线id', 'String', '选填'],
19
- },
20
- isConsole: true,
21
- disabled: true,
22
- },
23
- {
24
- mapFnName: 'getCouponList', //自定义方法名字(必选)
25
- title: '获取优惠券列表',
26
- path: '/sms-coupon/v1/activity-prizes-user/list',
27
- isRule: false,
28
- params: {
29
- distribution_method: ['发放方式 entry=主动发放, homed=首页发放,paid=消费后发放,card_binded=绑定卡后发放', 'String', '选填'],
30
- namespace: ['业务线', 'String', '必填'],
31
- },
32
- isConsole: true,
33
- disabled: true,
34
- },
35
- {
36
- mapFnName: 'getAllCoupon', //自定义方法名字(必选)
37
- title: '领取优惠券',
38
- path: '/sms-coupon/v1/activity-prizes-user/set',
39
- isRule: false,
40
- params: {
41
- distribution_method: ['发放方式 entry=主动发放, homed=首页发放,paid=消费后发放,card_binded=绑定卡后发放', 'String', '选填'],
42
- namespace: ['业务线', 'String', '必填'],
43
- },
44
- isConsole: true,
45
- disabled: true,
46
- },
47
- {
48
- mapFnName: 'getCouponResult', //自定义方法名字(必选)
49
- title: '轮询查询活动结果',
50
- path: '/sms-coupon/v1/activity-prizes-user/get',
51
- isRule: false,
52
- params: {
53
- tmp_order_number: ['tmp_order_number', 'String', '选填'],
54
- },
55
- isConsole: true,
56
- disabled: true,
57
- },
58
- ];