jufubao-third 1.0.22-beta3 → 1.0.22-beta5
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 +1 -1
- package/src/components/JfbThirdRideConfirm/JfbThirdRideConfirm.vue +1 -4
- package/src/components/JfbThirdRideConfirm/cusAttr/advanced.js +0 -15
- package/src/components/JfbThirdRideHome/Api.js +1 -1
- package/src/components/JfbThirdRideHome/JfbThirdRideHome.vue +2 -2
- package/src/components/JfbThirdRideStartEnd/JfbThirdRideStartEnd.vue +28 -10
- package/src/components/JfbThirdRideStartEnd/Mock.js +4 -4
package/package.json
CHANGED
|
@@ -187,9 +187,7 @@
|
|
|
187
187
|
this.selectedIndex = index
|
|
188
188
|
},
|
|
189
189
|
handleEdit() {
|
|
190
|
-
this.$xdUniHelper.
|
|
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
|
|
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
|
|
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.
|
|
513
|
+
this.$xdUniHelper.navigateTo({
|
|
514
514
|
url: this.rideConfirmPath + `?estimate_id=${res.estimate_id}`
|
|
515
515
|
})
|
|
516
516
|
})
|
|
@@ -99,11 +99,11 @@
|
|
|
99
99
|
},
|
|
100
100
|
},
|
|
101
101
|
created() {
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
this.init(this.container);
|
|
103
|
+
this.initPlaces();
|
|
104
104
|
|
|
105
|
-
|
|
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,19 +155,23 @@
|
|
|
142
155
|
this.getCoordinatesData();
|
|
143
156
|
},
|
|
144
157
|
/**
|
|
145
|
-
* @description 根据关键词搜索地点
|
|
158
|
+
* @description 根据关键词搜索地点(预览模式下底层自动使用Mock.js数据,无需keyword与定位)
|
|
146
159
|
*/
|
|
147
160
|
getList(){
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
if (
|
|
151
|
-
|
|
152
|
-
|
|
161
|
+
const isPreview = this.$configProject['isPreview'];
|
|
162
|
+
//预览模式无需keyword;非预览模式必须有关键词,且定位失败时禁止搜索
|
|
163
|
+
if (!isPreview) {
|
|
164
|
+
if (!this.keyword) return;
|
|
165
|
+
if (this.locateFailed) {
|
|
166
|
+
console.warn('定位失败,禁止搜索');
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
153
169
|
}
|
|
154
170
|
//坐标兼容:mixin返回longitude/latitude,此处映射为接口所需的lng/lat
|
|
155
171
|
const coords = this.currentCoords || {};
|
|
156
172
|
const lng = coords.lng !== undefined ? coords.lng : coords.longitude;
|
|
157
173
|
const lat = coords.lat !== undefined ? coords.lat : coords.latitude;
|
|
174
|
+
//统一调用jfbRootExec:预览模式底层自动命中Mock.js数据
|
|
158
175
|
jfbRootExec("searchRidePlaces", {
|
|
159
176
|
vm: this,
|
|
160
177
|
data: {
|
|
@@ -165,6 +182,7 @@
|
|
|
165
182
|
}
|
|
166
183
|
}).then(res => {
|
|
167
184
|
this.placeList = (res && res.list) || [];
|
|
185
|
+
this.locateFailed = false;
|
|
168
186
|
}).catch(err => {
|
|
169
187
|
console.warn('searchRidePlaces error', err);
|
|
170
188
|
});
|