|
@@ -12,11 +12,11 @@ declare (strict_types = 1);
|
|
|
|
|
|
|
|
namespace app\api\controller;
|
|
namespace app\api\controller;
|
|
|
|
|
|
|
|
|
|
+use think\response\Json;
|
|
|
use app\api\model\User as UserModel;
|
|
use app\api\model\User as UserModel;
|
|
|
-use app\common\exception\BaseException;
|
|
|
|
|
use app\api\model\UserCoupon as UserCouponModel;
|
|
use app\api\model\UserCoupon as UserCouponModel;
|
|
|
use app\api\service\User as UserService;
|
|
use app\api\service\User as UserService;
|
|
|
-use think\response\Json;
|
|
|
|
|
|
|
+use cores\exception\BaseException;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 用户管理
|
|
* 用户管理
|
|
@@ -75,4 +75,18 @@ class User extends Controller
|
|
|
}
|
|
}
|
|
|
return $this->renderSuccess('恭喜您,手机号绑定成功');
|
|
return $this->renderSuccess('恭喜您,手机号绑定成功');
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 修改个人信息(头像昵称)
|
|
|
|
|
+ * @return Json
|
|
|
|
|
+ * @throws \cores\exception\BaseException
|
|
|
|
|
+ */
|
|
|
|
|
+ public function personal(): Json
|
|
|
|
|
+ {
|
|
|
|
|
+ $model = new UserModel;
|
|
|
|
|
+ if (!$model->personal($this->postForm())) {
|
|
|
|
|
+ return $this->renderSuccess($model->getError() ?: '操作失败');
|
|
|
|
|
+ }
|
|
|
|
|
+ return $this->renderSuccess('恭喜您,信息修改成功');
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|