jufubao-base 1.0.0 → 1.0.3
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/file.config.js +16 -0
- package/package.json +3 -3
- package/src/components/JfbBaseBaidu/Attr.js +150 -0
- package/src/components/JfbBaseBaidu/JfbBaseBaidu.vue +71 -35
- package/src/components/JfbBaseBaidu/JfbBaseBaiduMixin.js +120 -0
- package/src/components/JfbBaseBottom/JfbBaseBottom.vue +110 -0
- package/src/components/JfbBaseBottom/JfbBaseBottomMixin.js +120 -0
- package/src/components/JfbBaseNumber/Api.js +4 -2
- package/src/components/JfbBaseNumber/JfbBaseNumber.vue +71 -39
- package/src/components/JfbBaseNumber/JfbBaseNumberMixin.js +120 -0
- package/src/components/JfbBaseTop/JfbBaseTop.vue +110 -0
- package/src/components/JfbBaseTop/JfbBaseTopMixin.js +120 -0
- package/src/components/JfbBaseUnit/JfbBaseUnit.vue +71 -35
- package/src/components/JfbBaseUnit/JfbBaseUnitMixin.js +120 -0
package/file.config.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
module.exports = {
|
|
3
|
+
/**
|
|
4
|
+
* @type {Number}
|
|
5
|
+
* @description 生成文件路径格式类型
|
|
6
|
+
* 其值:默认:1
|
|
7
|
+
* 1=>使用时间格式
|
|
8
|
+
* 2=>使用固定路径(resource,方便替换发布)
|
|
9
|
+
* 默认:1
|
|
10
|
+
*
|
|
11
|
+
* resource,需要文件替换才可以发布:
|
|
12
|
+
* 1、index.js resource/ => / /@@@@/ => https://domain/dir
|
|
13
|
+
* 2、index.html /@@@@/resource => https://domain/dir
|
|
14
|
+
*/
|
|
15
|
+
fileVersionType: 1,
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jufubao-base",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "聚福宝业务组件基础插件包",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"serve": "cross-env type=test cross-env NODE_ENV=development UNI_PLATFORM=h5 npm run init.entry && npm run dev:h5",
|
|
@@ -114,4 +114,4 @@
|
|
|
114
114
|
"uni-app": {
|
|
115
115
|
"scripts": {}
|
|
116
116
|
}
|
|
117
|
-
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
export default [
|
|
4
|
+
//文本信息
|
|
5
|
+
{
|
|
6
|
+
label: '标题名称:', //label
|
|
7
|
+
ele: 'el-input', //package 名称
|
|
8
|
+
type: 'text',
|
|
9
|
+
valueKey: 'title', //form[valueKey]
|
|
10
|
+
value: '', //v-model
|
|
11
|
+
placeholder: '请输入标题名称',
|
|
12
|
+
classNmae: 'input40', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
13
|
+
disabled: true,
|
|
14
|
+
rules: [
|
|
15
|
+
{
|
|
16
|
+
required: true,
|
|
17
|
+
type: 'url',
|
|
18
|
+
message: '请输入域名地址',
|
|
19
|
+
trigger: 'blur'
|
|
20
|
+
},
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
//远程获取内容选择
|
|
25
|
+
{
|
|
26
|
+
label: '跳转路径:', //label
|
|
27
|
+
ele: 'xd-select-list', //package 名称
|
|
28
|
+
valueKey: 'jumpToLink', //form[valueKey]
|
|
29
|
+
value: '', //v-model
|
|
30
|
+
placeholder: '请选择加盟商',
|
|
31
|
+
multiple: false, //多选
|
|
32
|
+
collapseTags: false,
|
|
33
|
+
remoteApi: '/api/editx/pages',
|
|
34
|
+
remote: true,
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
//本地固定内容选择
|
|
38
|
+
{
|
|
39
|
+
label: '选择内容:', //label
|
|
40
|
+
ele: 'xd-select-list', //package 名称
|
|
41
|
+
valueKey: 'select', //form[valueKey]
|
|
42
|
+
value: '', //v-model
|
|
43
|
+
placeholder: '请选择选择内容',
|
|
44
|
+
multiple: false, //多选
|
|
45
|
+
remote: false,
|
|
46
|
+
list: [
|
|
47
|
+
{"label": "订单详情", "value": '/main/order/order'},
|
|
48
|
+
{"label": "购物车详情", "value": '/main/cart/cart'},
|
|
49
|
+
{"label": "商品详情", "value": '/main/product/product'},
|
|
50
|
+
{"label": "商品分类", "value": '/main/producttype/producttype'},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
//本地固定单选选择
|
|
55
|
+
{
|
|
56
|
+
label: '单选列表(固定):', //label
|
|
57
|
+
ele: 'xd-radio', //package 名称
|
|
58
|
+
valueKey: 'radio_status_list', //form[valueKey]
|
|
59
|
+
value: 6, //v-model
|
|
60
|
+
disabled: true,
|
|
61
|
+
rules: [
|
|
62
|
+
{required: true, message: '请选择', trigger: ['blur', 'change']}
|
|
63
|
+
],
|
|
64
|
+
list: [
|
|
65
|
+
{"label": "万利达集团", "value": 4},
|
|
66
|
+
{"label": "中国联通", "value": 5},
|
|
67
|
+
{"label": "中国移动", "value": 6},
|
|
68
|
+
{"label": "味多美", "value": 7},
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
//远程固定单选选择
|
|
73
|
+
{
|
|
74
|
+
label: '单选列表(固定):', //label
|
|
75
|
+
ele: 'xd-radio', //package 名称
|
|
76
|
+
valueKey: 'radio_status_list', //form[valueKey]
|
|
77
|
+
value: 6, //v-model
|
|
78
|
+
disabled: false,
|
|
79
|
+
remoteApi: '/api/editx/pages',
|
|
80
|
+
remote: true,
|
|
81
|
+
rules: [
|
|
82
|
+
{required: true, message: '请选择', trigger: ['blur', 'change']}
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
//本地固定多选选择
|
|
87
|
+
{
|
|
88
|
+
label: '多选列表(固定):', //label
|
|
89
|
+
ele: 'xd-check', //package 名称
|
|
90
|
+
valueKey: 'xd-check_list', //form[valueKey]
|
|
91
|
+
value: 6, //v-model
|
|
92
|
+
disabled: true,
|
|
93
|
+
rules: [
|
|
94
|
+
{required: true, message: '请选择', trigger: ['blur', 'change']}
|
|
95
|
+
],
|
|
96
|
+
list: [
|
|
97
|
+
{"label": "万利达集团", "value": 4},
|
|
98
|
+
{"label": "中国联通", "value": 5},
|
|
99
|
+
{"label": "中国移动", "value": 6},
|
|
100
|
+
{"label": "味多美", "value": 7},
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
//远程多选选选择
|
|
105
|
+
{
|
|
106
|
+
label: '多选列表:', //label
|
|
107
|
+
ele: 'xd-check', //package 名称
|
|
108
|
+
valueKey: 'xd-check_remote-list', //form[valueKey]
|
|
109
|
+
value: 6, //v-model
|
|
110
|
+
disabled: false,
|
|
111
|
+
remoteApi: '/api/editx/pages',
|
|
112
|
+
remote: true,
|
|
113
|
+
rules: [
|
|
114
|
+
{required: true, message: '请选择', trigger: ['blur', 'change']}
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
//状态(二选一)单选选择
|
|
119
|
+
{
|
|
120
|
+
label: '状态(二选一):', //label
|
|
121
|
+
ele: 'xd-radio-status', //package 名称
|
|
122
|
+
valueKey: 'radio_status', //form[valueKey]
|
|
123
|
+
value: 'Y', //v-model
|
|
124
|
+
isall: true,
|
|
125
|
+
disabled: true,
|
|
126
|
+
backValueType: '', //返回值类型 1=>返回(Y,N)2=> [true|false] 3=>[1,0] 4=>[1,2]
|
|
127
|
+
placeholder: '请选择',
|
|
128
|
+
list: 'status', //status=>状态 best=>推荐 associate=>关联 yes=>是否 open=> 是否开启 check=>审核
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
//文本信息
|
|
132
|
+
{
|
|
133
|
+
label: '标题名称:', //label
|
|
134
|
+
ele: 'el-input', //package 名称
|
|
135
|
+
type: 'text',
|
|
136
|
+
valueKey: 'title', //form[valueKey]
|
|
137
|
+
value: '', //v-model
|
|
138
|
+
placeholder: '请输入标题名称',
|
|
139
|
+
classNmae: 'input40', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
140
|
+
disabled: true,
|
|
141
|
+
rules: [
|
|
142
|
+
{
|
|
143
|
+
required: true,
|
|
144
|
+
type: 'url',
|
|
145
|
+
message: '请输入域名地址',
|
|
146
|
+
trigger: 'blur'
|
|
147
|
+
},
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
]
|
|
@@ -1,61 +1,75 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view
|
|
2
|
+
<view
|
|
3
|
+
class="jfb-base-baidu"
|
|
4
|
+
@click="handleSelect"
|
|
5
|
+
:class="{ editx : isEditx && active }"
|
|
6
|
+
>
|
|
3
7
|
<!--#ifdef H5-->
|
|
4
|
-
<view
|
|
5
|
-
|
|
8
|
+
<view
|
|
9
|
+
class="jfb-base-baidu__edit"
|
|
10
|
+
:class="{ editx : isEditx && edit && active }"
|
|
11
|
+
v-if="isEditx && active"
|
|
12
|
+
>
|
|
13
|
+
<view class="jfb-base-baidu__edit-icon" @click="showEdit">
|
|
14
|
+
<xd-font-icon icon="iconmingchengtubiao"></xd-font-icon>
|
|
15
|
+
</view>
|
|
6
16
|
</view>
|
|
7
17
|
<!-- #endif -->
|
|
8
|
-
<view class="jfb-base-baidu__body"
|
|
18
|
+
<view class="jfb-base-baidu__body">
|
|
19
|
+
<view>测试插件( {{containerId}} )</view>
|
|
20
|
+
</view>
|
|
9
21
|
</view>
|
|
10
22
|
</template>
|
|
11
23
|
|
|
12
24
|
<script>
|
|
13
25
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
26
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
27
|
+
import JfbBaseBaiduMixin from "@/components/JfbBaseBaidu/JfbBaseBaiduMixin";
|
|
14
28
|
export default {
|
|
15
29
|
name: "JfbBaseBaidu",
|
|
16
30
|
components: {
|
|
17
31
|
XdFontIcon
|
|
18
32
|
},
|
|
33
|
+
mixins: [
|
|
34
|
+
JfbBaseBaiduMixin
|
|
35
|
+
],
|
|
19
36
|
data() {
|
|
20
37
|
return {
|
|
21
38
|
|
|
22
|
-
|
|
23
|
-
Attr: {},
|
|
24
|
-
edit: false, //是否开启编辑模式
|
|
25
|
-
contentId: null, //容器ID
|
|
26
|
-
|
|
27
|
-
// #endif
|
|
39
|
+
//todo
|
|
28
40
|
}
|
|
29
41
|
},
|
|
30
42
|
created() {
|
|
31
43
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
//监听Editx属性编辑模块视图发送变化接受时间
|
|
35
|
-
this.contentId = this.$xdUniHelper.randomChar(20);
|
|
36
|
-
XdBus.addEvent('attrViewChange', (contentId, data) => {
|
|
37
|
-
if (contentId !== this.contentId) this.edit = false
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
// #endif
|
|
44
|
+
//todo
|
|
41
45
|
},
|
|
42
46
|
methods: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
47
|
+
onJfbLoad(options) {
|
|
48
|
+
jfbRootExec('baiduUserLogin', {
|
|
49
|
+
vm: this,
|
|
50
|
+
data: {
|
|
51
|
+
account: 'gaoshiyong',
|
|
52
|
+
password: '123456789',
|
|
53
|
+
type: 3,
|
|
54
|
+
...options
|
|
55
|
+
}
|
|
56
|
+
}).then().catch()
|
|
57
|
+
},
|
|
58
|
+
onJfbScroll(options) {
|
|
59
|
+
console.log('event.onJfbScroll', options)
|
|
60
|
+
},
|
|
61
|
+
onJfbReachBottom(options) {
|
|
62
|
+
console.log('event.onJfbReachBottom', options)
|
|
63
|
+
},
|
|
64
|
+
onJfbShow(options) {
|
|
65
|
+
console.log('event.onJfbShow', options)
|
|
66
|
+
},
|
|
67
|
+
onJfbHide(options) {
|
|
68
|
+
console.log('event.onJfbHide', options)
|
|
69
|
+
},
|
|
70
|
+
onJfbBack(options) {
|
|
71
|
+
console.log('event.onJfbBack', options)
|
|
72
|
+
},
|
|
59
73
|
}
|
|
60
74
|
}
|
|
61
75
|
|
|
@@ -63,8 +77,30 @@
|
|
|
63
77
|
|
|
64
78
|
<style scoped lang="less">
|
|
65
79
|
.jfb-base-baidu {
|
|
80
|
+
border: 1px dashed rgba(0,0,0,0);
|
|
81
|
+
box-sizing: border-box;
|
|
82
|
+
|
|
83
|
+
&.editx {
|
|
84
|
+
position: relative;
|
|
85
|
+
border: 1px dashed #efefef;
|
|
86
|
+
box-sizing: border-box;
|
|
87
|
+
}
|
|
88
|
+
|
|
66
89
|
&__edit {
|
|
90
|
+
position: absolute;
|
|
91
|
+
right: 0;
|
|
92
|
+
top:0;
|
|
93
|
+
width: unit(80, rpx);
|
|
94
|
+
height: unit(40, rpx);
|
|
95
|
+
display: flex;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
align-items: center;
|
|
98
|
+
border: 1px dashed rgba(0, 0, 0, 0);
|
|
67
99
|
|
|
100
|
+
&.editx {
|
|
101
|
+
border: 1px dashed #efefef;
|
|
102
|
+
box-sizing: border-box;
|
|
103
|
+
}
|
|
68
104
|
}
|
|
69
105
|
|
|
70
106
|
&__body{
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// #ifdef H5
|
|
4
|
+
import Attr from "./Attr";
|
|
5
|
+
// #endif
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
props: {
|
|
9
|
+
layoutInfo: {
|
|
10
|
+
type: Object,
|
|
11
|
+
default() {
|
|
12
|
+
return {}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
pageAtrr: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default() {
|
|
18
|
+
return {}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
componentAtrr: {
|
|
22
|
+
type: Object,
|
|
23
|
+
default() {
|
|
24
|
+
return {}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
appAtrr: {
|
|
28
|
+
type: Object,
|
|
29
|
+
default() {
|
|
30
|
+
return {}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
settings: {
|
|
34
|
+
type: Object,
|
|
35
|
+
default() {
|
|
36
|
+
return {}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
|
|
43
|
+
//#ifdef H5
|
|
44
|
+
Attr, //对外开发编辑属性
|
|
45
|
+
active: false, //是否选择当前状态
|
|
46
|
+
isEditx: true, //当前为Editx模式
|
|
47
|
+
edit: false, //是否开启编辑模式
|
|
48
|
+
containerId: null, //容器ID
|
|
49
|
+
// #endif
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
created() {
|
|
53
|
+
//console.log(this.layoutInfo)
|
|
54
|
+
|
|
55
|
+
//#ifdef H5
|
|
56
|
+
|
|
57
|
+
//设置插件ID
|
|
58
|
+
if (this.componentAtrr.id) {
|
|
59
|
+
this.containerId = this.componentAtrr.id;
|
|
60
|
+
} else {
|
|
61
|
+
this.containerId = this.$xdUniHelper.randomChar(20);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
//监听用户点击状态显示虚框
|
|
65
|
+
XdBus.addEvent('select', ({containerId}) => {
|
|
66
|
+
this.active = containerId === this.containerId;
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
//监听用户点击编辑按钮进行编辑状态显示
|
|
70
|
+
XdBus.addEvent('useEditx', ({containerId}) => {
|
|
71
|
+
this.edit = containerId === this.containerId;
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// #endif
|
|
75
|
+
},
|
|
76
|
+
methods: {
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* 检查插件是否加载成功
|
|
80
|
+
*/
|
|
81
|
+
onCheck() {
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
//#ifdef H5
|
|
85
|
+
/**
|
|
86
|
+
* @description 点击视图编辑按钮发送Editx属性编辑面板
|
|
87
|
+
*/
|
|
88
|
+
showEdit() {
|
|
89
|
+
if (this.edit) return;
|
|
90
|
+
this.edit = true;
|
|
91
|
+
|
|
92
|
+
//往控制面板传递事件
|
|
93
|
+
XdBus.send('attrViewChange', {
|
|
94
|
+
Attr: this.$xdUniHelper.cloneDeep(Attr),
|
|
95
|
+
containerId: this.containerId,
|
|
96
|
+
}, false, 'xd-iframe');
|
|
97
|
+
|
|
98
|
+
//是否对当前控制面板进行编辑操作
|
|
99
|
+
XdBus.message('useEditx', {
|
|
100
|
+
containerId: this.containerId,
|
|
101
|
+
})
|
|
102
|
+
},
|
|
103
|
+
//#endif
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @description 点击选择插件显示边框
|
|
107
|
+
*/
|
|
108
|
+
handleSelect() {
|
|
109
|
+
|
|
110
|
+
//#ifdef H5
|
|
111
|
+
if (this.active) return;
|
|
112
|
+
this.active = true;
|
|
113
|
+
XdBus.message('select', {
|
|
114
|
+
containerId: this.containerId,
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
//#endif
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="jfb-base-bottom"
|
|
4
|
+
@click="handleSelect"
|
|
5
|
+
:class="{ editx : isEditx && active }"
|
|
6
|
+
>
|
|
7
|
+
<!--#ifdef H5-->
|
|
8
|
+
<view
|
|
9
|
+
class="jfb-base-bottom__edit"
|
|
10
|
+
:class="{ editx : isEditx && edit && active }"
|
|
11
|
+
v-if="isEditx && active"
|
|
12
|
+
>
|
|
13
|
+
<view class="jfb-base-bottom__edit-icon" @click="showEdit">
|
|
14
|
+
<xd-font-icon icon="iconmingchengtubiao"></xd-font-icon>
|
|
15
|
+
</view>
|
|
16
|
+
</view>
|
|
17
|
+
<!-- #endif -->
|
|
18
|
+
<view class="jfb-base-bottom__body">
|
|
19
|
+
<view>测试插件( {{containerId}} )</view>
|
|
20
|
+
</view>
|
|
21
|
+
</view>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
26
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
27
|
+
import JfbBaseBottomMixin from "@/components/JfbBaseBottom/JfbBaseBottomMixin";
|
|
28
|
+
export default {
|
|
29
|
+
name: "JfbBaseBottom",
|
|
30
|
+
components: {
|
|
31
|
+
XdFontIcon
|
|
32
|
+
},
|
|
33
|
+
mixins: [
|
|
34
|
+
JfbBaseBottomMixin
|
|
35
|
+
],
|
|
36
|
+
data() {
|
|
37
|
+
return {
|
|
38
|
+
|
|
39
|
+
//todo
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
created() {
|
|
43
|
+
|
|
44
|
+
//todo
|
|
45
|
+
},
|
|
46
|
+
methods: {
|
|
47
|
+
onJfbLoad(options) {
|
|
48
|
+
jfbRootExec('baiduUserLogin', {
|
|
49
|
+
vm: this,
|
|
50
|
+
data: {
|
|
51
|
+
account: 'gaoshiyong',
|
|
52
|
+
password: '123456789',
|
|
53
|
+
type: 3,
|
|
54
|
+
...options
|
|
55
|
+
}
|
|
56
|
+
}).then().catch()
|
|
57
|
+
},
|
|
58
|
+
onJfbScroll(options) {
|
|
59
|
+
console.log('event.onJfbScroll', options)
|
|
60
|
+
},
|
|
61
|
+
onJfbReachBottom(options) {
|
|
62
|
+
console.log('event.onJfbReachBottom', options)
|
|
63
|
+
},
|
|
64
|
+
onJfbShow(options) {
|
|
65
|
+
console.log('event.onJfbShow', options)
|
|
66
|
+
},
|
|
67
|
+
onJfbHide(options) {
|
|
68
|
+
console.log('event.onJfbHide', options)
|
|
69
|
+
},
|
|
70
|
+
onJfbBack(options) {
|
|
71
|
+
console.log('event.onJfbBack', options)
|
|
72
|
+
},
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<style scoped lang="less">
|
|
79
|
+
.jfb-base-bottom {
|
|
80
|
+
border: 1px dashed rgba(0,0,0,0);
|
|
81
|
+
box-sizing: border-box;
|
|
82
|
+
|
|
83
|
+
&.editx {
|
|
84
|
+
position: relative;
|
|
85
|
+
border: 1px dashed #efefef;
|
|
86
|
+
box-sizing: border-box;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&__edit {
|
|
90
|
+
position: absolute;
|
|
91
|
+
right: 0;
|
|
92
|
+
top:0;
|
|
93
|
+
width: unit(80, rpx);
|
|
94
|
+
height: unit(40, rpx);
|
|
95
|
+
display: flex;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
align-items: center;
|
|
98
|
+
border: 1px dashed rgba(0, 0, 0, 0);
|
|
99
|
+
|
|
100
|
+
&.editx {
|
|
101
|
+
border: 1px dashed #efefef;
|
|
102
|
+
box-sizing: border-box;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&__body{
|
|
107
|
+
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
</style>
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// #ifdef H5
|
|
4
|
+
import Attr from "./Attr";
|
|
5
|
+
// #endif
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
props: {
|
|
9
|
+
layoutInfo: {
|
|
10
|
+
type: Object,
|
|
11
|
+
default() {
|
|
12
|
+
return {}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
pageAtrr: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default() {
|
|
18
|
+
return {}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
componentAtrr: {
|
|
22
|
+
type: Object,
|
|
23
|
+
default() {
|
|
24
|
+
return {}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
appAtrr: {
|
|
28
|
+
type: Object,
|
|
29
|
+
default() {
|
|
30
|
+
return {}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
settings: {
|
|
34
|
+
type: Object,
|
|
35
|
+
default() {
|
|
36
|
+
return {}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
|
|
43
|
+
//#ifdef H5
|
|
44
|
+
Attr, //对外开发编辑属性
|
|
45
|
+
active: false, //是否选择当前状态
|
|
46
|
+
isEditx: true, //当前为Editx模式
|
|
47
|
+
edit: false, //是否开启编辑模式
|
|
48
|
+
containerId: null, //容器ID
|
|
49
|
+
// #endif
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
created() {
|
|
53
|
+
//console.log(this.layoutInfo)
|
|
54
|
+
|
|
55
|
+
//#ifdef H5
|
|
56
|
+
|
|
57
|
+
//设置插件ID
|
|
58
|
+
if (this.componentAtrr.id) {
|
|
59
|
+
this.containerId = this.componentAtrr.id;
|
|
60
|
+
} else {
|
|
61
|
+
this.containerId = this.$xdUniHelper.randomChar(20);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
//监听用户点击状态显示虚框
|
|
65
|
+
XdBus.addEvent('select', ({containerId}) => {
|
|
66
|
+
this.active = containerId === this.containerId;
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
//监听用户点击编辑按钮进行编辑状态显示
|
|
70
|
+
XdBus.addEvent('useEditx', ({containerId}) => {
|
|
71
|
+
this.edit = containerId === this.containerId;
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// #endif
|
|
75
|
+
},
|
|
76
|
+
methods: {
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* 检查插件是否加载成功
|
|
80
|
+
*/
|
|
81
|
+
onCheck() {
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
//#ifdef H5
|
|
85
|
+
/**
|
|
86
|
+
* @description 点击视图编辑按钮发送Editx属性编辑面板
|
|
87
|
+
*/
|
|
88
|
+
showEdit() {
|
|
89
|
+
if (this.edit) return;
|
|
90
|
+
this.edit = true;
|
|
91
|
+
|
|
92
|
+
//往控制面板传递事件
|
|
93
|
+
XdBus.send('attrViewChange', {
|
|
94
|
+
Attr: this.$xdUniHelper.cloneDeep(Attr),
|
|
95
|
+
containerId: this.containerId,
|
|
96
|
+
}, false, 'xd-iframe');
|
|
97
|
+
|
|
98
|
+
//是否对当前控制面板进行编辑操作
|
|
99
|
+
XdBus.message('useEditx', {
|
|
100
|
+
containerId: this.containerId,
|
|
101
|
+
})
|
|
102
|
+
},
|
|
103
|
+
//#endif
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @description 点击选择插件显示边框
|
|
107
|
+
*/
|
|
108
|
+
handleSelect() {
|
|
109
|
+
|
|
110
|
+
//#ifdef H5
|
|
111
|
+
if (this.active) return;
|
|
112
|
+
this.active = true;
|
|
113
|
+
XdBus.message('select', {
|
|
114
|
+
containerId: this.containerId,
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
//#endif
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
module.exports = [
|
|
4
4
|
{
|
|
5
|
+
mapFnName: 'getFilmSquate', //自定义方法名字
|
|
5
6
|
title: '获取电影广场列表',
|
|
6
7
|
path: '/api/account/film/list-film-square',
|
|
7
8
|
isRule: false,
|
|
9
|
+
prefix: 'online',
|
|
8
10
|
params: {
|
|
9
11
|
last_key: ['当前页', 'Number', '必选'],
|
|
10
12
|
page_size: ['每页数量', 'Number', '必选'],
|
|
@@ -13,10 +15,10 @@ module.exports = [
|
|
|
13
15
|
disabled: true,
|
|
14
16
|
},
|
|
15
17
|
{
|
|
18
|
+
mapFnName: 'getPaiqiDate',
|
|
16
19
|
title: '获取电影排期时间',
|
|
17
20
|
path: '/api/account/film/paiqi-date',
|
|
18
21
|
isRule: false,
|
|
19
|
-
resultKey: 'result',
|
|
20
22
|
params: {
|
|
21
23
|
film_id: ['电影id', 'Number', '必选'],
|
|
22
24
|
cinema_id: ['影院id', 'Number', '必选'],
|
|
@@ -24,4 +26,4 @@ module.exports = [
|
|
|
24
26
|
isConsole: true,
|
|
25
27
|
disabled: true,
|
|
26
28
|
},
|
|
27
|
-
]
|
|
29
|
+
];
|