切换导航条
此项目
正在载入...
登录
何书鹏
/
anttest
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
何书鹏
4 years ago
提交
1385a1d0a36096e7fd08dd3532546a5287bfd3b8
1 个父辈
12d4a8c4
bug修改
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
44 行增加
和
0 行删除
addons/shopro/model/OrderExpress.php
application/api/controller/OrderExpress.php
public/api.html
addons/shopro/model/OrderExpress.php
查看文件 @
1385a1d
...
...
@@ -52,6 +52,17 @@ class OrderExpress extends Model
return
$detail
;
}
// 根据物流单号查询物流信息
public
static
function
getDetail
(
$params
)
{
$user
=
User
::
info
();
$express_no
=
$params
[
'express_no'
]
??
''
;
$order_id
=
$params
[
'order_id'
]
??
0
;
$detail
=
self
::
with
(
'log'
)
->
where
(
'user_id'
,
$user
->
id
)
->
where
(
'order_id'
,
$order_id
)
->
where
(
'express_no'
,
$express_no
)
->
find
();
return
$detail
;
}
/**
* 记得用的时候一定要额外加上 order_id 等于当前订单号
...
...
application/api/controller/OrderExpress.php
查看文件 @
1385a1d
...
...
@@ -155,4 +155,37 @@ class OrderExpress extends Base
$this
->
success
(
'包裹详情'
,
\addons\shopro\model\OrderExpress
::
detail
(
$params
));
}
/**
* @ApiWeigh (95)
* @ApiTitle (根据快递单号查询物流轨迹)
* @ApiSummary (根据快递单号查询物流轨迹)
* @ApiMethod (GET)
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name=order_id, type=inter, required=true, description="订单ID")
* @ApiParams (name=express_no, type=string, required=true, description="快递单号")
*
* @ApiReturn({
"code": 1,
"msg": "包裹列表",
"time": "1609409042",
"data": {
"id": 4, //包裹ID
"user_id": 2, //用户ID
"order_id": 42, //订单ID
"express_name": "顺丰速运", //快递公司
"express_code": "SF", //快递公司编号
"express_no": "123456", //快递单号
"createtime": 1609395121,
"log": []
}
})
*/
public
function
getDetail
()
{
$params
=
$this
->
request
->
get
();
$this
->
success
(
'包裹列表'
,
\addons\shopro\model\OrderExpress
::
getDetail
(
$params
));
}
}
...
...
public/api.html
查看文件 @
1385a1d
此 diff 太大无法显示。
请
注册
或
登录
后发表评论