jufubao-base 1.0.8 → 1.0.10

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 (78) hide show
  1. package/commands.js +23 -0
  2. package/package.json +15 -13
  3. package/src/business/12121.png +0 -0
  4. package/src/business/base_download.png +0 -0
  5. package/src/business/base_icon_vip_3x.png +0 -0
  6. package/src/business/base_qr.png +0 -0
  7. package/src/components/JfbBaseBlock/Attr.js +44 -0
  8. package/src/components/JfbBaseBlock/JfbBaseBlock.vue +71 -0
  9. package/src/components/JfbBaseBlock/JfbBaseBlockLess.less +59 -0
  10. package/src/components/JfbBaseBlock/JfbBaseBlockMixin.js +174 -0
  11. package/src/components/JfbBaseCard/Api.js +34 -0
  12. package/src/components/{JfbBaseBottom → JfbBaseCard}/Attr.js +0 -0
  13. package/src/components/JfbBaseCard/JfbBaseCard.vue +456 -0
  14. package/src/components/JfbBaseCard/JfbBaseCardLess.less +57 -0
  15. package/src/components/JfbBaseCard/JfbBaseCardMixin.js +174 -0
  16. package/src/components/JfbBaseCardBind/Api.js +13 -0
  17. package/src/components/{JfbBaseNumber → JfbBaseCardBind}/Attr.js +0 -0
  18. package/src/components/JfbBaseCardBind/JfbBaseCardBind.vue +151 -0
  19. package/src/components/JfbBaseCardBind/JfbBaseCardBindLess.less +57 -0
  20. package/src/components/JfbBaseCardBind/JfbBaseCardBindMixin.js +174 -0
  21. package/src/components/JfbBaseCardDetail/Api.js +36 -0
  22. package/src/components/{JfbBaseTop → JfbBaseCardDetail}/Attr.js +0 -0
  23. package/src/components/JfbBaseCardDetail/JfbBaseCardDetail.vue +546 -0
  24. package/src/components/JfbBaseCardDetail/JfbBaseCardDetailLess.less +57 -0
  25. package/src/components/JfbBaseCardDetail/JfbBaseCardDetailMixin.js +174 -0
  26. package/src/components/JfbBaseCardInfo/Api.js +71 -0
  27. package/src/components/JfbBaseCardInfo/Attr.js +150 -0
  28. package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +263 -0
  29. package/src/components/JfbBaseCardInfo/JfbBaseCardInfoLess.less +57 -0
  30. package/src/components/JfbBaseCardInfo/JfbBaseCardInfoMixin.js +174 -0
  31. package/src/components/{JfbBaseNumber → JfbBaseCardMy}/Api.js +0 -0
  32. package/src/components/JfbBaseCardMy/Attr.js +150 -0
  33. package/src/components/JfbBaseCardMy/JfbBaseCardMy.vue +220 -0
  34. package/src/components/JfbBaseCardMy/JfbBaseCardMyLess.less +57 -0
  35. package/src/components/JfbBaseCardMy/JfbBaseCardMyMixin.js +174 -0
  36. package/src/components/JfbBaseCardShift/Api.js +25 -0
  37. package/src/components/JfbBaseCardShift/Attr.js +150 -0
  38. package/src/components/JfbBaseCardShift/JfbBaseCardShift.vue +254 -0
  39. package/src/components/JfbBaseCardShift/JfbBaseCardShiftLess.less +57 -0
  40. package/src/components/JfbBaseCardShift/JfbBaseCardShiftMixin.js +174 -0
  41. package/src/components/JfbBaseLine/Attr.js +59 -0
  42. package/src/components/JfbBaseLine/JfbBaseLine.vue +102 -0
  43. package/src/components/JfbBaseLine/JfbBaseLineLess.less +57 -0
  44. package/src/components/JfbBaseLine/JfbBaseLineMixin.js +174 -0
  45. package/src/components/JfbBaseLogin/Api.js +124 -0
  46. package/src/components/JfbBaseLogin/Attr.js +21 -0
  47. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +540 -0
  48. package/src/components/JfbBaseLogin/JfbBaseLoginLess.less +57 -0
  49. package/src/components/JfbBaseLogin/JfbBaseLoginMixin.js +174 -0
  50. package/src/components/{JfbBaseUnit → JfbBaseSetPwd}/Api.js +25 -3
  51. package/src/components/JfbBaseSetPwd/Attr.js +150 -0
  52. package/src/components/JfbBaseSetPwd/JfbBaseSetPwd.vue +207 -0
  53. package/src/components/JfbBaseSetPwd/JfbBaseSetPwdLess.less +57 -0
  54. package/src/components/JfbBaseSetPwd/JfbBaseSetPwdMixin.js +174 -0
  55. package/src/components/JfbBaseTestApi/Api.js +57 -0
  56. package/src/components/JfbBaseTestApi/Attr.js +45 -0
  57. package/src/components/JfbBaseTestApi/JfbBaseTestApi.vue +73 -0
  58. package/src/components/JfbBaseTestApi/JfbBaseTestApiLess.less +57 -0
  59. package/src/components/JfbBaseTestApi/JfbBaseTestApiMixin.js +174 -0
  60. package/src/components/JfbBaseTestBody/JfbBaseTestBody.vue +60 -0
  61. package/src/components/JfbBaseTestBody/JfbBaseTestBodyLess.less +57 -0
  62. package/src/components/JfbBaseTestBody/JfbBaseTestBodyMixin.js +166 -0
  63. package/src/components/JfbBaseTestBottom/JfbBaseTestBottom.vue +80 -0
  64. package/src/components/JfbBaseTestBottom/JfbBaseTestBottomLess.less +57 -0
  65. package/src/components/JfbBaseTestBottom/JfbBaseTestBottomMixin.js +166 -0
  66. package/src/components/JfbBaseTestTop/JfbBaseTestTop.vue +80 -0
  67. package/src/components/JfbBaseTestTop/JfbBaseTestTopLess.less +57 -0
  68. package/src/components/JfbBaseTestTop/JfbBaseTestTopMixin.js +166 -0
  69. package/src/components/JfbBaseBaidu/JfbBaseBaidu.vue +0 -110
  70. package/src/components/JfbBaseBaidu/JfbBaseBaiduMixin.js +0 -115
  71. package/src/components/JfbBaseBottom/JfbBaseBottom.vue +0 -110
  72. package/src/components/JfbBaseBottom/JfbBaseBottomMixin.js +0 -123
  73. package/src/components/JfbBaseNumber/JfbBaseNumber.vue +0 -110
  74. package/src/components/JfbBaseNumber/JfbBaseNumberMixin.js +0 -123
  75. package/src/components/JfbBaseTop/JfbBaseTop.vue +0 -110
  76. package/src/components/JfbBaseTop/JfbBaseTopMixin.js +0 -123
  77. package/src/components/JfbBaseUnit/JfbBaseUnit.vue +0 -110
  78. package/src/components/JfbBaseUnit/JfbBaseUnitMixin.js +0 -115
package/commands.js ADDED
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ const path = require('path');
4
+ const clog = require('./build/clog');
5
+ const fileHelper = require('./build/fileHepler');
6
+ const fromBuildPath = path.resolve('./node_modules/gxd-uni-commands/build');
7
+ const toBuildPath = path.resolve('./build');
8
+ const fromCommandsPath = path.resolve('./node_modules/gxd-uni-commands/commands');
9
+ const toCommandsPath = path.resolve('./commands');
10
+ const utils = require('./build/lib/utils');
11
+
12
+ const init = ()=>{
13
+ utils.logsLine(clog, 'start');
14
+ fileHelper.copySync(fromBuildPath, toBuildPath);
15
+ fileHelper.copySync(fromCommandsPath, toCommandsPath);
16
+ clog(`拷贝命令行操作成功,目录:${toBuildPath}`, 'green');
17
+ clog(`拷贝命令行操作成功,目录:${toCommandsPath}`, 'green');
18
+ utils.logsLine(clog);
19
+ };
20
+
21
+ init();
22
+
23
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -9,6 +9,13 @@
9
9
  "test": "cross-env type=test cross-env NODE_ENV=development UNI_PLATFORM=h5 npm run init.entry && npm run dev:h5",
10
10
  "dev": "cross-env type=test cross-env NODE_ENV=development UNI_PLATFORM=h5 npm run init.entry && npm run dev:h5",
11
11
  "build": "cross-env type=build cross-env NODE_ENV=production UNI_PLATFORM=h5 npm run init.entry && npm run build:h5",
12
+ "update": "node ./commands/update.pack.js",
13
+ "create": "node ./commands/create.pack.js",
14
+ "commands": "npm i && node ./commands.js",
15
+ "release": "node ./commands/npmignore && npm publish",
16
+ "upload.bus.static": "node ./build/commands/upload.business.static.js",
17
+ "init.entry": "node ./build/commands/entry.init.js",
18
+ "init": "node ./build/commands/copy.init.js",
12
19
  "dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
13
20
  "dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch --minimize",
14
21
  "dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
@@ -16,18 +23,11 @@
16
23
  "build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build --minimize",
17
24
  "build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
18
25
  "init.commands": "cp -rf ./node_modules/gxd-uni-commands/build ./",
19
- "init.entry": "node ./build/commands/entry.init.js",
20
- "init": "node ./build/commands/copy.init.js",
26
+ "init.editx": "node ./build/commands/editx.init.js",
21
27
  "copy": "cross-env isOpenDir=true node build/commands/copy.js",
22
28
  "oss": "cross-env bucket=xxx region=oss-cn-beijing name=基础项目 node ./build/commands/oss.js",
23
29
  "oss.dev": "cross-env bucket=dev-xxx region=oss-cn-qingdao name=基础项目 node ./build/commands/oss.js",
24
- "oss.test": "cross-env bucket=test-xxx region=oss-cn-qingdao name=基础项目 node ./build/commands/oss.js",
25
- "coder": "node ./build/commands/coder.js",
26
- "coder:page": "node ./build/commands/coder.page.js",
27
- "init.editx": "node ./build/commands/editx.init.js",
28
- "update.package": "node ./commands/update.pack.js",
29
- "publish.package": "node ./commands/npmignore && npm publish",
30
- "create.pack": "node ./commands/create.pack.js"
30
+ "oss.test": "cross-env bucket=test-xxx region=oss-cn-qingdao name=基础项目 node ./build/commands/oss.js"
31
31
  },
32
32
  "dependencies": {
33
33
  "@dcloudio/uni-app-plus": "2.0.1-33920220208001",
@@ -48,8 +48,8 @@
48
48
  "color": "^3.1.3",
49
49
  "core-js": "^2.6.5",
50
50
  "flyio": "^0.6.2",
51
- "gxd-uni-commands": "1.0.21",
52
- "gxd-uni-library": "1.0.22",
51
+ "gxd-uni-commands": "1.0.29",
52
+ "gxd-uni-library": "1.0.39",
53
53
  "jweixin-module": "^1.6.0",
54
54
  "md5": "^2.3.0",
55
55
  "qs": "^6.9.6",
@@ -105,7 +105,9 @@
105
105
  "art-template": "^4.13.2",
106
106
  "mockjs": "1.0.1-beta3",
107
107
  "vue-baidu-map": "^0.21.22",
108
- "copy-webpack-plugin": "5.1.2"
108
+ "copy-webpack-plugin": "5.1.2",
109
+ "copy-dir": "^1.3.0",
110
+ "md5": "^2.3.0"
109
111
  },
110
112
  "browserslist": [
111
113
  "Android >= 4",
Binary file
Binary file
Binary file
@@ -0,0 +1,44 @@
1
+ 'use strict';
2
+
3
+ export default {
4
+ style: [],
5
+ advanced: [],
6
+ content: [
7
+ {
8
+ label: '背景颜色:', //label
9
+ ele: 'xd-board-color', //package 名称
10
+ valueKey: 'bgcolor', //form[valueKey]
11
+ value: '', //v-model
12
+ placeholder: '请输入占位框背景颜色',
13
+ classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
14
+ rules: [
15
+ {
16
+ required: true,
17
+ message: '请输入占位框背景颜色',
18
+ trigger: 'blur'
19
+ },
20
+ ]
21
+ },
22
+ {
23
+ label: '高度:', //label
24
+ ele: 'el-input', //package 名称
25
+ type: 'number',
26
+ valueKey: 'height', //form[valueKey]
27
+ value: null, //v-model
28
+ placeholder: '请输入占位框高度,单位像素,默认:10px',
29
+ classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
30
+ rules: [
31
+ {
32
+ required: true,
33
+ message: '请输入占位框高度',
34
+ trigger: 'blur'
35
+ },
36
+ ]
37
+ },
38
+ {
39
+ label: '', //label
40
+ ele: 'slot', //package 名称
41
+ slot: 'is_reference',
42
+ },
43
+ ],
44
+ };
@@ -0,0 +1,71 @@
1
+ <template>
2
+ <view
3
+ class="jfb-base-block"
4
+ @click="handleSelect"
5
+ :class="{ editx : isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-base-block__edit"
10
+ :class="{ editx : isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-base-block__edit-icon" @click="delEdit">删除</view>
14
+ </view>
15
+ <!-- #endif -->
16
+ <view class="jfb-base-block__body">
17
+ <view :style="{height: height * 2 + 'rpx', background: bgcolor}"></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 JfbBaseBlockMixin from "./JfbBaseBlockMixin";
26
+ import {getContainerPropsValue} from "@/utils/xd.base";
27
+
28
+ export default {
29
+ name: "JfbBaseBlock",
30
+ components: {
31
+ XdFontIcon
32
+ },
33
+ mixins: [
34
+ JfbBaseBlockMixin
35
+ ],
36
+ data() {
37
+ return {
38
+ height: 10,
39
+ bgcolor: '#fff'
40
+ }
41
+ },
42
+ watch: {
43
+ container(value) {
44
+ this.init(value)
45
+ }
46
+ },
47
+ created() {
48
+ this.init(this.container);
49
+ },
50
+ methods: {
51
+ init(value) {
52
+ let bgcolor = getContainerPropsValue(value, 'content.bgcolor');
53
+ let height = getContainerPropsValue(value, 'content.height');
54
+ if (bgcolor) this.bgcolor = bgcolor;
55
+ if (height) this.height = height;
56
+ },
57
+ }
58
+ }
59
+
60
+ </script>
61
+
62
+ <style scoped lang="less">
63
+ @import "./JfbBaseBlockLess.less";
64
+
65
+ .jfb-base-block {
66
+
67
+ &__body{
68
+
69
+ }
70
+ }
71
+ </style>
@@ -0,0 +1,59 @@
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
+ .getBusinessImageUrl('base_qr.png');
15
+
16
+ //start
17
+ .jfb-base-block {
18
+ border: 1px dashed rgba(0, 0, 0, 0);
19
+ box-sizing: border-box;
20
+
21
+ &.editx {
22
+ position: relative;
23
+ border: 1px dashed blue;
24
+ box-sizing: border-box;
25
+
26
+ }
27
+
28
+ &:hover {
29
+ border: 1px dashed blue;
30
+ }
31
+
32
+
33
+ &__edit {
34
+ cursor: pointer;
35
+ position: absolute;
36
+ right: unit(0, rpx);
37
+ top: unit(-52, rpx);
38
+ height: unit(50, rpx);
39
+ line-height: unit(50, rpx);
40
+ display: flex;
41
+ justify-content: center;
42
+ align-items: center;
43
+ background: rgba(0, 0, 0, .6);
44
+ border-radius: unit(10, rpx);
45
+ box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
46
+ color: #fff;
47
+ font-size: unit(22, rpx);
48
+
49
+ &-icon{
50
+ padding: 0 unit(20, rpx);
51
+ }
52
+
53
+ &.editx {
54
+ box-sizing: border-box;
55
+
56
+ }
57
+ }
58
+ }
59
+ //end
@@ -0,0 +1,174 @@
1
+ 'use strict';
2
+
3
+ //@AttrImport
4
+ import Attr from "./Attr";
5
+ //@EndAttrImport
6
+
7
+ import {getContainerPropsValue} from "@/utils/xd.base";
8
+ export default {
9
+ props: {
10
+ /**
11
+ * @description 插件在页面中到唯一ID
12
+ */
13
+ cid:{
14
+ type: null|String|Number,
15
+ default: null,
16
+ },
17
+ /**
18
+ * @description 业务插件相关数据集合
19
+ */
20
+ container:{
21
+ type: Object,
22
+ default() {
23
+ return {}
24
+ }
25
+ },
26
+ /**
27
+ * @description 页面框架属性
28
+ */
29
+ layoutInfo: {
30
+ type: Object,
31
+ default() {
32
+ return {}
33
+ }
34
+ },
35
+ /**
36
+ * @description 页面属性
37
+ */
38
+ pageAttr: {
39
+ type: Object,
40
+ default() {
41
+ return {}
42
+ }
43
+ },
44
+ /**
45
+ * @description 业务插件元素属性(插件管理时候填写属性)
46
+ */
47
+ componentAttr: {
48
+ type: Object|Array,
49
+ default() {
50
+ return {}
51
+ }
52
+ },
53
+ /**
54
+ * @description 业务插件所属插件库属性(业务插件库)
55
+ */
56
+ appAttr: {
57
+ type: Object|Array,
58
+ default() {
59
+ return {}
60
+ }
61
+ },
62
+ /**
63
+ * @description 项目配置
64
+ */
65
+ settings: {
66
+ type: Object,
67
+ default() {
68
+ return {}
69
+ }
70
+ },
71
+ /**
72
+ * @description 业务插件库所用风格属性
73
+ */
74
+ styles: {
75
+ type: Object || null,
76
+ default() {
77
+ return {}
78
+ }
79
+ }
80
+ },
81
+ data() {
82
+ return {
83
+ containerId: null, //容器ID
84
+ //#ifdef H5
85
+
86
+ //@AttrData
87
+ Attr, //对外开发编辑属性
88
+ //@EndAttrData
89
+
90
+ active: false, //是否选择当前状态
91
+ isEditx: true, //当前为Editx模式
92
+ edit: false, //是否开启编辑模式
93
+ // #endif
94
+ }
95
+ },
96
+ created() {
97
+ //设置插件cid
98
+ if (this.cid) {
99
+ this.containerId = this.cid;
100
+ } else {
101
+ this.containerId = this.$xdUniHelper.randomChar(20);
102
+ }
103
+
104
+ //#ifdef H5
105
+ //监听用户点击状态显示虚框
106
+ XdBus.addEvent('select', ({containerId}) => {
107
+ this.active = containerId === this.containerId;
108
+ });
109
+
110
+ //业务面板选中插件操作
111
+ XdBus.addEvent('onBoardSelect', ({containerId}) => {
112
+ if (containerId === this.containerId) {
113
+ this.handleSelect()
114
+ }
115
+ });
116
+ // #endif
117
+ },
118
+ methods: {
119
+
120
+ /**
121
+ * 检查插件是否加载成功
122
+ */
123
+ onCheck() {
124
+ },
125
+
126
+ //#ifdef H5
127
+ /**
128
+ * @description 点击删除操作按钮
129
+ */
130
+ delEdit(){
131
+ XdBus.send('onDelPackage', {
132
+ containerId: this.containerId,
133
+ componentAtrr: this.componentAtrr,
134
+ cid: this.cid,
135
+ container: this.container
136
+ })
137
+ },
138
+ //#endif
139
+
140
+ /**
141
+ * @description 点击选择插件显示边框
142
+ */
143
+ handleSelect() {
144
+ //#ifdef H5
145
+ if (this.active) return;
146
+ this.active = true;
147
+ let AttrObj = this.$xdUniHelper.checkVarType(Attr) === 'object' ?
148
+ Attr: { style: [], advanced: [], content: []};
149
+ console.log('handleSelect.Attr', AttrObj);
150
+
151
+ //设置已绑定数据
152
+ Object.keys(AttrObj).map(type=>{
153
+ AttrObj[type].map(item=>{
154
+ item.value = getContainerPropsValue(this.container, `${type}.${item.valueKey}`, item.value);
155
+ })
156
+ });
157
+
158
+ //发送点击组件事件
159
+ XdBus.send('onSelectPackage', {
160
+ containerId: this.containerId,
161
+ Attr: AttrObj,
162
+ container: this.container
163
+ });
164
+
165
+ //绑定选中插件事件
166
+ XdBus.message('select', {
167
+ containerId: this.containerId,
168
+ })
169
+ //#endif
170
+ },
171
+
172
+
173
+ }
174
+ }
@@ -0,0 +1,34 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description API模型
5
+ * 建议:Ffff=>模块 Xxxx=>自定义名字
6
+ * 获取单记录(getByIdFfffXxxx)
7
+ * 获取列表记录(getByListFfffXxxx)
8
+ * 添加列表记录(addFfffXxxxx)
9
+ * 删除列表记录(removeFfffXxxxx|deleteFfffXxxx)
10
+ * 更新列表记录(updateFfffXxxxx)
11
+ * @type {*[]}
12
+ */
13
+ module.exports = [
14
+ {
15
+ mapFnName: 'getListCardBind', //自定义方法名字(必选)
16
+ isRule: false,
17
+ title: '获得绑定卡',
18
+ prefix: 'list',
19
+ path: '/card/v1/card-bind/list-bind-card',
20
+ params: {},
21
+ disabled: true,
22
+ },
23
+ {
24
+ mapFnName: 'loginCardBind', //自定义方法名字(必选)
25
+ isRule: false,
26
+ title: '登录卡',
27
+ prefix: 'login',
28
+ path: '/card/v1/card-bind/login-card',
29
+ data: {
30
+ card_number: ['卡号', 'String', '必选'],
31
+ },
32
+ disabled: true,
33
+ },
34
+ ];