Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GeliBusinessPlatform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljy
GeliBusinessPlatform
Commits
c24c3e12
Commit
c24c3e12
authored
Aug 05, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
货拉拉相关molde和接口
parent
e2f7952f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
183 additions
and
1 deletion
+183
-1
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/Interface/Interface_Z.plist
GeliBusinessPlatform/Interface/Interface_Z.plist
+6
-0
GeliBusinessPlatform/Model/LalamoveInterface.swift
GeliBusinessPlatform/Model/LalamoveInterface.swift
+21
-0
GeliBusinessPlatform/Model/LalamoveInterface/LalamoveModel.swift
...inessPlatform/Model/LalamoveInterface/LalamoveModel.swift
+156
-1
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
c24c3e12
No preview for this file type
GeliBusinessPlatform/Interface/Interface_Z.plist
View file @
c24c3e12
...
...
@@ -234,5 +234,11 @@
<string>
Logistics/cancelLogisticsOrder
</string>
<key>
获取城市下可选车型信息
</key>
<string>
Lalamove/cityCart
</string>
<key>
物流预估价格
</key>
<string>
Lalamove/orderPriceCalculate
</string>
<key>
地址检索poi
</key>
<string>
Lalamove/citySearch
</string>
<key>
货拉拉下单
</key>
<string>
Lalamove/submitOrder
</string>
</dict>
</plist>
GeliBusinessPlatform/Model/LalamoveInterface.swift
View file @
c24c3e12
...
...
@@ -20,3 +20,24 @@ func cityList(_ params:[String:Any],success:@escaping (_ res:Any)->(),failture:@
failture
(
error
)
}
}
//MARK:--物流预估价格
//params-key(nonce_str city_id city_info_revision下单城市版本号 order_vehicle_id 车型ID std_tag_arr用户选择的车型附加要求,(中文,多个用逗号拼接)spec_req_arr用户选择的城市额外需求,(数字值,多个用逗号拼接) lat_lon_arr 地址信息,二维数组,josn格式,字段如下 lat_lon_arr 字段:由发货地经纬度+城市Id 和 收发货地经纬度+城市Id 组成的二维数组,转json格式,例:
//[{“lat”:23.149393205825, “lon”:113.25378640268,”city_id”:1001}, {“lat”:23.172258837638, “lon”:113.2305979752,”city_id”:1001}])
func
orderPriceCalculate
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"物流预估价格"
,
params
,
{
(
rep
:
DataResponse
<
orderPriceCalculateModel
>
)
in
},
success
:
{
(
data
)
in
success
(
data
)
})
{
(
error
)
in
failture
(
error
)
}
}
//MARK:--地址检索poi
//params-key(nonce_str 随机字符串,用户自定义,60s内不可重复使用,仅用于保证签名不可预测 kw 搜索关键字 如:深圳北站 city 搜索城市(中文名称), 如:深圳)
func
citySearch
(
_
params
:[
String
:
Any
],
success
:
@escaping
(
_
res
:
Any
)
->
(),
failture
:
@escaping
(
_
error
:
Error
)
->
())
{
NetworkRequest
.
sharedInstance
.
postRequest
(
"地址检索poi"
,
params
,
{
(
rep
:
DataResponse
<
citySearchModel
>
)
in
},
success
:
{
(
data
)
in
success
(
data
)
})
{
(
error
)
in
failture
(
error
)
}
}
GeliBusinessPlatform/Model/LalamoveInterface/LalamoveModel.swift
View file @
c24c3e12
...
...
@@ -8,7 +8,7 @@
import
Foundation
import
ObjectMapper
//MARK: -
运单
列表
//MARK: -
城市
列表
class
cityListModel
:
Mappable
{
var
code
:
Int
?
var
message
:
String
?
...
...
@@ -200,3 +200,158 @@ class spec_req_arr_data: Mappable {
desc
<-
map
[
"desc"
]
}
}
//MARK: - 物流预估价格
class
orderPriceCalculateModel
:
Mappable
{
var
code
:
Int
?
var
message
:
String
?
var
data
:
orderPriceCalculateDataModel
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
code
<-
map
[
"code"
]
message
<-
map
[
"message"
]
data
<-
map
[
"data"
]
}
}
class
orderPriceCalculateDataModel
:
Mappable
{
var
path_id
:
String
?
var
distance_by
:
Int
?
var
distance_total
:
Int
?
var
total_price_fen
:
Float
?
//订单预估总价
var
order_vehicle_name
:
String
?
var
exceed_distance
:
Int
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
path_id
<-
map
[
"path_id"
]
distance_by
<-
map
[
"distance_by"
]
distance_total
<-
map
[
"distance_total"
]
total_price_fen
<-
map
[
"total_price_fen"
]
order_vehicle_name
<-
map
[
"order_vehicle_name"
]
exceed_distance
<-
map
[
"exceed_distance"
]
}
}
class
orderPriceCalculateSpecReqDataModel
:
Mappable
{
var
price_value_fen
:
Int
?
var
name
:
String
?
var
price_fen
:
Float
?
var
price_type
:
Int
?
var
driver_price_value_fen
:
Float
?
var
type
:
Int
?
var
driver_price_fen
:
Float
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
price_value_fen
<-
map
[
"price_value_fen"
]
name
<-
map
[
"name"
]
price_fen
<-
map
[
"price_fen"
]
price_type
<-
map
[
"price_type"
]
driver_price_value_fen
<-
map
[
"driver_price_value_fen"
]
type
<-
map
[
"type"
]
driver_price_fen
<-
map
[
"driver_price_fen"
]
}
}
class
orderPriceCalculateOrderPriceDataModel
:
Mappable
{
var
pay_status
:
Int
?
var
price_fen
:
Float
?
var
type
:
Int
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
pay_status
<-
map
[
"pay_status"
]
price_fen
<-
map
[
"price_fen"
]
type
<-
map
[
"type"
]
}
}
//MARK: - 地址检索poi
class
citySearchModel
:
Mappable
{
var
code
:
Int
?
var
message
:
String
?
var
data
:
citySearchDataModel
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
code
<-
map
[
"code"
]
message
<-
map
[
"message"
]
data
<-
map
[
"data"
]
}
}
class
citySearchDataModel
:
Mappable
{
var
poi
:
Array
<
citySearchDataPoiModel
>
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
poi
<-
map
[
"poi"
]
}
}
class
citySearchDataPoiModel
:
Mappable
{
var
uid
:
String
?
//地址uid
var
name
:
String
?
// 地址名称,示例:深圳北站
var
address
:
String
?
// 地址详情,示例:深圳市⻰华区致远中路28号
var
city
:
String
?
//地址所属城市名称, 示例:深圳市
var
city_id
:
Int
?
//地址所属城市ID,示例:1002
var
area
:
String
?
//地址所属区(县),示例:⻰华区
var
distance
:
String
?
//距离(将返回与输入参数中经纬度的距离,如果输入参数中没有传经纬度 则返回空)
var
location
:
citySearchDataPoiLocationModel
?
//地址经纬度(wgs84坐标系)
var
children
:
Array
<
citySearchDataPoiChildrenModel
>
?
//可选子节点地址
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
uid
<-
map
[
"uid"
]
name
<-
map
[
"name"
]
address
<-
map
[
"address"
]
city
<-
map
[
"city"
]
city_id
<-
map
[
"city_id"
]
area
<-
map
[
"area"
]
distance
<-
map
[
"distance"
]
}
}
class
citySearchDataPoiLocationModel
:
Mappable
{
var
lat
:
Double
?
var
lon
:
Double
?
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
lat
<-
map
[
"lat"
]
lon
<-
map
[
"lon"
]
}
}
class
citySearchDataPoiChildrenModel
:
Mappable
{
var
uid
:
String
?
//地址uid
var
name
:
String
?
// 子节点地址名称, 示例:a口
var
address
:
String
?
// 地子节点地址详情, 示例:上梅林地铁站-A口
var
location
:
citySearchDataPoiLocationModel
?
//子节点地址经纬度(wgs84坐标系)
required
init
?(
map
:
Map
)
{
}
func
mapping
(
map
:
Map
)
{
uid
<-
map
[
"uid"
]
name
<-
map
[
"name"
]
address
<-
map
[
"address"
]
location
<-
map
[
"location"
]
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment