jufubao-base 1.0.299 → 1.0.301-beta1

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.
@@ -0,0 +1,304 @@
1
+ 'use strict';
2
+ import {
3
+ dataVal ,
4
+ statusShow,
5
+ statusDataVal,
6
+ customVal,
7
+ cusDisabled ,
8
+ getCustomAttr,
9
+ } from "@/utils/AttrTools";
10
+ import IConList from "@/ICONS"
11
+ import ProductAttr from "@/utils/Attr/ProductAttr";
12
+
13
+ export default function (data, gValue,gColor,oldData){
14
+
15
+ return [
16
+ {
17
+ ele: 'title',
18
+ label: '基础',
19
+ size: 'small',
20
+ groupKey:'content',
21
+ },
22
+ {
23
+ label: "是否展示优先支付账户:",
24
+ ele: "xd-radio",
25
+ valueKey: "isShowPaySoft",
26
+ value: data.isShowPaySoft || "N",
27
+ groupKey: "content",
28
+ list: [
29
+ { label: "展示", value: "Y" },
30
+ { label: "不展示", value: "N" }
31
+ ]
32
+ },
33
+
34
+ {
35
+ ele: 'title',
36
+ label: '组件样式',
37
+ size: 'small',
38
+ groupKey:'content',
39
+ },
40
+ {
41
+ label: "组件样式",
42
+ ele: "xd-style-image",
43
+ groupKey: 'content',
44
+ valueKey: "compLayout",
45
+ cusStyle:{marginBottom: '5px'},
46
+ value: customVal({
47
+ data,
48
+ key: 'compLayout',
49
+ gValue,
50
+ sValue:"1",
51
+ }),
52
+ labelInline:true,
53
+ className: 'input100',
54
+ isTplRef:true,
55
+ handleCustom(cusRes) {
56
+ XdBus.getParentApi('getCompStylesOptions')({
57
+ layout_ids: 'lNIroukRdhDsu5lpqIkKn',
58
+ key: Date.now()
59
+ })
60
+ .then(res => {
61
+ cusRes.data.cb(res)
62
+ })
63
+ .catch(error => {
64
+ console.error(error);
65
+ });
66
+ },
67
+ },
68
+
69
+ {
70
+ ele: 'title',
71
+ label: '展示内容',
72
+ size: 'small',
73
+ groupKey:'content',
74
+ },
75
+ {
76
+ label: '扫码提货',
77
+ ele: 'xd-cus-switch',
78
+ valueKey: 'showScan',
79
+ value: dataVal({ data, key: 'showScan', dValue: 'Y', gValue }),
80
+ className: 'input100',
81
+ labelInline: true,
82
+ groupKey: 'content',
83
+ setting: {
84
+ tips: ['显示', '不显示'],
85
+ isBackType: 'string'
86
+ },
87
+ },
88
+ { ele: 'group_start' },
89
+ {
90
+ label: '标题',
91
+ ele: 'el-input',
92
+ valueKey: 'scanName',
93
+ labelInline: true,
94
+ value: dataVal({ data, key: 'scanName', dValue: '', gValue }),
95
+ hidden: data.showScan !== 'Y',
96
+ groupKey: 'content',
97
+ className: 'input80',
98
+ inline: false,
99
+ max: 4,
100
+ placeholder: "扫码提货"
101
+ },
102
+ {
103
+ label: "图标",
104
+ ele: "xd-radio",
105
+ valueKey: "scanIconType",
106
+ value: dataVal({ data, key: 'scanIconType', dValue: "icon", gValue }),
107
+ groupKey: 'content',
108
+ labelInline: true,
109
+ list: [
110
+ { label: "图标", value: "icon" },
111
+ { label: "图片", value: "img" }
112
+ ],
113
+ hidden: data.showScan !== 'Y'
114
+ },
115
+ data.scanIconType === 'icon' &&{
116
+ label: " ",
117
+ ele: "xd-icon-select",
118
+ valueKey: "scanIcon",
119
+ value: data.scanIcon || '',
120
+ hidden: data.showScan !== 'Y',
121
+ list: IConList,
122
+ labelInline: true,
123
+ className: 'input80',
124
+ groupKey: "content",
125
+ },
126
+ data.scanIconType === 'img' &&{
127
+ label: ' ',
128
+ ele: "xd-upload",
129
+ valueKey: 'scanImg',
130
+ groupKey:'content',
131
+ value: data.scanImg || {},
132
+ defaultValue: data.scanImg || null,
133
+ hidden: data.showScan !== 'Y',
134
+ slot: true,
135
+ oneWidth: 60,
136
+ oneHeight: 60,
137
+ elinputClassName: 'input40',
138
+ tipsformet: '上传@imageType@不超过@size@MB.比例1:1',
139
+ type: ['jpg', 'png', 'jpeg'],
140
+ styleType: 'one',
141
+ uploadType: 'aliyun',
142
+ size: 1,
143
+ action: 'action',
144
+ sort: true,
145
+ maxlen: 100,
146
+ labelInline: true,
147
+ },
148
+ { ele: 'group_end' },
149
+
150
+
151
+ {
152
+ label: '聚好兑',
153
+ ele: 'xd-cus-switch',
154
+ valueKey: 'showJHD',
155
+ value: dataVal({ data, key: 'showJHD', dValue: 'Y', gValue }),
156
+ className: 'input100',
157
+ labelInline: true,
158
+ groupKey: 'content',
159
+ setting: {
160
+ tips: ['显示', '不显示'],
161
+ isBackType: 'string'
162
+ },
163
+ },
164
+ { ele: 'group_start' },
165
+ {
166
+ label: '标题',
167
+ ele: 'el-input',
168
+ valueKey: 'JHDName',
169
+ labelInline: true,
170
+ value: dataVal({ data, key: 'JHDName', dValue: '', gValue }),
171
+ hidden: data.showJHD !== 'Y',
172
+ groupKey: 'content',
173
+ className: 'input80',
174
+ inline: false,
175
+ max: 4,
176
+ placeholder: "聚好兑"
177
+ },
178
+ {
179
+ label: "图标",
180
+ ele: "xd-radio",
181
+ valueKey: "JHDIconType",
182
+ value: dataVal({ data, key: 'JHDIconType', dValue: "icon", gValue }),
183
+ groupKey: 'content',
184
+ labelInline: true,
185
+ list: [
186
+ { label: "图标", value: "icon" },
187
+ { label: "图片", value: "img" }
188
+ ],
189
+ hidden: data.showJHD !== 'Y'
190
+ },
191
+ data.JHDIconType === 'icon' &&{
192
+ label: " ",
193
+ ele: "xd-icon-select",
194
+ valueKey: "JHDIcon",
195
+ value: data.JHDIcon || '',
196
+ list: IConList,
197
+ labelInline: true,
198
+ className: 'input80',
199
+ groupKey: "content",
200
+ hidden: data.showJHD !== 'Y',
201
+ },
202
+ data.JHDIconType === 'img' &&{
203
+ label: ' ',
204
+ ele: "xd-upload",
205
+ valueKey: 'JHDImg',
206
+ groupKey:'content',
207
+ value: data.JHDImg || {},
208
+ defaultValue: data.JHDImg || null,
209
+ slot: true,
210
+ oneWidth: 60,
211
+ oneHeight: 60,
212
+ elinputClassName: 'input40',
213
+ tipsformet: '上传@imageType@不超过@size@MB.比例1:1',
214
+ type: ['jpg', 'png', 'jpeg'],
215
+ styleType: 'one',
216
+ uploadType: 'aliyun',
217
+ size: 1,
218
+ action: 'action',
219
+ sort: true,
220
+ maxlen: 100,
221
+ labelInline: true,
222
+ hidden: data.showJHD !== 'Y',
223
+ },
224
+ { ele: 'group_end' },
225
+
226
+
227
+ {
228
+ label: '展码提货',
229
+ ele: 'xd-cus-switch',
230
+ valueKey: 'showQP',
231
+ value: dataVal({ data, key: 'showQP', dValue: 'Y', gValue }),
232
+ className: 'input100',
233
+ labelInline: true,
234
+ groupKey: 'content',
235
+ setting: {
236
+ tips: ['显示', '不显示'],
237
+ isBackType: 'string'
238
+ },
239
+ },
240
+ { ele: 'group_start' },
241
+ {
242
+ label: '标题',
243
+ ele: 'el-input',
244
+ valueKey: 'QPName',
245
+ labelInline: true,
246
+ value: dataVal({ data, key: 'QPName', dValue: '', gValue }),
247
+ hidden: data.showQP !== 'Y',
248
+ groupKey: 'content',
249
+ className: 'input80',
250
+ inline: false,
251
+ max: 4,
252
+ placeholder: "展码提货"
253
+ },
254
+ {
255
+ label: "图标",
256
+ ele: "xd-radio",
257
+ valueKey: "QPIconType",
258
+ value: dataVal({ data, key: 'QPIconType', dValue: "icon", gValue }),
259
+ groupKey: 'content',
260
+ labelInline: true,
261
+ list: [
262
+ { label: "图标", value: "icon" },
263
+ { label: "图片", value: "img" }
264
+ ],
265
+ hidden: data.showQP !== 'Y'
266
+ },
267
+ data.QPIconType === 'icon' &&{
268
+ label: " ",
269
+ ele: "xd-icon-select",
270
+ valueKey: "QPIcon",
271
+ value: data.QPIcon || '',
272
+ list: IConList,
273
+ labelInline: true,
274
+ className: 'input80',
275
+ groupKey: "content",
276
+ hidden: data.showQP !== 'Y',
277
+ },
278
+ data.QPIconType === 'img' &&{
279
+ label: ' ',
280
+ ele: "xd-upload",
281
+ valueKey: 'QPImg',
282
+ groupKey:'content',
283
+ value: data.QPImg || {},
284
+ defaultValue: data.QPImg || null,
285
+ slot: true,
286
+ oneWidth: 60,
287
+ oneHeight: 60,
288
+ elinputClassName: 'input40',
289
+ tipsformet: '上传@imageType@不超过@size@MB.比例1:1',
290
+ type: ['jpg', 'png', 'jpeg'],
291
+ styleType: 'one',
292
+ uploadType: 'aliyun',
293
+ size: 1,
294
+ action: 'action',
295
+ sort: true,
296
+ maxlen: 100,
297
+ labelInline: true,
298
+ hidden: data.showQP !== 'Y',
299
+ },
300
+ { ele: 'group_end' },
301
+
302
+
303
+ ].filter(i=>i)
304
+ }
@@ -0,0 +1,94 @@
1
+ 'use strict';
2
+
3
+ import {
4
+ dataVal,
5
+ statusShow,
6
+ statusDataVal,
7
+ customVal,
8
+ cusDisabled,
9
+ getCustomAttr,
10
+ oldTonNewBorAndSha,
11
+ cRaBorShadow,
12
+ isDefStatus
13
+ } from "@/utils/AttrTools";
14
+ import productStyle from "@/utils/Attr/productStyle";
15
+ const Color = require('color');
16
+
17
+ export default function (data={},gValue={},gColor={},oldData) {
18
+ let defContBorder = cRaBorShadow( data, 'contBorder', {dValue:'D'},gValue);
19
+ let defContShadow = cRaBorShadow( data, 'contShadow', {dValue:'D'},gValue);
20
+ //导航投影设置
21
+ let titleTabShadowExt = {dValue:'N'};
22
+ if(gValue.isAdd === true && gValue.isFirst) titleTabShadowExt = {dValue:'D'};
23
+ let titleTabShadow = cRaBorShadow(data , 'titleTabShadow',titleTabShadowExt, gValue);
24
+
25
+ return [
26
+ {
27
+ ele: 'title',
28
+ label: '常规',
29
+ size: 'small',
30
+ groupKey:'style',
31
+ },
32
+ {
33
+ label: '内容区背景',
34
+ ele: 'xd-radio',
35
+ groupKey: 'style',
36
+ valueKey: 'contBgcColorStatus',
37
+ value: statusDataVal({
38
+ data,
39
+ key:'contBgcColorStatus',
40
+ fields:['bodyBgImg'],
41
+ gValue,
42
+ cusField:['productStyle']
43
+ }),
44
+ labelInline:true,
45
+ list: [
46
+ {label: '默认', value: 'D'},
47
+ {label: '自定义', value: 'C'},
48
+ ]
49
+ },
50
+ {ele: 'group_start'},
51
+ {
52
+ label: '背景色',
53
+ ele: 'xd-color',
54
+ valueKey: 'contBgcColor',
55
+ labelInline: true,
56
+ value: dataVal({
57
+ data,
58
+ key:'contBgcColor',
59
+ dValue:['#fff'],
60
+ gValue,
61
+ }),
62
+ hidden: !statusShow({data, key: 'contBgcColorStatus', fields:['bodyBgImg'], gValue}),
63
+ placeholder: '请选择背景颜色',
64
+ className: 'input80',
65
+ groupKey:'style',
66
+ setting: {
67
+ showAlpha: true
68
+ },
69
+ },
70
+ {
71
+ label: '背景图',
72
+ ele: "xd-upload",
73
+ valueKey: 'bodyBgImg',
74
+ groupKey:'style',
75
+ value: data.bodyBgImg || {},
76
+ defaultValue: data.bodyBgImg || null,
77
+ hidden: !statusShow({data, key: 'contBgcColorStatus', fields:['bodyBgImg'], gValue}),
78
+ slot: true,
79
+ oneWidth: 60,
80
+ oneHeight: 60,
81
+ elinputClassName: 'input40',
82
+ tipsformet: '上传@imageType@不超过@size@MB.比例1:1',
83
+ type: ['jpg', 'png', 'jpeg'],
84
+ styleType: 'one',
85
+ uploadType: 'aliyun',
86
+ size: 1,
87
+ action: 'action',
88
+ sort: true,
89
+ maxlen: 100,
90
+ labelInline: true,
91
+ },
92
+ {ele: 'group_end'},
93
+ ].filter(i=>i)
94
+ }
@@ -0,0 +1,54 @@
1
+ 'use strict';
2
+ import { jfbRootExec } from "@/utils/xd.event";
3
+ export default {
4
+ data() {
5
+ return {
6
+ showShopList: false,
7
+ }
8
+ },
9
+ methods: {
10
+ p_getShopList(params = {}, cb){
11
+ return new Promise((resolve, reject) => {
12
+ jfbRootExec("getConsumpShopList", {
13
+ vm: this,
14
+ data: {
15
+ consume_mode: 'SELL',
16
+ latitude: this.stateLocation.latitude + '',
17
+ longitude: this.stateLocation.longitude + '',
18
+ ...params,
19
+ }
20
+ }).then(res => {
21
+ if(cb) cb(res.list);
22
+ resolve(res.list);
23
+ }).catch(err => {
24
+ reject(err);
25
+ })
26
+ })
27
+ },
28
+ handleCityDone(city){
29
+ console.log("handleCityDone", city);
30
+ },
31
+ handleCityChange(){
32
+ this.$xdUniHelper.navigateTo({
33
+ url: this.cityPath
34
+ })
35
+ },
36
+ handleChoseShop(shop){
37
+ this.shop_id = shop.shop_id;
38
+ this.resource_shop_id = shop.resource_shop_id;
39
+ this.shopName = shop.resource_shop_name;
40
+ this.p_getAsyncStep((err) => {
41
+ if(err === 'error'){
42
+ }else{
43
+ this.showShopList = false;
44
+ this.showMask = false;
45
+ }
46
+ });
47
+ },
48
+ handleToShop() {
49
+ this.$xdUniHelper.navigateTo({
50
+ url: this.shopPath
51
+ });
52
+ },
53
+ }
54
+ }