jufubao-base 1.0.279-beta1 → 1.0.279-beta102

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