...
|
...
|
@@ -105,12 +105,16 @@ class GoodsController extends RestBaseController |
|
|
* @param name:address type:varchar require:1 other: desc:详细地址
|
|
|
* @param name:name type:varchar require:1 other: desc:收货人姓名
|
|
|
* @param name:mobile type:varchar require:1 other: desc:收货人电话
|
|
|
* @param name:status type:int require:1 other: desc:0:非默认地址,1:默认地址
|
|
|
*/
|
|
|
public function addressPost()
|
|
|
{
|
|
|
$param=$this->request->param();
|
|
|
$param['user_id']=$this->getUserId();
|
|
|
$param['create_time']=time();
|
|
|
if ($param['status']==1){
|
|
|
Db::name('address')->where('user_id',$param['user_id'])->update(['status'=>0]);
|
|
|
}
|
|
|
Db::name('address')->insert($param);
|
|
|
$this->success('收货地址添加成功');
|
|
|
}
|
...
|
...
|
|