正在显示
1 个修改的文件
包含
17 行增加
和
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 | } |
-
请 注册 或 登录 后发表评论