jufubao-third 1.0.22-beta2 → 1.0.22-beta4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-third",
3
- "version": "1.0.22-beta2",
3
+ "version": "1.0.22-beta4",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件第三方购物平台包",
6
6
  "main": "index.js",
@@ -6,15 +6,11 @@
6
6
  */
7
7
  module.exports = [
8
8
  {
9
- mapFnName: 'rideOrderList',
10
- title: "打车 - 订单列表",
11
- path: "/thirdmall/v1/:xnamespace/amapcar/ride/order-list",
9
+ mapFnName: 'checkUnpaidOrder',
10
+ title: "查询未支付订单",
11
+ path: "/thirdmall/v1/order/has-unpaid-order",
12
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],
13
+ params: {
18
14
  },
19
15
  isConsole: true,
20
16
  disabled: true,
@@ -19,12 +19,12 @@
19
19
  <!-- 预览占位 -->
20
20
  <!-- #ifdef H5 -->
21
21
  <view v-if="$configProject.isPreview" class="check-pay-placeholder">
22
- <text class="check-pay-placeholder__text">出行待支付检查(引用组件)</text>
22
+ <text class="check-pay-placeholder__text">出行待支付检查占位</text>
23
23
  </view>
24
24
  <!-- #endif -->
25
25
  <!-- 待支付弹窗 -->
26
- <view class="check-pay-mask" v-if="showPayModal" @click.stop>
27
- <view class="check-pay-modal">
26
+ <view class="check-pay-mask" v-if="showPayModal" @click="handleClosePayModal">
27
+ <view class="check-pay-modal" @click.stop>
28
28
  <text class="check-pay-modal__text">当前您还有待支付的订单</text>
29
29
  <text class="check-pay-modal__text">请先完成支付</text>
30
30
  <view class="check-pay-modal__btn" @click="handleGoPay">
@@ -77,26 +77,23 @@
77
77
  * @description 检查是否有待支付订单
78
78
  */
79
79
  checkUnpaidOrder() {
80
- jfbRootExec("rideOrderList", {
80
+ jfbRootExec("checkUnpaidOrder", {
81
81
  vm: this,
82
82
  data: {
83
- xnamespace: this.xnamespace,
84
- order_type: 'ING',
85
- page_token: '1',
86
- page_size: 10
83
+ xnamespace: this.xnamespace
87
84
  }
88
85
  }).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;
86
+ // if (res && res.has_unpaid_order) {
96
87
  this.showPayModal = true;
97
- }
88
+ // }
98
89
  }).catch(() => {})
99
90
  },
91
+ /**
92
+ * @description 手动关闭待支付弹窗
93
+ */
94
+ handleClosePayModal() {
95
+ this.showPayModal = false;
96
+ },
100
97
  /**
101
98
  * @description 点击去支付
102
99
  */
@@ -1,38 +1,7 @@
1
1
  'use strict';
2
2
 
3
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"
4
+ checkUnpaidOrder: {
5
+ "has_unpaid_order": false, //返回 true 则禁止下单
37
6
  }
38
7
  }
@@ -187,9 +187,7 @@
187
187
  this.selectedIndex = index
188
188
  },
189
189
  handleEdit() {
190
- this.$xdUniHelper.redirectTo({
191
- url: this.rideDrivePath
192
- })
190
+ this.$xdUniHelper.navigateBack();
193
191
  },
194
192
  handleCallRide() {
195
193
  const car = this.carTypes[this.selectedIndex]
@@ -229,7 +227,6 @@
229
227
  */
230
228
  init(container) {
231
229
  this.xnamespace = getContainerPropsValue(container, 'content.xnamespace', this.projectAttr.business_code || '');
232
- this.rideDrivePath = getContainerPropsValue(container, 'content.rideDrivePath', {value: ""}).value;
233
230
  },
234
231
  onJfbScroll(options) {
235
232
  console.log('event.onJfbScroll', options)
@@ -3,20 +3,5 @@
3
3
  export default (data, gValue, gColor, oldData) => {
4
4
  return [
5
5
  //高级
6
- {
7
- label: '重选出行路线',
8
- groupKey:'advanced',
9
- className: 'input100',
10
- ele: 'xd-select-pages-path',
11
- valueKey: 'rideDrivePath',
12
- placeholder: '请选择重选出行路线跳转路径',
13
- labelInline: true,
14
- inline: false,
15
- value: data['rideDrivePath'] || null,
16
- setting: {
17
- mode:'new',
18
- router: XdBus.getParentApi('getPagesTree')
19
- },
20
- },
21
6
  ].filter(i=>i)
22
7
  }
@@ -35,7 +35,7 @@ module.exports = [
35
35
  start_address: ['起始地址', 'String', '必选'],
36
36
  end_address: ['结束地址', 'String', '必选'],
37
37
  service_type: ['业务类型: 1实时/2预约/3接机/4送机/8代驾', 'String', '必选'],
38
- ride_types: ['运力类型', 'String', '必选','1,12,3,4,15'],
38
+ ride_types: ['运力类型', 'String', '必选','1,12,3,4'],
39
39
  departure_time: ['出发时间', 'String', '可选'],
40
40
  },
41
41
  isConsole: true,
@@ -500,7 +500,7 @@
500
500
  start_address: start.address || '',
501
501
  end_address: end.address || '',
502
502
  service_type: this.tabIndex === 0 ? 1 : 2,
503
- ride_types: '1,12,3,4,15',
503
+ ride_types: '1,12,3,4',
504
504
  };
505
505
  //仅预约用车才传departure_time(所选时间的13位毫秒时间戳);现在用车不传
506
506
  if (this.tabIndex !== 0) {
@@ -510,7 +510,7 @@
510
510
  .then(res => {
511
511
  //接口返回 {list:[{name,address,lng,lat,distance}]}
512
512
  console.log('getRideEstimatePrice result', res);
513
- this.$xdUniHelper.redirectTo({
513
+ this.$xdUniHelper.navigateTo({
514
514
  url: this.rideConfirmPath + `?estimate_id=${res.estimate_id}`
515
515
  })
516
516
  })
@@ -18,5 +18,16 @@ module.exports = [
18
18
  },
19
19
  isConsole: true,
20
20
  disabled: true,
21
+ },
22
+ {
23
+ mapFnName: 'orderDetailUrl',
24
+ title: "订单详情url",
25
+ path: "/thirdmall-apiuri/v1/order/detail-url/:channel_order_id",
26
+ isRule: false,
27
+ params: {
28
+ channel_order_id: ['订单号', 'String', true],
29
+ },
30
+ isConsole: true,
31
+
21
32
  }
22
33
  ];
@@ -261,9 +261,25 @@
261
261
  jfbRootExec('navigateBack', { vm: this })
262
262
  },
263
263
  handleCardClick(item) {
264
- this.$xdUniHelper.navigateTo({
265
- url: this.orderDetailsPath + '?order_id=' + item.channel_order_id
266
- })
264
+ if(item.to_order_detail === 'Y'){
265
+ this.$xdUniHelper.navigateTo({
266
+ url: this.orderDetailsPath + '?order_id=' + item.main_order_id
267
+ })
268
+ }else{
269
+ jfbRootExec("orderDetailUrl", {
270
+ vm: this,
271
+ data: {
272
+ channel_order_id: item.channel_order_id,
273
+ channel_code: "amapcar",
274
+ business_code: this.xnamespace
275
+ }
276
+ }).then(res => {
277
+ let url = res.value;
278
+ // #ifdef H5
279
+ window.location.href = url;
280
+ // #endif
281
+ })
282
+ }
267
283
  },
268
284
  /**
269
285
  * @description 监听事件变化
@@ -99,11 +99,11 @@
99
99
  },
100
100
  },
101
101
  created() {
102
- this.init(this.container);
103
- this.getCoordinatesData();
102
+ this.init(this.container);
103
+ this.initPlaces();
104
104
 
105
- //todo
106
- },
105
+ //todo
106
+ },
107
107
  methods: {
108
108
  onJfbLoad(options) {
109
109
  //解析上一页跳转传参 type(起点start/终点end)
@@ -119,6 +119,19 @@
119
119
  this.xnamespace = gCPVal(container, 'xnamespace', '');
120
120
  // this.selectToLocationPath = gCPVal(container, 'content.selectToLocationPath', {value: ""}).value;
121
121
  },
122
+ /**
123
+ * @description 初始化地点列表:预览模式不请求定位、不判断定位失败,默认展示接口mock数据;非预览模式按定位逻辑
124
+ */
125
+ initPlaces(){
126
+ //预览模式:跳过定位,直接通过jfbRootExec加载mock列表(底层自动命中Mock.js数据)
127
+ if (this.$configProject['isPreview']) {
128
+ this.locateFailed = false;
129
+ this.getList();
130
+ return;
131
+ }
132
+ //非预览模式:请求定位
133
+ this.getCoordinatesData();
134
+ },
122
135
  /**
123
136
  * @description 获取定位信息:成功则进入正常页面,失败则显示失败页
124
137
  */
@@ -142,9 +155,27 @@
142
155
  this.getCoordinatesData();
143
156
  },
144
157
  /**
145
- * @description 根据关键词搜索地点
158
+ * @description 根据关键词搜索地点(预览模式下底层自动使用Mock.js数据,无需keyword与定位)
146
159
  */
147
160
  getList(){
161
+ //预览模式:加载默认mock数据,不校验keyword、不校验定位
162
+ if (this.$configProject['isPreview']) {
163
+ jfbRootExec("searchRidePlaces", {
164
+ vm: this,
165
+ data: {
166
+ channel_code: "amapcar",
167
+ keyword: '',
168
+ lng: '',
169
+ lat: '',
170
+ }
171
+ }).then(res => {
172
+ this.placeList = (res && res.list) || [];
173
+ this.locateFailed = false;
174
+ }).catch(err => {
175
+ console.warn('searchRidePlaces error', err);
176
+ });
177
+ return;
178
+ }
148
179
  if (!this.keyword) return;
149
180
  //定位失败时禁止请求搜索接口
150
181
  if (this.locateFailed) {
@@ -5,10 +5,10 @@ module.exports = {
5
5
  searchRidePlaces:{
6
6
  "list": [
7
7
  {
8
- "name": "string",
9
- "address": "string",
10
- "lng": "string",
11
- "lat": "string",
8
+ "name": "故宫",
9
+ "address": "北京市故宫路",
10
+ "lng": "116.397428",
11
+ "lat": "39.90923",
12
12
  "distance": 0
13
13
  }
14
14
  ]