jufubao-base 1.0.297-beta21 → 1.0.297-beta23

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,298 @@
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
+ list: IConList,
121
+ labelInline: true,
122
+ className: 'input80',
123
+ groupKey: "content",
124
+ },
125
+ data.scanIconType === 'img' &&{
126
+ label: ' ',
127
+ ele: "xd-upload",
128
+ valueKey: 'scanImg',
129
+ groupKey:'content',
130
+ value: data.scanImg || {},
131
+ defaultValue: data.scanImg || null,
132
+ slot: true,
133
+ oneWidth: 60,
134
+ oneHeight: 60,
135
+ elinputClassName: 'input40',
136
+ tipsformet: '上传@imageType@不超过@size@MB.比例1:1',
137
+ type: ['jpg', 'png', 'jpeg'],
138
+ styleType: 'one',
139
+ uploadType: 'aliyun',
140
+ size: 1,
141
+ action: 'action',
142
+ sort: true,
143
+ maxlen: 100,
144
+ labelInline: true,
145
+ },
146
+ { ele: 'group_end' },
147
+
148
+
149
+ {
150
+ label: '聚好兑',
151
+ ele: 'xd-cus-switch',
152
+ valueKey: 'showJHD',
153
+ value: dataVal({ data, key: 'showJHD', dValue: 'Y', gValue }),
154
+ className: 'input100',
155
+ labelInline: true,
156
+ groupKey: 'content',
157
+ setting: {
158
+ tips: ['显示', '不显示'],
159
+ isBackType: 'string'
160
+ },
161
+ },
162
+ { ele: 'group_start' },
163
+ {
164
+ label: '标题',
165
+ ele: 'el-input',
166
+ valueKey: 'JHDName',
167
+ labelInline: true,
168
+ value: dataVal({ data, key: 'JHDName', dValue: '', gValue }),
169
+ hidden: data.showJHD !== 'Y',
170
+ groupKey: 'content',
171
+ className: 'input80',
172
+ inline: false,
173
+ max: 4,
174
+ placeholder: "聚好兑"
175
+ },
176
+ {
177
+ label: "图标",
178
+ ele: "xd-radio",
179
+ valueKey: "JHDIconType",
180
+ value: dataVal({ data, key: 'JHDIconType', dValue: "icon", gValue }),
181
+ groupKey: 'content',
182
+ labelInline: true,
183
+ list: [
184
+ { label: "图标", value: "icon" },
185
+ { label: "图片", value: "img" }
186
+ ],
187
+ hidden: data.showJHD !== 'Y'
188
+ },
189
+ data.JHDIconType === 'icon' &&{
190
+ label: " ",
191
+ ele: "xd-icon-select",
192
+ valueKey: "JHDIcon",
193
+ value: data.JHDIcon || '',
194
+ list: IConList,
195
+ labelInline: true,
196
+ className: 'input80',
197
+ groupKey: "content",
198
+ },
199
+ data.JHDIconType === 'img' &&{
200
+ label: ' ',
201
+ ele: "xd-upload",
202
+ valueKey: 'JHDImg',
203
+ groupKey:'content',
204
+ value: data.JHDImg || {},
205
+ defaultValue: data.JHDImg || null,
206
+ slot: true,
207
+ oneWidth: 60,
208
+ oneHeight: 60,
209
+ elinputClassName: 'input40',
210
+ tipsformet: '上传@imageType@不超过@size@MB.比例1:1',
211
+ type: ['jpg', 'png', 'jpeg'],
212
+ styleType: 'one',
213
+ uploadType: 'aliyun',
214
+ size: 1,
215
+ action: 'action',
216
+ sort: true,
217
+ maxlen: 100,
218
+ labelInline: true,
219
+ },
220
+ { ele: 'group_end' },
221
+
222
+
223
+ {
224
+ label: '展码提货',
225
+ ele: 'xd-cus-switch',
226
+ valueKey: 'showQP',
227
+ value: dataVal({ data, key: 'showQP', dValue: 'Y', gValue }),
228
+ className: 'input100',
229
+ labelInline: true,
230
+ groupKey: 'content',
231
+ setting: {
232
+ tips: ['显示', '不显示'],
233
+ isBackType: 'string'
234
+ },
235
+ },
236
+ { ele: 'group_start' },
237
+ {
238
+ label: '标题',
239
+ ele: 'el-input',
240
+ valueKey: 'QPName',
241
+ labelInline: true,
242
+ value: dataVal({ data, key: 'QPName', dValue: '', gValue }),
243
+ hidden: data.showQP !== 'Y',
244
+ groupKey: 'content',
245
+ className: 'input80',
246
+ inline: false,
247
+ max: 4,
248
+ placeholder: "展码提货"
249
+ },
250
+ {
251
+ label: "图标",
252
+ ele: "xd-radio",
253
+ valueKey: "QPIconType",
254
+ value: dataVal({ data, key: 'QPIconType', dValue: "icon", gValue }),
255
+ groupKey: 'content',
256
+ labelInline: true,
257
+ list: [
258
+ { label: "图标", value: "icon" },
259
+ { label: "图片", value: "img" }
260
+ ],
261
+ hidden: data.showQP !== 'Y'
262
+ },
263
+ data.QPIconType === 'icon' &&{
264
+ label: " ",
265
+ ele: "xd-icon-select",
266
+ valueKey: "QPIcon",
267
+ value: data.QPIcon || '',
268
+ list: IConList,
269
+ labelInline: true,
270
+ className: 'input80',
271
+ groupKey: "content",
272
+ },
273
+ data.QPIconType === 'img' &&{
274
+ label: ' ',
275
+ ele: "xd-upload",
276
+ valueKey: 'QPImg',
277
+ groupKey:'content',
278
+ value: data.QPImg || {},
279
+ defaultValue: data.QPImg || null,
280
+ slot: true,
281
+ oneWidth: 60,
282
+ oneHeight: 60,
283
+ elinputClassName: 'input40',
284
+ tipsformet: '上传@imageType@不超过@size@MB.比例1:1',
285
+ type: ['jpg', 'png', 'jpeg'],
286
+ styleType: 'one',
287
+ uploadType: 'aliyun',
288
+ size: 1,
289
+ action: 'action',
290
+ sort: true,
291
+ maxlen: 100,
292
+ labelInline: true,
293
+ },
294
+ { ele: 'group_end' },
295
+
296
+
297
+ ].filter(i=>i)
298
+ }
@@ -0,0 +1,93 @@
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
+ slot: true,
78
+ oneWidth: 60,
79
+ oneHeight: 60,
80
+ elinputClassName: 'input40',
81
+ tipsformet: '上传@imageType@不超过@size@MB.比例1:1',
82
+ type: ['jpg', 'png', 'jpeg'],
83
+ styleType: 'one',
84
+ uploadType: 'aliyun',
85
+ size: 1,
86
+ action: 'action',
87
+ sort: true,
88
+ maxlen: 100,
89
+ labelInline: true,
90
+ },
91
+ {ele: 'group_end'},
92
+ ].filter(i=>i)
93
+ }
@@ -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
+ }