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

接口

@@ -112,7 +112,7 @@ class GoodsController extends RestBaseController @@ -112,7 +112,7 @@ class GoodsController extends RestBaseController
112 { 112 {
113 $param=$this->request->param(); 113 $param=$this->request->param();
114 $param['user_id']=$this->getUserId(); 114 $param['user_id']=$this->getUserId();
115 - str_replace(',',"",$param['province']); 115 + $param['province']=str_replace(',',"",$param['province']);
116 $param['create_time']=time(); 116 $param['create_time']=time();
117 if ($param['status']==1){ 117 if ($param['status']==1){
118 Db::name('address')->where('user_id',$param['user_id'])->update(['status'=>0]); 118 Db::name('address')->where('user_id',$param['user_id'])->update(['status'=>0]);
@@ -134,4 +134,20 @@ class GoodsController extends RestBaseController @@ -134,4 +134,20 @@ class GoodsController extends RestBaseController
134 $data=Db::name('address')->where('user_id',$this->getUserId())->select()->toArray(); 134 $data=Db::name('address')->where('user_id',$this->getUserId())->select()->toArray();
135 $this->success('用户全部地址',$data); 135 $this->success('用户全部地址',$data);
136 } 136 }
  137 +
  138 + /**
  139 + * @title 收货地址选择
  140 + * @description 收货地址选择接口
  141 + * @author panhaowen
  142 + * @url /portal/Goods/addressChoose
  143 + * @method POST
  144 + * @header name:XX-Token require:1 default: desc:token
  145 + * @param name:id type:int require:1 other: desc:收货地址id
  146 + */
  147 + public function addressChoose()
  148 + {
  149 + $param=$this->request->param();
  150 + $data=Db::name('address')->where('id',$param['id'])->find();
  151 + $this->success('选择地址数据',$data);
  152 + }
137 } 153 }