jufubao-base 1.0.287 → 1.0.289

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 (30) hide show
  1. package/get.package.path.js +2 -2
  2. package/package.json +1 -1
  3. package/src/components/JfbBaseCard/JfbBaseCard.vue +6 -0
  4. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +6 -0
  5. package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +6 -0
  6. package/src/components/JfbBaseCardV3/JfbBaseCardV3.vue +6 -0
  7. package/src/components/JfbBaseChangeCompany/Api.js +18 -0
  8. package/src/components/JfbBaseChangeCompany/Attr.js +18 -0
  9. package/src/components/JfbBaseChangeCompany/JfbBaseChangeCompany.vue +201 -0
  10. package/src/components/JfbBaseChangeCompany/JfbBaseChangeCompanyLess.less +79 -0
  11. package/src/components/JfbBaseChangeCompany/JfbBaseChangeCompanyMixin.js +30 -0
  12. package/src/components/JfbBaseChangeCompany/Mock.js +7 -0
  13. package/src/components/JfbBaseChangeCompany/cusAttr/advanced.js +24 -0
  14. package/src/components/JfbBaseChangeCompany/cusAttr/content.js +27 -0
  15. package/src/components/JfbBaseChangeCompany/cusAttr/style.js +127 -0
  16. package/src/components/JfbBaseChoseCompany/Api.js +33 -0
  17. package/src/components/JfbBaseChoseCompany/Attr.js +18 -0
  18. package/src/components/JfbBaseChoseCompany/JfbBaseChoseCompany.vue +350 -0
  19. package/src/components/JfbBaseChoseCompany/JfbBaseChoseCompanyLess.less +79 -0
  20. package/src/components/JfbBaseChoseCompany/JfbBaseChoseCompanyMixin.js +30 -0
  21. package/src/components/JfbBaseChoseCompany/Mock.js +9 -0
  22. package/src/components/JfbBaseChoseCompany/cusAttr/advanced.js +24 -0
  23. package/src/components/JfbBaseChoseCompany/cusAttr/content.js +69 -0
  24. package/src/components/JfbBaseChoseCompany/cusAttr/style.js +327 -0
  25. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +2 -3
  26. package/src/components/JfbBaseOrderList/Mock.js +1 -1
  27. package/src/components/JfbBaseWalletDetail/JfbBaseWalletDetail.vue +3 -0
  28. package/src/components/JfbBaseWalletEffective/JfbBaseWalletEffective.vue +3 -0
  29. package/src/components/JfbBaseWalletIndex/JfbBaseWalletIndex.vue +17 -7
  30. package/src/components/JfbBaseWalletItem/JfbBaseWalletItem.vue +6 -2
@@ -0,0 +1,350 @@
1
+ <template>
2
+ <view
3
+ class="jfb-base-chose-company"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx: isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-base-chose-company__edit"
10
+ :class="{ editx: isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-base-chose-company__edit-icon" @click="delEdit"
14
+ >删除</view
15
+ >
16
+ </view>
17
+ <!-- #endif -->
18
+ <view
19
+ class="jfb-base-chose-company__body"
20
+ :style="{ minHeight: layoutInfo.bodyMinHeightRpx + 'rpx' }"
21
+ >
22
+ <view :style="[contentPaddingCompStyle]">
23
+ <view class="jfb-base-chose-company__body-title"
24
+ >企业信息({{ companyList.length }}家)</view
25
+ >
26
+ <view class="jfb-base-chose-company__body-notice">{{ title }}</view>
27
+ <view :style="{ '--main-color': mainColor }">
28
+ <view
29
+ v-for="(item, index) in companyList"
30
+ :key="index"
31
+ @click="handleChoseCompany(item)"
32
+ :style="[listPaddingCompStyle]"
33
+ :class="[
34
+ 'jfb-base-chose-company__body-company',
35
+ item.is_select ? 'active' : '',
36
+ ]"
37
+ >
38
+ <view
39
+ v-if="item.is_select"
40
+ class="jfb-base-chose-company__body-company-active"
41
+ :style="{
42
+ background: mainColor,
43
+ borderRadius: `0 ${listRadius}rpx 0 30rpx`,
44
+ }"
45
+ >
46
+ <XdFontIcon
47
+ size="20"
48
+ icon="iconduigou-xian"
49
+ color="#fff"
50
+ ></XdFontIcon>
51
+ </view>
52
+ {{ item.company_name }}
53
+ </view></view
54
+ >
55
+ </view>
56
+ <view :style="[addCoMpStyle]" class="jfb-base-chose-company__body-add"
57
+ >{{ addTitle
58
+ }}<view @click="handleToAdd" :style="{color:mainColor}"
59
+ >去添加<XdFontIcon
60
+ size="28"
61
+ icon="iconxiangyou_xian"
62
+ ></XdFontIcon></view
63
+ ></view>
64
+ </view>
65
+ </view>
66
+ </template>
67
+
68
+ <script>
69
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
70
+ import { jfbRootExec } from "@/utils/xd.event";
71
+ import JfbBaseChoseCompanyMixin from "./JfbBaseChoseCompanyMixin";
72
+ import { getContainerPropsValue, gCPVal } from "@/utils/xd.base";
73
+ import componentsMixins from "@/mixins/componentsMixins";
74
+ import extsMixins from "@/mixins/extsMixins";
75
+ import { mapState } from "vuex";
76
+ export default {
77
+ name: "JfbBaseChoseCompany",
78
+ components: {
79
+ XdFontIcon,
80
+ },
81
+ mixins: [componentsMixins, extsMixins, JfbBaseChoseCompanyMixin],
82
+ data() {
83
+ return {
84
+ title: "",
85
+ addTitle: "",
86
+ contentPadding: {},
87
+ listPadding: {},
88
+ listRadius: "",
89
+ listSpacing: "",
90
+ listBorder: 0,
91
+ listShadow: "0 0 0 rgba(0,0,0,0)",
92
+ listFontStyle: {},
93
+ addBackground: "",
94
+ addFontStyle: {},
95
+ addCompanyPath: "",
96
+ companyList: [],
97
+ redirect_url: "",
98
+ };
99
+ },
100
+ watch: {
101
+ container(value, oldValue) {
102
+ if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
103
+ if (this.$configProject["isPreview"]) this.init(value);
104
+ },
105
+ },
106
+ computed: {
107
+ ...mapState(["brandInfo", "jfbAuthorize"]),
108
+ contentPaddingCompStyle() {
109
+ return {
110
+ padding: this.getMarginAndPadding(this.contentPadding, 0),
111
+ };
112
+ },
113
+ listPaddingCompStyle() {
114
+ return {
115
+ padding: this.getMarginAndPadding(this.listPadding, 0),
116
+ marginTop: this.listSpacing + "rpx",
117
+ borderRadius: this.listRadius + "rpx",
118
+ border: this.listBorder,
119
+ boxShadow: this.listShadow,
120
+ color: this.listFontStyle.color,
121
+ };
122
+ },
123
+ addCoMpStyle() {
124
+ return {
125
+ background: this.addBackground,
126
+ color: this.addFontStyle.color,
127
+ };
128
+ },
129
+ },
130
+ created() {
131
+ this.init(this.container);
132
+
133
+ //todo
134
+ },
135
+ methods: {
136
+ onJfbLoad(options) {
137
+ if (options.redirect_url) {
138
+ this.redirect_url = Base64.decode(options.redirect_url);
139
+ }
140
+ jfbRootExec("getChoseCompanyList", {
141
+ vm: this,
142
+ data: {},
143
+ }).then((res) => {
144
+ console.log(res, "resgetChoseCompanyList");
145
+ if (res.list.length === 0) {
146
+ this.handleToAdd();
147
+ return;
148
+ }
149
+ this.companyList = res.list;
150
+ });
151
+ },
152
+ /**
153
+ * @description 监听事件变化
154
+ * @param container {object} 业务组件对象自己
155
+ */
156
+ init(container) {
157
+ //content
158
+ this.title = gCPVal(
159
+ container,
160
+ "title",
161
+ "切换企业将进入对应企业搭建的平台,频道、商品、品牌等可能存在差异",
162
+ {
163
+ sKey: "titleStatus",
164
+ fields: ["title"],
165
+ }
166
+ );
167
+ this.addTitle = gCPVal(container, "addTitle", "无此企业?", {
168
+ sKey: "addTitleStatus",
169
+ fields: ["addTitle"],
170
+ });
171
+ //style
172
+ this.contentPadding = gCPVal(
173
+ container,
174
+ "contentPadding",
175
+ { top: 36, bottom: 0, left: 20, right: 20 },
176
+ {
177
+ sKey: "contentPaddingStatus",
178
+ isPMR: true,
179
+ fields: ["contentPadding"],
180
+ }
181
+ );
182
+ this.listPadding = gCPVal(
183
+ container,
184
+ "listPadding",
185
+ { top: 40, bottom: 40, left: 32, right: 32 },
186
+ {
187
+ sKey: "listPaddingStatus",
188
+ isPMR: true,
189
+ fields: ["listPadding"],
190
+ }
191
+ );
192
+ this.listSpacing = gCPVal(container, "listSpacing", "24", {
193
+ sKey: "listSpacingStatus",
194
+ fields: ["listSpacing"],
195
+ });
196
+ this.listRadius =
197
+ gCPVal(container, "listRadius", [8], {
198
+ sKey: "listRadiusStatus",
199
+ fields: ["listRadius"],
200
+ }) || 0;
201
+ this.listBorder = gCPVal(
202
+ container,
203
+ "listBorder",
204
+ [{ color: "#ccc", width: 2, style: "solid" }],
205
+ {
206
+ isBorder: true,
207
+ bsOld: ["is_border", "is_border_w", "is_border_c"],
208
+ }
209
+ );
210
+ this.listShadow = gCPVal(
211
+ container,
212
+ "listShadow",
213
+ [{ width: 0, color: "rgba(0,0,0,0)" }, "none"],
214
+ { isShadow: true, bsOld: ["is_shadow", "is_shadow_w", "is_shadow_bg"] }
215
+ );
216
+ this.listFontStyle = gCPVal(
217
+ container,
218
+ "listFontStyle",
219
+ [
220
+ {
221
+ color: "#333",
222
+ },
223
+ ],
224
+ {
225
+ sKey: "listFontStyleStatus",
226
+ fields: ["listFontStyle"],
227
+ isMerge: true,
228
+ }
229
+ );
230
+ this.addBackground = gCPVal(container, "addBackground", "#F8F8F8", {
231
+ sKey: "addBackgroundStatus",
232
+ fields: ["addBackground"],
233
+ });
234
+ this.addFontStyle = gCPVal(
235
+ container,
236
+ "addFontStyle",
237
+ [
238
+ {
239
+ color: "#999999",
240
+ },
241
+ ],
242
+ { sKey: "addFontStyleStatus", fields: ["addFontStyle"], isMerge: true }
243
+ );
244
+ //advanced
245
+ this.addCompanyPath = getContainerPropsValue(
246
+ container,
247
+ "content.addCompanyPath",
248
+ { value: "" }
249
+ ).value;
250
+ },
251
+ handleChoseCompany(item) {
252
+ jfbRootExec("switchChoseCompany", {
253
+ vm: this,
254
+ data: {
255
+ customer_id: item.company_id,
256
+ is_need_register_saas_user: item.is_need_register_saas_user,
257
+ company_source_from: item.company_source_from,
258
+ },
259
+ }).then((res) => {
260
+ //#ifdef MP-WEIXIN
261
+ if (this.jfbAuthorize !== null) {
262
+ this.jfbAuthorize.setAllToken(res);
263
+ }
264
+ //#endif
265
+
266
+ if (this.redirect_url) {
267
+ this.$xdUniHelper.redirectTo({
268
+ url: this.redirect_url,
269
+ });
270
+ } else {
271
+ this.$xdUniHelper.redirectTo({
272
+ url: this.settings.index,
273
+ });
274
+ }
275
+ });
276
+ },
277
+ handleToAdd() {
278
+ this.$xdUniHelper.navigateTo({
279
+ url: this.addCompanyPath,
280
+ });
281
+ },
282
+ onJfbScroll(options) {
283
+ console.log("event.onJfbScroll", options);
284
+ },
285
+ onJfbReachBottom(options) {
286
+ console.log("event.onJfbReachBottom", options);
287
+ },
288
+ onJfbShow(options) {
289
+ console.log("event.onJfbShow", options);
290
+ },
291
+ onJfbHide(options) {
292
+ console.log("event.onJfbHide", options);
293
+ },
294
+ onJfbBack(options) {
295
+ console.log("event.onJfbBack", options);
296
+ },
297
+ onJfbUpdate(...data) {
298
+ console.log("event.onJfbUpdate", data);
299
+ },
300
+ onJfbCustomEvent(options) {
301
+ console.log("event.onJfbReachBottom", options);
302
+ },
303
+ },
304
+ };
305
+ </script>
306
+
307
+ <style scoped lang="less">
308
+ @import "./JfbBaseChoseCompanyLess.less";
309
+
310
+ .jfb-base-chose-company {
311
+ &__body {
312
+ color: #333;
313
+ &-title {
314
+ font-weight: 500;
315
+ font-size: 36rpx;
316
+ }
317
+ &-notice {
318
+ color: #666666;
319
+ margin-top: 8rpx;
320
+ font-size: 28rpx;
321
+ }
322
+ &-company {
323
+ font-size: 32rpx;
324
+ font-weight: 500;
325
+ position: relative;
326
+ &-active {
327
+ position: absolute;
328
+ top: 0;
329
+ right: 0;
330
+ padding: 18rpx 16rpx;
331
+ }
332
+ }
333
+ &-add {
334
+ display: flex;
335
+ justify-content: center;
336
+ align-items: center;
337
+ padding: 24rpx 0;
338
+ margin-top: 360rpx;
339
+ font-size: 28rpx;
340
+ & > view {
341
+ display: flex;
342
+ align-items: center;
343
+ }
344
+ }
345
+ .active {
346
+ border-color: var(--main-color) !important;
347
+ }
348
+ }
349
+ }
350
+ </style>
@@ -0,0 +1,79 @@
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-chose-company {
16
+ box-sizing: border-box;
17
+
18
+ &__body{
19
+ position: relative;
20
+ overflow: hidden;
21
+ z-index: 2
22
+ }
23
+
24
+ &.editx,&.editx:hover {
25
+ position: relative;
26
+ min-height: unit(100, rpx);
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
+
43
+ &__edit {
44
+ cursor: pointer;
45
+ position: absolute;
46
+ right: unit(0, rpx);
47
+ top: unit(-52, rpx);
48
+ height: unit(50, rpx);
49
+ line-height: unit(50, rpx);
50
+ display: flex;
51
+ justify-content: center;
52
+ align-items: center;
53
+ background: rgba(0, 0, 0, .6);
54
+ border-radius: unit(10, rpx);
55
+ box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
56
+ color: #fff;
57
+ font-size: unit(22, rpx);
58
+
59
+ &-icon{
60
+ padding: 0 unit(20, rpx);
61
+ }
62
+
63
+ &.editx {
64
+ box-sizing: border-box;
65
+
66
+ }
67
+ }
68
+ }
69
+ //end
70
+
71
+
72
+ /**notPreview**/
73
+ .jfb-base-chose-company {
74
+ //&:before {
75
+ //content: " ";
76
+ //display: table;
77
+ //}
78
+ }
79
+ /**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-chose-company'
20
+ }
21
+ },
22
+ created() {
23
+
24
+ //@AttrDataCreated
25
+ this.Attr = this.$xdUniHelper.customClone(Attr);
26
+ //@EndAttrDataCreated
27
+
28
+
29
+ },
30
+ }
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+
5
+ getChoseCompanyList: { "list": [{ "company_id": "101683", "company_name": "广州向阳中学(测试)", "company_logo": "", "company_source_from": "S", "is_need_register_saas_user": false, "is_select": false }], "request_id": "748f6396ea2a1cac" },
6
+
7
+ switchChoseCompany: { "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIxNjEtMTc5MjhjYzM3Nzg4YmUwMiIsImlhdCI6MTc1Njc3NzEyOC4yMDQ4MDEsImV4cCI6MTc1Njc4NDMyOC4yMDQ4MDEsInVzZXJfaWQiOiI1MDAwMDM0IiwidXNlcl9zaWduIjoiMjYxN2Q2N2ExNDM5OTRlOWJjMjU1ODViMmI0OGFhMzciLCJ1c2VyX3NpZ25fZXhwaXJlIjoiMTc1Njc4NDM4OCIsImNsaWVudF9pcCI6IjEwMS43Mi4xODcuNzQiLCJwbGF0Zm9ybSI6InNhYXM6MTAxNjgzOjoiLCJjdXN0b21lcl9pZCI6IjEwMTY4MyJ9.jQVEYQZ9x6GiRMY0Jg0V6grg4x40UDQAd9-1VkGB9Eo", "csrf_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIxNjEtMTc5MjhjYzM3Nzg4YmUwMiIsImlhdCI6MTc1Njc3NzEyOC4yMDQ5OSwiZXhwIjoxNzU2Nzg0MzI4LjIwNDk5LCJjc3JmX3VzZXJfaWQiOjUwMDAwMzQsImNsaWVudF9pcCI6IjEwMS43Mi4xODcuNzQiLCJjdXN0b21lcl9pZCI6IjEwMTY4MyJ9.rJtEvKouJpDeJDmufoc5edn63Bmfx8ZIPXTmi09e6K0", "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIxNjEtMTc5MjhjYzM3Nzg4YmUwMiIsImlhdCI6MTc1Njc3NzEyOC4yMDQ5NTgsImV4cCI6MTc1ODA3MzEyOC4yMDQ5NTgsInJlZnJlc2hfdXNlcl9pZCI6NTAwMDAzNCwiY2xpZW50X2lwIjoiMTAxLjcyLjE4Ny43NCIsInBsYXRmb3JtIjoic2FhczoxMDE2ODM6OiIsImN1c3RvbWVyX2lkIjoiMTAxNjgzIn0.FkSrW7on6AnhgUMGF3rGwtpbe59OqOu-3jk2k0YC6_o", "access_token_expire_in": "7200", "csrf_token_expire_in": "7200", "refresh_token_expire_in": "1296000", "user_id": 5000034, "platform": "saas:101683::", "phone_number": "17703167945", "request_id": "39be2208ca0bba15" },
8
+
9
+ }
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+ import {
3
+ dataVal,
4
+ } from "@/utils/AttrTools";
5
+
6
+ export default (data, gValue, gColor, oldData) => {
7
+ return [
8
+ {
9
+ label: '添加企业',
10
+ ele: 'xd-select-pages-path',
11
+ labelInline: true,
12
+ valueKey: 'addCompanyPath',
13
+ placeholder: '请选择切换企业跳转地址',
14
+ value: dataVal({ data, key: 'addCompanyPath', dValue: null, gValue }),
15
+ groupKey: 'advanced',
16
+ className: 'input100',
17
+ setting: {
18
+ mode: 'new',
19
+ router: XdBus.getParentApi('getPagesTree'),
20
+ },
21
+ inline: false,
22
+ },
23
+ ]
24
+ }
@@ -0,0 +1,69 @@
1
+ 'use strict';
2
+ import {
3
+ dataVal,
4
+ statusDataVal,
5
+ statusShow
6
+ } from "@/utils/AttrTools";
7
+
8
+ export default (data, gValue, gColor, oldData) => {
9
+ return [
10
+ {
11
+ ele: 'title',
12
+ label: '基础',
13
+ size: 'small',
14
+ groupKey: 'content',
15
+ },
16
+ {
17
+ label: '选择企业',
18
+ ele: 'xd-radio',
19
+ groupKey: 'content',
20
+ valueKey: 'titleStatus',
21
+ value: statusDataVal({ data, key: 'titleStatus', fields: ['title'], gValue }),
22
+ labelInline: true,
23
+ list: [
24
+ { label: '默认', value: 'D' },
25
+ { label: '自定义', value: 'C' },
26
+ ]
27
+ },
28
+ { ele: 'group_start' },
29
+ {
30
+ label: '',
31
+ ele: 'el-input',
32
+ type: 'text',
33
+ valueKey: 'title',
34
+ labelInline: true,
35
+ value: dataVal({ data, key: 'title', dValue: '', gValue }),
36
+ hidden: !statusShow({ data, key: 'titleStatus', fields: ['title'], gValue }),
37
+ groupKey: 'content',
38
+ placeholder: '请输入提示内容',
39
+ className: 'input80',
40
+ },
41
+ { ele: 'group_end' },
42
+ {
43
+ label: '添加企业',
44
+ ele: 'xd-radio',
45
+ groupKey: 'content',
46
+ valueKey: 'addTitleStatus',
47
+ value: statusDataVal({ data, key: 'addTitleStatus', fields: ['addTitle'], gValue }),
48
+ labelInline: true,
49
+ list: [
50
+ { label: '默认', value: 'D' },
51
+ { label: '自定义', value: 'C' },
52
+ ]
53
+ },
54
+ { ele: 'group_start' },
55
+ {
56
+ label: '',
57
+ ele: 'el-input',
58
+ type: 'text',
59
+ valueKey: 'addTitle',
60
+ labelInline: true,
61
+ value: dataVal({ data, key: 'addTitle', dValue: '', gValue }),
62
+ hidden: !statusShow({ data, key: 'addTitleStatus', fields: ['addTitle'], gValue }),
63
+ groupKey: 'content',
64
+ placeholder: '请输入提示内容',
65
+ className: 'input80',
66
+ },
67
+ { ele: 'group_end' },
68
+ ]
69
+ }