jufubao-base 1.0.19 → 1.0.21

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 (39) hide show
  1. package/package.json +2 -1
  2. package/src/components/JfbBaseAfterOrderList/Api.js +60 -0
  3. package/src/components/JfbBaseAfterOrderList/Attr.js +154 -0
  4. package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderList.vue +203 -0
  5. package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderListLess.less +57 -0
  6. package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderListMixin.js +222 -0
  7. package/src/components/JfbBaseBlock/JfbBaseBlock.vue +20 -0
  8. package/src/components/JfbBaseBlock/JfbBaseBlockMixin.js +42 -4
  9. package/src/components/JfbBaseCard/JfbBaseCardMixin.js +42 -4
  10. package/src/components/JfbBaseCardBind/JfbBaseCardBindMixin.js +42 -4
  11. package/src/components/JfbBaseCardDetail/JfbBaseCardDetailMixin.js +42 -4
  12. package/src/components/JfbBaseCardInfo/JfbBaseCardInfoMixin.js +42 -4
  13. package/src/components/JfbBaseCardMy/JfbBaseCardMyMixin.js +42 -4
  14. package/src/components/JfbBaseCardShift/JfbBaseCardShiftMixin.js +42 -4
  15. package/src/components/JfbBaseFooter/Attr.js +82 -0
  16. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +111 -40
  17. package/src/components/JfbBaseFooter/JfbBaseFooterMixin.js +49 -3
  18. package/src/components/JfbBaseLine/JfbBaseLineMixin.js +42 -4
  19. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +172 -51
  20. package/src/components/JfbBaseLogin/JfbBaseLoginMixin.js +42 -4
  21. package/src/components/JfbBaseMy/Api.js +60 -0
  22. package/src/components/JfbBaseMy/Attr.js +54 -0
  23. package/src/components/JfbBaseMy/JfbBaseMy.vue +262 -0
  24. package/src/components/JfbBaseMy/JfbBaseMyLess.less +57 -0
  25. package/src/components/JfbBaseMy/JfbBaseMyMixin.js +222 -0
  26. package/src/components/JfbBaseOrderList/Api.js +60 -0
  27. package/src/components/JfbBaseOrderList/Attr.js +154 -0
  28. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +285 -0
  29. package/src/components/JfbBaseOrderList/JfbBaseOrderListLess.less +57 -0
  30. package/src/components/JfbBaseOrderList/JfbBaseOrderListMixin.js +222 -0
  31. package/src/components/JfbBaseSetPwd/JfbBaseSetPwdMixin.js +42 -4
  32. package/src/components/JfbBaseSuccess/Attr.js +68 -0
  33. package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +327 -0
  34. package/src/components/JfbBaseSuccess/JfbBaseSuccessLess.less +57 -0
  35. package/src/components/JfbBaseSuccess/JfbBaseSuccessMixin.js +222 -0
  36. package/src/components/JfbBaseTestApi/JfbBaseTestApiMixin.js +42 -4
  37. package/src/components/JfbBaseTestBody/JfbBaseTestBodyMixin.js +37 -3
  38. package/src/components/JfbBaseTestBottom/JfbBaseTestBottomMixin.js +37 -3
  39. package/src/components/JfbBaseTestTop/JfbBaseTestTopMixin.js +37 -3
@@ -0,0 +1,262 @@
1
+ <template>
2
+ <view
3
+ class="jfb-base-my"
4
+ @click="handleSelect"
5
+ :class="{ editx : isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-base-my__edit"
10
+ :class="{ editx : isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-base-my__edit-icon" @click="delEdit">删除</view>
14
+ </view>
15
+ <!-- #endif -->
16
+ <view class="jfb-base-my__body">
17
+ <view>
18
+ <view class="jfb-base-my__body-header">
19
+ <image src="https://img.js.design/assets/smartFill/img316164da746310.jpg"></image>
20
+ <view>黑白灰</view>
21
+ </view>
22
+ <view class="jfb-base-my__body-add">
23
+ <view>我的票券</view>
24
+ <view :style="{borderColor:$mainColor,color:$mainColor}" @click="handleToLink('/pages/card/card')">添加票券</view>
25
+ </view>
26
+ <view class="jfb-base-my__body-card">
27
+ <view class="jfb-base-my__body-card-num">
28
+ <view>可用票券:1</view>
29
+ <view @click="handleToLink('/pages/setpwd/setpwd')">设置支付密码
30
+ <xd-font-icon size="24" icon="iconxiangyou_xian"></xd-font-icon>
31
+ </view>
32
+ </view>
33
+ <view :style="{borderColor:$mainColor,color:$mainColor}" @click="handleToLink('/pages/card/card')">进入我的票券</view>
34
+ </view>
35
+ <view class="jfb-base-my__body-add">
36
+ <view>我的订单</view>
37
+ <view :style="{borderColor:$mainColor,color:$mainColor}">售后订单</view>
38
+ </view>
39
+ <view class="jfb-base-my__body-order">
40
+ <view class="jfb-base-my__body-order-type">
41
+ <view class="jfb-base-my__body-order-type-item">
42
+ <xd-font-icon
43
+ icon="iconfuwuxieyi_mian"
44
+ :style="{color: $mainColor}"
45
+ size="50"
46
+ ></xd-font-icon>
47
+ <view style="margin-top: 18rpx">全部</view>
48
+ <view :style="{backgroundColor: $mainColor}" class="jfb-base-my__body-order-type-item-number">2</view>
49
+ </view>
50
+ <view class="jfb-base-my__body-order-type-item">
51
+ <xd-font-icon
52
+ :style="{color: $mainColor}"
53
+ icon="iconfuwuxieyi_mian"
54
+ size="50"
55
+ ></xd-font-icon>
56
+ <view style="margin-top: 18rpx">全部</view>
57
+ </view>
58
+ <view class="jfb-base-my__body-order-type-item">
59
+ <xd-font-icon
60
+ :style="{color: $mainColor}"
61
+ icon="iconfuwuxieyi_mian"
62
+ size="50"
63
+ ></xd-font-icon>
64
+ <view style="margin-top: 18rpx">全部</view>
65
+ </view>
66
+ </view>
67
+ </view>
68
+ </view>
69
+
70
+ </view>
71
+ </view>
72
+ </template>
73
+
74
+ <script>
75
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
76
+ import {jfbRootExec} from "@/utils/xd.event";
77
+ import JfbBaseMyMixin from "./JfbBaseMyMixin";
78
+ import {getContainerPropsValue} from "@/utils/xd.base";
79
+
80
+ export default {
81
+ name: "JfbBaseMy",
82
+ components: {
83
+ XdFontIcon
84
+ },
85
+ mixins: [
86
+ JfbBaseMyMixin
87
+ ],
88
+ data() {
89
+ return {
90
+ orderTypeList: []
91
+ //todo
92
+ }
93
+ },
94
+ watch: {
95
+ container(value) {
96
+ this.init(value)
97
+ }
98
+ },
99
+ created() {
100
+ this.init(this.container);
101
+
102
+ //todo
103
+ },
104
+ methods: {
105
+ onJfbLoad(options) {
106
+
107
+ // jfbRootExec('baiduUserLogin', {
108
+
109
+ // vm: this,// data: {
110
+
111
+ // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
112
+
113
+ // }
114
+
115
+ // }).then().catch()
116
+ },
117
+ /**
118
+ * @description 监听事件变化
119
+ * @param container {object} 业务组件对象自己
120
+ */
121
+ init(value) {
122
+
123
+ this.orderTypeList = getContainerPropsValue(value, 'content.orderTypeList');
124
+
125
+ //this.height = getContainerPropsValue(value, 'content.height', 10);
126
+ },
127
+ handleToLink(path) {
128
+ this.$xdUniHelper.navigateTo({
129
+ url: path
130
+ })
131
+ },
132
+ onJfbScroll(options) {
133
+ console.log('event.onJfbScroll', options)
134
+ },
135
+ onJfbReachBottom(options) {
136
+ console.log('event.onJfbReachBottom', options)
137
+ },
138
+ onJfbShow(options) {
139
+ console.log('event.onJfbShow', options)
140
+ },
141
+ onJfbHide(options) {
142
+ console.log('event.onJfbHide', options)
143
+ },
144
+ onJfbBack(options) {
145
+ console.log('event.onJfbBack', options)
146
+ },
147
+ }
148
+ }
149
+
150
+ </script>
151
+
152
+ <style scoped lang="less">
153
+ @import "./JfbBaseMyLess.less";
154
+
155
+ .jfb-base-my {
156
+ border: 1px dashed rgba(0, 0, 0, 0);
157
+ box-sizing: border-box;
158
+
159
+ &__body {
160
+ &-header {
161
+ padding: unit(40, rpx);
162
+ display: flex;
163
+ align-items: center;
164
+
165
+ & > image {
166
+ width: unit(140, rpx);
167
+ height: unit(140, rpx);
168
+ margin-right: unit(30, rpx);
169
+ border-radius: 50%;
170
+ }
171
+
172
+ view {
173
+ color: #383838;
174
+ font-size: unit(40, rpx);
175
+ }
176
+ }
177
+
178
+ &-add {
179
+ display: flex;
180
+ justify-content: space-between;
181
+ align-items: center;
182
+ font-size: unit(28, rpx);
183
+ padding: unit(40, rpx);
184
+
185
+ & > view:nth-child(2) {
186
+ width: unit(200, rpx);
187
+ height: unit(60, rpx);
188
+ line-height: unit(60, rpx);
189
+ border-radius: unit(30, rpx);
190
+ border: 1px solid #FF5733;
191
+ color: #FF5733;
192
+ text-align: center;
193
+ }
194
+ }
195
+
196
+ &-card {
197
+ border-radius: unit(20, rpx);
198
+ border: 1px solid #EEEEEE;
199
+ padding: unit(40, rpx);
200
+ margin: 0 unit(20, rpx);
201
+
202
+ &-num {
203
+ display: flex;
204
+ align-items: center;
205
+ justify-content: space-between;
206
+ font-size: unit(28, rpx);
207
+
208
+ & > view:nth-child(1) {
209
+ color: #808080;
210
+ }
211
+
212
+ & > view:nth-child(2) {
213
+ color: #808080;
214
+ display: flex;
215
+ align-items: center;
216
+ }
217
+ }
218
+
219
+ & > view:nth-child(2) {
220
+ width: unit(620, rpx);
221
+ height: unit(80, rpx);
222
+ line-height: unit(80, rpx);
223
+ border-radius: unit(100, rpx);
224
+ background: #FFE5E0;
225
+ color: #FE7A63;
226
+ font-size: unit(24, rpx);
227
+ text-align: center;
228
+ margin-top: unit(30, rpx);
229
+ }
230
+ }
231
+
232
+ &-order {
233
+
234
+ &-type {
235
+ display: flex;
236
+ justify-content: space-between;
237
+ align-items: center;
238
+ border-radius: unit(20, rpx);
239
+ border: 1px solid #EEEEEE;
240
+ padding: unit(40, rpx);
241
+ margin: 0 unit(20, rpx);
242
+
243
+ &-item {
244
+ font-size: unit(24, rpx);
245
+ color: #999999;
246
+ position: relative;
247
+
248
+ &-number {
249
+ position: absolute;
250
+ top: unit(-20, rpx);
251
+ right: unit(-28, rpx);
252
+ font-size: unit(28, rpx);
253
+ padding: unit(2, rpx) unit(16, rpx) unit(2, rpx) unit(16, rpx);
254
+ border-radius: unit(20, rpx);
255
+ color: #fff;
256
+ }
257
+ }
258
+ }
259
+ }
260
+ }
261
+ }
262
+ </style>
@@ -0,0 +1,57 @@
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-my {
16
+ border: 1px dashed rgba(0, 0, 0, 0);
17
+ box-sizing: border-box;
18
+
19
+ &.editx {
20
+ position: relative;
21
+ border: 1px dashed blue;
22
+ box-sizing: border-box;
23
+
24
+ }
25
+
26
+ &:hover {
27
+ border: 1px dashed blue;
28
+ }
29
+
30
+
31
+ &__edit {
32
+ cursor: pointer;
33
+ position: absolute;
34
+ right: unit(0, rpx);
35
+ top: unit(-52, rpx);
36
+ height: unit(50, rpx);
37
+ line-height: unit(50, rpx);
38
+ display: flex;
39
+ justify-content: center;
40
+ align-items: center;
41
+ background: rgba(0, 0, 0, .6);
42
+ border-radius: unit(10, rpx);
43
+ box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
44
+ color: #fff;
45
+ font-size: unit(22, rpx);
46
+
47
+ &-icon{
48
+ padding: 0 unit(20, rpx);
49
+ }
50
+
51
+ &.editx {
52
+ box-sizing: border-box;
53
+
54
+ }
55
+ }
56
+ }
57
+ //end
@@ -0,0 +1,222 @@
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
+ * @description 项目配置文件
82
+ */
83
+ projectAttr: {
84
+ type: Object || null,
85
+ default() {
86
+ return {}
87
+ }
88
+ }
89
+ },
90
+ data() {
91
+ return {
92
+ containerId: null, //容器ID
93
+ //#ifdef H5
94
+
95
+ //@AttrData
96
+ Attr:{}, //对外开发编辑属性
97
+ //@EndAttrData
98
+
99
+ active: false, //是否选择当前状态
100
+ isEditx: true, //当前为Editx模式
101
+ edit: false, //是否开启编辑模式
102
+ // #endif
103
+
104
+ //风格键
105
+ mainColor: '',
106
+ successColor: '',
107
+ warningColor: '',
108
+ subMainColor: '',
109
+ infoColor: '',
110
+ defaultColor: '',
111
+ dangerColor: ''
112
+ }
113
+ },
114
+ created() {
115
+
116
+ //@AttrDataCreated
117
+ this.Attr = this.$xdUniHelper.customClone(Attr);
118
+ //@EndAttrDataCreated
119
+
120
+
121
+ //设置插件cid
122
+ if (this.cid) {
123
+ this.containerId = this.cid;
124
+ } else {
125
+ this.containerId = this.$xdUniHelper.randomChar(20);
126
+ }
127
+
128
+ //初始化风格
129
+ this.initThemesToData();
130
+
131
+ //#ifdef H5
132
+ //监听用户点击状态显示虚框
133
+ XdBus.addEvent('select', ({containerId}) => {
134
+ this.active = containerId === this.containerId;
135
+ });
136
+
137
+ //业务面板选中插件操作
138
+ XdBus.addEvent('onBoardSelect', ({containerId}) => {
139
+ if (containerId === this.containerId) {
140
+ this.handleSelect()
141
+ }
142
+ });
143
+ // #endif
144
+ },
145
+ methods: {
146
+
147
+ /**
148
+ * 检查插件是否加载成功
149
+ */
150
+ onCheck() {
151
+ },
152
+
153
+ /***
154
+ * @description 业务组件风格map到data中
155
+ */
156
+ initThemesToData() {
157
+ Object.keys(this.styles).map(key => {
158
+ let k = key.replace('$', '');
159
+ if (this[k] !== undefined) this[k] = this.styles[key];
160
+ });
161
+ console.log('initThemesToData',this)
162
+ },
163
+
164
+ /**
165
+ * @description 其子级插件获取当前插件的业务组件风格列表
166
+ * @returns {*}
167
+ */
168
+ getParentThemes(){
169
+ return this.styles;
170
+ },
171
+
172
+
173
+ //#ifdef H5
174
+ /**
175
+ * @description 点击删除操作按钮
176
+ */
177
+ delEdit(){
178
+ XdBus.send('onDelPackage', {
179
+ containerId: this.containerId,
180
+ componentAtrr: this.componentAtrr,
181
+ cid: this.cid,
182
+ container: this.container
183
+ })
184
+ },
185
+ //#endif
186
+
187
+ /**
188
+ * @description 点击选择插件显示边框
189
+ */
190
+ handleSelect() {
191
+ //#ifdef H5
192
+ if (this.active) return;
193
+ this.active = true;
194
+ let AttrObj = this.$xdUniHelper.checkVarType(this.Attr) === 'object' ?
195
+ this.Attr : { style: [], advanced: [], content: []};
196
+ console.log('handleSelect.Attr', AttrObj);
197
+
198
+ //设置已绑定数据
199
+ Object.keys(AttrObj).map(type=>{
200
+ AttrObj[type].map(item=>{
201
+ if(item.value !== undefined) item.value = getContainerPropsValue(this.container, `${type}.${item.valueKey}`, item.value);
202
+ if(item.defaultValue !== undefined) item.defaultValue = getContainerPropsValue(this.container, `${type}.${item.valueKey}`, item.value);
203
+ })
204
+ });
205
+
206
+ //发送点击组件事件
207
+ XdBus.send('onSelectPackage', {
208
+ containerId: this.containerId,
209
+ Attr: AttrObj,
210
+ container: this.$xdUniHelper.cloneDeep(this.container)
211
+ });
212
+
213
+ //绑定选中插件事件
214
+ XdBus.message('select', {
215
+ containerId: this.containerId,
216
+ })
217
+ //#endif
218
+ },
219
+
220
+
221
+ }
222
+ }
@@ -0,0 +1,60 @@
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: 'getByIdFilmSquate', //自定义方法名字(必选)
16
+ title: '获取电影广场列表',
17
+ path: '/api/account/film/list-film-square',
18
+ isRule: false,
19
+ params: {
20
+ last_key: ['当前页', 'Number', '必选'],
21
+ page_size: ['每页数量', 'Number', '必选'],
22
+ },
23
+ isConsole: true,
24
+ disabled: true,
25
+ },
26
+ {
27
+ mapFnName: 'updateFilmPaiqiDate', //自定义方法名字(必选)
28
+ title: '更新排期',
29
+ path: '/api/account/film/paiqi-date',
30
+ isRule: false,
31
+ params: {
32
+ film_id: ['电影id', 'Number', '必选'],
33
+ cinema_id: ['影院id', 'Number', '必选'],
34
+ },
35
+ isConsole: true,
36
+ disabled: true,
37
+ },
38
+ {
39
+ mapFnName: 'removeFilmAddress', //自定义方法名字(必选)
40
+ title: '删除我的配送地址',
41
+ path: '/api/account/film/paiqi-date',
42
+ isRule: false,
43
+ params: {
44
+ film_id: ['电影id', 'Number', '必选'],
45
+ },
46
+ isConsole: true,
47
+ disabled: true,
48
+ },
49
+ {
50
+ mapFnName: 'addFilmcart', //自定义方法名字(必选)
51
+ title: '添加购物车',
52
+ path: '/api/account/film/paiqi-date',
53
+ isRule: false,
54
+ params: {
55
+ film_id: ['电影id', 'Number', '必选'],
56
+ },
57
+ isConsole: true,
58
+ disabled: true,
59
+ },
60
+ ];