jufubao-third 1.0.21 → 1.0.22-beta2

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 (57) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbThirdPay/WalletMix.js +1 -0
  3. package/src/components/JfbThirdRideCheckPay/Api.js +22 -0
  4. package/src/components/JfbThirdRideCheckPay/Attr.js +17 -0
  5. package/src/components/JfbThirdRideCheckPay/JfbThirdRideCheckPay.vue +220 -0
  6. package/src/components/JfbThirdRideCheckPay/JfbThirdRideCheckPayLess.less +80 -0
  7. package/src/components/JfbThirdRideCheckPay/JfbThirdRideCheckPayMixin.js +30 -0
  8. package/src/components/JfbThirdRideCheckPay/Mock.js +38 -0
  9. package/src/components/JfbThirdRideCheckPay/cusAttr/advanced.js +28 -0
  10. package/src/components/JfbThirdRideCheckPay/cusAttr/content.js +27 -0
  11. package/src/components/JfbThirdRideCheckPay/cusAttr/style.js +7 -0
  12. package/src/components/JfbThirdRideConfirm/Api.js +37 -0
  13. package/src/components/JfbThirdRideConfirm/Attr.js +17 -0
  14. package/src/components/JfbThirdRideConfirm/JfbThirdRideConfirm.vue +530 -0
  15. package/src/components/JfbThirdRideConfirm/JfbThirdRideConfirmLess.less +80 -0
  16. package/src/components/JfbThirdRideConfirm/JfbThirdRideConfirmMixin.js +30 -0
  17. package/src/components/JfbThirdRideConfirm/Mock.js +69 -0
  18. package/src/components/JfbThirdRideConfirm/cusAttr/advanced.js +22 -0
  19. package/src/components/JfbThirdRideConfirm/cusAttr/content.js +27 -0
  20. package/src/components/JfbThirdRideConfirm/cusAttr/style.js +7 -0
  21. package/src/components/JfbThirdRideGenOrder/Api.js +21 -0
  22. package/src/components/JfbThirdRideGenOrder/Attr.js +17 -0
  23. package/src/components/JfbThirdRideGenOrder/JfbThirdRideGenOrder.vue +234 -0
  24. package/src/components/JfbThirdRideGenOrder/JfbThirdRideGenOrderLess.less +80 -0
  25. package/src/components/JfbThirdRideGenOrder/JfbThirdRideGenOrderMixin.js +30 -0
  26. package/src/components/JfbThirdRideGenOrder/Mock.js +11 -0
  27. package/src/components/JfbThirdRideGenOrder/cusAttr/advanced.js +37 -0
  28. package/src/components/JfbThirdRideGenOrder/cusAttr/content.js +7 -0
  29. package/src/components/JfbThirdRideGenOrder/cusAttr/style.js +7 -0
  30. package/src/components/JfbThirdRideHome/Api.js +44 -0
  31. package/src/components/JfbThirdRideHome/Attr.js +17 -0
  32. package/src/components/JfbThirdRideHome/JfbThirdRideHome.vue +831 -0
  33. package/src/components/JfbThirdRideHome/JfbThirdRideHomeLess.less +80 -0
  34. package/src/components/JfbThirdRideHome/JfbThirdRideHomeMixin.js +30 -0
  35. package/src/components/JfbThirdRideHome/Mock.js +13 -0
  36. package/src/components/JfbThirdRideHome/cusAttr/advanced.js +52 -0
  37. package/src/components/JfbThirdRideHome/cusAttr/content.js +27 -0
  38. package/src/components/JfbThirdRideHome/cusAttr/style.js +7 -0
  39. package/src/components/JfbThirdRideRecord/Api.js +22 -0
  40. package/src/components/JfbThirdRideRecord/Attr.js +17 -0
  41. package/src/components/JfbThirdRideRecord/JfbThirdRideRecord.vue +517 -0
  42. package/src/components/JfbThirdRideRecord/JfbThirdRideRecordLess.less +80 -0
  43. package/src/components/JfbThirdRideRecord/JfbThirdRideRecordMixin.js +30 -0
  44. package/src/components/JfbThirdRideRecord/Mock.js +44 -0
  45. package/src/components/JfbThirdRideRecord/cusAttr/advanced.js +22 -0
  46. package/src/components/JfbThirdRideRecord/cusAttr/content.js +27 -0
  47. package/src/components/JfbThirdRideRecord/cusAttr/style.js +7 -0
  48. package/src/components/JfbThirdRideStartEnd/Api.js +20 -0
  49. package/src/components/JfbThirdRideStartEnd/Attr.js +17 -0
  50. package/src/components/JfbThirdRideStartEnd/JfbThirdRideStartEnd.vue +364 -0
  51. package/src/components/JfbThirdRideStartEnd/JfbThirdRideStartEndLess.less +80 -0
  52. package/src/components/JfbThirdRideStartEnd/JfbThirdRideStartEndMixin.js +30 -0
  53. package/src/components/JfbThirdRideStartEnd/Mock.js +17 -0
  54. package/src/components/JfbThirdRideStartEnd/cusAttr/advanced.js +22 -0
  55. package/src/components/JfbThirdRideStartEnd/cusAttr/content.js +27 -0
  56. package/src/components/JfbThirdRideStartEnd/cusAttr/style.js +7 -0
  57. package/src/mixins/getCoordinatesMixins.js +407 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-third",
3
- "version": "1.0.21",
3
+ "version": "1.0.22-beta2",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件第三方购物平台包",
6
6
  "main": "index.js",
@@ -98,6 +98,7 @@ export default {
98
98
  vm: this,
99
99
  data: {
100
100
  namespace: this.xnamespace,
101
+ show_type: "normal",
101
102
  ...this.options,
102
103
  }
103
104
  }).then(res => {
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+ /**
3
+ * @description 接口配置,
4
+ * 在设置方法名字当时候,别忘记加上【模块名字】:Ride
5
+ * @type {*[]}
6
+ */
7
+ module.exports = [
8
+ {
9
+ mapFnName: 'rideOrderList',
10
+ title: "打车 - 订单列表",
11
+ path: "/thirdmall/v1/:xnamespace/amapcar/ride/order-list",
12
+ isRule: false,
13
+ data: {
14
+ xnamespace: ['业务线', 'String', true],
15
+ order_type: ['类型', 'COM已完成,ING进行中', true],
16
+ page_token: ['分页参数', 'String', false],
17
+ page_size: ['分页大小', 'Number', false],
18
+ },
19
+ isConsole: true,
20
+ disabled: true,
21
+ }
22
+ ];
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ import style from "./cusAttr/style";
4
+ import advanced from "./cusAttr/advanced";
5
+ import content from "./cusAttr/content";
6
+
7
+ export default {
8
+ style: [],
9
+ advanced: [],
10
+ content: (data, gValue, gColor, oldData={})=>{
11
+ return [
12
+ ...content(data, gValue, gColor, oldData),
13
+ ...style(data, gValue, gColor, oldData),
14
+ ...advanced(data, gValue, gColor, oldData),
15
+ ].filter(i=>i)
16
+ },
17
+ }
@@ -0,0 +1,220 @@
1
+ <template>
2
+ <view
3
+ class="jfb-third-ride-check-pay"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx : isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-third-ride-check-pay__edit"
10
+ :class="{ editx : isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-third-ride-check-pay__edit-icon" @click.stop="delEdit">
14
+ <xd-font-icon icon="iconshanchu-01" color="#fff" size="30"></xd-font-icon>
15
+ </view>
16
+ </view>
17
+ <!-- #endif -->
18
+ <view class="jfb-third-ride-check-pay__body">
19
+ <!-- 预览占位 -->
20
+ <!-- #ifdef H5 -->
21
+ <view v-if="$configProject.isPreview" class="check-pay-placeholder">
22
+ <text class="check-pay-placeholder__text">出行待支付检查(引用组件)</text>
23
+ </view>
24
+ <!-- #endif -->
25
+ <!-- 待支付弹窗 -->
26
+ <view class="check-pay-mask" v-if="showPayModal" @click.stop>
27
+ <view class="check-pay-modal">
28
+ <text class="check-pay-modal__text">当前您还有待支付的订单</text>
29
+ <text class="check-pay-modal__text">请先完成支付</text>
30
+ <view class="check-pay-modal__btn" @click="handleGoPay">
31
+ <text class="check-pay-modal__btn-text">去支付</text>
32
+ </view>
33
+ </view>
34
+ </view>
35
+ </view>
36
+ </view>
37
+ </template>
38
+
39
+ <script>
40
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
41
+ import { jfbRootExec } from "@/utils/xd.event";
42
+ import JfbThirdRideCheckPayMixin from "./JfbThirdRideCheckPayMixin";
43
+ import { getContainerPropsValue } from "@/utils/xd.base";
44
+ import componentsMixins from "@/mixins/componentsMixins";
45
+ import extsMixins from "@/mixins/extsMixins";
46
+ export default {
47
+ name: "JfbThirdRideCheckPay",
48
+ components: {
49
+ XdFontIcon
50
+ },
51
+ mixins: [
52
+ componentsMixins, extsMixins, JfbThirdRideCheckPayMixin
53
+ ],
54
+ data() {
55
+ return {
56
+ xnamespace: '',
57
+ showPayModal: false,
58
+ unpaidOrder: null,
59
+ orderListPath: ''
60
+ }
61
+ },
62
+ watch: {
63
+ container(value, oldValue) {
64
+ if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
65
+ if (this.$configProject['isPreview']) this.init(value)
66
+ },
67
+ },
68
+ created() {
69
+ this.init(this.container);
70
+ },
71
+ methods: {
72
+ onJfbLoad(options) {
73
+ this.setNameSpace(options);
74
+ this.checkUnpaidOrder();
75
+ },
76
+ /**
77
+ * @description 检查是否有待支付订单
78
+ */
79
+ checkUnpaidOrder() {
80
+ jfbRootExec("rideOrderList", {
81
+ vm: this,
82
+ data: {
83
+ xnamespace: this.xnamespace,
84
+ order_type: 'ING',
85
+ page_token: '1',
86
+ page_size: 10
87
+ }
88
+ }).then(res => {
89
+ const list = res && res.list || [];
90
+ // 查找待支付订单(need_pay_price > 0 或 show_status 表示待支付)
91
+ const unpaid = list.find(item => {
92
+ return item.need_pay_price > 0 || item.show_status_name === '待支付';
93
+ });
94
+ if (unpaid) {
95
+ this.unpaidOrder = unpaid;
96
+ this.showPayModal = true;
97
+ }
98
+ }).catch(() => {})
99
+ },
100
+ /**
101
+ * @description 点击去支付
102
+ */
103
+ handleGoPay() {
104
+ this.showPayModal = false;
105
+ if (this.orderListPath) {
106
+ this.$xdUniHelper.redirectTo({
107
+ url: this.orderListPath + '?type=unpaid'
108
+ });
109
+ }
110
+ },
111
+ /**
112
+ * @description 监听事件变化
113
+ * @param container {object} 业务组件对象自己
114
+ */
115
+ init(container) {
116
+ this.xnamespace = getContainerPropsValue(container, 'content.xnamespace', this.projectAttr.business_code || '');
117
+ this.orderListPath = getContainerPropsValue(container, 'advanced.orderListPath', {value: ""}).value;
118
+ },
119
+ onJfbScroll(options) {
120
+ console.log('event.onJfbScroll', options)
121
+ },
122
+ onJfbReachBottom(options) {
123
+ console.log('event.onJfbReachBottom', options)
124
+ },
125
+ onJfbShow(options) {
126
+ console.log('event.onJfbShow', options)
127
+ },
128
+ onJfbHide(options) {
129
+ console.log('event.onJfbHide', options)
130
+ },
131
+ onJfbBack(options) {
132
+ console.log('event.onJfbBack', options)
133
+ },
134
+ onJfbUpdate(...data) {
135
+ console.log('event.onJfbUpdate', data)
136
+ },
137
+ onJfbCustomEvent(options) {
138
+ console.log('event.onJfbReachBottom', options)
139
+ },
140
+ }
141
+ }
142
+
143
+ </script>
144
+
145
+ <style scoped lang="less">
146
+ @import "./JfbThirdRideCheckPayLess.less";
147
+
148
+ .jfb-third-ride-check-pay {
149
+ &__body {
150
+ position: relative;
151
+ }
152
+ }
153
+
154
+ // 预览占位
155
+ .check-pay-placeholder {
156
+ display: flex;
157
+ align-items: center;
158
+ justify-content: center;
159
+ padding: 40rpx;
160
+ background: #F5F5F5;
161
+ border: 2rpx dashed #DDD;
162
+ border-radius: 16rpx;
163
+ margin: 20rpx;
164
+
165
+ &__text {
166
+ font-size: 28rpx;
167
+ color: #999;
168
+ }
169
+ }
170
+
171
+ // 遮罩层
172
+ .check-pay-mask {
173
+ position: fixed;
174
+ top: 0;
175
+ left: 0;
176
+ right: 0;
177
+ bottom: 0;
178
+ background: rgba(0, 0, 0, 0.5);
179
+ z-index: 999;
180
+ display: flex;
181
+ align-items: center;
182
+ justify-content: center;
183
+ }
184
+
185
+ // 弹窗
186
+ .check-pay-modal {
187
+ width: 560rpx;
188
+ background: #fff;
189
+ border-radius: 24rpx;
190
+ padding: 48rpx 40rpx 40rpx;
191
+ display: flex;
192
+ flex-direction: column;
193
+ align-items: center;
194
+
195
+ &__text {
196
+ font-size: 30rpx;
197
+ color: #333;
198
+ text-align: center;
199
+ line-height: 1.6;
200
+ margin-bottom: 8rpx;
201
+ }
202
+
203
+ &__btn {
204
+ margin-top: 40rpx;
205
+ width: 240rpx;
206
+ height: 72rpx;
207
+ background: #F5A623;
208
+ border-radius: 36rpx;
209
+ display: flex;
210
+ align-items: center;
211
+ justify-content: center;
212
+ }
213
+
214
+ &__btn-text {
215
+ font-size: 30rpx;
216
+ color: #fff;
217
+ font-weight: 500;
218
+ }
219
+ }
220
+ </style>
@@ -0,0 +1,80 @@
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-third-ride-check-pay {
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: var(--preview-z-index);
37
+ cursor: pointer;
38
+ }
39
+
40
+ }
41
+
42
+
43
+ &__edit {
44
+ cursor: pointer;
45
+ position: absolute;
46
+ right: unit(0, rpx);
47
+ top: unit(0, rpx);
48
+ height: unit(50, rpx);
49
+ z-index: 100;
50
+ display: flex;
51
+ justify-content: center;
52
+ align-items: center;
53
+ background: rgba(0, 0, 0, .4);
54
+ border-radius: 0 0 0 20rpx;
55
+ box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
56
+ color: #fff;
57
+ font-size: unit(22, rpx);
58
+ padding: 0 6rpx 0 6px;
59
+
60
+ &-icon{
61
+ padding: 0 unit(20, rpx);
62
+ }
63
+
64
+ &.editx {
65
+ box-sizing: border-box;
66
+
67
+ }
68
+ }
69
+ }
70
+ //end
71
+
72
+
73
+ /**notPreview**/
74
+ .jfb-third-ride-check-pay {
75
+ //&:before {
76
+ //content: " ";
77
+ //display: table;
78
+ //}
79
+ }
80
+ /**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-third-ride-check-pay'
20
+ }
21
+ },
22
+ created() {
23
+
24
+ //@AttrDataCreated
25
+ this.Attr = this.$xdUniHelper.customClone(Attr);
26
+ //@EndAttrDataCreated
27
+
28
+
29
+ },
30
+ }
@@ -0,0 +1,38 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ rideOrderList: {
5
+ "total_size": 1,
6
+ "next_page_token": "",
7
+ "list": [
8
+ {
9
+ "channel_order_id": "40160320001350016846830466",
10
+ "pay_order_id": "pay_order_001",
11
+ "need_pay_price": 500,
12
+ "user_id": 5000020,
13
+ "mobile": "",
14
+ "user_name": "",
15
+ "start_name": "中国民生银行(北京西客站支行)",
16
+ "end_name": "清华大学",
17
+ "ride_type": 1,
18
+ "ride_type_name": "经济型",
19
+ "total_fee": 8527,
20
+ "enterprise_amount": 0,
21
+ "person_amount": 0,
22
+ "estimate_price": 10430,
23
+ "estimate_mileage": 19200,
24
+ "estimate_time": 2473,
25
+ "duration": "41",
26
+ "mileage": "19200",
27
+ "show_status": 2,
28
+ "show_status_name": "待支付",
29
+ "to_order_detail": "N",
30
+ "order_service_type": 1,
31
+ "order_service_type_name": "实时单",
32
+ "request_time": "2026-08-14 16:48:07",
33
+ "depart_time": 1786697287,
34
+ }
35
+ ],
36
+ "request_id": "8d5f00c80f8d22ce"
37
+ }
38
+ }
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ export default (data, gValue, gColor, oldData) => {
4
+ return [
5
+ //高级
6
+ {
7
+ label: '订单列表跳转路径',
8
+ groupKey:'advanced',
9
+ className: 'input100',
10
+ ele: 'xd-select-pages-path',
11
+ valueKey: 'orderListPath',
12
+ placeholder: '请选择订单列表跳转路径',
13
+ labelInline: true,
14
+ inline: false,
15
+ value: data['orderListPath'] || null,
16
+ setting: {
17
+ mode:'new',
18
+ router: XdBus.getParentApi('getPagesTree')
19
+ },
20
+ },
21
+ {
22
+ label: '',
23
+ groupKey:'advanced',
24
+ ele: 'slot',
25
+ slot: 'is_reference',
26
+ },
27
+ ].filter(i=>i)
28
+ }
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+ import { dataVal } from "@/utils/AttrTools";
3
+
4
+ export default (data, gValue, gColor, oldData) => {
5
+ return [
6
+ //内容
7
+ {
8
+ label: "业务线",
9
+ ele: "xd-choose-namespace",
10
+ valueKey: "xnamespace",
11
+ value: dataVal({data, key:'xnamespace', dValue:"", gValue}),
12
+ groupKey:'content',
13
+ className: 'input80',
14
+ labelInline:true,
15
+ placeholder: '请选择业务线',
16
+ notice: '空继承上级业务线',
17
+ inline: false,
18
+ handleCustom: (cb) => {
19
+ XdBus.getParentApi('getOptionsNamespaces')()
20
+ .then(res => {
21
+ cb(res.list)
22
+ })
23
+ .catch();
24
+ }
25
+ },
26
+ ].filter(i=>i)
27
+ }
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ export default (data, gValue, gColor, oldData) => {
4
+ return [
5
+ //风格
6
+ ].filter(i=>i)
7
+ }
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+ /**
3
+ * @description 接口配置,
4
+ * 在设置方法名字当时候,别忘记加上【模块名字】:Ride
5
+ * @type {*[]}
6
+ */
7
+ module.exports = [
8
+ {
9
+ mapFnName: 'rideEstimatePriceResult',
10
+ title: "打车 - 查询预估价结果",
11
+ path: "/thirdmall/v1/:xnamespace/amapcar/ride/estimate-price-result",
12
+ isRule: false,
13
+ data: {
14
+ xnamespace: ['业务线', 'String', true],
15
+ estimate_id: ['预估价id', 'String', true],
16
+ },
17
+ isConsole: true,
18
+ disabled: true,
19
+ },
20
+ {
21
+ mapFnName: 'rideH5Url',
22
+ title: "打车 - H5跳转",
23
+ path: "/thirdmall-apiuri/v1/:xnamespace/amapcar/ride/h5-url",
24
+ isRule: false,
25
+ data: {
26
+ xnamespace: ['业务线', 'String', true],
27
+ start_lng: ['起点经度', 'Number', true],
28
+ start_lat: ['起点纬度', 'Number', true],
29
+ end_lng: ['终点经度', 'Number', true],
30
+ end_lat: ['终点纬度', 'Number', true],
31
+ service_type: ['业务类型: ', '1实时/2预约/3接机/4送机/8代驾', true],
32
+ ride_types: ['运力类型,逗号分隔(各平台自定义)', 'Number', false],
33
+ },
34
+ isConsole: true,
35
+ disabled: true,
36
+ }
37
+ ];
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ import style from "./cusAttr/style";
4
+ import advanced from "./cusAttr/advanced";
5
+ import content from "./cusAttr/content";
6
+
7
+ export default {
8
+ style: [],
9
+ advanced: [],
10
+ content: (data, gValue, gColor, oldData={})=>{
11
+ return [
12
+ ...content(data, gValue, gColor, oldData),
13
+ ...style(data, gValue, gColor, oldData),
14
+ ...advanced(data, gValue, gColor, oldData),
15
+ ].filter(i=>i)
16
+ },
17
+ }