jufubao-base 1.0.135 → 1.0.136

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.
Files changed (209) hide show
  1. package/package.json +4 -3
  2. package/src/components/JfbBaseAddress/Attr.js +11 -5
  3. package/src/components/JfbBaseAddress/JfbBaseAddress.vue +3 -3
  4. package/src/components/JfbBaseAddress/JfbBaseAddressLess.less +18 -19
  5. package/src/components/JfbBaseAfterOrderDetail/Attr.js +19 -7
  6. package/src/components/JfbBaseAfterOrderDetail/JfbBaseAfterOrderDetail.vue +6 -4
  7. package/src/components/JfbBaseAfterOrderDetail/JfbBaseAfterOrderDetailLess.less +18 -19
  8. package/src/components/JfbBaseAfterOrderList/Attr.js +25 -16
  9. package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderList.vue +6 -9
  10. package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderListLess.less +18 -19
  11. package/src/components/JfbBaseBack/JfbBaseBackLess.less +18 -19
  12. package/src/components/JfbBaseBackground/Attr.js +9 -8
  13. package/src/components/JfbBaseBackground/JfbBaseBackground.vue +0 -3
  14. package/src/components/JfbBaseBackground/JfbBaseBackgroundLess.less +18 -19
  15. package/src/components/JfbBaseBlock/Attr.js +12 -2
  16. package/src/components/JfbBaseBlock/JfbBaseBlock.vue +1 -8
  17. package/src/components/JfbBaseBlock/JfbBaseBlockLess.less +18 -19
  18. package/src/components/JfbBaseBottomNotice/JfbBaseBottomNoticeLess.less +18 -19
  19. package/src/components/JfbBaseCard/Attr.js +78 -41
  20. package/src/components/JfbBaseCard/JfbBaseCard.vue +12 -23
  21. package/src/components/JfbBaseCard/JfbBaseCardLess.less +18 -19
  22. package/src/components/JfbBaseCardBind/JfbBaseCardBindLess.less +18 -19
  23. package/src/components/JfbBaseCardBindV2/Attr.js +5 -4
  24. package/src/components/JfbBaseCardBindV2/JfbBaseCardBindV2.vue +3 -1
  25. package/src/components/JfbBaseCardBindV2/JfbBaseCardBindV2Less.less +18 -19
  26. package/src/components/JfbBaseCardDetail/Attr.js +4 -3
  27. package/src/components/JfbBaseCardDetail/JfbBaseCardDetailLess.less +18 -19
  28. package/src/components/JfbBaseCardDetailEntry/Attr.js +10 -8
  29. package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntry.vue +4 -13
  30. package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntryLess.less +18 -19
  31. package/src/components/JfbBaseCardDisabled/Attr.js +1 -3
  32. package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabledLess.less +18 -19
  33. package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntryLess.less +18 -19
  34. package/src/components/JfbBaseCardEntry/Api.js +1 -1
  35. package/src/components/JfbBaseCardEntry/Attr.js +86 -67
  36. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +6 -5
  37. package/src/components/JfbBaseCardEntry/JfbBaseCardEntryLess.less +18 -19
  38. package/src/components/JfbBaseCardInfo/Attr.js +22 -16
  39. package/src/components/JfbBaseCardInfo/JfbBaseCardInfoLess.less +18 -19
  40. package/src/components/JfbBaseCardInfoEntry/Attr.js +16 -11
  41. package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntryLess.less +18 -19
  42. package/src/components/JfbBaseCardMerge/Attr.js +21 -8
  43. package/src/components/JfbBaseCardMerge/JfbBaseCardMerge.vue +15 -30
  44. package/src/components/JfbBaseCardMerge/JfbBaseCardMergeLess.less +18 -19
  45. package/src/components/JfbBaseCardMergeEntry/Attr.js +20 -6
  46. package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntry.vue +28 -25
  47. package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntryLess.less +18 -19
  48. package/src/components/JfbBaseCardShift/Attr.js +18 -4
  49. package/src/components/JfbBaseCardShift/JfbBaseCardShift.vue +26 -11
  50. package/src/components/JfbBaseCardShift/JfbBaseCardShiftLess.less +18 -19
  51. package/src/components/JfbBaseCardShift/Mock.js +21 -0
  52. package/src/components/JfbBaseCardShiftEntry/Attr.js +34 -26
  53. package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntry.vue +294 -257
  54. package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntryLess.less +18 -19
  55. package/src/components/JfbBaseCardShiftEntry/Mock.js +2 -1
  56. package/src/components/JfbBaseCardSweepInfo/Attr.js +5 -3
  57. package/src/components/JfbBaseCardSweepInfo/JfbBaseCardSweepInfoLess.less +18 -19
  58. package/src/components/JfbBaseCardV2/Attr.js +21 -17
  59. package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +3 -5
  60. package/src/components/JfbBaseCardV2/JfbBaseCardV2Less.less +18 -19
  61. package/src/components/JfbBaseCardV3/Attr.js +18 -14
  62. package/src/components/JfbBaseCardV3/JfbBaseCardV3.vue +1 -1
  63. package/src/components/JfbBaseCardV3/JfbBaseCardV3Less.less +18 -19
  64. package/src/components/JfbBaseCity/Attr.js +2 -4
  65. package/src/components/JfbBaseCity/JfbBaseCityLess.less +18 -19
  66. package/src/components/JfbBaseClear/Attr.js +17 -0
  67. package/src/components/JfbBaseClear/JfbBaseClear.vue +9 -9
  68. package/src/components/JfbBaseClear/JfbBaseClearLess.less +18 -19
  69. package/src/components/JfbBaseClear/JfbBaseClearMixin.js +12 -0
  70. package/src/components/JfbBaseConDialog/Api.js +2 -2
  71. package/src/components/JfbBaseConDialog/Attr.js +23 -14
  72. package/src/components/JfbBaseConDialog/JfbBaseConDialog.vue +63 -35
  73. package/src/components/JfbBaseConDialog/JfbBaseConDialogLess.less +18 -19
  74. package/src/components/JfbBaseConDialog/Mock.js +20 -1
  75. package/src/components/JfbBaseConDialog/XdCouCardBind.vue +15 -9
  76. package/src/components/JfbBaseConList/Api.js +1 -1
  77. package/src/components/JfbBaseConList/Attr.js +149 -224
  78. package/src/components/JfbBaseConList/JfbBaseConList.vue +150 -133
  79. package/src/components/JfbBaseConList/JfbBaseConListLess.less +18 -19
  80. package/src/components/JfbBaseConPhone/JfbBaseConPhoneLess.less +18 -19
  81. package/src/components/JfbBaseEntry/Attr.js +33 -21
  82. package/src/components/JfbBaseEntry/JfbBaseEntry.vue +34 -23
  83. package/src/components/JfbBaseEntry/JfbBaseEntryLess.less +18 -19
  84. package/src/components/JfbBaseExpressDetail/JfbBaseExpressDetailLess.less +18 -19
  85. package/src/components/JfbBaseFastLink/Api.js +1 -54
  86. package/src/components/JfbBaseFastLink/Attr.js +168 -116
  87. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +12 -16
  88. package/src/components/JfbBaseFastLink/JfbBaseFastLinkLess.less +18 -19
  89. package/src/components/JfbBaseFooter/Attr.js +28 -22
  90. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +19 -15
  91. package/src/components/JfbBaseFooter/JfbBaseFooterLess.less +18 -19
  92. package/src/components/JfbBaseHeader/Attr.js +89 -91
  93. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +28 -29
  94. package/src/components/JfbBaseHeader/JfbBaseHeaderLess.less +18 -19
  95. package/src/components/JfbBaseLogin/Api.js +1 -1
  96. package/src/components/JfbBaseLogin/Attr.js +111 -88
  97. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +4 -5
  98. package/src/components/JfbBaseLogin/JfbBaseLoginLess.less +18 -19
  99. package/src/components/JfbBaseLoginForgetPwd/Attr.js +52 -45
  100. package/src/components/JfbBaseLoginForgetPwd/JfbBaseLoginForgetPwd.vue +14 -14
  101. package/src/components/JfbBaseLoginForgetPwd/JfbBaseLoginForgetPwdLess.less +18 -19
  102. package/src/components/JfbBaseLoginSetPwd/Attr.js +6 -4
  103. package/src/components/JfbBaseLoginSetPwd/JfbBaseLoginSetPwdLess.less +18 -19
  104. package/src/components/JfbBaseMapOverlay/JfbBaseMapOverlayLess.less +18 -19
  105. package/src/components/JfbBaseMapSearch/Attr.js +0 -15
  106. package/src/components/JfbBaseMapSearch/JfbBaseMapSearch.vue +1 -25
  107. package/src/components/JfbBaseMapSearch/JfbBaseMapSearchLess.less +18 -19
  108. package/src/components/JfbBaseMergeUserCard/Attr.js +4 -3
  109. package/src/components/JfbBaseMergeUserCard/JfbBaseMergeUserCardLess.less +18 -19
  110. package/src/components/JfbBaseMultipleExpress/Attr.js +4 -3
  111. package/src/components/JfbBaseMultipleExpress/JfbBaseMultipleExpressLess.less +18 -19
  112. package/src/components/JfbBaseMy/JfbBaseMyLess.less +18 -19
  113. package/src/components/JfbBaseMySetting/Attr.js +1 -1
  114. package/src/components/JfbBaseMySetting/JfbBaseMySettingLess.less +18 -19
  115. package/src/components/JfbBaseNotice/Attr.js +109 -58
  116. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +81 -54
  117. package/src/components/JfbBaseNotice/JfbBaseNoticeLess.less +18 -19
  118. package/src/components/JfbBaseNoticeBottom/JfbBaseNoticeBottomLess.less +18 -19
  119. package/src/components/JfbBaseNoticeTop/JfbBaseNoticeTopLess.less +18 -19
  120. package/src/components/JfbBaseOrderDetail/Attr.js +210 -193
  121. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +14 -7
  122. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetailLess.less +18 -19
  123. package/src/components/JfbBaseOrderList/Attr.js +56 -44
  124. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +43 -8
  125. package/src/components/JfbBaseOrderList/JfbBaseOrderListLess.less +18 -19
  126. package/src/components/JfbBasePay/Attr.js +2 -13
  127. package/src/components/JfbBasePay/JfbBasePay.vue +7 -6
  128. package/src/components/JfbBasePay/JfbBasePayLess.less +18 -19
  129. package/src/components/JfbBasePay/Mock.js +2 -1
  130. package/src/components/JfbBasePhoneCollect/Attr.js +27 -2
  131. package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollect.vue +1 -1
  132. package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollectLess.less +18 -19
  133. package/src/components/JfbBasePhoneLogin/Attr.js +27 -2
  134. package/src/components/JfbBasePhoneLogin/JfbBasePhoneLoginLess.less +18 -19
  135. package/src/components/JfbBasePoster/Attr.js +103 -83
  136. package/src/components/JfbBasePoster/JfbBasePoster.vue +134 -141
  137. package/src/components/JfbBasePoster/JfbBasePosterLess.less +18 -19
  138. package/src/components/JfbBasePosterBigSmall/Attr.js +93 -76
  139. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +3 -7
  140. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmallLess.less +18 -19
  141. package/src/components/JfbBasePosterBigSmall/getWidthHeight.js +2 -2
  142. package/src/components/JfbBasePosterEntry/Attr.js +47 -34
  143. package/src/components/JfbBasePosterEntry/JfbBasePosterEntry.vue +44 -49
  144. package/src/components/JfbBasePosterEntry/JfbBasePosterEntryLess.less +18 -19
  145. package/src/components/JfbBasePosterType/Attr.js +82 -48
  146. package/src/components/JfbBasePosterType/FourScreen.vue +8 -2
  147. package/src/components/JfbBasePosterType/JfbBasePosterType.vue +36 -59
  148. package/src/components/JfbBasePosterType/JfbBasePosterTypeLess.less +18 -19
  149. package/src/components/JfbBaseRecharge/Attr.js +35 -23
  150. package/src/components/JfbBaseRecharge/JfbBaseRecharge.vue +54 -8
  151. package/src/components/JfbBaseRecharge/JfbBaseRechargeLess.less +18 -19
  152. package/src/components/JfbBaseRechargeOrder/Attr.js +32 -22
  153. package/src/components/JfbBaseRechargeOrder/JfbBaseRechargeOrder.vue +12 -7
  154. package/src/components/JfbBaseRechargeOrder/JfbBaseRechargeOrderLess.less +18 -19
  155. package/src/components/JfbBaseRechargeOrderDetail/JfbBaseRechargeOrderDetailLess.less +18 -19
  156. package/src/components/JfbBaseRechargeSuccess/Attr.js +10 -8
  157. package/src/components/JfbBaseRechargeSuccess/JfbBaseRechargeSuccessLess.less +18 -19
  158. package/src/components/JfbBaseSearch/Attr.js +6 -148
  159. package/src/components/JfbBaseSearch/JfbBaseSearch.vue +8 -37
  160. package/src/components/JfbBaseSearch/JfbBaseSearchLess.less +18 -19
  161. package/src/components/JfbBaseSetPwd/Attr.js +6 -147
  162. package/src/components/JfbBaseSetPwd/JfbBaseSetPwdLess.less +18 -19
  163. package/src/components/JfbBaseSuccess/Attr.js +89 -19
  164. package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +48 -26
  165. package/src/components/JfbBaseSuccess/JfbBaseSuccessLess.less +18 -19
  166. package/src/components/JfbBaseSuccess/Mock.js +8 -0
  167. package/src/components/JfbBaseTestApi/JfbBaseTestApi.vue +9 -9
  168. package/src/components/JfbBaseTestApi/JfbBaseTestApiLess.less +18 -19
  169. package/src/components/JfbBaseTestBody/JfbBaseTestBodyLess.less +18 -19
  170. package/src/components/JfbBaseTestBottom/JfbBaseTestBottomLess.less +18 -19
  171. package/src/components/JfbBaseTestNotice/JfbBaseTestNoticeLess.less +18 -19
  172. package/src/components/JfbBaseTestTop/JfbBaseTestTopLess.less +18 -19
  173. package/src/components/JfbBaseUserCenter/Attr.js +72 -53
  174. package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +40 -27
  175. package/src/components/JfbBaseUserCenter/JfbBaseUserCenterLess.less +18 -19
  176. package/src/components/JfbBaseUserInfo/Attr.js +54 -45
  177. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +21 -21
  178. package/src/components/JfbBaseUserInfo/JfbBaseUserInfoLess.less +18 -19
  179. package/src/components/JfbBaseUserOrder/Attr.js +119 -94
  180. package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +21 -7
  181. package/src/components/JfbBaseUserOrder/JfbBaseUserOrderLess.less +18 -19
  182. package/src/components/JfbBaseVideo/Attr.js +72 -19
  183. package/src/components/JfbBaseVideo/JfbBaseVideo.vue +69 -28
  184. package/src/components/JfbBaseVideo/JfbBaseVideoLess.less +18 -19
  185. package/src/components/JfbBaseVideo/XdVideo.vue +6 -44
  186. package/src/components/JfbBaseWallet/Attr.js +27 -19
  187. package/src/components/JfbBaseWallet/JfbBaseWalletLess.less +18 -19
  188. package/src/components/JfbBaseWalletDetail/Attr.js +2 -6
  189. package/src/components/JfbBaseWalletDetail/JfbBaseWalletDetailLess.less +18 -19
  190. package/src/components/JfbBaseWalletEffective/JfbBaseWalletEffectiveLess.less +18 -19
  191. package/src/components/JfbBaseWalletIndex/Attr.js +3 -1
  192. package/src/components/JfbBaseWalletIndex/JfbBaseWalletIndexLess.less +18 -19
  193. package/src/components/JfbBaseWalletItem/Attr.js +3 -1
  194. package/src/components/JfbBaseWalletItem/JfbBaseWalletItemLess.less +18 -19
  195. package/src/components/JfbBaseWebview/JfbBaseWebviewLess.less +18 -19
  196. package/src/components/JfbBaseWxAuthorize/Api.js +3 -3
  197. package/src/components/JfbBaseWxAuthorize/Attr.js +31 -3
  198. package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorize.vue +34 -28
  199. package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorizeLess.less +18 -19
  200. package/src/components/JfbBaseWxAuthorizeError/Attr.js +21 -17
  201. package/src/components/JfbBaseWxAuthorizeError/JfbBaseWxAuthorizeError.vue +4 -4
  202. package/src/components/JfbBaseWxAuthorizeError/JfbBaseWxAuthorizeErrorLess.less +18 -19
  203. package/src/components/JfbBaseLine/Attr.js +0 -59
  204. package/src/components/JfbBaseLine/JfbBaseLine.vue +0 -105
  205. package/src/components/JfbBaseLine/JfbBaseLineLess.less +0 -80
  206. package/src/components/JfbBaseLine/JfbBaseLineMixin.js +0 -30
  207. package/src/components/JfbBasePosterType/Screen.vue +0 -284
  208. package/src/components/JfbBaseSearch/Api.js +0 -60
  209. package/src/components/JfbBaseSearch/Mock.js +0 -5
@@ -8,15 +8,15 @@ import console from "@dcloudio/uni-h5/src/core/helpers/console";
8
8
  export default {
9
9
  style:[],
10
10
  content:(params)=>{
11
- console.log(params,'anananananana');
12
11
  if(!params['isCarousel']) params['isCarousel'] = 1;
13
12
  return [
14
13
  {
15
- label: '广告位置配置:', //label
16
- ele: 'xd-site-poster', //package 名称
17
- valueKey: 'poster', //form[valueKey]
14
+ label: '广告位置配置:',
15
+ ele: 'xd-site-poster',
16
+ valueKey: 'poster',
18
17
  className: 'input80',
19
18
  value: params.poster || {},
19
+ groupKey:'content',
20
20
  setting: {
21
21
  count: 1,
22
22
  scene: {label: '广告', value: 'normal'}
@@ -215,82 +215,49 @@ export default {
215
215
  loading.close()
216
216
  }
217
217
  },
218
- inline: false,
219
- notice: '',
220
- rules: [
221
- {required: true, message: '请选择广告位置', trigger: 'change'},
222
- ],
223
- },
224
- {
225
- ele: 'title',
226
- label: '广告位轮廓设置',
227
- size: 'small', //default/mini/small
228
- },
229
- {
230
- label: '广告位边距设置:',
231
- ele: 'xd-margin-padding',
232
- valueKey: 'margin',
233
- value: params.margin || null,
234
- disabled: false,
235
- setting: {
236
- type: 'margin',
237
- },
238
- placeholder: '请设置广告位边距设置',
239
- inline: false,
240
- notice: '设置边距充,<span style="color: red">单位:像素(px)</span>。默认值:<span style="color: red">0</span>像素',
218
+ rules: [{
219
+ required: true,
220
+ validator: (rule, value, callback) => {
221
+ let message = '请设置广告相关内容';
222
+ if(!value) {
223
+ callback(message);
224
+ return;
225
+ }
226
+ if(value.size && !value.size.height){
227
+ callback(message);
228
+ return
229
+ }
241
230
 
231
+ if(value.size && !value.size.width){
232
+ callback(message);
233
+ return
234
+ }
235
+ callback()
236
+ },trigger: ['blur', 'change']
237
+ }],
242
238
  },
243
- params.poster && params.poster['type']&& params.poster['type'] !== '1' &&{
244
- label: '广告位填充设置:',
245
- ele: 'xd-margin-padding',
246
- valueKey: 'bgImagePadding',
247
- value: params['bgImagePadding'] || null,
248
- disabled: false,
249
- setting: {
250
- type: 'padding',
251
- },
252
- placeholder: '请填充设置',
253
- inline: false,
254
- notice: '设置内填充,<span style="color: red">单位:像素(px)</span>。无背景时候默认值:<span style="color: red">20</span>像素。有背景时候默认值:<span style="color: red">20</span>像素。',
255
- },
256
- params.poster && params.poster['type'] &&params.number > 1 && {
257
- label: '广告内容之间间距设置:',
258
- ele: 'el-input',
259
- type: 'number',
260
- valueKey: 'padding',
261
- value: params.padding || 0,
262
- className: 'input40',
263
- placeholder: '请广告内容之间间距设置',
264
- notice: '请广告内容之间间距设置。<span style="color: red">单位:像素(px)</span>。默认值:<span style="color: red">0</span>像素',
265
- inline: false,
266
- },
267
- {
268
- label: '广告圆角设置:',
269
- ele: 'xd-site-select-list',
270
- valueKey: 'radius',
271
- value: params['radius'] || '20',
272
- placeholder: '请选择广告圆角设置',
273
- multiple: false,
274
- className: 'input80',
275
- handleCustom({action, data}) {
276
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
277
- .then(res => {
278
- data.cb(res.list)
279
- })
280
- .catch(error => {
281
- console.error(error);
282
- });
283
- },
239
+ params['isCarousel']=== 2 && (params.poster && params.poster['type'] && params.poster['type'] === '1') && {
240
+ label: '是否启用配套背景:',
241
+ ele: 'xd-radio',
242
+ valueKey: 'isSupport',
243
+ value: params['isSupport'] || 'Y',
244
+ groupKey:'style',
245
+ list: [
246
+ {"label": "启用", "value": 'Y'},
247
+ {"label": "禁用", "value": 'N'},
248
+ ]
284
249
  },
285
250
  {
286
251
  ele: 'title',
287
252
  label: '广告位参数配置',
288
- size: 'small', //default/mini/small
253
+ size: 'small',
254
+ groupKey:'content',
289
255
  },
290
256
  params.poster && params.poster['type']&& params.poster['type'] !== '1' && {
291
257
  label: '广告背景图:',
292
258
  ele: 'xd-upload',
293
259
  valueKey: 'background',
260
+ groupKey:'content',
294
261
  value: params.background || {},
295
262
  defaultValue: params.background || null,
296
263
  slot: true,
@@ -311,6 +278,7 @@ export default {
311
278
  ele: 'el-input',
312
279
  type: 'number',
313
280
  valueKey: 'number',
281
+ groupKey:'content',
314
282
  value: params.number || 1,
315
283
  placeholder: '请输入广告位置使用张数',
316
284
  className: 'input40',
@@ -328,6 +296,7 @@ export default {
328
296
  ele: 'xd-radio',
329
297
  valueKey: 'isCarousel',
330
298
  value: params['isCarousel'] || 1,
299
+ groupKey:'content',
331
300
  rules: [
332
301
  {required: true, message: '请选择广告位显示方式', trigger: ['blur', 'change']}
333
302
  ],
@@ -340,7 +309,7 @@ export default {
340
309
  label: '广告位轮播周期:',
341
310
  ele: 'el-input',
342
311
  type: 'number',
343
- isKey: true,
312
+ groupKey:'content',
344
313
  valueKey: 'carouselTime',
345
314
  value: params.carouselTime || 5,
346
315
  placeholder: '请输入广告位轮播周期,单位秒',
@@ -355,10 +324,11 @@ export default {
355
324
  ]
356
325
  },
357
326
  params['isCarousel'] === 2 && {
358
- label: '广告显示dot类型:', //label
359
- ele: 'xd-select-list', //package 名称
360
- valueKey: 'dot_type', //form[valueKey]
361
- value: params['dot_type'] || 'dot', //v-model
327
+ label: '广告显示dot类型:',
328
+ ele: 'xd-select-list',
329
+ valueKey: 'dot_type',
330
+ value: params['dot_type'] || 'dot',
331
+ groupKey:'content',
362
332
  placeholder: '请选择广告显示dot类型',
363
333
  multiple: false,
364
334
  className: 'input80',
@@ -376,6 +346,7 @@ export default {
376
346
  label: '广告位内容显示行数:',
377
347
  ele: 'xd-radio',
378
348
  valueKey: 'rows',
349
+ groupKey:'content',
379
350
  value: params.rows || 1,
380
351
  list: [
381
352
  {"label": "一行", "value": 1},
@@ -383,16 +354,65 @@ export default {
383
354
  {"label": "三行", "value": 3},
384
355
  ]
385
356
  },
386
- params['isCarousel']===2 && params['rows'] === 1 && {
387
- label: '是否启用配套背景:',
388
- ele: 'xd-radio',
389
- valueKey: 'isSupport',
390
- value: params['isSupport'] || 'Y',
391
- list: [
392
- {"label": "启用", "value": 'Y'},
393
- {"label": "禁用", "value": 'N'},
394
- ]
357
+ {
358
+ label: '广告位边距设置:',
359
+ ele: 'xd-margin-padding',
360
+ valueKey: 'margin',
361
+ groupKey:'style',
362
+ value: params.margin || null,
363
+ setting: {
364
+ type: 'margin',
365
+ },
366
+ placeholder: '请设置广告位边距设置',
367
+ inline: false,
368
+ notice: '设置边距充,<span style="color: red">单位:像素(px)</span>。默认值:<span style="color: red">0</span>像素',
369
+
395
370
  },
371
+ {
372
+ label: '广告位填充设置:',
373
+ ele: 'xd-margin-padding',
374
+ valueKey: 'bgImagePadding',
375
+ value: params['bgImagePadding'] || null,
376
+ groupKey:'style',
377
+ setting: {
378
+ type: 'padding',
379
+ },
380
+ placeholder: '请填充设置',
381
+ inline: false,
382
+ notice: '设置内填充,<span style="color: red">单位:像素(px)</span>。无背景时候默认值:<span style="color: red">20</span>像素。有背景时候默认值:<span style="color: red">0</span>像素。',
383
+ },
384
+ params.poster && params.poster['type'] && params.number > 1 && {
385
+ label: '广告内容之间间距设置:',
386
+ ele: 'el-input',
387
+ type: 'number',
388
+ valueKey: 'padding',
389
+ value: params.padding || 0,
390
+ groupKey:'style',
391
+ className: 'input40',
392
+ placeholder: '请广告内容之间间距设置',
393
+ notice: '请广告内容之间间距设置。<span style="color: red">单位:像素(px)</span>。默认值:<span style="color: red">0</span>像素',
394
+ inline: false,
395
+ },
396
+ {
397
+ label: '广告圆角设置:',
398
+ ele: 'xd-site-select-list',
399
+ valueKey: 'radius',
400
+ groupKey:'style',
401
+ value: params['radius'] || '20',
402
+ placeholder: '请选择广告圆角设置',
403
+ multiple: false,
404
+ className: 'input80',
405
+ handleCustom({action, data}) {
406
+ XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
407
+ .then(res => {
408
+ data.cb(res.list)
409
+ })
410
+ .catch(error => {
411
+ console.error(error);
412
+ });
413
+ },
414
+ },
415
+
396
416
  ].filter(i=>i)
397
417
  },
398
418
  advanced: [
@@ -13,82 +13,77 @@
13
13
  <view class="jfb-base-poster__edit-icon" @click="delEdit">删除</view>
14
14
  </view>
15
15
  <!-- #endif -->
16
- <view
17
- class="jfb-base-poster__body"
18
- v-if="noData"
19
- :style="{
20
- margin: margin,
21
- backgroundImage: background?`url(${getBgImage})`:'none',
22
- backgroundSize: '100%',
23
- backgroundRepeat: 'no-repeat',
24
- padding: outPadding
25
- }
26
- ">
27
- <!--一分屏-->
28
- <template v-if="posterType === '1'">
29
- <view
30
- v-if="isCarousel === 1"
31
- class="jfb-base-poster__one notCarousel"
32
- :style="{
33
- width: width + 'rpx',
34
- height: outOneHeight + 'rpx',
35
- }"
36
- >
37
- <view
16
+ <view class="jfb-base-poster__body" v-if="noData">
17
+ <view class="x-line"></view>
18
+
19
+ <view class="jfb-base-poster-cont" :style="getBodyStyle">
20
+ <!--一分屏-->
21
+ <template v-if="posterType === '1'">
22
+ <view
23
+ v-if="isCarousel === 1"
24
+ class="jfb-base-poster__one notCarousel"
25
+ :style="{
26
+ width: getOneWidth + 'rpx',
27
+ }"
28
+ >
29
+ <view
30
+ :style="{
31
+ width: getOneWidth + 'rpx',
32
+ height: getOneHeight + 'rpx',
33
+ borderRadius: (posterType === '1' ? radius: 0) + 'rpx',
34
+ marginBottom: padding + 'rpx'
35
+ }"
36
+ @click="handleClick(item)"
37
+ v-for="(item,index) in info"
38
+ :key="index"
39
+ >
40
+ <image :src="item.image_url" mode="aspectFill"></image>
41
+ </view>
42
+ </view>
43
+ <view
44
+ v-else
45
+ class="jfb-base-poster__one carousel"
38
46
  :style="{
39
- width: width + 'rpx',
40
- height: height + 'rpx',
47
+ width: getOneWidth + 'rpx',
48
+ height: getOneHeight + 'rpx',
41
49
  borderRadius: (posterType === '1' ? radius: 0) + 'rpx',
42
- marginBottom: padding + 'rpx'
43
50
  }"
44
- @click="handleClick(item)"
45
- v-for="(item,index) in info"
46
- :key="index"
47
51
  >
48
- <image :src="item.image_url" mode="aspectFill"></image>
49
- </view>
50
- </view>
51
- <view
52
- v-else
53
- class="jfb-base-poster__one carousel"
54
- :style="{
55
- width: width + 'rpx',
56
- height: height + 'rpx',
57
- borderRadius: (posterType === '1' ? radius: 0) + 'rpx',
58
- }"
59
- >
60
- <xd-swiper-dot
61
- v-if="pageSwiperShow"
62
- :current="current"
63
- :info="info"
64
- field="content_name"
65
- :mode="mode"
66
- :dots-styles="dotStyleData"
67
- >
68
- <xd-swiper
69
- :indicator-dots="false"
70
- :list="info"
71
- :current="current"
72
- :width=" width + 'rpx'"
73
- :height="height + 'rpx'"
74
- :interval="carouselTime"
75
- @onClickItem="handleClick"
76
- @animationfinish="handleAnimationfinish"
77
- >
78
- <template slot-scope="{ item, index}">
79
- <image :src="item['image_url']" mode="aspectFill"></image>
80
- </template>
81
- </xd-swiper>
82
- </xd-swiper-dot>
83
- <view v-if="isPreview" class="carousel-mask"></view>
84
- </view>
85
- </template>
86
- <!--一分屏-->
87
- <more-screen
88
- v-if="posterType !== '1'"
89
- :config="getConfig"
90
- :content="info"
91
- ></more-screen>
52
+ <xd-swiper-dot
53
+ v-if="pageSwiperShow"
54
+ :current="current"
55
+ :info="info"
56
+ field="content_name"
57
+ :mode="mode"
58
+ :dots-styles="dotStyleData"
59
+ >
60
+ <xd-swiper
61
+ :indicator-dots="false"
62
+ :list="info"
63
+ :current="current"
64
+ :width=" getOneWidth + 'rpx'"
65
+ :height="getOneHeight + 'rpx'"
66
+ :interval="carouselTime"
67
+ @onClickItem="handleClick"
68
+ @animationfinish="handleAnimationfinish"
69
+ >
70
+ <template slot-scope="{ item, index}">
71
+ <image :src="item['image_url']" mode="aspectFill"></image>
72
+ </template>
73
+ </xd-swiper>
74
+ </xd-swiper-dot>
75
+ <view v-if="isPreview" class="carousel-mask"></view>
76
+ </view>
77
+ </template>
78
+ <!--一分屏-->
79
+ <!--多分屏-->
80
+ <more-screen
81
+ v-if="posterType !== '1'"
82
+ :config="getConfig"
83
+ :content="info"
84
+ ></more-screen>
85
+ <!--多分屏-->
86
+ </view>
92
87
  </view>
93
88
  <!--解决图片缓冲预加载问题-->
94
89
  <view v-for="(item,index) in info" :key="index" style="position: absolute; top: -19999px; left: -100000px">
@@ -145,49 +140,47 @@
145
140
  rows: 1, //四分屏起作用
146
141
  radius: 0,
147
142
  timer: null,
148
- isSupport: 'Y',
143
+ isSupport: 'N',
149
144
  currentImage: '',
150
145
  info: [],
151
- mS: {
152
- top: 0,
153
- bottom: 0,
154
- left: 0,
155
- right: 0
156
- },
146
+ mS: {},//边距
147
+ bgImagePadding:{},//填充
157
148
  isPreview: false,
158
149
  noData:false,
159
150
  background: '',
160
-
161
- test: {
162
- "content_id": "KpBbUKdj4aBejwe7Fh1ki",
163
- "position_id": "QCk3PmoyQmOWRP1SxnYR3",
164
- "partner_id": 0,
165
- "site_id": "",
166
- "content_name": "测试.",
167
- "image_url": "//dummyimage.com/200x200",
168
- "redirect_type": "EMP",
169
- "redirect_type_name": "无链接",
170
- "redirect_data": "",
171
- "sort": "",
172
- "status": "",
173
- "start_time": "",
174
- "end_time": "",
175
- "op_user_id": "",
176
- "created_time": 0,
177
- "updated_time": 0
178
- }
179
151
  }
180
152
  },
181
153
  computed: {
154
+ getBodyStyle(){
155
+ let image = {};
156
+ if(this.background) image = {
157
+ backgroundImage: `url(${this.getBgImage})`,
158
+ backgroundSize: '100%',
159
+ backgroundRepeat: 'no-repeat',
160
+ }
161
+ return {
162
+ ...image,
163
+ margin: this.margin,
164
+ padding: this.outPadding
165
+ }
166
+ },
167
+ getOneWidth(){
168
+ let margin = this.checkValue(this.mS.left, 0) + this.checkValue(this.mS.right, 0);
169
+ let padding = this.checkValue(this.bgImagePadding.left, 20) + this.checkValue(this.bgImagePadding.right, 20);
170
+ return 750 - (margin + padding);
171
+ },
172
+ getOneHeight(){
173
+ return this.getOneWidth * this.height / this.width
174
+ },
182
175
  getConfig(){
183
176
  let cell = this.posterType === '2' ? 2: (this.posterType === '3' ? 3 : 4);
184
177
  let spacing = Math.floor((cell - 1) * this.padding * this.$rpxNum);
185
- let padding = 0;
186
- if(this.background === 'none' || this.$xdUniHelper.isEmpty(this.background)) padding = 20;
187
- let addPadding = ((this.bgImagePadding.right !== null? this.bgImagePadding.right:padding) +
188
- (this.bgImagePadding.left !== null? this.bgImagePadding.left : padding)) * this.$rpxNum;
189
- let viewWidth = uni.getSystemInfoSync().safeArea.width - ((this.mS.right || 0) + (this.mS.left || 0)) * this.$rpxNum - addPadding - spacing;
190
- if(this.$configProject.isPreview) viewWidth -= 2;
178
+ let paddingDefault = 0;
179
+ if(this.background === 'none' || this.background === '' || this.$xdUniHelper.isEmpty(this.background)) paddingDefault = 20;
180
+ let addPadding = this.checkValue(this.bgImagePadding.right, paddingDefault) + this.checkValue(this.bgImagePadding.left, paddingDefault);
181
+ addPadding = addPadding * this.$rpxNum;
182
+ let margin = (this.checkValue(this.mS.right, 0) + this.checkValue(this.mS.left, 0)) * this.$rpxNum;
183
+ let viewWidth = uni.getSystemInfoSync().safeArea.width -margin - addPadding - spacing;
191
184
  let width = Math.floor(viewWidth / cell);
192
185
  let height = this.height * width / this.width;
193
186
  return {
@@ -206,8 +199,27 @@
206
199
  }
207
200
  },
208
201
  margin(){
209
- return `${this.mS.top||0}rpx ${this.mS.right||0}rpx ${this.mS.bottom||0}rpx ${this.mS.left||0}rpx`
202
+ let str = `${this.checkValue(this.mS.top, 0)}rpx`;
203
+ str = `${str} ${this.checkValue(this.mS.right, 0)}rpx`;
204
+ str = `${str} ${this.checkValue(this.mS.bottom, 0)}rpx`;
205
+ str = `${str} ${this.checkValue(this.mS.left, 0)}rpx`;
206
+ return str;
210
207
  },
208
+ outPadding(){
209
+ try {
210
+ let defaultvalue = 0;
211
+ if(!this.background || this.background === 'none' || this.$xdUniHelper.isEmpty(this.background)) defaultvalue = 20;
212
+ if(this.posterType === '1') defaultvalue = 20;
213
+ let str = `${this.checkValue(this.bgImagePadding.top, defaultvalue)}rpx`;
214
+ str = `${str} ${this.checkValue(this.bgImagePadding.right, defaultvalue)}rpx`;
215
+ str = `${str} ${this.checkValue(this.bgImagePadding.bottom, defaultvalue)}rpx`;
216
+ str = `${str} ${this.checkValue(this.bgImagePadding.left,defaultvalue)}rpx`;
217
+ return str;
218
+ } catch (error) {
219
+ return 0
220
+ }
221
+
222
+ },
211
223
  getMode(){
212
224
  let mode = this.mode;
213
225
  if (this.posterType !== '1') {
@@ -221,9 +233,7 @@
221
233
  dotStyleData(){
222
234
  let alpha = 1;
223
235
  if(this.posterType === '1') alpha = 0.6;
224
-
225
236
  let selectedColor = `rgba(${color(this.mainColor).alpha(alpha).array().join(',')})`;
226
- console.log('selectedColor',selectedColor, this.mode, this.posterType);
227
237
  let style = {
228
238
  dot: {
229
239
  backgroundColor: 'rgba(166,166,166,.5)',
@@ -282,24 +292,11 @@
282
292
  }
283
293
  return bg
284
294
  },
285
- outPadding(){
286
- try {
287
- let defaultvalue = 0;
288
- if(this.background === 'none' || this.$xdUniHelper.isEmpty(this.background)) defaultvalue = 20
289
- console.log(this.bgImagePadding,'this.paddingthis.paddingthis.padding');
290
- let padding = `${this.bgImagePadding.top !== null ? this.bgImagePadding.top : defaultvalue}rpx`;
291
- padding = `${padding} ${this.bgImagePadding.right !== null ? this.bgImagePadding.right : defaultvalue}rpx`;
292
- padding = `${padding} ${this.bgImagePadding.bottom !== null ? this.bgImagePadding.bottom : defaultvalue}rpx`;
293
- padding = `${padding} ${this.bgImagePadding.left !== null ? this.bgImagePadding.left : defaultvalue}rpx`;
294
- return padding;
295
- } catch (error) {
296
- console.log(error,'amamamam');
297
- }
298
295
 
299
- },
300
296
  },
301
297
  watch: {
302
- container(value) {
298
+ container(value, oloValue) {
299
+ if(JSON.stringify(value) === JSON.stringify(oloValue)) return;
303
300
  this.init(value);
304
301
  if(this.timer) clearTimeout(this.timer);
305
302
  this.timer = setTimeout(()=>{
@@ -351,7 +348,7 @@
351
348
  getTestData(){
352
349
  let temp = [];
353
350
  for (let i = 0; i< this.useNumber; i++) {
354
- let item = this.$xdUniHelper.cloneDeep(this.test);
351
+ let item = this.$xdUniHelper.cloneDeep(this['posterTest']);
355
352
  item.content_id = i;
356
353
  item.content_name = item.content_name + i;
357
354
  item.image_url = `//dummyimage.com/${this.width}x${this.height}`;
@@ -360,11 +357,8 @@
360
357
  return temp
361
358
  },
362
359
  handleAnimationfinish(e) {
363
-
364
-
365
360
  //不支持背景不处理
366
361
  if(this.isSupport==='N') return;
367
-
368
362
  console.warn(`handleAnimationfinish.start`)
369
363
  this.pageSwiperShow = this.$root.$isShow;
370
364
 
@@ -451,11 +445,6 @@
451
445
  this.currentImage = this.info[current]['image_background_url']
452
446
  if(this.isSupport==='Y' && this.rows===1 && this.isCarousel===2) {
453
447
  this.$xdRoot.$emit("setLayoutPageBg", this.currentImage);
454
- }
455
- },
456
- getDefualtValue(key){
457
- if (key === 'margin') {
458
- return {top: 0, bottom: 0, left: 0, right: 0}
459
448
  }
460
449
  },
461
450
 
@@ -471,17 +460,18 @@
471
460
  if(this.poster.position) {
472
461
  this.posterPosition = this.poster.position
473
462
  }
463
+ this.isCarousel = getContainerPropsValue(container, 'content.isCarousel', 1);
474
464
  this.radius = getContainerPropsValue(container, 'content.radius', 0);
475
465
  this.padding = getContainerPropsValue(container, 'content.padding', 0);
476
466
  this.rows = getContainerPropsValue(container, 'content.rows', 1);
477
- this.isSupport = getContainerPropsValue(container, 'content.isSupport', 'Y');
478
- this.mS = getContainerPropsValue(container, 'content.margin', this.getDefualtValue('margin'));
479
- this.background = getContainerPropsValue(container, "content.background", 'none');
480
- this.bgImagePadding = getContainerPropsValue(container, 'content.bgImagePadding', {top: 20, left: 20, right: 20, bottom: 20});
467
+ if(this.posterType === '1' && this.isCarousel === 2) this.isSupport = getContainerPropsValue(container, 'content.isSupport', 'Y');
468
+ this.mS = getContainerPropsValue(container, 'content.margin', {});
469
+ this.background = getContainerPropsValue(container, "content.background", '');
470
+ this.bgImagePadding = getContainerPropsValue(container, 'content.bgImagePadding', {});
481
471
  //content
482
472
 
483
473
  this.mode = getContainerPropsValue(container, 'content.dot_type', 'dot');
484
- this.isCarousel = getContainerPropsValue(container, 'content.isCarousel', 1);
474
+
485
475
  this.carouselTime = Number(getContainerPropsValue(container, 'content.carouselTime', 5)) * 1000;
486
476
  this.useNumber = getContainerPropsValue(container, 'content.number', 1);
487
477
 
@@ -566,11 +556,14 @@
566
556
 
567
557
  .jfb-base-poster {
568
558
  &__body{
569
- box-sizing: border-box;
570
- overflow: hidden;
571
- justify-content: center;
572
- align-items: center;
573
- display: flex;
559
+ & > view.jfb-base-poster-cont {
560
+ box-sizing: border-box;
561
+ overflow: hidden;
562
+ justify-content: center;
563
+ align-items: center;
564
+ display: flex;
565
+ }
566
+
574
567
  }
575
568
  &__one.notCarousel {
576
569
  position: relative;