作者 sgj
1 个管道 的构建 失败 耗费 6 秒

学习时间修改

@@ -822,6 +822,7 @@ class SecondController extends RestBaseController @@ -822,6 +822,7 @@ class SecondController extends RestBaseController
822 * @method POST 822 * @method POST
823 * 823 *
824 * 824 *
  825 + *@param name:id type:int require:1 other: desc:id
825 *@param name:name type:int require:1 other: desc:姓名 826 *@param name:name type:int require:1 other: desc:姓名
826 *@param name:province type:int require:1 other: desc:省 827 *@param name:province type:int require:1 other: desc:省
827 *@param name:city type:int require:1 other: desc:市 828 *@param name:city type:int require:1 other: desc:市
@@ -838,6 +839,7 @@ class SecondController extends RestBaseController @@ -838,6 +839,7 @@ class SecondController extends RestBaseController
838 * @throws 839 * @throws
839 */ 840 */
840 public function editAddress(){ 841 public function editAddress(){
  842 + $id=input('id');
841 $userId=$this->getUserId(); 843 $userId=$this->getUserId();
842 $param = $this->request->param(); 844 $param = $this->request->param();
843 $validate = new Validate([ 845 $validate = new Validate([
@@ -867,7 +869,7 @@ class SecondController extends RestBaseController @@ -867,7 +869,7 @@ class SecondController extends RestBaseController
867 $Address->setDefaultBefore($userId); 869 $Address->setDefaultBefore($userId);
868 } 870 }
869 $param['user_id']=$userId; 871 $param['user_id']=$userId;
870 - $result=$Address->save($param); 872 + $result=$Address->where('id',$id)->update($param);
871 if ($result>0){ 873 if ($result>0){
872 $this->success('修改成功'); 874 $this->success('修改成功');
873 }else{ 875 }else{