正在显示
3 个修改的文件
包含
37 行增加
和
67 行删除
@@ -2,6 +2,8 @@ | @@ -2,6 +2,8 @@ | ||
2 | <project version="4"> | 2 | <project version="4"> |
3 | <component name="ChangeListManager"> | 3 | <component name="ChangeListManager"> |
4 | <list default="true" id="73de7205-e736-4b59-941a-a54ab4506a41" name="Default" comment=""> | 4 | <list default="true" id="73de7205-e736-4b59-941a-a54ab4506a41" name="Default" comment=""> |
5 | + <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/public/tou.png" /> | ||
6 | + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> | ||
5 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/api/index/controller/OtherController.php" afterPath="$PROJECT_DIR$/api/index/controller/OtherController.php" /> | 7 | <change type="MODIFICATION" beforePath="$PROJECT_DIR$/api/index/controller/OtherController.php" afterPath="$PROJECT_DIR$/api/index/controller/OtherController.php" /> |
6 | </list> | 8 | </list> |
7 | <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> | 9 | <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> |
@@ -16,8 +18,8 @@ | @@ -16,8 +18,8 @@ | ||
16 | <file leaf-file-name="OtherController.php" pinned="false" current-in-tab="true"> | 18 | <file leaf-file-name="OtherController.php" pinned="false" current-in-tab="true"> |
17 | <entry file="file://$PROJECT_DIR$/api/index/controller/OtherController.php"> | 19 | <entry file="file://$PROJECT_DIR$/api/index/controller/OtherController.php"> |
18 | <provider selected="true" editor-type-id="text-editor"> | 20 | <provider selected="true" editor-type-id="text-editor"> |
19 | - <state relative-caret-position="284"> | ||
20 | - <caret line="326" column="50" lean-forward="false" selection-start-line="326" selection-start-column="50" selection-end-line="326" selection-end-column="50" /> | 21 | + <state relative-caret-position="257"> |
22 | + <caret line="328" column="62" lean-forward="true" selection-start-line="328" selection-start-column="62" selection-end-line="328" selection-end-column="62" /> | ||
21 | <folding> | 23 | <folding> |
22 | <element signature="e#129#158#0#PHP" expanded="true" /> | 24 | <element signature="e#129#158#0#PHP" expanded="true" /> |
23 | <element signature="e#344#512#0#PHP" expanded="false" /> | 25 | <element signature="e#344#512#0#PHP" expanded="false" /> |
@@ -36,12 +38,11 @@ | @@ -36,12 +38,11 @@ | ||
36 | <element signature="e#6020#6946#0#PHP" expanded="false" /> | 38 | <element signature="e#6020#6946#0#PHP" expanded="false" /> |
37 | <element signature="e#6952#7256#0#PHP" expanded="false" /> | 39 | <element signature="e#6952#7256#0#PHP" expanded="false" /> |
38 | <element signature="e#7261#7650#0#PHP" expanded="false" /> | 40 | <element signature="e#7261#7650#0#PHP" expanded="false" /> |
39 | - <element signature="e#10525#11316#0#PHP" expanded="false" /> | ||
40 | - <element signature="e#11336#12200#0#PHP" expanded="false" /> | ||
41 | - <element signature="e#12227#12627#0#PHP" expanded="false" /> | ||
42 | - <element signature="e#12651#13224#0#PHP" expanded="false" /> | ||
43 | - <element signature="e#13247#14057#0#PHP" expanded="false" /> | ||
44 | - <element signature="e#14064#15117#0#PHP" expanded="false" /> | 41 | + <element signature="e#10737#11528#0#PHP" expanded="false" /> |
42 | + <element signature="e#11548#12412#0#PHP" expanded="false" /> | ||
43 | + <element signature="e#12439#12839#0#PHP" expanded="false" /> | ||
44 | + <element signature="e#12863#13436#0#PHP" expanded="false" /> | ||
45 | + <element signature="e#13459#14269#0#PHP" expanded="false" /> | ||
45 | </folding> | 46 | </folding> |
46 | </state> | 47 | </state> |
47 | </provider> | 48 | </provider> |
@@ -127,8 +128,8 @@ | @@ -127,8 +128,8 @@ | ||
127 | </component> | 128 | </component> |
128 | <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" /> | 129 | <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" /> |
129 | <component name="ProjectFrameBounds"> | 130 | <component name="ProjectFrameBounds"> |
130 | - <option name="x" value="61" /> | ||
131 | - <option name="y" value="77" /> | 131 | + <option name="x" value="-60" /> |
132 | + <option name="y" value="86" /> | ||
132 | <option name="width" value="1868" /> | 133 | <option name="width" value="1868" /> |
133 | <option name="height" value="1019" /> | 134 | <option name="height" value="1019" /> |
134 | </component> | 135 | </component> |
@@ -253,15 +254,15 @@ | @@ -253,15 +254,15 @@ | ||
253 | <workItem from="1569486627319" duration="2740000" /> | 254 | <workItem from="1569486627319" duration="2740000" /> |
254 | <workItem from="1569494185536" duration="1054000" /> | 255 | <workItem from="1569494185536" duration="1054000" /> |
255 | <workItem from="1569544728303" duration="25104000" /> | 256 | <workItem from="1569544728303" duration="25104000" /> |
256 | - <workItem from="1569716359574" duration="27168000" /> | 257 | + <workItem from="1569716359574" duration="28303000" /> |
257 | </task> | 258 | </task> |
258 | <servers /> | 259 | <servers /> |
259 | </component> | 260 | </component> |
260 | <component name="TimeTrackingManager"> | 261 | <component name="TimeTrackingManager"> |
261 | - <option name="totallyTimeSpent" value="426159000" /> | 262 | + <option name="totallyTimeSpent" value="427294000" /> |
262 | </component> | 263 | </component> |
263 | <component name="ToolWindowManager"> | 264 | <component name="ToolWindowManager"> |
264 | - <frame x="61" y="77" width="1868" height="1019" extended-state="0" /> | 265 | + <frame x="-60" y="86" width="1868" height="1019" extended-state="0" /> |
265 | <editor active="true" /> | 266 | <editor active="true" /> |
266 | <layout> | 267 | <layout> |
267 | <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18086283" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> | 268 | <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18086283" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> |
@@ -296,7 +297,6 @@ | @@ -296,7 +297,6 @@ | ||
296 | <watches-manager /> | 297 | <watches-manager /> |
297 | </component> | 298 | </component> |
298 | <component name="editorHistoryManager"> | 299 | <component name="editorHistoryManager"> |
299 | - <entry file="file://$PROJECT_DIR$/api/index/controller/CommonController.php" /> | ||
300 | <entry file="file://$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/statistic/index.html"> | 300 | <entry file="file://$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/statistic/index.html"> |
301 | <provider selected="true" editor-type-id="text-editor"> | 301 | <provider selected="true" editor-type-id="text-editor"> |
302 | <state relative-caret-position="126"> | 302 | <state relative-caret-position="126"> |
@@ -520,11 +520,6 @@ | @@ -520,11 +520,6 @@ | ||
520 | </state> | 520 | </state> |
521 | </provider> | 521 | </provider> |
522 | </entry> | 522 | </entry> |
523 | - <entry file="file://$PROJECT_DIR$/public/bg.png"> | ||
524 | - <provider selected="true" editor-type-id="images"> | ||
525 | - <state /> | ||
526 | - </provider> | ||
527 | - </entry> | ||
528 | <entry file="file://$PROJECT_DIR$/api/index/controller/ResourceController.php"> | 523 | <entry file="file://$PROJECT_DIR$/api/index/controller/ResourceController.php"> |
529 | <provider selected="true" editor-type-id="text-editor"> | 524 | <provider selected="true" editor-type-id="text-editor"> |
530 | <state relative-caret-position="224"> | 525 | <state relative-caret-position="224"> |
@@ -698,10 +693,20 @@ | @@ -698,10 +693,20 @@ | ||
698 | </state> | 693 | </state> |
699 | </provider> | 694 | </provider> |
700 | </entry> | 695 | </entry> |
696 | + <entry file="file://$PROJECT_DIR$/public/bg.png"> | ||
697 | + <provider selected="true" editor-type-id="images"> | ||
698 | + <state /> | ||
699 | + </provider> | ||
700 | + </entry> | ||
701 | + <entry file="file://$PROJECT_DIR$/public/tou.png"> | ||
702 | + <provider selected="true" editor-type-id="images"> | ||
703 | + <state /> | ||
704 | + </provider> | ||
705 | + </entry> | ||
701 | <entry file="file://$PROJECT_DIR$/api/index/controller/OtherController.php"> | 706 | <entry file="file://$PROJECT_DIR$/api/index/controller/OtherController.php"> |
702 | <provider selected="true" editor-type-id="text-editor"> | 707 | <provider selected="true" editor-type-id="text-editor"> |
703 | - <state relative-caret-position="284"> | ||
704 | - <caret line="326" column="50" lean-forward="false" selection-start-line="326" selection-start-column="50" selection-end-line="326" selection-end-column="50" /> | 708 | + <state relative-caret-position="257"> |
709 | + <caret line="328" column="62" lean-forward="true" selection-start-line="328" selection-start-column="62" selection-end-line="328" selection-end-column="62" /> | ||
705 | <folding> | 710 | <folding> |
706 | <element signature="e#129#158#0#PHP" expanded="true" /> | 711 | <element signature="e#129#158#0#PHP" expanded="true" /> |
707 | <element signature="e#344#512#0#PHP" expanded="false" /> | 712 | <element signature="e#344#512#0#PHP" expanded="false" /> |
@@ -720,12 +725,11 @@ | @@ -720,12 +725,11 @@ | ||
720 | <element signature="e#6020#6946#0#PHP" expanded="false" /> | 725 | <element signature="e#6020#6946#0#PHP" expanded="false" /> |
721 | <element signature="e#6952#7256#0#PHP" expanded="false" /> | 726 | <element signature="e#6952#7256#0#PHP" expanded="false" /> |
722 | <element signature="e#7261#7650#0#PHP" expanded="false" /> | 727 | <element signature="e#7261#7650#0#PHP" expanded="false" /> |
723 | - <element signature="e#10525#11316#0#PHP" expanded="false" /> | ||
724 | - <element signature="e#11336#12200#0#PHP" expanded="false" /> | ||
725 | - <element signature="e#12227#12627#0#PHP" expanded="false" /> | ||
726 | - <element signature="e#12651#13224#0#PHP" expanded="false" /> | ||
727 | - <element signature="e#13247#14057#0#PHP" expanded="false" /> | ||
728 | - <element signature="e#14064#15117#0#PHP" expanded="false" /> | 728 | + <element signature="e#10737#11528#0#PHP" expanded="false" /> |
729 | + <element signature="e#11548#12412#0#PHP" expanded="false" /> | ||
730 | + <element signature="e#12439#12839#0#PHP" expanded="false" /> | ||
731 | + <element signature="e#12863#13436#0#PHP" expanded="false" /> | ||
732 | + <element signature="e#13459#14269#0#PHP" expanded="false" /> | ||
729 | </folding> | 733 | </folding> |
730 | </state> | 734 | </state> |
731 | </provider> | 735 | </provider> |
@@ -326,13 +326,16 @@ class OtherController extends RestBaseController | @@ -326,13 +326,16 @@ class OtherController extends RestBaseController | ||
326 | ->find(); | 326 | ->find(); |
327 | $avatar = $this->request->param('avatar'); | 327 | $avatar = $this->request->param('avatar'); |
328 | $image = \think\Image::open(ROOT_PATH."public/bg.png"); | 328 | $image = \think\Image::open(ROOT_PATH."public/bg.png"); |
329 | + $tou = \think\Image::open(ROOT_PATH."public/tou.png"); | ||
330 | + $tou->thumb(90,90,\think\Image::THUMB_CENTER)->save(ROOT_PATH."public/tou.png"); | ||
329 | $text = "期待你的加入"; | 331 | $text = "期待你的加入"; |
330 | $remark = "长按识别二维码识别小程序"; | 332 | $remark = "长按识别二维码识别小程序"; |
331 | $result = $image | 333 | $result = $image |
334 | + ->water(ROOT_PATH."public/tou.png",[35,48],100) | ||
332 | ->water(ROOT_PATH."public/upload/$code",[456,590],100) | 335 | ->water(ROOT_PATH."public/upload/$code",[456,590],100) |
333 | - ->text($remark,ROOT_PATH.'public/static/font-awesome/fonts/PingFang Medium.ttf',14,'#FFFFFF',[66,659]) | ||
334 | - ->text($text,ROOT_PATH.'public/static/font-awesome/fonts/PingFang Medium.ttf',12,'#FFFFFF',[132,100]) | ||
335 | - ->text($job['job_title'],ROOT_PATH.'public/static/font-awesome/fonts/PingFang Medium.ttf',20,'#FFFFFF',[100,200]) | 336 | + ->text($remark,ROOT_PATH.'public/static/font-awesome/fonts/PingFang Medium.ttf',16,'#FFFFFF',[66,659]) |
337 | + ->text($text,ROOT_PATH.'public/static/font-awesome/fonts/PingFang Medium.ttf',14,'#FFFFFF',[132,100]) | ||
338 | + ->text($job['job_title'],ROOT_PATH.'public/static/font-awesome/fonts/PingFang Medium.ttf',22,'#FFFFFF',[100,200]) | ||
336 | ->text($user['user_nickname'],ROOT_PATH.'public/static/font-awesome/fonts/PingFang Medium.ttf',16,'#FFFFFF',[132,60]); | 339 | ->text($user['user_nickname'],ROOT_PATH.'public/static/font-awesome/fonts/PingFang Medium.ttf',16,'#FFFFFF',[132,60]); |
337 | $result->save($savePath."poster_".$user_id."_$job_id.png"); | 340 | $result->save($savePath."poster_".$user_id."_$job_id.png"); |
338 | $this->success('SUCCESS',['url'=>cmf_get_image_url("poster/poster_".$user_id."_$job_id.png")]); | 341 | $this->success('SUCCESS',['url'=>cmf_get_image_url("poster/poster_".$user_id."_$job_id.png")]); |
@@ -439,41 +442,4 @@ class OtherController extends RestBaseController | @@ -439,41 +442,4 @@ class OtherController extends RestBaseController | ||
439 | return $result; | 442 | return $result; |
440 | } | 443 | } |
441 | 444 | ||
442 | - | ||
443 | - public function yuanjiao($imgpath){ | ||
444 | - $ext= pathinfo($imgpath); | ||
445 | - $src_img = null; | ||
446 | - switch ($ext['extension']) { | ||
447 | - case 'jpg': | ||
448 | - $src_img = imagecreatefromjpeg($imgpath); | ||
449 | - break; | ||
450 | - case 'png': | ||
451 | - $src_img = imagecreatefrompng($imgpath); | ||
452 | - break; | ||
453 | - } | ||
454 | - $wh= getimagesize($imgpath); | ||
455 | - $w=$wh[0]; | ||
456 | - $h= $wh[1]; | ||
457 | - $w= min($w, $h); | ||
458 | - $h= $w; | ||
459 | - $img = imagecreatetruecolor($w, $h); | ||
460 | - //这一句一定要有 | ||
461 | - imagesavealpha($img, true); | ||
462 | - //拾取一个完全透明的颜色,最后一个参数127为全透明 | ||
463 | - $bg = imagecolorallocatealpha($img, 255, 255, 255, 127); | ||
464 | - imagefill($img, 0, 0, $bg); | ||
465 | - $r= $w / 2; //圆半径 | ||
466 | - $y_x = $r; //圆心X坐标 | ||
467 | - $y_y = $r; //圆心Y坐标 | ||
468 | - for ($x = 0; $x < $w; $x++) { | ||
469 | - for ($y = 0; $y < $h; $y++) { | ||
470 | - $rgbColor = imagecolorat($src_img, $x, $y); | ||
471 | - if (((($x - $r) * ($x - $r) + ($y - $r) * ($y - $r)) < ($r * $r))) { | ||
472 | - imagesetpixel($img, $x, $y, $rgbColor); | ||
473 | - } | ||
474 | - } | ||
475 | -} | ||
476 | -return $img; | ||
477 | -} | ||
478 | - | ||
479 | } | 445 | } |
public/tou.png
0 → 100644
![](/guosheng/resource/raw/72e21ec709361f919552ce55addc9edc4e40e5fe/public/tou.png)
8.3 KB
-
请 注册 或 登录 后发表评论