jufubao-food 1.0.12-beta4 → 1.0.12-beta6

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-food",
3
- "version": "1.0.12-beta4",
3
+ "version": "1.0.12-beta6",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件餐饮插件包",
6
6
  "main": "index.js",
@@ -105,13 +105,21 @@ module.exports = [
105
105
  },
106
106
  {
107
107
  mapFnName: 'createFoodOrder',
108
- title: '创建订单',
109
- path: '/hourdash/v1/order/submit/:cart_order_id',
108
+ title: '餐饮 - 创建订单',
109
+ path: '/mall/v1/order/pre/submit',
110
110
  isRule: false,
111
111
  data: {
112
- selected_card_list_json: ['被操作的卡券的卡号', 'String', '必选'],
113
- buy_product: ['临时订单号', 'Number', '必选'],
114
- need_pay_price: ['仍需支付金额', 'Number', '必选'],
112
+ pay_card_list: [
113
+ '被操作的卡券的卡号',
114
+ `[
115
+ {card_number:123,card_point:100,card_price:200},
116
+ {card_number:234,card_point:100,card_price:200,card_password:abc},
117
+ {card_number:456,card_point:100,card_price:200,qrcode:aaa}]`,
118
+ '必选',
119
+ ],
120
+ total_price: ['总金额', 'Number', '必选'],
121
+ main_order_id: ['main_order_id', 'number', '必选'],
122
+ notify_provider_id: ['notify_provider_id', 'String', '可选']
115
123
  },
116
124
  isConsole: true,
117
125
  disabled: true,
@@ -93,15 +93,9 @@
93
93
  <xd-list-item label="商品价格" paddingLR="60rpx" size="small">
94
94
  <xd-unit :price="orderInfo.product_total_amount" :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
95
95
  </xd-list-item>
96
- <!-- <xd-list-item label="商品运费" paddingLR="60rpx" size="small">
97
- <xd-unit :price="orderFee.user_logistics_amount_origin" :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
98
- </xd-list-item> -->
99
96
  </view>
100
97
 
101
98
  <view class="section">
102
- <!-- <xd-list-item label="运费减免" :showBottom="!!showPayMethods.length" paddingLR="60rpx" size="small">
103
- <xd-unit :largeZero="false" :price="-orderFee.user_logistics_discount_amount" :isOld="false" :fontSize="24" :iconSize="0.3"></xd-unit>
104
- </xd-list-item> -->
105
99
  <template v-for="item in otherPayMethod">
106
100
  <xd-list-item v-if="item.method === 'card'" :key="item.method" :label="item.show_name" paddingLR="60rpx" size="small" :showRight="!(choseCoupon && choseCoupon.cardPayPrice)" @click="toChoseCard">
107
101
  <view slot="label">{{item.show_name}} <text v-if="choseCard && choseCard.cardPayPrice" style="color:red;margin-left: 4px;">(已选{{ choseCard.selectedCardList.length }}张)</text></view>
@@ -278,11 +272,10 @@
278
272
  order_id: "", //订单ID
279
273
  comment: "", //订单备注
280
274
  buyer_phone_number: "", //订购人手机号
281
- meal_method: "in_store", //订餐方式
275
+ meal_method: "", //订餐方式
282
276
  productList: [],
283
277
  orderInfo: {},
284
278
  shopInfo: {},
285
- orderFee: {},
286
279
  otherPayMethod: [],
287
280
  otherPayLoaded: false,
288
281
  is_can_buy: "Y",
@@ -290,6 +283,7 @@
290
283
  vipCardList: [],
291
284
  vip_card_id: "",
292
285
  plus_saving_money: 0,
286
+ main_order_id: "",
293
287
 
294
288
  showDialogConfirmShop: false,
295
289
  showDialogChangeShop: false,
@@ -481,7 +475,9 @@
481
475
  is_show_price: this.showPrice,
482
476
  latitude: this.stateLocation.latitude,
483
477
  longitude: this.stateLocation.longitude,
484
- vip_card_id: this.vip_card_id
478
+ card_id: this.vip_card_id,
479
+ meal_method: this.meal_method,
480
+ main_order_id: this.main_order_id
485
481
  }
486
482
  }).then(res => {
487
483
  this.$xdHideLoading();
@@ -493,39 +489,32 @@
493
489
  },150)
494
490
  },
495
491
  handlerConfirmRes(res){
496
- this.is_first_use_card = res.is_first_use_card || "Y";
497
- this.is_use_jfb_pay = res.is_use_jfb_pay || "Y";
492
+ // this.is_first_use_card = res.is_first_use_card || "Y";
493
+ // this.is_use_jfb_pay = res.is_use_jfb_pay || "Y";
498
494
  this.is_show_vip_card_list = res.is_show_vip_card_list;
499
495
 
496
+ // this.is_can_buy = res.is_can_buy;
497
+ let priceChange = this.orderInfo.real_total_amount && this.orderInfo.real_total_amount != res.order_info.real_total_amount;
498
+
500
499
  this.productList = res.product_infos;
501
500
  this.orderInfo = res.order_info;
502
501
  this.shopInfo = res.shop_info;
502
+ let mealMethods = res.shop_info.meal_method;
503
+ if(!this.meal_method && mealMethods.length){
504
+ this.meal_method = mealMethods[0].value;
505
+ }
506
+ this.plus_saving_money = res.plus_saving_money || 0;
507
+ this.main_order_id = res.order_info.main_order_id
503
508
 
504
- // this.is_can_buy = res.is_can_buy;
505
- // this.gift_pay_method = res.gift_pay_method;
506
- // this.show_receive_address = res.show_receive_address;
507
- // this.show_pick_up_address = res.show_pick_up_address;
508
- // this.main_show_delivery_price = res.main_show_delivery_price;
509
- // let priceChange = this.orderFee.total_amount && this.orderFee.total_amount != res.total_amount;
510
-
511
- // this.orderFee = {
512
- // logistics_amount: res.logistics_amount,
513
- // total_amount: res.total_amount,
514
- // user_logistics_discount_amount: res.user_logistics_discount_amount,
515
- // user_logistics_amount_origin: res.user_logistics_amount_origin,
516
- // product_amount: res.product_amount,
517
- // plus_saving_money: res.plus_saving_money,
518
- // origin_amount: res.origin_amount,
519
- // }
520
509
  //支付方式跟用户相关,与订单无关。
521
510
  //只获取一次。
522
511
  if(!this.otherPayLoaded){
523
512
  this.p_getPayMethod(res.support_payment_methods);
524
513
  }
525
514
  //确认订单价格改变,清空选择
526
- // if(priceChange){
527
- // this.clearCheckedWhenPriceChange();
528
- // }
515
+ if(priceChange){
516
+ this.clearCheckedWhenPriceChange();
517
+ }
529
518
  if(res.vip_card_item){
530
519
  if(res.vip_card_item.is_can_buy === 'Y'){
531
520
  this.vip_card_id = res.vip_card_item.vip_card_id;
@@ -551,6 +540,7 @@
551
540
  },
552
541
  handleSelectMeal(method){
553
542
  this.meal_method = method;
543
+ this.p_getCartConfirm();
554
544
  },
555
545
  //确认订单价格改变,清空选择
556
546
  clearCheckedWhenPriceChange(){
@@ -609,7 +599,7 @@
609
599
  handleSwitchShop(){
610
600
  this.showDialogChangeShop = false;
611
601
  this.$xdUniHelper.navigateTo({
612
- url: this.switchStorePath
602
+ url: this.switchStorePath + '?brand_id=' + this.shopInfo.brand_id,
613
603
  })
614
604
  },
615
605
  handleChangeStop(){
@@ -665,7 +655,7 @@
665
655
  //使用钱包跟票券一同支付
666
656
  useTickAndWalletPay(selected_card_list, selected_wallet_list){
667
657
  this.createSettleOrder({
668
- total_price: this.orderFee.total_amount,
658
+ total_price: this.orderInfo.real_total_amount,
669
659
  selected_card_list_json: JSON.stringify(selected_card_list),
670
660
  selected_wallet_list_json: JSON.stringify(selected_wallet_list),
671
661
  need_pay_price: this.orderNeedPayPrice,
@@ -192,11 +192,11 @@ export default {
192
192
  ...options,
193
193
  ...other,
194
194
  namespace: this.xnamespace,
195
- cart_order_id: this.order_id,
195
+ main_order_id: this.main_order_id,
196
196
  notify_provider_id: this.projectAttr['notify_provider_id'],
197
197
  }
198
198
  }).then(async res => {
199
- successCb({...res, order_id: res.main_order_id })
199
+ successCb({...res, order_id: res.order_id })
200
200
  // setTimeout(() => {
201
201
  // this.p_getOrderInfo(res, (res1) => {
202
202
  // successCb(res1)
@@ -7,7 +7,19 @@ export default {
7
7
  style: [],
8
8
  content: (data) => {
9
9
  return [
10
-
10
+ {
11
+ label: '商品列表页',
12
+ ele: 'xd-select-pages-path',
13
+ valueKey: 'foodProductListPath',
14
+ placeholder: '请选择商品列表页跳转地址',
15
+ value: data.foodProductListPath || null,
16
+ labelInline: true,
17
+ setting: {
18
+ router: XdBus.getParentApi('getPagesTree'),
19
+ },
20
+ groupKey:'advanced',
21
+ className: 'input100',
22
+ },
11
23
  ].filter(i=>i)
12
24
  },
13
25
  advanced: [],
@@ -132,6 +132,7 @@
132
132
  bottomBtnFill: "",
133
133
  bottomPadding: {},
134
134
  bottomBtnOrder: "",
135
+ foodProductListPath: "",
135
136
  }
136
137
  },
137
138
  computed: {
@@ -206,6 +207,7 @@
206
207
  * @param container {object} 业务组件对象自己
207
208
  */
208
209
  init(container) {
210
+ this.foodProductListPath = getContainerPropsValue(container, 'content.foodProductListPath', {value: ""}).value;
209
211
  this.shopBtnBgColor = gCPVal(container, 'shopBtnBgColor', this.mainColor, {sKey:'cartBtnStatus',fields:['shopBtnBgColor']});
210
212
  },
211
213
  handleSkuChange(sku){
@@ -267,7 +269,14 @@
267
269
  }
268
270
  }
269
271
  }).then(res => {
270
- this.onJfbBack(res);
272
+ //判断是否有上一页,如果有则返回上一页
273
+ if(getCurrentPages().length > 1){
274
+ this.$xdUniHelper.navigateBack();
275
+ }else{
276
+ this.$xdUniHelper.redirectTo({
277
+ url: this.foodProductListPath + `?resource_shop_id=${this.baseInfo.resource_shop_id}`,
278
+ })
279
+ }
271
280
  })
272
281
  },
273
282
  animationfinish(e) {
@@ -298,7 +307,6 @@
298
307
  },
299
308
  onJfbBack(options) {
300
309
  if(this.$configProject["isPreview"]) return;
301
- this.$xdUniHelper.navigateBack();
302
310
  },
303
311
  onJfbUpdate(...data) {
304
312
  console.log('event.onJfbUpdate', data)
@@ -316,7 +324,7 @@
316
324
 
317
325
  .jfb-food-product-info {
318
326
  &__body{
319
- background-color: #efefef;
327
+ background-color: #f8f8f8;
320
328
  .xd-store-product {
321
329
  color: #333;
322
330
  &__swiper {
@@ -19,7 +19,7 @@
19
19
  <view class="shop_info" :style="{top: layoutInfo.top+'rpx'}" @click="handleSwitchShop">
20
20
  <view class="flex-center">
21
21
  <xd-font-icon icon="icona-Buy2" size="36" style="margin-right: 8rpx;"></xd-font-icon>
22
- {{ shopInfo.shop_name }} <text style="margin:0 20rpx;">|</text> <text class="_distance">{{ shopInfo.distance }}</text>
22
+ <view class="shop_name">{{ shopInfo.shop_name }}</view><text style="margin:0 20rpx;">|</text> <text class="_distance">{{ shopInfo.distance }}</text>
23
23
  </view>
24
24
  <view>
25
25
  <xd-font-icon icon="iconxiangyou_xian" color="#666666" size="28"></xd-font-icon>
@@ -91,7 +91,7 @@
91
91
  <xd-unit :price="cartPrice" :isOld="false"></xd-unit>
92
92
  </view>
93
93
  <view>
94
- <xd-button width="200rpx" size="small" type="primary" @click="handleSubmitCart">选好了</xd-button>
94
+ <xd-button width="200rpx" size="small" type="primary" :disabled="!cartProductList.length" @click="handleSubmitCart">选好了</xd-button>
95
95
  </view>
96
96
  </view>
97
97
  <view class="cart_product_modal" v-if="cartProductShow">
@@ -197,7 +197,7 @@
197
197
  //商品列表
198
198
  column_num: 1,
199
199
  skeNumber:10,
200
- rowSpacing:20,
200
+ rowSpacing: 16,
201
201
  columnSpacing:20,
202
202
  listPadding:{},
203
203
  productConfig:{},
@@ -226,7 +226,7 @@
226
226
  return {
227
227
  backgroundColor: this.itemBgcColor,
228
228
  marginBottom: this.rowSpacing + 'rpx',
229
- padding: '20rpx',
229
+ padding: '16rpx',
230
230
  borderRadius: '16rpx',
231
231
  }
232
232
  },
@@ -272,7 +272,8 @@
272
272
  this.foodDetailPath = getContainerPropsValue(container, 'content.foodDetailPath', {value: "/Smallline/food/pinfo"}).value;
273
273
  this.confirmPath = getContainerPropsValue(container, 'content.confirmPath', {value: "/Smallline/food/confirmv2"}).value;
274
274
  this.switchStorePath = getContainerPropsValue(container, 'content.switchStorePath', { value: ''}).value;
275
- this.productConfig = this.getProductConfig(container);
275
+ // this.productConfig = this.getProductConfig(container);
276
+ this.productConfig = this.getProductConfig(container,{cartStyle:'iconaddcart'});
276
277
  },
277
278
  handleCartNumChange(val, prod){
278
279
  console.log("handleCartNumChange", val, prod)
@@ -304,7 +305,7 @@
304
305
  },
305
306
  handleSwitchShop(){
306
307
  this.$xdUniHelper.navigateTo({
307
- url: this.switchStorePath,
308
+ url: this.switchStorePath + "?brand_id=" + this.shopInfo.brand_id,
308
309
  })
309
310
  },
310
311
  p_getFoodShopDetail(){
@@ -578,6 +579,7 @@
578
579
  })
579
580
  },
580
581
  handleSubmitCart(){
582
+ if(this.cartProductList.length === 0) return;
581
583
  jfbRootExec("submitFoodCart", {
582
584
  vm: this,
583
585
  data: {
@@ -625,7 +627,7 @@
625
627
 
626
628
  .jfb-food-product-list {
627
629
  &__body{
628
- background-color: #f0f0f0;
630
+ background-color: #f8f8f8;
629
631
  .flex-center{
630
632
  display: flex;
631
633
  align-items: center;
@@ -649,17 +651,24 @@
649
651
  font-size: 24rpx;
650
652
  color: #666666;
651
653
  }
654
+ .shop_name{
655
+ white-space: nowrap;
656
+ overflow: hidden;
657
+ text-overflow: ellipsis;
658
+ max-width: 460rpx;
659
+ flex: 1;
660
+ }
652
661
  }
653
662
  .section_main{
654
663
  display: flex;
655
- padding-top: 20rpx;
664
+ padding-top: 16rpx;
656
665
  box-sizing: border-box;
657
666
  .left_nav{
658
667
  width: 160rpx;
659
668
  background-color: #FFFFFF;
660
669
  font-size: 24rpx;
661
670
  border-radius: 16rpx;
662
- margin-left: 20rpx;
671
+ margin-left: 16rpx;
663
672
  .nav_item{
664
673
  padding: 24rpx;
665
674
  text-align: center;
@@ -693,13 +702,13 @@
693
702
  }
694
703
  .right_product{
695
704
  flex: 1;
696
- margin: 0 20rpx;
705
+ margin: 0 16rpx;
697
706
 
698
707
  .product_group{
699
708
  .group_title{
700
709
  font-size: 24rpx;
701
710
  background-color: #FFFFFF;
702
- margin-bottom: 20rpx;
711
+ margin-bottom: 16rpx;
703
712
  height: 64rpx;
704
713
  line-height: 64rpx;
705
714
  text-align: center;
@@ -7,7 +7,7 @@ export default (data)=>{
7
7
  ele: 'xd-select-pages-path',
8
8
  valueKey: 'foodDetailPath',
9
9
  placeholder: '请选择商品详情页跳转地址',
10
- value: data.payPath || null,
10
+ value: data.foodDetailPath || null,
11
11
  labelInline: true,
12
12
  setting: {
13
13
  router: XdBus.getParentApi('getPagesTree'),
@@ -20,7 +20,7 @@ export default (data)=>{
20
20
  ele: 'xd-select-pages-path',
21
21
  valueKey: 'confirmPath',
22
22
  placeholder: '请选择订单确认页跳转地址',
23
- value: data.payPath || null,
23
+ value: data.confirmPath || null,
24
24
  labelInline: true,
25
25
  setting: {
26
26
  router: XdBus.getParentApi('getPagesTree'),
@@ -7,8 +7,16 @@ import {
7
7
  cusDisabled ,
8
8
  getCustomAttr,
9
9
  } from "@/utils/AttrTools";
10
+ import ProductAttr from "@/utils/Attr/ProductAttr";
10
11
 
11
12
  export default function (data, gValue,gColor,oldData){
13
+ //类型
14
+ let titleFooterStyle = 'line-6-8-s';
15
+ if(data['titleFooterStyle'] &&
16
+ ['line-6-8-l','line-6-8-s', 'triangle', 'center', 'desc', 'none'].includes(data['titleFooterStyle'])
17
+ ){
18
+ titleFooterStyle = data['titleFooterStyle'];
19
+ }
12
20
 
13
21
  return [
14
22
  {
@@ -36,5 +44,96 @@ export default function (data, gValue,gColor,oldData){
36
44
  .catch();
37
45
  }
38
46
  },
47
+
48
+ {
49
+ ele: 'title',
50
+ label: '组件样式',
51
+ size: 'small',
52
+ groupKey:'content',
53
+ },
54
+ {
55
+ label: "列表布局",
56
+ ele: "xd-style-image",
57
+ groupKey: 'content',
58
+ valueKey: "row_num",
59
+ value: dataVal({data, key:'row_num', dValue:2, gValue}),
60
+ labelInline:true,
61
+ className: 'input100',
62
+ handleCustom(cusRes) {
63
+ XdBus.getParentApi('getCompStylesOptions')({
64
+ layout_ids: 'FzCwxOH7MQpT5ISYs8Xm6',
65
+ key: Date.now()
66
+ })
67
+ .then(res => {
68
+ res.list.map(item=>{
69
+ item.value = Number(item.value)
70
+ return item;
71
+ })
72
+ cusRes.data.cb(res)
73
+ })
74
+ .catch(error => {
75
+ console.error(error);
76
+ });
77
+ },
78
+ },
79
+ {
80
+ label: "商品样式",
81
+ ele: "xd-style-image",
82
+ groupKey: 'content',
83
+ valueKey: "productStyle",
84
+ cusStyle:{marginBottom: '5px'},
85
+ value: customVal({
86
+ data,
87
+ key: 'productStyle',
88
+ fields: { 'itemBgcColorStatus':['itemBgcColor'],'bgBorder':['contBorder','bs']},
89
+ gValue,
90
+ sValue:"{\"border\":0,\"backgroundColor\":\"#fff\"}",
91
+ }),
92
+ labelInline:true,
93
+ className: 'input100',
94
+ isTplRef:true,
95
+ handleCustom(cusRes) {
96
+ XdBus.getParentApi('getCompStylesOptions')({
97
+ layout_ids: 'Y4oxNuIUOgVMaTD1LeWxp',
98
+ key: Date.now()
99
+ })
100
+ .then(res => {
101
+ cusRes.data.cb(res)
102
+ })
103
+ .catch(error => {
104
+ console.error(error);
105
+ });
106
+ },
107
+ },
108
+ {
109
+ label: "分类样式",
110
+ ele: "xd-style-image",
111
+ groupKey: 'content',
112
+ valueKey: "titleFooterStyle",
113
+ value: titleFooterStyle,
114
+ labelInline:true,
115
+ hidden: !(dataVal({data, key:'navStatus', dValue:'Y', gValue}) === 'Y'),
116
+ cusStyle:{marginBottom: '0'},
117
+ className: 'input100',
118
+ handleCustom(cusRes) {
119
+ XdBus.getParentApi('getCompStylesOptions')({
120
+ layout_ids: 'GRiS78vhPtfNXlac1WA63',
121
+ filter: false,
122
+ })
123
+ .then(res => {
124
+ cusRes.data.cb(res)
125
+ })
126
+ .catch(error => {
127
+ console.error(error);
128
+ });
129
+ },
130
+ },
131
+ {
132
+ ele: 'title',
133
+ label: '展示内容',
134
+ size: 'small',
135
+ groupKey:'content',
136
+ },
137
+ ...ProductAttr(data,gValue,gColor,oldData),
39
138
  ].filter(i=>i)
40
139
  }
@@ -11,8 +11,176 @@ import {
11
11
  cRaBorShadow,
12
12
  isDefStatus
13
13
  } from "@/utils/AttrTools";
14
+ import productStyle from "@/utils/Attr/productStyle";
14
15
  const Color = require('color');
15
16
 
16
17
  export default function (data={},gValue={},gColor={},oldData) {
17
- return []
18
+ //导航投影设置
19
+ let titleTabShadowExt = {dValue:'N'};
20
+ if(gValue.isAdd === true && gValue.isFirst) titleTabShadowExt = {dValue:'D'};
21
+ let titleTabShadow = cRaBorShadow(data , 'titleTabShadow',titleTabShadowExt, gValue);
22
+
23
+ return [
24
+ {
25
+ ele: 'title',
26
+ label: '常规',
27
+ size: 'small',
28
+ groupKey:'style',
29
+ },
30
+ {
31
+ label: '外边距',
32
+ ele: 'xd-radio',
33
+ groupKey: 'style',
34
+ valueKey: 'bodyPaddingStatus',
35
+ value: statusDataVal({data, key:'bodyPaddingStatus', fields:['bodyPadding'],gValue}),
36
+ labelInline:true,
37
+ list: [
38
+ {label: '默认', value: 'D'},
39
+ {label: '自定义', value: 'C'},
40
+ ]
41
+ },
42
+ {ele: 'group_start'},
43
+ {
44
+ label: '',
45
+ ele: 'xd-margin-padding',
46
+ groupKey:'style',
47
+ valueKey: 'bodyPadding',
48
+ hidden:!statusShow({data, key: 'bodyPaddingStatus', fields:['bodyPadding'], gValue}),
49
+ value: dataVal({
50
+ data,
51
+ key:'bodyPadding',
52
+ dValue:[0],
53
+ gValue,
54
+ isPM: true,
55
+ isCPM: true,
56
+ }),
57
+ setting: {
58
+ type: 'margin',
59
+ },
60
+ },
61
+ {ele: 'group_end'},
62
+ ...productStyle(data, gValue, gColor, oldData),
63
+
64
+ {
65
+ ele: 'title',
66
+ label: '分类导航样式',
67
+ size: 'small',
68
+ groupKey:'style',
69
+ },
70
+ {
71
+ label: '导航背景',
72
+ ele: 'xd-radio',
73
+ groupKey: 'style',
74
+ valueKey: 'titleBgcColorStatus',
75
+ value: statusDataVal({data, key: 'titleBgcColorStatus', fields:['titleBgcColor'], gValue}),
76
+ labelInline:true,
77
+ list: [
78
+ {label: '默认', value: 'D'},
79
+ {label: '自定义', value: 'C'},
80
+ ]
81
+ },
82
+ {ele: 'group_start'},
83
+ {
84
+ label: '',
85
+ ele: 'xd-color',
86
+ labelInline: true,
87
+ valueKey: 'titleBgcColor',
88
+ value: dataVal({
89
+ data,
90
+ key:'titleBgcColor',
91
+ dValue:'#fff',
92
+ gValue
93
+ }),
94
+ hidden: !statusShow({data, key: 'titleBgcColorStatus', fields:['titleBgcColor'], gValue}),
95
+ placeholder: '请选择背景颜色',
96
+ classNmae: 'input80',
97
+ groupKey:'style',
98
+ setting: {
99
+ showAlpha: true
100
+ },
101
+ },
102
+ {ele: 'group_end'},
103
+ {
104
+ label: '导航名称',
105
+ ele: 'xd-radio',
106
+ groupKey: 'style',
107
+ valueKey: 'titleStyleStatus',
108
+ value: statusDataVal({data, key:'titleStyleStatus', fields:['titleStyle','titleColor'],gValue}),
109
+ labelInline:true,
110
+ list: [
111
+ {label: '默认', value: 'D'},
112
+ {label: '自定义', value: 'C'},
113
+ ]
114
+ },
115
+ {ele: 'group_start'},
116
+ {
117
+ label: '',
118
+ ele: 'xd-text-and-bgc',
119
+ groupKey:'style',
120
+ valueKey: 'titleStyle',
121
+ value: dataVal({data, key:'titleStyle', dValue:null, gValue}),
122
+ hidden: !statusShow({data, key: 'titleStyleStatus', fields:['titleStyle','titleColor'], gValue}),
123
+ labelInline:true,
124
+ isRefresh: true,
125
+ setting: {
126
+ fontSize: true,
127
+ weight:true,
128
+ bgColor:(dataVal({data, key:'titleFooterStyle', dValue:'', gValue}) === 'desc'),
129
+ selected:true,
130
+ default:{
131
+ color: data['titleColor'] || '#333',
132
+ actColor: gColor.mainColor,
133
+ fontSize: '30',
134
+ actFontSize: '30', //'', 20 , 26 ,28,30, 36 默认值:''=>24
135
+ fontWeight: '500',
136
+ actFontWeight: '500',
137
+ actBgColor: "",
138
+ bgColor: ""
139
+ }
140
+ },
141
+ handleCustom({action, data}) {
142
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
143
+ .then(res => {
144
+ data.cb(res.list)
145
+ })
146
+ .catch(error => {
147
+ console.error(error);
148
+ data.cb([])
149
+ });
150
+ },
151
+ },
152
+ {ele: 'group_end'},
153
+ {
154
+ label: '导航投影',
155
+ ele: 'xd-shadow',
156
+ labelInline: true,
157
+ groupKey:'style',
158
+ valueKey: 'titleTabShadow',
159
+ value: titleTabShadow,
160
+ className: 'input100',
161
+ setting: {
162
+ selected: titleTabShadow.type,//设置默认选中项
163
+ isRadio:true,//启用editx默认
164
+ isDef: true,//启动默认选项
165
+ //设置默认值
166
+ default: {
167
+ color: 'rgba(0,0,0,.05)',
168
+ width: '10',
169
+ }
170
+ },
171
+ handleCustom({action, data}) {
172
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
173
+ .then(res => {
174
+ res.list = res.list.filter(item=>{
175
+ return item.label !== '无';
176
+ });
177
+ data.cb(res.list)
178
+ })
179
+ .catch(error => {
180
+ console.error(error);
181
+ data.cb([])
182
+ });
183
+ },
184
+ },
185
+ ].filter(i=>i)
18
186
  }