作者 郭盛
1 个管道 的构建 通过 耗费 5 秒

修改人数

... ... @@ -2,9 +2,8 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="73de7205-e736-4b59-941a-a54ab4506a41" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/api/index/controller/OtherController.php" afterPath="$PROJECT_DIR$/api/index/controller/OtherController.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/api/index/controller/ResourceController.php" afterPath="$PROJECT_DIR$/api/index/controller/ResourceController.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/api/index/controller/ReleaseController.php" afterPath="$PROJECT_DIR$/api/index/controller/ReleaseController.php" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
... ... @@ -18,69 +17,42 @@
<file leaf-file-name="OtherController.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/api/index/controller/OtherController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="296">
<caret line="300" column="37" lean-forward="true" selection-start-line="300" selection-start-column="37" selection-end-line="300" selection-end-column="37" />
<state relative-caret-position="299">
<caret line="325" column="0" lean-forward="false" selection-start-line="325" selection-start-column="0" selection-end-line="325" selection-end-column="0" />
<folding>
<element signature="e#129#158#0#PHP" expanded="true" />
<element signature="e#325#493#0#PHP" expanded="false" />
<element signature="e#498#807#0#PHP" expanded="false" />
<element signature="e#813#979#0#PHP" expanded="false" />
<element signature="e#984#1287#0#PHP" expanded="false" />
<element signature="e#1293#1934#0#PHP" expanded="false" />
<element signature="e#1939#3023#0#PHP" expanded="false" />
<element signature="e#3029#3393#0#PHP" expanded="false" />
<element signature="e#3398#3872#0#PHP" expanded="false" />
<element signature="e#3878#4149#0#PHP" expanded="false" />
<element signature="e#4154#5087#0#PHP" expanded="false" />
<element signature="e#5093#5402#0#PHP" expanded="false" />
<element signature="e#5407#5707#0#PHP" expanded="false" />
<element signature="e#5717#5996#0#PHP" expanded="false" />
<element signature="e#6001#6927#0#PHP" expanded="false" />
<element signature="e#7242#7631#0#PHP" expanded="false" />
<element signature="e#11017#11881#0#PHP" expanded="false" />
<element signature="e#11908#12308#0#PHP" expanded="false" />
<element signature="e#12331#12904#0#PHP" expanded="false" />
<element signature="e#344#512#0#PHP" expanded="false" />
<element signature="e#517#826#0#PHP" expanded="false" />
<element signature="e#832#998#0#PHP" expanded="false" />
<element signature="e#1003#1306#0#PHP" expanded="false" />
<element signature="e#1312#1953#0#PHP" expanded="false" />
<element signature="e#1958#3042#0#PHP" expanded="false" />
<element signature="e#3048#3412#0#PHP" expanded="false" />
<element signature="e#3417#3891#0#PHP" expanded="false" />
<element signature="e#3897#4168#0#PHP" expanded="false" />
<element signature="e#4173#5106#0#PHP" expanded="false" />
<element signature="e#5112#5421#0#PHP" expanded="false" />
<element signature="e#5426#5726#0#PHP" expanded="false" />
<element signature="e#5736#6015#0#PHP" expanded="false" />
<element signature="e#6020#6946#0#PHP" expanded="false" />
<element signature="e#6952#7256#0#PHP" expanded="false" />
<element signature="e#7261#7650#0#PHP" expanded="false" />
<element signature="e#7656#8029#0#PHP" expanded="false" />
<element signature="e#11221#12085#0#PHP" expanded="false" />
<element signature="e#12112#12512#0#PHP" expanded="false" />
<element signature="e#12535#13108#0#PHP" expanded="false" />
<element signature="e#13114#14167#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ResourceController.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/api/index/controller/ResourceController.php">
<file leaf-file-name="ReleaseController.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/api/index/controller/ReleaseController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="450">
<caret line="128" column="18" lean-forward="false" selection-start-line="128" selection-start-column="18" selection-end-line="128" selection-end-column="18" />
<folding>
<element signature="e#346#543#0#PHP" expanded="false" />
<element signature="e#548#956#0#PHP" expanded="false" />
<element signature="e#962#1253#0#PHP" expanded="false" />
<element signature="e#1258#2915#0#PHP" expanded="false" />
<element signature="e#4216#4690#0#PHP" expanded="false" />
<element signature="e#4697#5696#0#PHP" expanded="false" />
<element signature="e#5702#6355#0#PHP" expanded="false" />
<element signature="e#6360#7517#0#PHP" expanded="false" />
<element signature="e#7523#8226#0#PHP" expanded="false" />
<element signature="e#8231#9868#0#PHP" expanded="false" />
<element signature="e#9874#10732#0#PHP" expanded="false" />
<element signature="e#10737#12675#0#PHP" expanded="false" />
<element signature="e#12681#13521#0#PHP" expanded="false" />
<element signature="e#13526#15631#0#PHP" expanded="false" />
<element signature="e#15637#16284#0#PHP" expanded="false" />
<element signature="e#16289#17904#0#PHP" expanded="false" />
<element signature="e#17910#18326#0#PHP" expanded="false" />
<element signature="e#18331#19150#0#PHP" expanded="false" />
<element signature="e#19155#19833#0#PHP" expanded="false" />
<element signature="e#19839#20293#0#PHP" expanded="false" />
<element signature="e#20298#21156#0#PHP" expanded="false" />
<element signature="e#21162#21668#0#PHP" expanded="false" />
<element signature="e#21673#23104#0#PHP" expanded="false" />
<element signature="e#23110#23389#0#PHP" expanded="false" />
<element signature="e#23394#23836#0#PHP" expanded="false" />
<element signature="e#23842#24076#0#PHP" expanded="false" />
<element signature="e#24081#24474#0#PHP" expanded="false" />
<element signature="e#24480#24711#0#PHP" expanded="false" />
<element signature="e#24716#25074#0#PHP" expanded="false" />
</folding>
<state relative-caret-position="275">
<caret line="219" column="16" lean-forward="true" selection-start-line="219" selection-start-column="16" selection-end-line="219" selection-end-column="16" />
<folding />
</state>
</provider>
</entry>
... ... @@ -141,12 +113,12 @@
<option value="$PROJECT_DIR$/api/index/controller/ActiveController.php" />
<option value="$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/picture/edit.html" />
<option value="$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/area/index.html" />
<option value="$PROJECT_DIR$/api/index/controller/ReleaseController.php" />
<option value="$PROJECT_DIR$/api/index/controller/FinanceController.php" />
<option value="$PROJECT_DIR$/simplewind/cmf/controller/RestBaseController.php" />
<option value="$PROJECT_DIR$/api/index/controller/SendController.php" />
<option value="$PROJECT_DIR$/api/index/controller/OtherController.php" />
<option value="$PROJECT_DIR$/api/index/controller/ResourceController.php" />
<option value="$PROJECT_DIR$/api/index/controller/OtherController.php" />
<option value="$PROJECT_DIR$/api/index/controller/SendController.php" />
<option value="$PROJECT_DIR$/api/index/controller/ReleaseController.php" />
</list>
</option>
</component>
... ... @@ -165,10 +137,10 @@
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds" extendedState="1">
<option name="x" value="29" />
<option name="y" value="59" />
<option name="x" value="99" />
<option name="y" value="108" />
<option name="width" value="1868" />
<option name="height" value="1063" />
<option name="height" value="1061" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
... ... @@ -212,6 +184,30 @@
<item name="index" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="controller" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="resource" type="b2602c69:ProjectViewProjectNode" />
<item name="resource" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="resource" type="b2602c69:ProjectViewProjectNode" />
<item name="resource" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="upload" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="resource" type="b2602c69:ProjectViewProjectNode" />
<item name="resource" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="upload" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="qrcode" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="resource" type="b2602c69:ProjectViewProjectNode" />
<item name="resource" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="uploads" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
</expand>
<select />
</subPane>
... ... @@ -291,15 +287,15 @@
<workItem from="1569486627319" duration="2740000" />
<workItem from="1569494185536" duration="1054000" />
<workItem from="1569544728303" duration="25104000" />
<workItem from="1569716359574" duration="14315000" />
<workItem from="1569716359574" duration="19845000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="413306000" />
<option name="totallyTimeSpent" value="418836000" />
</component>
<component name="ToolWindowManager">
<frame x="29" y="59" width="1868" height="1063" extended-state="1" />
<frame x="99" y="108" width="1868" height="1061" extended-state="1" />
<editor active="true" />
<layout>
<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" />
... ... @@ -334,13 +330,6 @@
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/attestation/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/attestation/edit.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="200">
... ... @@ -554,49 +543,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/FinanceController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="900">
<caret line="43" column="27" lean-forward="false" selection-start-line="43" selection-start-column="27" selection-end-line="43" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/MyinfoController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-2806">
<caret line="22" column="7" lean-forward="false" selection-start-line="22" selection-start-column="7" selection-end-line="22" selection-end-column="7" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/ReleaseController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="8281">
<caret line="431" column="5" lean-forward="true" selection-start-line="431" selection-start-column="5" selection-end-line="431" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/SendController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="325">
<caret line="98" column="26" lean-forward="false" selection-start-line="98" selection-start-column="26" selection-end-line="98" selection-end-column="26" />
<folding>
<element signature="e#296#1102#0#PHP" expanded="false" />
<element signature="e#1108#2740#0#PHP" expanded="false" />
<element signature="e#2746#2930#0#PHP" expanded="false" />
<element signature="e#2935#3427#0#PHP" expanded="false" />
<element signature="e#3433#4607#0#PHP" expanded="false" />
<element signature="e#4612#6545#0#PHP" expanded="false" />
<element signature="e#6551#7483#0#PHP" expanded="false" />
<element signature="e#7488#9131#0#PHP" expanded="false" />
<element signature="e#9137#9946#0#PHP" expanded="false" />
<element signature="e#9951#11545#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/ActiveController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="175">
... ... @@ -659,19 +605,6 @@
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/upload/qrcode/code_11_22.jpg">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/simplewind/vendor/topthink/think-image/src/Image.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="371">
<caret line="485" column="51" lean-forward="false" selection-start-line="485" selection-start-column="51" selection-end-line="485" selection-end-column="51" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
... ... @@ -685,43 +618,14 @@
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/OtherController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="296">
<caret line="300" column="37" lean-forward="true" selection-start-line="300" selection-start-column="37" selection-end-line="300" selection-end-column="37" />
<folding>
<element signature="e#129#158#0#PHP" expanded="true" />
<element signature="e#325#493#0#PHP" expanded="false" />
<element signature="e#498#807#0#PHP" expanded="false" />
<element signature="e#813#979#0#PHP" expanded="false" />
<element signature="e#984#1287#0#PHP" expanded="false" />
<element signature="e#1293#1934#0#PHP" expanded="false" />
<element signature="e#1939#3023#0#PHP" expanded="false" />
<element signature="e#3029#3393#0#PHP" expanded="false" />
<element signature="e#3398#3872#0#PHP" expanded="false" />
<element signature="e#3878#4149#0#PHP" expanded="false" />
<element signature="e#4154#5087#0#PHP" expanded="false" />
<element signature="e#5093#5402#0#PHP" expanded="false" />
<element signature="e#5407#5707#0#PHP" expanded="false" />
<element signature="e#5717#5996#0#PHP" expanded="false" />
<element signature="e#6001#6927#0#PHP" expanded="false" />
<element signature="e#7242#7631#0#PHP" expanded="false" />
<element signature="e#11017#11881#0#PHP" expanded="false" />
<element signature="e#11908#12308#0#PHP" expanded="false" />
<element signature="e#12331#12904#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/ResourceController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="450">
<caret line="128" column="18" lean-forward="false" selection-start-line="128" selection-start-column="18" selection-end-line="128" selection-end-column="18" />
<state relative-caret-position="224">
<caret line="60" column="8" lean-forward="true" selection-start-line="60" selection-start-column="8" selection-end-line="73" selection-end-column="9" />
<folding>
<element signature="e#346#543#0#PHP" expanded="false" />
<element signature="e#548#956#0#PHP" expanded="false" />
<element signature="e#962#1253#0#PHP" expanded="false" />
<element signature="e#1258#2915#0#PHP" expanded="false" />
<element signature="e#4216#4690#0#PHP" expanded="false" />
<element signature="e#4697#5696#0#PHP" expanded="false" />
<element signature="e#5702#6355#0#PHP" expanded="false" />
... ... @@ -751,5 +655,105 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/simplewind/vendor/topthink/think-image/src/Image.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="125">
<caret line="13" column="4" lean-forward="true" selection-start-line="13" selection-start-column="4" selection-end-line="13" selection-end-column="4" />
<folding>
<element signature="e#616#660#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/upload/qrcode/code_14_22.jpg">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/upload/qrcode/code_11_22.jpg">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/SendController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="349">
<caret line="21" column="7" lean-forward="false" selection-start-line="21" selection-start-column="7" selection-end-line="21" selection-end-column="7" />
<folding>
<element signature="e#296#1102#0#PHP" expanded="false" />
<element signature="e#1108#2740#0#PHP" expanded="false" />
<element signature="e#2746#2930#0#PHP" expanded="false" />
<element signature="e#2935#3427#0#PHP" expanded="false" />
<element signature="e#3433#4607#0#PHP" expanded="false" />
<element signature="e#4612#6545#0#PHP" expanded="false" />
<element signature="e#6551#7483#0#PHP" expanded="false" />
<element signature="e#7488#9131#0#PHP" expanded="false" />
<element signature="e#9137#9946#0#PHP" expanded="false" />
<element signature="e#9951#11545#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/MyinfoController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="174">
<caret line="22" column="7" lean-forward="false" selection-start-line="22" selection-start-column="7" selection-end-line="22" selection-end-column="7" />
<folding>
<element signature="e#767#1496#0#PHP" expanded="false" />
<element signature="e#1502#2191#0#PHP" expanded="false" />
<element signature="e#2196#4102#0#PHP" expanded="false" />
<element signature="e#4108#4373#0#PHP" expanded="false" />
<element signature="e#4378#4728#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/FinanceController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-176">
<caret line="43" column="27" lean-forward="false" selection-start-line="43" selection-start-column="27" selection-end-line="43" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/OtherController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="299">
<caret line="325" column="0" lean-forward="false" selection-start-line="325" selection-start-column="0" selection-end-line="325" selection-end-column="0" />
<folding>
<element signature="e#129#158#0#PHP" expanded="true" />
<element signature="e#344#512#0#PHP" expanded="false" />
<element signature="e#517#826#0#PHP" expanded="false" />
<element signature="e#832#998#0#PHP" expanded="false" />
<element signature="e#1003#1306#0#PHP" expanded="false" />
<element signature="e#1312#1953#0#PHP" expanded="false" />
<element signature="e#1958#3042#0#PHP" expanded="false" />
<element signature="e#3048#3412#0#PHP" expanded="false" />
<element signature="e#3417#3891#0#PHP" expanded="false" />
<element signature="e#3897#4168#0#PHP" expanded="false" />
<element signature="e#4173#5106#0#PHP" expanded="false" />
<element signature="e#5112#5421#0#PHP" expanded="false" />
<element signature="e#5426#5726#0#PHP" expanded="false" />
<element signature="e#5736#6015#0#PHP" expanded="false" />
<element signature="e#6020#6946#0#PHP" expanded="false" />
<element signature="e#6952#7256#0#PHP" expanded="false" />
<element signature="e#7261#7650#0#PHP" expanded="false" />
<element signature="e#7656#8029#0#PHP" expanded="false" />
<element signature="e#11221#12085#0#PHP" expanded="false" />
<element signature="e#12112#12512#0#PHP" expanded="false" />
<element signature="e#12535#13108#0#PHP" expanded="false" />
<element signature="e#13114#14167#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/ReleaseController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="275">
<caret line="219" column="16" lean-forward="true" selection-start-line="219" selection-start-column="16" selection-end-line="219" selection-end-column="16" />
<folding />
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
... ...
... ... @@ -12,6 +12,7 @@ namespace api\index\controller;
use api\index\model\JobModel;
use cmf\controller\RestBaseController;
use think\Db;
use think\Request;
use think\Validate;
/**
... ... @@ -313,6 +314,8 @@ class OtherController extends RestBaseController
}else{
$code = "qrcode/code_$user_id.jpg";
}
$codeImage = \think\Image::open(ROOT_PATH."public/upload/$code");
$codeImage->thumb(120,120,\think\Image::THUMB_CENTER)->save(ROOT_PATH."public/upload/$code");
$jobModel = new JobModel();
$where['id'] = ['eq',$job_id];
$job = $jobModel->getOne($where);
... ... @@ -320,15 +323,16 @@ class OtherController extends RestBaseController
->field('avatar,user_nickname')
->where('id',$job['user_id'])
->find();
$image = \think\Image::open(ROOT_PATH."public/bg.png");
$text = "期待你的加入";
$remark = "长按识别二维码识别小程序";
$result = $image
->water(ROOT_PATH."public/upload/$code",9,100)
->text($remark,ROOT_PATH.'public/static/font-awesome/fonts/PingFang Medium.ttf',14,'#FFFFFF',[54,434])
->text($text,ROOT_PATH.'public/static/font-awesome/fonts/PingFang Medium.ttf',12,'#FFFFFF',[112,167])
->text($job['job_title'],ROOT_PATH.'public/static/font-awesome/fonts/PingFang Medium.ttf',20,'#FFFFFF',[60,212])
->text($user['user_nickname'],ROOT_PATH.'public/static/font-awesome/fonts/PingFang Medium.ttf',14,'#FFFFFF',[112,145]);
->water(ROOT_PATH."public/upload/$code",[456,590],100)
->text($remark,ROOT_PATH.'public/static/font-awesome/fonts/PingFang Medium.ttf',14,'#FFFFFF',[66,659])
->text($text,ROOT_PATH.'public/static/font-awesome/fonts/PingFang Medium.ttf',12,'#FFFFFF',[132,100])
->text($job['job_title'],ROOT_PATH.'public/static/font-awesome/fonts/PingFang Medium.ttf',20,'#FFFFFF',[100,200])
->text($user['user_nickname'],ROOT_PATH.'public/static/font-awesome/fonts/PingFang Medium.ttf',16,'#FFFFFF',[132,60]);
$result->save($savePath."poster_".$user_id."_$job_id.png");
$this->success('SUCCESS',['url'=>cmf_get_image_url("poster/poster_".$user_id."_$job_id.png")]);
}
... ... @@ -417,4 +421,40 @@ class OtherController extends RestBaseController
return $result;
}
public function yuanjiao($imgpath){
$ext= pathinfo($imgpath);
$src_img = null;
switch ($ext['extension']) {
case 'jpg':
$src_img = imagecreatefromjpeg($imgpath);
break;
case 'png':
$src_img = imagecreatefrompng($imgpath);
break;
}
$wh= getimagesize($imgpath);
$w=$wh[0];
$h= $wh[1];
$w= min($w, $h);
$h= $w;
$img = imagecreatetruecolor($w, $h);
//这一句一定要有
imagesavealpha($img, true);
//拾取一个完全透明的颜色,最后一个参数127为全透明
$bg = imagecolorallocatealpha($img, 255, 255, 255, 127);
imagefill($img, 0, 0, $bg);
$r= $w / 2; //圆半径
$y_x = $r; //圆心X坐标
$y_y = $r; //圆心Y坐标
for ($x = 0; $x < $w; $x++) {
for ($y = 0; $y < $h; $y++) {
$rgbColor = imagecolorat($src_img, $x, $y);
if (((($x - $r) * ($x - $r) + ($y - $r) * ($y - $r)) < ($r * $r))) {
imagesetpixel($img, $x, $y, $rgbColor);
}
}
}
return $img;
}
}
\ No newline at end of file
... ...
... ... @@ -235,7 +235,7 @@ class ReleaseController extends RestBaseController
'job_title' => 'require',
'linkman' => 'require',
'city'=>'require',
'needpeopel'=>'require',
'needpeople'=>'require',
'linkman_tel'=>'require|number|max:11',
'company_name'=>'require',
'content'=>'require',
... ...