作者 潘浩文
1 个管道 的构建 通过 耗费 1 秒

接口

... ... @@ -112,7 +112,7 @@ class GoodsController extends RestBaseController
{
$param=$this->request->param();
$param['user_id']=$this->getUserId();
str_replace(',',"",$param['province']);
$param['province']=str_replace(',',"",$param['province']);
$param['create_time']=time();
if ($param['status']==1){
Db::name('address')->where('user_id',$param['user_id'])->update(['status'=>0]);
... ... @@ -134,4 +134,20 @@ class GoodsController extends RestBaseController
$data=Db::name('address')->where('user_id',$this->getUserId())->select()->toArray();
$this->success('用户全部地址',$data);
}
/**
* @title 收货地址选择
* @description 收货地址选择接口
* @author panhaowen
* @url /portal/Goods/addressChoose
* @method POST
* @header name:XX-Token require:1 default: desc:token
* @param name:id type:int require:1 other: desc:收货地址id
*/
public function addressChoose()
{
$param=$this->request->param();
$data=Db::name('address')->where('id',$param['id'])->find();
$this->success('选择地址数据',$data);
}
}
... ...