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

修改志愿者列表

@@ -29,6 +29,7 @@ use api\index\model\UserModel; @@ -29,6 +29,7 @@ use api\index\model\UserModel;
29 use cmf\controller\RestBaseController; 29 use cmf\controller\RestBaseController;
30 use FontLib\Table\Type\name; 30 use FontLib\Table\Type\name;
31 use think\console\output\formatter\Style; 31 use think\console\output\formatter\Style;
  32 +use think\Image;
32 use think\Validate; 33 use think\Validate;
33 34
34 /** 35 /**
@@ -968,21 +969,33 @@ class SecondController extends RestBaseController @@ -968,21 +969,33 @@ class SecondController extends RestBaseController
968 } 969 }
969 970
970 /** 971 /**
971 - * @title 生成电子证件(暂无) 972 + * @title 生成电子证件
972 * @description 生成电子证件 973 * @description 生成电子证件
973 * @author sgj 974 * @author sgj
974 - * @url /index/second/commitOrder 975 + * @url /index/second/zhengJianPic
975 * @method POST 976 * @method POST
976 * 977 *
977 * 978 *
978 * 979 *
979 *@header name:XX-Token require:1 default: desc:token 980 *@header name:XX-Token require:1 default: desc:token
980 - *@param name:good_id type:int require:1 other: desc:商品id 981 + *@param name:type type:int require:1 other: desc:1正面2背面
981 * 982 *
982 * @throws 983 * @throws
983 */ 984 */
984 public function zhengJianPic(){ 985 public function zhengJianPic(){
985 - 986 + $userId=$this->getUserId();
  987 + $User=new VolunteerModel();
  988 + $user=$User->where('user_id',$userId)->find()->toArray();
  989 + dump($user);
  990 + $info['photo']=explode('https://volunteer.cnpu.org',$user['photo']);
  991 + dump($info);
  992 + $path1=ROOT_PATH.'public/imgs/font.png';
  993 + $path2=ROOT_PATH.'public'.DS.$info['photo'][1];
  994 + dump($path1);
  995 + dump($path2);
  996 + $image1 =\think\Image::open($path1);
  997 + $image2 =\think\Image::open($path2);
  998 + //$image2->thumb(430,62);
986 } 999 }
987 /** 1000 /**
988 * @title 他人主页 1001 * @title 他人主页