jufubao-base 1.0.119-beta8 → 1.0.119-beta9

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-beta8",
3
+ "version": "1.0.119-beta9",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -26,6 +26,7 @@
26
26
  <view v-if="showCode" class="jfb-base-con-phone__body-wrap-input">
27
27
  <view>
28
28
  <input
29
+ @input="filterSpaces"
29
30
  v-model="phoneNumber"
30
31
  placeholder="请输入手机号"
31
32
  type="text"
@@ -204,6 +205,14 @@ export default {
204
205
  : "phone";
205
206
  await this.getList();
206
207
  },
208
+ filterSpaces(event) {
209
+ // 使用replace方法去除用户输入的空格
210
+ let value = event.target.value.replace(/\s+/g, '');
211
+ // 更新数据以移除空格
212
+ this.phoneNumber = value;
213
+ // 将处理后的值反映到视图
214
+ event.target.value = value;
215
+ },
207
216
  getList() {
208
217
  jfbRootExec("getCouponPhoneList", {
209
218
  vm: this,
@@ -1,60 +0,0 @@
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: 'getByIdFilmSquate', //自定义方法名字(必选)
16
- title: '获取电影广场列表',
17
- path: '/api/account/film/list-film-square',
18
- isRule: false,
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', '必选'],
56
- },
57
- isConsole: true,
58
- disabled: true,
59
- },
60
- ];
@@ -1,129 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * @description 当表单组件中有联动操作时候,使用方法进行返回
5
- */
6
- export default {
7
- style: [],
8
- content: (data) => {
9
- return [
10
- {
11
- label: "选择业务线",
12
- ele: "xd-choose-namespace",
13
- valueKey: "xnamespace",
14
- value: data.xnamespace || null,
15
- handleCustom: (cb) => {
16
- XdBus.getParentApi('getOptionsNamespaces')()
17
- .then(res => {
18
- cb(res.list)
19
- })
20
- .catch();
21
- }
22
- },
23
- {
24
- label: '样式:',
25
- ele: 'xd-radio',
26
- valueKey: 'position',
27
- value: data['position'] || 1,
28
- rules: [
29
- {required: true, message: '请选择广告位显示方式', trigger: ['blur', 'change']}
30
- ],
31
- list: [
32
- {"label": "商品靠左", "value": 1},
33
- {"label": "商品靠右", "value": 2},
34
- ]
35
- },
36
- {
37
- label: '是否显示价格:',
38
- ele: 'xd-radio',
39
- valueKey: 'isPrice',
40
- value: data['isPrice'] || 'Y',
41
- placeholder: '请选择是否显示价格',
42
- multiple: false,
43
- className: 'input80',
44
- list: [
45
- {label: '是', value: 'Y'},
46
- {label: '否', value: 'N'},
47
- ]
48
- },
49
- {
50
- label: '是否展示原价:',
51
- ele: 'xd-radio',
52
- valueKey: 'isShowDiscount',
53
- value: data.isShowDiscount || "Y",
54
- rules: [
55
- {required: true, message: '请选择', trigger: ['blur', 'change']}
56
- ],
57
- list: [
58
- {"label": "显示", "value": "Y"},
59
- {"label": "隐藏", "value": "N"},
60
- ]
61
- },
62
- data.isShowDiscount==='Y'&&{
63
- label: '价差大于多少展示原价:',
64
- ele: 'el-input',
65
- type: 'number',
66
- valueKey: 'differ',
67
- value: data['differ'] || '',
68
- placeholder: '价差',
69
- className: 'input80',
70
- },
71
- {
72
- label: '展示商品总数:',
73
- ele: 'el-input',
74
- type: 'number',
75
- valueKey: 'number',
76
- value: data.number || '',
77
- placeholder: '请输入',
78
- className: 'input80',
79
- },
80
- {
81
- label: '商品展示方式:',
82
- ele: 'xd-radio',
83
- valueKey: 'productShowType',
84
- value: data.productShowType,
85
- rules: [
86
- {required: true, message: '请选择', trigger: ['blur', 'change']}
87
- ],
88
- list: [
89
- {"label": "固定展示", "value": "regular"},
90
- {"label": "向左轮播", "value": "left"},
91
- {"label": "向上轮播", "value": "top"},
92
- ]
93
- },
94
- {
95
- label: '限时秒杀背景图:', //label
96
- ele: 'xd-upload', //package 名称
97
- valueKey: 'secondBackground', //form[valueKey]
98
- value: data.secondBackground || null, //v-model
99
- defaultValue: data.secondBackground || null, //默认图片对象
100
- slot: true, //按钮是否使用slot
101
- tipsformet: '上传文件格式:@imageType@,不超过@size@MB.,建议尺寸:800*800像素',
102
- type: ['jpg', 'png', 'jpeg'],
103
- styleType: 'one', //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
104
- uploadType: 'aliyun', //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
105
- size: 5, //5M
106
- action: 'aliyun',
107
- },
108
- {
109
- label: '场次文字颜色:',
110
- ele: 'xd-color',
111
- valueKey: 'textColor',
112
- value: data.textColor,
113
- placeholder: '请选择文字颜色',
114
- classNmae: 'input80',
115
- },
116
- {
117
- label: '场次文字背景颜色:',
118
- ele: 'xd-color',
119
- valueKey: 'textBgColor',
120
- value: data.textBgColor,
121
- placeholder: '请选择场次文字背景颜色',
122
- classNmae: 'input80',
123
- },
124
- ].filter(i=>i)
125
- },
126
- advanced: [
127
-
128
- ],
129
- };
@@ -1,388 +0,0 @@
1
- <template>
2
- <view
3
- class="jfb-base-con-flash-home"
4
- @click="handleEditxSelect"
5
- :class="{ editx: isEditx && active }"
6
- >
7
- <!--#ifdef H5-->
8
- <view
9
- class="jfb-base-con-flash-home__edit"
10
- :class="{ editx: isEditx && active }"
11
- v-if="isEditx && active"
12
- >
13
- <view class="jfb-base-con-flash-home__edit-icon" @click="delEdit"
14
- >删除</view
15
- >
16
- </view>
17
- <!-- #endif -->
18
- <view class="jfb-base-con-flash-home__body">
19
- <view
20
- :style="{ flexDirection: position === 1 ? 'row' : 'row-reverse' }"
21
- class="jfb-base-con-flash-home__body-wrap"
22
- >
23
- <view
24
- :style="{
25
- backgroundImage: `url(${secondBackground})`,
26
- backgroundSize: '100% 100%',
27
- marginRight: position === 1 ? '0' : '20rpx',
28
- }"
29
- class="jfb-base-con-flash-home__body-wrap-session"
30
- >
31
- <view>
32
- <view
33
- :style="{ background: textBgColor, color: textColor }"
34
- class="jfb-base-con-flash-home__body-wrap-session-info"
35
- >10:00点场 距结束</view
36
- >
37
- <view class="jfb-base-con-flash-home__body-wrap-session-time">
38
- <text :style="{ color: textColor }">12</text>:
39
- <text :style="{ color: textColor }">48</text>:
40
- <text :style="{ color: textColor }">56</text>
41
- </view>
42
- </view>
43
- </view>
44
- <swiper
45
- :vertical="productShowType === 'top'"
46
- :autoplay="productShowType !== 'regular'"
47
- class="jfb-base-con-flash-home__body-wrap-product"
48
- :style="{
49
- marginRight: position === 1 ? '0' : '20rpx',
50
- }"
51
- >
52
- <swiper-item v-for="(item, index) in product_group" :key="index">
53
- <view class="jfb-base-con-flash-home__body-wrap-product-group">
54
- <view v-for="(SItem, SIndex) in item" :key="SIndex">
55
- <view
56
- class="jfb-base-con-flash-home__body-wrap-product-group-item"
57
- :style="{
58
- marginLeft: SIndex === 0&&position === 2 ? '0' : '20rpx',
59
- }"
60
- >
61
- <image :src="SItem.img"></image>
62
- <view
63
- class="jfb-base-con-flash-home__body-wrap-product-group-item-name"
64
- >{{ SItem.name }}</view
65
- >
66
- <view class="prod_price" v-if="isPrice === 'Y'">
67
- <xd-unit
68
- :price="SItem.sale_price"
69
- :isOld="false"
70
- color="#000000"
71
- :iconSize="0.14"
72
- :fontSize="20"
73
- />
74
- <!-- todo -->
75
- <view
76
- v-if="isShowDiscount === 'Y' && checkDiscountPrice(SItem)"
77
- class="prod_oldPrice"
78
- >原价:{{ dividePrice(SItem.market_price) }}</view
79
- >
80
- </view>
81
- </view>
82
- </view>
83
- </view>
84
- </swiper-item>
85
- </swiper>
86
- </view>
87
- </view>
88
- </view>
89
- </template>
90
-
91
- <script>
92
- import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
93
- import XdUnit from "@/components/XdUnit/XdUnit";
94
- import { jfbRootExec } from "@/utils/xd.event";
95
- import JfbBaseConFlashHomeMixin from "./JfbBaseConFlashHomeMixin";
96
- import { getContainerPropsValue } from "@/utils/xd.base";
97
- import componentsMixins from "@/mixins/componentsMixins";
98
- import extsMixins from "@/mixins/extsMixins";
99
- import getServiceUrl from "@/common/getServiceUrl";
100
- export default {
101
- name: "JfbBaseConFlashHome",
102
- components: {
103
- XdFontIcon,
104
- XdUnit,
105
- },
106
- mixins: [componentsMixins, extsMixins, JfbBaseConFlashHomeMixin],
107
- data() {
108
- return {
109
- secondBackground: "",
110
- xnamespace: "",
111
- position: "",
112
- isShowDiscount: "",
113
- number: "",
114
- productShowType: "",
115
- differ: 1,
116
- textColor: "",
117
- textBgColor: "",
118
- isPrice: "Y",
119
- productList: [
120
- {
121
- img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
122
- name: "方家铺子中宁四星红枸杞250g",
123
- market_price: 1200,
124
- sale_price: 1000,
125
- },
126
- {
127
- img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
128
- name: "方家铺子中宁四星红枸杞250g",
129
- market_price: 1200,
130
- sale_price: 1000,
131
- },
132
- {
133
- img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
134
- name: "方家铺子中宁四星红枸杞250g",
135
- market_price: 1200,
136
- sale_price: 1000,
137
- },
138
- {
139
- img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
140
- name: "方家铺子中宁四星红枸杞250g",
141
- market_price: 1200,
142
- sale_price: 1000,
143
- },
144
- {
145
- img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
146
- name: "方家铺子中宁四星红枸杞250g",
147
- market_price: 1200,
148
- sale_price: 1000,
149
- },
150
- {
151
- img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
152
- name: "方家铺子中宁四星红枸杞250g",
153
- market_price: 1200,
154
- sale_price: 1000,
155
- },
156
- {
157
- img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
158
- name: "方家铺子中宁四星红枸杞250g",
159
- market_price: 1200,
160
- sale_price: 1000,
161
- },
162
- {
163
- img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
164
- name: "方家铺子中宁四星红枸杞250g",
165
- market_price: 1200,
166
- sale_price: 1000,
167
- },
168
- {
169
- img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
170
- name: "方家铺子中宁四星红枸杞250g",
171
- market_price: 1200,
172
- sale_price: 1000,
173
- },
174
- {
175
- img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
176
- name: "方家铺子中宁四星红枸杞250g",
177
- market_price: 1200,
178
- sale_price: 1000,
179
- },
180
- {
181
- img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
182
- name: "方家铺子中宁四星红枸杞250g",
183
- market_price: 1200,
184
- sale_price: 1000,
185
- },
186
- ],
187
- };
188
- },
189
- watch: {
190
- container(value) {
191
- this.init(value);
192
- },
193
- },
194
- computed: {
195
- product_group() {
196
- let groupedProducts = [];
197
- for (let i = 0; i < this.productList.length; i += 3) {
198
- let group = this.productList.slice(i, i + 3);
199
- groupedProducts.push(group);
200
- }
201
- return groupedProducts;
202
- },
203
- },
204
- created() {
205
- this.init(this.container);
206
-
207
- //todo
208
- },
209
- methods: {
210
- onJfbLoad(options) {
211
- // jfbRootExec('baiduUserLogin', {
212
- // vm: this,// data: {
213
- // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
214
- // }
215
- // }).then().catch()
216
- },
217
- /**
218
- * @description 监听事件变化
219
- * @param container {object} 业务组件对象自己
220
- */
221
- init(container) {
222
- this.xnamespace = getContainerPropsValue(
223
- container,
224
- "content.xnamespace",
225
- this.projectAttr.business_code
226
- );
227
- this.position = getContainerPropsValue(container, "content.position", 1);
228
- this.isShowDiscount = getContainerPropsValue(
229
- container,
230
- "content.isShowDiscount",
231
- "Y"
232
- );
233
- this.number = getContainerPropsValue(container, "content.number", 10);
234
- this.productShowType = getContainerPropsValue(
235
- container,
236
- "content.productShowType",
237
- "regular"
238
- );
239
- this.textColor = getContainerPropsValue(
240
- container,
241
- "content.textColor",
242
- this.mainColor
243
- );
244
- this.textBgColor = getContainerPropsValue(
245
- container,
246
- "content.textBgColor",
247
- "yellow"
248
- );
249
- this.isPrice = getContainerPropsValue(container, "content.isPrice", "Y");
250
- this.secondBackground = getServiceUrl(
251
- getContainerPropsValue(container, "content.secondBackground", "none")
252
- .url
253
- );
254
- this.differ = getContainerPropsValue(container, "content.differ", 1);
255
-
256
- console.log(this.secondBackground, "secondBackground");
257
- },
258
- checkDiscountPrice(item) {
259
- if (this.isShowDiscount === "Y") {
260
- let price = item.market_price - item.sale_price;
261
- console.log(
262
- item.market_price,
263
- item.sale_price,
264
- this.$xdUniHelper.divisionFloatNumber(price, 100),
265
- this.differ,
266
- this.$xdUniHelper.divisionFloatNumber(price, 100) > this.differ,
267
- "hhhhhh"
268
- );
269
- return this.$xdUniHelper.divisionFloatNumber(price, 100) > this.differ;
270
- }
271
- },
272
- dividePrice(num) {
273
- return this.$xdUniHelper.divisionFloatNumber(num, 100);
274
- },
275
- onJfbScroll(options) {
276
- console.log("event.onJfbScroll", options);
277
- },
278
- onJfbReachBottom(options) {
279
- console.log("event.onJfbReachBottom", options);
280
- },
281
- onJfbShow(options) {
282
- console.log("event.onJfbShow", options);
283
- },
284
- onJfbHide(options) {
285
- console.log("event.onJfbHide", options);
286
- },
287
- onJfbBack(options) {
288
- console.log("event.onJfbBack", options);
289
- },
290
- onJfbUpdate(...data) {
291
- console.log("event.onJfbUpdate", data);
292
- },
293
- onJfbCustomEvent(options) {
294
- console.log("event.onJfbReachBottom", options);
295
- },
296
- },
297
- };
298
- </script>
299
-
300
- <style scoped lang="less">
301
- @import "./JfbBaseConFlashHomeLess.less";
302
-
303
- .jfb-base-con-flash-home {
304
- &__body {
305
- uni-swiper {
306
- height: 258rpx !important;
307
- }
308
- &-wrap {
309
- display: flex;
310
- padding: 20rpx 0 20rpx 20rpx;
311
- &-session {
312
- width: 168rpx;
313
- height: 258rpx;
314
- border-radius: 8rpx;
315
- display: flex;
316
- flex-direction: column-reverse;
317
- align-items: center;
318
- &-info {
319
- border-radius: 28rpx;
320
- text-align: center;
321
- padding: 6rpx 0 6rpx 0;
322
- font-size: 14rpx;
323
- font-weight: 500;
324
- width: 148rpx;
325
- }
326
- &-time {
327
- font-size: 24rpx;
328
- color: #fff;
329
- display: flex;
330
- justify-content: space-around;
331
- margin-bottom: 30rpx;
332
- margin-top: 16rpx;
333
-
334
- & > text {
335
- background: #fff;
336
- padding: 4rpx;
337
- border-radius: 4rpx;
338
- }
339
- }
340
- }
341
- &-product {
342
- display: flex;
343
- flex: 1;
344
- &-group {
345
- display: flex;
346
- &-item {
347
- width: 152rpx;
348
- height: 240rpx;
349
- border-radius: 8rpx;
350
- padding: 0 0 15rpx 6rpx;
351
- background: rgba(255, 255, 255, 1);
352
- display: flex;
353
- flex-direction: column;
354
- justify-content: flex-start;
355
- align-items: center;
356
- margin-left: 20rpx;
357
- box-shadow: 0px 8rpx 16rpx rgba(0, 0, 0, 0.1);
358
- image {
359
- width: 168rpx;
360
- height: 168rpx;
361
- }
362
- &-name {
363
- font-size: 14rpx;
364
- color: #333;
365
- text-align: left;
366
- vertical-align: top;
367
- }
368
- }
369
- }
370
- }
371
- .prod_price {
372
- display: flex;
373
- align-items: center;
374
- margin-top: 18rpx;
375
- width: 100%;
376
- justify-content: flex-start;
377
-
378
- .prod_oldPrice {
379
- font-size: 14rpx;
380
- text-decoration: line-through;
381
- color: #888888;
382
- margin-left: 10rpx;
383
- }
384
- }
385
- }
386
- }
387
- }
388
- </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-flash-home {
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-flash-home {
75
- &:before {
76
- content: " ";
77
- display: table;
78
- }
79
- }
80
- /**endNotPreview**/