jufubao-base 1.0.63-beta6 → 1.0.63
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 +1 -1
- package/src/components/JfbBaseAddress/JfbBaseAddressLess.less +1 -1
- package/src/components/JfbBaseAfterOrderDetail/JfbBaseAfterOrderDetailLess.less +1 -1
- package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderListLess.less +1 -1
- package/src/components/JfbBaseBack/JfbBaseBackLess.less +1 -1
- package/src/components/JfbBaseBackground/Api.js +19 -0
- package/src/components/JfbBaseBackground/Attr.js +224 -0
- package/src/components/JfbBaseBackground/JfbBaseBackground.vue +111 -0
- package/src/components/JfbBaseBackground/JfbBaseBackgroundLess.less +80 -0
- package/src/components/JfbBaseBackground/JfbBaseBackgroundMixin.js +30 -0
- package/src/components/JfbBaseBlock/JfbBaseBlockLess.less +1 -1
- package/src/components/JfbBaseBottomNotice/JfbBaseBottomNoticeLess.less +1 -1
- package/src/components/JfbBaseCard/JfbBaseCardLess.less +1 -1
- package/src/components/JfbBaseCardBind/JfbBaseCardBindLess.less +1 -1
- package/src/components/JfbBaseCardBindV2/JfbBaseCardBindV2Less.less +1 -1
- package/src/components/JfbBaseCardDetail/JfbBaseCardDetailLess.less +1 -1
- package/src/components/JfbBaseCardDetailEntry/JfbBaseCardDetailEntryLess.less +1 -1
- package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabledLess.less +1 -1
- package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntryLess.less +1 -1
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntryLess.less +1 -1
- package/src/components/JfbBaseCardInfo/JfbBaseCardInfoLess.less +1 -1
- package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntryLess.less +1 -1
- package/src/components/JfbBaseCardMerge/JfbBaseCardMergeLess.less +1 -1
- package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntryLess.less +1 -1
- package/src/components/JfbBaseCardShift/JfbBaseCardShiftLess.less +1 -1
- package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntryLess.less +1 -1
- package/src/components/JfbBaseCardSweepInfo/JfbBaseCardSweepInfoLess.less +1 -1
- package/src/components/JfbBaseCardV2/JfbBaseCardV2Less.less +1 -1
- package/src/components/JfbBaseCardV3/JfbBaseCardV3Less.less +1 -1
- package/src/components/JfbBaseCity/JfbBaseCityLess.less +1 -1
- package/src/components/JfbBaseClear/JfbBaseClearLess.less +1 -1
- package/src/components/JfbBaseEntry/JfbBaseEntryLess.less +1 -1
- package/src/components/JfbBaseExpressDetail/JfbBaseExpressDetailLess.less +1 -1
- package/src/components/JfbBaseFastLink/JfbBaseFastLinkLess.less +1 -1
- package/src/components/JfbBaseFooter/JfbBaseFooterLess.less +1 -1
- package/src/components/JfbBaseHeader/JfbBaseHeaderLess.less +1 -1
- package/src/components/JfbBaseLine/JfbBaseLineLess.less +1 -1
- package/src/components/JfbBaseLogin/JfbBaseLoginLess.less +1 -1
- package/src/components/JfbBaseLoginForgetPwd/JfbBaseLoginForgetPwdLess.less +1 -1
- package/src/components/JfbBaseLoginSetPwd/JfbBaseLoginSetPwdLess.less +1 -1
- package/src/components/JfbBaseMapOverlay/JfbBaseMapOverlayLess.less +1 -1
- package/src/components/JfbBaseMapSearch/JfbBaseMapSearchLess.less +1 -1
- package/src/components/JfbBaseMergeUserCard/JfbBaseMergeUserCardLess.less +1 -1
- package/src/components/JfbBaseMultipleExpress/JfbBaseMultipleExpressLess.less +1 -1
- package/src/components/JfbBaseMy/JfbBaseMyLess.less +1 -1
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +41 -26
- package/src/components/JfbBaseNotice/JfbBaseNoticeLess.less +1 -1
- package/src/components/JfbBaseNoticeBottom/JfbBaseNoticeBottomLess.less +1 -1
- package/src/components/JfbBaseNoticeTop/JfbBaseNoticeTopLess.less +1 -1
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +45 -29
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetailLess.less +1 -1
- package/src/components/JfbBaseOrderList/JfbBaseOrderListLess.less +1 -1
- package/src/components/JfbBasePay/JfbBasePayLess.less +1 -1
- package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollectLess.less +1 -1
- package/src/components/JfbBasePhoneLogin/JfbBasePhoneLoginLess.less +1 -1
- package/src/components/JfbBasePoster/JfbBasePosterLess.less +1 -1
- package/src/components/JfbBasePosterEntry/JfbBasePosterEntryLess.less +1 -1
- package/src/components/JfbBasePosterType/Attr.js +1 -1
- package/src/components/JfbBasePosterType/JfbBasePosterTypeLess.less +1 -1
- package/src/components/JfbBaseRecharge/JfbBaseRechargeLess.less +1 -1
- package/src/components/JfbBaseRechargeOrder/JfbBaseRechargeOrderLess.less +1 -1
- package/src/components/JfbBaseRechargeOrderDetail/JfbBaseRechargeOrderDetailLess.less +1 -1
- package/src/components/JfbBaseRechargeSuccess/JfbBaseRechargeSuccessLess.less +1 -1
- package/src/components/JfbBaseSearch/JfbBaseSearchLess.less +1 -1
- package/src/components/JfbBaseSetPwd/JfbBaseSetPwdLess.less +1 -1
- package/src/components/JfbBaseSuccess/JfbBaseSuccessLess.less +1 -1
- package/src/components/JfbBaseTestApi/JfbBaseTestApiLess.less +1 -1
- package/src/components/JfbBaseTestBody/JfbBaseTestBodyLess.less +1 -1
- package/src/components/JfbBaseTestBottom/JfbBaseTestBottomLess.less +1 -1
- package/src/components/JfbBaseTestNotice/JfbBaseTestNoticeLess.less +1 -1
- package/src/components/JfbBaseTestTop/JfbBaseTestTopLess.less +1 -1
- package/src/components/JfbBaseUserCenter/JfbBaseUserCenterLess.less +1 -1
- package/src/components/JfbBaseUserInfo/JfbBaseUserInfoLess.less +1 -1
- package/src/components/JfbBaseUserOrder/JfbBaseUserOrderLess.less +1 -1
- package/src/components/JfbBaseVideo/Api.js +19 -0
- package/src/components/JfbBaseVideo/Attr.js +259 -0
- package/src/components/JfbBaseVideo/JfbBaseVideo.vue +159 -0
- package/src/components/JfbBaseVideo/JfbBaseVideoLess.less +80 -0
- package/src/components/JfbBaseVideo/JfbBaseVideoMixin.js +30 -0
- package/src/components/JfbBaseVideo/Mock.js +3 -0
- package/src/components/JfbBaseVideo/XdVideo.vue +212 -0
- package/src/components/JfbBaseWebview/JfbBaseWebviewLess.less +1 -1
- package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorizeLess.less +1 -1
- package/src/components/JfbBaseWxAuthorizeError/JfbBaseWxAuthorizeErrorLess.less +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = [
|
|
4
|
+
{
|
|
5
|
+
mapFnName: 'getListVideoContent', //自定义方法名字(必选)
|
|
6
|
+
title: '获取内容',
|
|
7
|
+
path: '/cms/v1/ad-content',
|
|
8
|
+
isRule: false,
|
|
9
|
+
params: {
|
|
10
|
+
scene: ['使用场景', 'String', '选填'],
|
|
11
|
+
container_id: ['插件ID', 'String', '必填'],
|
|
12
|
+
page_id: ['页面ID', 'String', '必填'],
|
|
13
|
+
page_size: ['记录条数', 'Number', '必填'],
|
|
14
|
+
},
|
|
15
|
+
isConsole: true,
|
|
16
|
+
disabled: true,
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
];
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import console from "@dcloudio/uni-h5/src/core/helpers/console";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
7
|
+
*/
|
|
8
|
+
export default {
|
|
9
|
+
style:[],
|
|
10
|
+
content:(params)=>{
|
|
11
|
+
return [
|
|
12
|
+
{
|
|
13
|
+
label: '视频位置配置:', //label
|
|
14
|
+
ele: 'xd-site-poster', //package 名称
|
|
15
|
+
valueKey: 'video', //form[valueKey]
|
|
16
|
+
className: 'input80',
|
|
17
|
+
value: params.video || {},
|
|
18
|
+
setting: {
|
|
19
|
+
count: 1,
|
|
20
|
+
scene: {label: '视频', value: 'video'}
|
|
21
|
+
},
|
|
22
|
+
handleCustom({action, data}) {
|
|
23
|
+
//设置场景参数
|
|
24
|
+
if(data) {
|
|
25
|
+
data.params = Object.assign({}, {scene: 'video'}, data.params || {})
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//获取显示内容
|
|
29
|
+
if (action === 'screenList') {
|
|
30
|
+
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'editx_base_ad_split_screen'})
|
|
31
|
+
.then(res => {
|
|
32
|
+
data.cb(res['list'])
|
|
33
|
+
})
|
|
34
|
+
.catch(error => {
|
|
35
|
+
console.error(error);
|
|
36
|
+
});
|
|
37
|
+
return
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//获取返回参数(广告位高度必选项)
|
|
41
|
+
if (action === 'getPosterInfo') {
|
|
42
|
+
XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
|
|
43
|
+
.then(res => {
|
|
44
|
+
data.cb({list: res.list, selectId: res.selected})
|
|
45
|
+
})
|
|
46
|
+
.catch(error => {
|
|
47
|
+
console.error(error);
|
|
48
|
+
});
|
|
49
|
+
return
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
//使用内容分类
|
|
53
|
+
if (action === 'cmsPublishEditxContent') {
|
|
54
|
+
XdBus.getParentApi('cmsPublishEditxContent')(data.params)
|
|
55
|
+
.then(res => {
|
|
56
|
+
data.cb(res)
|
|
57
|
+
})
|
|
58
|
+
.catch(error => {
|
|
59
|
+
console.error(error);
|
|
60
|
+
});
|
|
61
|
+
return
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
let loading = XdBus.getParentApi('loading')({});
|
|
65
|
+
//位置列表
|
|
66
|
+
if (action === 'getListPostion') {
|
|
67
|
+
XdBus.getParentApi('getListPosterPosition')(data.params)
|
|
68
|
+
.then(res => {
|
|
69
|
+
loading.close();
|
|
70
|
+
data.cb(res)
|
|
71
|
+
})
|
|
72
|
+
.catch(error => {
|
|
73
|
+
loading.close();
|
|
74
|
+
console.error(error);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
//位置创建
|
|
79
|
+
if (action === 'addPostion') {
|
|
80
|
+
XdBus.getParentApi('addPosterPosition')(data.params)
|
|
81
|
+
.then(res => {
|
|
82
|
+
loading.close();
|
|
83
|
+
data.cb(true)
|
|
84
|
+
})
|
|
85
|
+
.catch(error => {
|
|
86
|
+
console.error(error);
|
|
87
|
+
loading.close();
|
|
88
|
+
data.cb(false)
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
//位置编辑
|
|
93
|
+
if (action === 'editPostion') {
|
|
94
|
+
XdBus.getParentApi('updatePosterPosition')(data.params)
|
|
95
|
+
.then(res => {
|
|
96
|
+
loading.close();
|
|
97
|
+
data.cb(true)
|
|
98
|
+
})
|
|
99
|
+
.catch(error => {
|
|
100
|
+
console.error(error);
|
|
101
|
+
loading.close();
|
|
102
|
+
data.cb(false)
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
//位置删除
|
|
107
|
+
if (action === 'deleltePostion') {
|
|
108
|
+
XdBus.getParentApi('deletePosterPosition')(data.params)
|
|
109
|
+
.then(res => {
|
|
110
|
+
loading.close();
|
|
111
|
+
data.cb(true)
|
|
112
|
+
})
|
|
113
|
+
.catch(error => {
|
|
114
|
+
console.error(error);
|
|
115
|
+
loading.close();
|
|
116
|
+
data.cb(false)
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
//获取广告位内容列表
|
|
121
|
+
if (action === 'getListContent') {
|
|
122
|
+
XdBus.getParentApi('getListPosterContent')(data.params)
|
|
123
|
+
.then(res => {
|
|
124
|
+
loading.close();
|
|
125
|
+
data.cb(res)
|
|
126
|
+
})
|
|
127
|
+
.catch(error => {
|
|
128
|
+
loading.close();
|
|
129
|
+
console.error(error);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
//广告内容创建
|
|
134
|
+
if (action === 'addContent') {
|
|
135
|
+
XdBus.getParentApi('addPosterContent')(data.params)
|
|
136
|
+
.then(res => {
|
|
137
|
+
loading.close();
|
|
138
|
+
data.cb(true)
|
|
139
|
+
})
|
|
140
|
+
.catch(error => {
|
|
141
|
+
console.error(error);
|
|
142
|
+
loading.close();
|
|
143
|
+
data.cb(false)
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
//广告内容编辑
|
|
148
|
+
if (action === 'editContent') {
|
|
149
|
+
XdBus.getParentApi('updatePosterContent')(data.params)
|
|
150
|
+
.then(res => {
|
|
151
|
+
loading.close();
|
|
152
|
+
data.cb(true)
|
|
153
|
+
})
|
|
154
|
+
.catch(error => {
|
|
155
|
+
console.error(error);
|
|
156
|
+
loading.close();
|
|
157
|
+
data.cb(false)
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
//广告内容删除
|
|
162
|
+
if (action === 'deleteContent') {
|
|
163
|
+
XdBus.getParentApi('deletePosterContent')(data.params)
|
|
164
|
+
.then(res => {
|
|
165
|
+
loading.close();
|
|
166
|
+
data.cb(true)
|
|
167
|
+
})
|
|
168
|
+
.catch(error => {
|
|
169
|
+
console.error(error);
|
|
170
|
+
loading.close();
|
|
171
|
+
data.cb(false)
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
//获取广告内容跳转地址类型
|
|
176
|
+
if (action === 'jumpPosterContentType') {
|
|
177
|
+
XdBus.getParentApi('getOptionsSettingList')({setting_id: "cms_setting"})
|
|
178
|
+
.then(res => {
|
|
179
|
+
loading.close();
|
|
180
|
+
data.cb(res['redirect_type'])
|
|
181
|
+
})
|
|
182
|
+
.catch(error => {
|
|
183
|
+
loading.close();
|
|
184
|
+
console.error(error);
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
//发布
|
|
189
|
+
if (action === 'publish') {
|
|
190
|
+
console.log('publish', data.params)
|
|
191
|
+
XdBus.getParentApi('cmsPublishContent')(data.params)
|
|
192
|
+
.then(res => {
|
|
193
|
+
loading.close();
|
|
194
|
+
data.cb(res)
|
|
195
|
+
})
|
|
196
|
+
.catch(error => {
|
|
197
|
+
loading.close();
|
|
198
|
+
console.error(error);
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
//获取站内页面地址
|
|
203
|
+
if (action === 'router') {
|
|
204
|
+
loading.close()
|
|
205
|
+
return XdBus.getParentApi('getPagesTree');
|
|
206
|
+
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
//通知页面进行刷新
|
|
210
|
+
if(action === 'update') {
|
|
211
|
+
XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
|
|
212
|
+
loading.close()
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
inline: false,
|
|
216
|
+
notice: '',
|
|
217
|
+
rules: [
|
|
218
|
+
{required: true, message: '请选择视频位置', trigger: 'change'},
|
|
219
|
+
],
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
label: '视频位边距设置:',
|
|
223
|
+
ele: 'xd-margin-padding',
|
|
224
|
+
valueKey: 'margin',
|
|
225
|
+
value: params.margin || null,
|
|
226
|
+
disabled: false,
|
|
227
|
+
setting: {
|
|
228
|
+
type: 'margin',
|
|
229
|
+
},
|
|
230
|
+
placeholder: '请设置视频位边距设置',
|
|
231
|
+
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
label: '内容圆角设置:',
|
|
235
|
+
ele: 'xd-site-select-list',
|
|
236
|
+
valueKey: 'radius',
|
|
237
|
+
value: params['radius'] || '0',
|
|
238
|
+
placeholder: '请选择内容圆角设置',
|
|
239
|
+
multiple: false,
|
|
240
|
+
className: 'input80',
|
|
241
|
+
handleCustom({action, data}) {
|
|
242
|
+
XdBus.getParentApi('getOptionsSettingList')({
|
|
243
|
+
setting_id: 'edtix_style_radius',
|
|
244
|
+
key: Date.now()
|
|
245
|
+
})
|
|
246
|
+
.then(res => {
|
|
247
|
+
data.cb(res.list)
|
|
248
|
+
})
|
|
249
|
+
.catch(error => {
|
|
250
|
+
console.error(error);
|
|
251
|
+
});
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
].filter(i=>i)
|
|
255
|
+
},
|
|
256
|
+
advanced: [
|
|
257
|
+
|
|
258
|
+
],
|
|
259
|
+
};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="jfb-base-video"
|
|
4
|
+
@click="handleEditxSelect"
|
|
5
|
+
:class="{ editx : isEditx && active }"
|
|
6
|
+
>
|
|
7
|
+
<!--#ifdef H5-->
|
|
8
|
+
<view
|
|
9
|
+
class="jfb-base-video__edit"
|
|
10
|
+
:class="{ editx : isEditx && active }"
|
|
11
|
+
v-if="isEditx && active"
|
|
12
|
+
>
|
|
13
|
+
<view class="jfb-base-video__edit-icon" @click="delEdit">删除</view>
|
|
14
|
+
</view>
|
|
15
|
+
<!-- #endif -->
|
|
16
|
+
<view class="jfb-base-video__body">
|
|
17
|
+
<view class="float"></view>
|
|
18
|
+
<view class="video" v-if="video !== null">
|
|
19
|
+
<xd-video
|
|
20
|
+
:margin="margin"
|
|
21
|
+
:poster="videoSetting"
|
|
22
|
+
:video="video"
|
|
23
|
+
:radius="radius"
|
|
24
|
+
:pack-this="$vm"
|
|
25
|
+
></xd-video>
|
|
26
|
+
</view>
|
|
27
|
+
</view>
|
|
28
|
+
</view>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
const color = require('color');
|
|
33
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
34
|
+
import JfbBaseVideoMixin from "./JfbBaseVideoMixin";
|
|
35
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
36
|
+
import extsMixins from "@/mixins/extsMixins"
|
|
37
|
+
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
38
|
+
import XdVideo from "./XdVideo.vue";
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
export default {
|
|
42
|
+
name: "JfbBaseVideo",
|
|
43
|
+
components: {
|
|
44
|
+
XdVideo
|
|
45
|
+
},
|
|
46
|
+
mixins: [componentsMixins,extsMixins,JfbBaseVideoMixin],
|
|
47
|
+
data() {
|
|
48
|
+
return {
|
|
49
|
+
selfMask: true,
|
|
50
|
+
page_size: 1,
|
|
51
|
+
options:{},
|
|
52
|
+
|
|
53
|
+
//data
|
|
54
|
+
video: null,
|
|
55
|
+
videoSetting: null,
|
|
56
|
+
margin:{},
|
|
57
|
+
radius:0,
|
|
58
|
+
$vm: {}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
computed: {
|
|
62
|
+
iconFont(){
|
|
63
|
+
if(this.autoplay === 'N') return 'iconplayright'
|
|
64
|
+
if(this.autoplay === 'E') return 'iconshibai';
|
|
65
|
+
if(this.autoplay === 'R') return 'iconplayreplay';
|
|
66
|
+
},
|
|
67
|
+
contentWidth(){
|
|
68
|
+
let border = 0;
|
|
69
|
+
if(this.isPreview) border = 2;
|
|
70
|
+
return 750 - (this.margin.left + this.margin.right + border);
|
|
71
|
+
},
|
|
72
|
+
contentHeight(){
|
|
73
|
+
let border = 0;
|
|
74
|
+
if(this.isPreview) border = 2;
|
|
75
|
+
let winWidth = 750 - ((this.margin.left||0) + (this.margin.right||0) + border);
|
|
76
|
+
return winWidth * this.height/this.width;
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
outMargin(){
|
|
80
|
+
let margin = `${this.margin.top !== null ? this.margin.top : 0}rpx`;
|
|
81
|
+
margin = `${margin} ${this.margin.right !== null ? this.margin.right : 0}rpx`;
|
|
82
|
+
margin = `${margin} ${this.margin.bottom !== null ? this.margin.bottom :0}rpx`;
|
|
83
|
+
margin = `${margin} ${this.margin.left !== null ? this.margin.left : 0}rpx`;
|
|
84
|
+
return margin;
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
watch: {
|
|
88
|
+
container(value) {
|
|
89
|
+
this.init(value);
|
|
90
|
+
if(this.timer) clearTimeout(this.timer);
|
|
91
|
+
this.timer = setTimeout(()=>{
|
|
92
|
+
if (this.$configProject['isPreview']) this.onJfbLoad(this.options)
|
|
93
|
+
}, 400)
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
created() {
|
|
97
|
+
this.$vm = this;
|
|
98
|
+
this.isPreview = this.$configProject.isPreview;
|
|
99
|
+
this.init(this.container);
|
|
100
|
+
|
|
101
|
+
},
|
|
102
|
+
methods: {
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @description 监听事件变化
|
|
106
|
+
* @param container {object} 业务组件对象自己
|
|
107
|
+
*/
|
|
108
|
+
init(container) {
|
|
109
|
+
this.videoSetting = getContainerPropsValue(container, 'content.video', {size:{width: 400, height: 300}, type: '1'});
|
|
110
|
+
this.margin = getContainerPropsValue(container, 'content.margin', {top:0, bottom:0, right:0, left: 0});
|
|
111
|
+
this.radius = getContainerPropsValue(container, 'content.radius', 0);
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
onJfbLoad(options) {
|
|
115
|
+
this.options = options;
|
|
116
|
+
jfbRootExec('getListVideoContent', {
|
|
117
|
+
vm: this,
|
|
118
|
+
data: {
|
|
119
|
+
page_id: this.pageAttr['page_id'], //页面ID
|
|
120
|
+
container_id: this.containerId, //组件ID
|
|
121
|
+
page_size: this.page_size //可以不传
|
|
122
|
+
},
|
|
123
|
+
})
|
|
124
|
+
.then(res => {
|
|
125
|
+
if(res && res.list && res.list.length > 0) {
|
|
126
|
+
this.video = res.list[0];
|
|
127
|
+
}
|
|
128
|
+
})
|
|
129
|
+
.catch(error => {
|
|
130
|
+
this.$xdLog.catch(error)
|
|
131
|
+
})
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
onJfbUpdate() {
|
|
135
|
+
this.onJfbLoad(this.options);
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
</script>
|
|
142
|
+
|
|
143
|
+
<style scoped lang="less">
|
|
144
|
+
@import "./JfbBaseVideoLess.less";
|
|
145
|
+
|
|
146
|
+
.jfb-base-video {
|
|
147
|
+
&__body{
|
|
148
|
+
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.float {
|
|
154
|
+
height: 1px;
|
|
155
|
+
width: 100%;
|
|
156
|
+
overflow: hidden;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
</style>
|
|
@@ -0,0 +1,80 @@
|
|
|
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-video {
|
|
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-video {
|
|
75
|
+
&:before {
|
|
76
|
+
content: " ";
|
|
77
|
+
display: table;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**endNotPreview**/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
//@AttrImport
|
|
5
|
+
import Attr from "./Attr";
|
|
6
|
+
//@EndAttrImport
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
data() {
|
|
11
|
+
return {
|
|
12
|
+
//#ifdef H5
|
|
13
|
+
|
|
14
|
+
//@AttrData
|
|
15
|
+
Attr:{}, //对外开发编辑属性
|
|
16
|
+
//@EndAttrData
|
|
17
|
+
|
|
18
|
+
// #endif
|
|
19
|
+
cssRoot: 'jfb-base-video'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
created() {
|
|
23
|
+
|
|
24
|
+
//@AttrDataCreated
|
|
25
|
+
this.Attr = this.$xdUniHelper.customClone(Attr);
|
|
26
|
+
//@EndAttrDataCreated
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
}
|