jufubao-third 1.0.0-beta1 → 1.0.0-beta2

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-third",
3
- "version": "1.0.0-beta1",
3
+ "version": "1.0.0-beta2",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件第三方购物平台包",
6
6
  "main": "index.js",
@@ -0,0 +1,58 @@
1
+ 'use strict';
2
+ /**
3
+ * @description 接口配置,
4
+ * 在设置方法名字当时候,别忘记加上【模块名字】:Pay
5
+ * @type {*[]}
6
+ */
7
+ module.exports = [
8
+ {
9
+ //设置方法名字当别忘记加上【模块名字】:Pay
10
+ mapFnName: 'getPayByIdFilmSquate',
11
+ title: '获取电影广场列表',
12
+ path: '/api/account/film/list-film-square',
13
+ isRule: false,
14
+ params: {
15
+ last_key: ['当前页', 'Number', '必选'],
16
+ page_size: ['每页数量', 'Number', '必选'],
17
+ },
18
+ isConsole: true,
19
+ disabled: true,
20
+ },
21
+ {
22
+ //设置方法名字当别忘记加上【模块名字】:Pay
23
+ mapFnName: 'updatePayFilmPaiqiDate',
24
+ title: '更新排期',
25
+ path: '/api/account/film/paiqi-date',
26
+ isRule: false,
27
+ params: {
28
+ film_id: ['电影id', 'Number', '必选'],
29
+ cinema_id: ['影院id', 'Number', '必选'],
30
+ },
31
+ isConsole: true,
32
+ disabled: true,
33
+ },
34
+ {
35
+ //设置方法名字当别忘记加上【模块名字】:Pay
36
+ mapFnName: 'removePayFilmAddress',
37
+ title: '删除我的配送地址',
38
+ path: '/api/account/film/paiqi-date',
39
+ isRule: false,
40
+ params: {
41
+ film_id: ['电影id', 'Number', '必选'],
42
+ },
43
+ isConsole: true,
44
+ disabled: true,
45
+ },
46
+ {
47
+ //设置方法名字当别忘记加上【模块名字】:Pay
48
+ mapFnName: 'addPayFilmcart',
49
+ title: '添加购物车',
50
+ path: '/api/account/film/paiqi-date',
51
+ isRule: false,
52
+ params: {
53
+ film_id: ['电影id', 'Number', '必选'],
54
+ },
55
+ isConsole: true,
56
+ disabled: true,
57
+ },
58
+ ];
@@ -0,0 +1,106 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description 当表单组件中有联动操作时候,使用方法进行返回
5
+ */
6
+ export default {
7
+ style: [],
8
+ content: (data) => {
9
+ return [
10
+ {
11
+ label: '背景颜色:', //label
12
+ ele: 'xd-color', //package 名称
13
+ valueKey: 'bgcolor', //form[valueKey]
14
+ value: data.bgcolor || '', //v-model
15
+ placeholder: '请输入占位框背景颜色',
16
+ classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
17
+ rules: [
18
+ {
19
+ required: true,
20
+ message: '请输入占位框背景颜色',
21
+ trigger: 'blur'
22
+ },
23
+ ]
24
+ },
25
+ {
26
+ label: '选中路径:', //label
27
+ ele: 'xd-select-pages-path', //package 名称
28
+ valueKey: 'select-pages-path', //form[valueKey]
29
+ value: data['select-pages-path'] || {},
30
+ setting: {
31
+ router: XdBus.getParentApi('getPagesTree')
32
+ },
33
+ inline: false,
34
+ },
35
+ data.bgcolor && {
36
+ label: '高度:', //label
37
+ ele: 'el-input', //package 名称
38
+ type: 'number',
39
+ valueKey: 'height', //form[valueKey]
40
+ value: data.height || 100, //v-model
41
+ placeholder: '请输入占位框高度,单位像素,默认:10px',
42
+ className: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
43
+ rules: [
44
+ {
45
+ required: true,
46
+ message: '请输入占位框高度',
47
+ trigger: 'blur'
48
+ },
49
+ ]
50
+ },
51
+ {
52
+ label: '', //label
53
+ ele: 'slot', //package 名称
54
+ slot: 'is_reference',
55
+ },
56
+ ].filter(i=>i)
57
+ },
58
+ advanced: [
59
+ {
60
+ label: '背景颜色:', //label
61
+ ele: 'xd-color', //package 名称
62
+ valueKey: 'bgcolor', //form[valueKey]
63
+ value: '', //v-model
64
+ placeholder: '请输入占位框背景颜色',
65
+ classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
66
+ rules: [
67
+ {
68
+ required: true,
69
+ message: '请输入占位框背景颜色',
70
+ trigger: 'blur'
71
+ },
72
+ ]
73
+ },
74
+ {
75
+ label: '选中路径:', //label
76
+ ele: 'xd-select-pages-path', //package 名称
77
+ valueKey: 'select-pages-path', //form[valueKey]
78
+ value: null,
79
+ setting: {
80
+ router: XdBus.getParentApi('getPagesTree')
81
+ },
82
+ inline: false,
83
+ },
84
+ {
85
+ label: '高度:', //label
86
+ ele: 'el-input', //package 名称
87
+ type: 'number',
88
+ valueKey: 'height', //form[valueKey]
89
+ value: null, //v-model
90
+ placeholder: '请输入占位框高度,单位像素,默认:10px',
91
+ classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
92
+ rules: [
93
+ {
94
+ required: true,
95
+ message: '请输入占位框高度',
96
+ trigger: 'blur'
97
+ },
98
+ ]
99
+ },
100
+ {
101
+ label: '', //label
102
+ ele: 'slot', //package 名称
103
+ slot: 'is_reference',
104
+ },
105
+ ],
106
+ };
@@ -0,0 +1,111 @@
1
+ <template>
2
+ <view
3
+ class="jfb-third-pay"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx : isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-third-pay__edit"
10
+ :class="{ editx : isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-third-pay__edit-icon" @click="delEdit">删除</view>
14
+ </view>
15
+ <!-- #endif -->
16
+ <view class="jfb-third-pay__body">
17
+ <view>测试插件( {{containerId}} )</view>
18
+ </view>
19
+ </view>
20
+ </template>
21
+
22
+ <script>
23
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
24
+ import { jfbRootExec } from "@/utils/xd.event";
25
+ import JfbThirdPayMixin from "./JfbThirdPayMixin";
26
+ import { getContainerPropsValue } from "@/utils/xd.base";
27
+ import componentsMixins from "@/mixins/componentsMixins";
28
+ import extsMixins from "@/mixins/extsMixins";
29
+ export default {
30
+ name: "JfbThirdPay",
31
+ components: {
32
+ XdFontIcon
33
+ },
34
+ mixins: [
35
+ componentsMixins, extsMixins, JfbThirdPayMixin
36
+ ],
37
+ data() {
38
+ return {
39
+
40
+ //todo
41
+ }
42
+ },
43
+ watch: {
44
+ container(value, oloValue) {
45
+ if (JSON.stringify(value) === JSON.stringify(oloValue)) return;
46
+ this.init(value)
47
+ }
48
+ },
49
+ created() {
50
+ this.init(this.container);
51
+
52
+ //todo
53
+ },
54
+ methods: {
55
+ onJfbLoad(options) {
56
+
57
+ // jfbRootExec('baiduUserLogin', {
58
+
59
+ // vm: this,// data: {
60
+
61
+ // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
62
+
63
+ // }
64
+
65
+ // }).then().catch()
66
+ },
67
+ /**
68
+ * @description 监听事件变化
69
+ * @param container {object} 业务组件对象自己
70
+ */
71
+ init(container) {
72
+
73
+ //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
74
+
75
+ //this.height = getContainerPropsValue(container, 'content.height', 10);
76
+ },
77
+ onJfbScroll(options) {
78
+ console.log('event.onJfbScroll', options)
79
+ },
80
+ onJfbReachBottom(options) {
81
+ console.log('event.onJfbReachBottom', options)
82
+ },
83
+ onJfbShow(options) {
84
+ console.log('event.onJfbShow', options)
85
+ },
86
+ onJfbHide(options) {
87
+ console.log('event.onJfbHide', options)
88
+ },
89
+ onJfbBack(options) {
90
+ console.log('event.onJfbBack', options)
91
+ },
92
+ onJfbUpdate(...data) {
93
+ console.log('event.onJfbUpdate', data)
94
+ },
95
+ onJfbCustomEvent(options) {
96
+ console.log('event.onJfbReachBottom', options)
97
+ },
98
+ }
99
+ }
100
+
101
+ </script>
102
+
103
+ <style scoped lang="less">
104
+ @import "./JfbThirdPayLess.less";
105
+
106
+ .jfb-third-pay {
107
+ &__body{
108
+
109
+ }
110
+ }
111
+ </style>
@@ -0,0 +1,78 @@
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-third-pay {
16
+ box-sizing: border-box;
17
+ min-height: unit(100, rpx);
18
+
19
+ &__body{
20
+ position: relative;
21
+ overflow: hidden;
22
+ z-index: 2
23
+ }
24
+
25
+ &.editx,&:hover {
26
+ position: relative;
27
+ z-index: 3;
28
+ &::after{
29
+ border: 2rpx dashed blue;
30
+ content: " ";
31
+ position: absolute;
32
+ top:0;
33
+ left:0;
34
+ bottom:0;
35
+ right:0;
36
+ z-index: 4;
37
+ cursor: pointer;
38
+ }
39
+ }
40
+
41
+
42
+ &__edit {
43
+ cursor: pointer;
44
+ position: absolute;
45
+ right: unit(0, rpx);
46
+ top: unit(-52, rpx);
47
+ height: unit(50, rpx);
48
+ line-height: unit(50, rpx);
49
+ display: flex;
50
+ justify-content: center;
51
+ align-items: center;
52
+ background: rgba(0, 0, 0, .6);
53
+ border-radius: unit(10, rpx);
54
+ box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
55
+ color: #fff;
56
+ font-size: unit(22, rpx);
57
+
58
+ &-icon{
59
+ padding: 0 unit(20, rpx);
60
+ }
61
+
62
+ &.editx {
63
+ box-sizing: border-box;
64
+
65
+ }
66
+ }
67
+ }
68
+ //end
69
+
70
+
71
+ /**notPreview**/
72
+ .jfb-third-pay {
73
+ //&:before {
74
+ //content: " ";
75
+ //display: table;
76
+ //}
77
+ }
78
+ /**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-third-pay'
20
+ }
21
+ },
22
+ created() {
23
+
24
+ //@AttrDataCreated
25
+ this.Attr = this.$xdUniHelper.customClone(Attr);
26
+ //@EndAttrDataCreated
27
+
28
+
29
+ },
30
+ }
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+
5
+ getPayByIdFilmSquate:{},
6
+
7
+ updatePayFilmPaiqiDate:{},
8
+
9
+ removePayFilmAddress:{},
10
+
11
+ addPayFilmcart:{},
12
+
13
+ }