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

个人中心接口

... ... @@ -89,4 +89,36 @@ class GoodsController extends RestBaseController
}
}
/**
* @title 添加收货地址提交
* @description 添加收货地址提交接口
* @author panhaowen
* @url /portal/Goods/addressPost
* @method POST
* @header name:XX-Token require:1 default: desc:token
*/
public function addressPost()
{
$param=$this->request->param();
$param['user_id']=$this->getUserId();
$param['create_time']=time();
Db::name('address')->insert($param);
$this->success('收货地址添加成功');
}
/**
* @title 收货地址列标
* @description 收货地址列表接口
* @author panhaowen
* @url /portal/Goods/address
* @method POST
* @header name:XX-Token require:1 default: desc:token
*/
public function address()
{
$data=Db::name('address')->where('user_id',$this->getUserId())->select()->toArray();
$this->success('用户全部地址',$data);
}
}
... ...