jufubao-base 1.0.160-beta1 → 1.0.162-beta10

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 (50) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseAfterOrderDetail/Attr.js +9 -0
  3. package/src/components/JfbBaseAfterOrderDetail/JfbBaseAfterOrderDetail.vue +40 -75
  4. package/src/components/JfbBaseAfterOrderDetail/Mock.js +3 -2
  5. package/src/components/JfbBaseAfterOrderList/Attr.js +9 -0
  6. package/src/components/JfbBaseAfterOrderList/JfbBaseAfterOrderList.vue +63 -83
  7. package/src/components/JfbBaseAfterOrderList/Mock.js +8 -0
  8. package/src/components/JfbBaseCard/Attr.js +220 -194
  9. package/src/components/JfbBaseCard/JfbBaseCard.vue +50 -17
  10. package/src/components/JfbBaseCard/Mock.js +7 -6
  11. package/src/components/JfbBaseCardBind/JfbBaseCardBind.vue +2 -0
  12. package/src/components/JfbBaseCardDisabled/JfbBaseCardDisabled.vue +3 -3
  13. package/src/components/JfbBaseCardDisabledEntry/JfbBaseCardDisabledEntry.vue +2 -2
  14. package/src/components/JfbBaseCardEntry/Attr.js +12 -0
  15. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +35 -2
  16. package/src/components/JfbBaseCardEntry/Mock.js +1 -0
  17. package/src/components/JfbBaseCardInfo/JfbBaseCardInfo.vue +43 -32
  18. package/src/components/JfbBaseCardInfoEntry/JfbBaseCardInfoEntry.vue +27 -8
  19. package/src/components/JfbBaseCardShift/JfbBaseCardShift.vue +32 -13
  20. package/src/components/JfbBaseCardSweepInfo/JfbBaseCardSweepInfo.vue +61 -24
  21. package/src/components/JfbBaseCardV2/Attr.js +39 -2
  22. package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +46 -24
  23. package/src/components/JfbBaseCardV2/Mock.js +12 -11
  24. package/src/components/JfbBaseCardV3/Attr.js +13 -1
  25. package/src/components/JfbBaseCardV3/JfbBaseCardV3.vue +5 -1
  26. package/src/components/JfbBaseCardV3/Mock.js +1 -1
  27. package/src/components/JfbBaseConDialog/XdCouCardBind.vue +14 -2
  28. package/src/components/JfbBaseMultipleExpress/Attr.js +9 -0
  29. package/src/components/JfbBaseMultipleExpress/JfbBaseMultipleExpress.vue +20 -28
  30. package/src/components/JfbBaseMultipleExpress/Mock.js +10 -0
  31. package/src/components/JfbBaseOrderDetail/Attr.js +23 -0
  32. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +57 -137
  33. package/src/components/JfbBaseOrderDetail/bizMock.js +4 -2
  34. package/src/components/JfbBaseOrderList/Attr.js +9 -0
  35. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +37 -90
  36. package/src/components/JfbBaseOrderList/Mock.js +27 -5
  37. package/src/components/JfbBasePhoneCollect/Attr.js +11 -0
  38. package/src/components/JfbBasePhoneCollect/JfbBasePhoneCollect.vue +3 -0
  39. package/src/components/JfbBasePoster/Attr.js +1 -0
  40. package/src/components/JfbBasePosterBigSmall/Attr.js +3 -0
  41. package/src/components/JfbBasePosterType/Attr.js +35 -25
  42. package/src/components/JfbBasePosterType/FourScreen.vue +18 -19
  43. package/src/components/JfbBasePosterType/JfbBasePosterType.vue +12 -0
  44. package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +2 -2
  45. package/src/components/JfbBaseSweep/Api.js +13 -0
  46. package/src/components/JfbBaseSweep/Attr.js +34 -0
  47. package/src/components/JfbBaseSweep/JfbBaseSweep.vue +353 -0
  48. package/src/components/JfbBaseSweep/JfbBaseSweepLess.less +79 -0
  49. package/src/components/JfbBaseSweep/JfbBaseSweepMixin.js +30 -0
  50. package/src/components/JfbBaseSweep/Mock.js +3 -0
@@ -0,0 +1,353 @@
1
+ <template>
2
+ <view
3
+ class="jfb-base-sweep"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx: isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-base-sweep__edit"
10
+ :class="{ editx: isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-base-sweep__edit-icon" @click="delEdit">删除</view>
14
+ </view>
15
+ <!-- #endif -->
16
+ <view
17
+ :style="{ height: layoutInfo.bodyMinHeightRpx + 'rpx' }"
18
+ class="jfb-base-sweep__body"
19
+ >
20
+ <view
21
+ :style="{ background: backgroundColor, color: warningColor }"
22
+ class="jfb-base-sweep__body-pop"
23
+ v-if="isPreview"
24
+ >设置背景模式方便编辑(占位),在线上此模块不显</view
25
+ >
26
+ <view class="jfb-base-sweep__body-other" v-if="other">
27
+ <view>
28
+ <xd-font-icon
29
+ color="red"
30
+ size="240"
31
+ icon="iconmingchengtubiao"
32
+ ></xd-font-icon>
33
+ <view class="jfb-base-sweep__body-other-text">无法识别该界面</view>
34
+ </view>
35
+ <view class="jfb-base-sweep__body-footer" :style="prod_bottom">
36
+ <XdButton @click="scan" type="primary" radius="50rpx" width="50%"
37
+ >重试</XdButton
38
+ >
39
+ </view>
40
+ </view>
41
+ <view class="jfb-base-sweep__body-other" v-if="show">
42
+ <view>
43
+ <image style="width: 500rpx;height:500rpx" src="https://img0.jufubao.cn/common/qrcode-dome.png?ver=1"></image>
44
+ <view style="color:#000000;font-size:48rpx" class="jfb-base-sweep__body-other-text">重新扫码</view>
45
+ </view>
46
+ <view class="jfb-base-sweep__body-footer" :style="prod_bottom">
47
+ <XdButton @click="scan" type="primary" radius="50rpx" width="50%"
48
+ >扫一扫</XdButton
49
+ >
50
+ </view>
51
+ </view>
52
+ </view>
53
+ </view>
54
+ </template>
55
+
56
+ <script>
57
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
58
+ import XdButton from "@/components/XdButton/XdButton";
59
+ import { jfbRootExec } from "@/utils/xd.event";
60
+ import JfbBaseSweepMixin from "./JfbBaseSweepMixin";
61
+ import { getContainerPropsValue } from "@/utils/xd.base";
62
+ import componentsMixins from "@/mixins/componentsMixins";
63
+ import extsMixins from "@/mixins/extsMixins";
64
+ import { mapState } from "vuex";
65
+ import { parseNetworkURL } from "@/utils/linkUrl";
66
+ const Color = require("color");
67
+
68
+ export default {
69
+ name: "JfbBaseSweep",
70
+ components: {
71
+ XdFontIcon,
72
+ XdButton,
73
+ },
74
+ mixins: [componentsMixins, extsMixins, JfbBaseSweepMixin],
75
+ data() {
76
+ return {
77
+ isPreview: false,
78
+ backgroundColor: "",
79
+ other: false,
80
+ show: true
81
+ };
82
+ },
83
+ computed: {
84
+ ...mapState({
85
+ jwxSDK: (state) => state.jwxSDK,
86
+ }),
87
+ prod_bottom() {
88
+ return this.fixedStyle({ height: 0, zIndex: 111 });
89
+ },
90
+ },
91
+ watch: {
92
+ container(value) {
93
+ this.init(value);
94
+ },
95
+ },
96
+ async created() {
97
+ this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
98
+ this.isPreview = this.$configProject["isPreview"];
99
+ this.init(this.container);
100
+ //#ifdef H5
101
+ if (!this.$configProject.isPreview) {
102
+ await jfbRootExec("getH5WxAuthorize", {
103
+ vm: this,
104
+ data: {site_id: "wx_pub"},
105
+ })
106
+ .then(res => {
107
+ console.log(0)
108
+ this.$xdHideLoading();
109
+ this.scan();
110
+ })
111
+ .catch(error=>{
112
+ this.$xdAlert({
113
+ content: error,
114
+ });
115
+ })
116
+ }
117
+ // #endif
118
+ },
119
+ methods: {
120
+ onJfbLoad(options) {
121
+ if (!this.isPreview) {
122
+ this.$xdShowLoading({
123
+ isMask: true
124
+ });
125
+ //#ifdef MP-WEIXIN
126
+ this.$xdHideLoading();
127
+ this.scan();
128
+ //#endif
129
+ }
130
+ },
131
+ extractDomain(hostname) {
132
+ // 匹配并提取顶级域名后的两个标签(例如:.com、.co.uk)
133
+ const matches = hostname.match(/[^.]+\.[^.]+$/);
134
+ return matches ? matches[0] : hostname;
135
+ },
136
+ handleH5() {
137
+ // 判断jwxSDK是否为空
138
+ if (this.jwxSDK !== null) {
139
+ // 调用jwxSDK的scanQRCode方法,扫描二维码
140
+ this.jwxSDK.scanQRCode({
141
+ // 需要返回结果
142
+ needResult: 1,
143
+ // 扫描类型为二维码
144
+ scanType: ["qrCode"],
145
+ // 扫描成功后的回调函数
146
+ success: (res) => {
147
+ // 定义一个变量params,将url按照"?"进行分割,获取到参数部分
148
+ let params = res.resultStr.split("?")[1]
149
+ ? res.resultStr.split("?")[1]
150
+ : "";
151
+ // 将参数部分按照"&"进行分割,获取到每个参数
152
+ const queryArr = params.split("&");
153
+ // 定义一个空对象queryobjArr,用于存储参数
154
+ let queryobjArr = {};
155
+ // 遍历参数数组,将参数名和参数值存储到queryobjArr中
156
+ queryArr.forEach((item, index) => {
157
+ const Strindex = item.indexOf("=");
158
+ queryobjArr[item.slice(0, Strindex)] = item.slice(Strindex + 1);
159
+ });
160
+ // 判断queryobjArr中是否存在"x-params"参数
161
+ if (queryobjArr["x-params"]) {
162
+ // 如果存在,则将参数拼接到url中,并跳转到该url
163
+ let path = `${this.change_url}?x-params=${queryobjArr["x-params"]}&refrom=official`;
164
+ this.$xdUniHelper.navigateTo({
165
+ url: path,
166
+ });
167
+ return;
168
+ }
169
+ if (queryobjArr["pa"]) {
170
+ // 如果queryobjArr中有pa属性,则获取pa属性的值,并将其拼接到bind_url后面,然后使用navigateTo方法跳转到该路径
171
+ let qrcode = encodeURIComponent(res.resultStr)
172
+ let path = `${this.bind_url}?qrcode=${qrcode}`;
173
+ console.log(path,'pathpath');
174
+ this.$xdUniHelper.navigateTo({
175
+ url: path,
176
+ });
177
+ return;
178
+ }
179
+ // 如果res.resultStr是以http或https开头的字符串,则进行以下操作
180
+ if (/^https?:/.test(res.resultStr)) {
181
+ // 获取res.resultStr中的host属性
182
+ let host = this.$xdUniHelper.parseURL(res.resultStr).host;
183
+ // 获取当前页面的域名
184
+ let domain = document.domain;
185
+ // 如果host属性以当前页面的域名结尾,则进行以下操作
186
+ if (host.substr(-domain.length) === domain) {
187
+ // 获取res.resultStr的值
188
+ let path = res.resultStr;
189
+ // 使用navigateTo方法跳转到该路径
190
+ this.$xdUniHelper.navigateTo({
191
+ url: path,
192
+ });
193
+ return;
194
+ }
195
+ }
196
+ this.other = true;
197
+ this.show = false;
198
+ },
199
+ // 扫描失败后的回调函数
200
+ fail: (error) => {
201
+ console.log(44444);
202
+ this.other = true;
203
+ this.show = false;
204
+ // 如果error是字符串类型,则将其转换为对象类型
205
+ if (typeof error === "string") error = { error: error };
206
+ // 如果window["jwxJfbSDKParams"]存在,则将error对象与window["jwxJfbSDKParams"]合并
207
+ if (window["jwxJfbSDKParams"])
208
+ error = Object.assign(error, window["jwxJfbSDKParams"]);
209
+ // 调用$xdLog的setARMSError方法,记录错误信息
210
+ this.$xdLog.setARMSError(error);
211
+ },
212
+ error: ()=>{
213
+ console.log(44444);
214
+ this.other = true;
215
+ this.show = false;
216
+ }
217
+ });
218
+ }
219
+ },
220
+ handleMP() {
221
+ // 调用uni.scanCode方法,扫描二维码
222
+ uni.scanCode({
223
+ scanType: ["qrCode"],
224
+ success: (res) => {
225
+ // 定义一个变量params,将url按照"?"进行分割,获取到参数部分
226
+ let params = res.result.split("?")[1] ? res.result.split("?")[1] : "";
227
+ // 将参数部分按照"&"进行分割,获取到每个参数
228
+ const queryArr = params.split("&");
229
+ // 定义一个空对象queryobjArr,用于存储参数
230
+ let queryobjArr = {};
231
+ // 遍历参数数组,将参数名和参数值存储到queryobjArr中
232
+ queryArr.forEach((item, index) => {
233
+ const Strindex = item.indexOf("=");
234
+ queryobjArr[item.slice(0, Strindex)] = item.slice(Strindex + 1);
235
+ });
236
+ // 判断queryobjArr中是否存在"x-params"参数
237
+ if (queryobjArr["x-params"]) {
238
+ // 如果存在,则将参数拼接到url中,并跳转到该url
239
+ let path = `${this.change_url}?x-params=${queryobjArr["x-params"]}&refrom=official`;
240
+ this.$xdUniHelper.navigateTo({
241
+ url: path,
242
+ });
243
+ return;
244
+ }
245
+ if (queryobjArr["pa"]) {
246
+ // 如果queryobjArr中有pa属性,则获取pa属性的值,并将其拼接到bind_url后面,然后使用navigateTo方法跳转到该路径
247
+ let qrcode = encodeURIComponent(res.result)
248
+ let path = `${this.bind_url}?qrcode=${qrcode}`;
249
+ this.$xdUniHelper.navigateTo({
250
+ url: path,
251
+ });
252
+ return;
253
+ }
254
+ // 如果res.result是以http或https开头的字符串,则进行以下操作
255
+ if (/^https?:/.test(res.result)) {
256
+ // 获取res.result中的host属性
257
+ let host = parseNetworkURL(res.result).host;
258
+ // 获取当前页面的域名
259
+ console.log(host, 2222);
260
+ let domain = this.extractDomain(this.projectAttr.host);
261
+ console.log(this.extractDomain(this.projectAttr.host), 333);
262
+ // 如果host属性以当前页面的域名结尾,则进行以下操作
263
+ if (host.substr(-domain.length) === domain) {
264
+ // 获取res.resultStr的值
265
+ let path = res.result;
266
+ // 使用navigateTo方法跳转到该路径
267
+ this.$xdUniHelper.navigateTo({
268
+ url: path,
269
+ });
270
+ return;
271
+ }
272
+ }
273
+ this.other = true;
274
+ this.show = false;
275
+ },
276
+ fail: (error) => {
277
+ // 如果扫描失败,则调用$xdLog.setARMSError方法记录错误信息
278
+ this.other = true;
279
+ this.show = false;
280
+ this.$xdLog.setARMSError(error);
281
+ },
282
+ });
283
+ },
284
+ scan() {
285
+ try {
286
+ //#ifdef H5
287
+ this.handleH5();
288
+ //#endif
289
+ //#ifdef MP-WEIXIN
290
+ this.handleMP();
291
+ //#endif
292
+ } catch (err) {
293
+ this.$xdLog.setARMSError(err);
294
+ }
295
+ },
296
+ /**
297
+ * @description 监听事件变化
298
+ * @param container {object} 业务组件对象自己
299
+ */
300
+ init(container) {
301
+ this.change_url = getContainerPropsValue(
302
+ container,
303
+ "content.change_url",
304
+ { value: "" }
305
+ ).value;
306
+ this.bind_url = getContainerPropsValue(container, "content.bind_url", {
307
+ value: "",
308
+ }).value;
309
+ },
310
+ onJfbShow(options) {
311
+ console.log("event.onJfbShow", options);
312
+ },
313
+ },
314
+ };
315
+ </script>
316
+
317
+ <style scoped lang="less">
318
+ @import "./JfbBaseSweepLess.less";
319
+
320
+ .jfb-base-sweep {
321
+ &__body {
322
+ min-height: 100rpx;
323
+ &-other {
324
+ display: flex;
325
+ justify-content: space-between;
326
+ padding-top: 300rpx;
327
+ align-items: center;
328
+ flex-direction: column;
329
+ height: 100%;
330
+ &-text {
331
+ margin-top: 40rpx;
332
+ color: #666;
333
+ font-size: unit(24, rpx);
334
+ text-align: center;
335
+ }
336
+ }
337
+ &-pop {
338
+ min-height: 100rpx;
339
+ text-align: center;
340
+ vertical-align: middle;
341
+ color: #666;
342
+ font-size: unit(24, rpx);
343
+ line-height: 100rpx;
344
+ }
345
+ &-footer {
346
+ position: fixed;
347
+ left: 0;
348
+ right: 0;
349
+ height: unit(200, rpx);
350
+ }
351
+ }
352
+ }
353
+ </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-sweep {
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-sweep {
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-sweep'
20
+ }
21
+ },
22
+ created() {
23
+
24
+ //@AttrDataCreated
25
+ this.Attr = this.$xdUniHelper.customClone(Attr);
26
+ //@EndAttrDataCreated
27
+
28
+
29
+ },
30
+ }
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ module.exports = {}