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

测试

... ... @@ -2,7 +2,6 @@
<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/ActiveController.php" afterPath="$PROJECT_DIR$/api/index/controller/ActiveController.php" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
... ... @@ -17,8 +16,8 @@
<file leaf-file-name="ActiveController.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/api/index/controller/ActiveController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="473">
<caret line="370" column="40" lean-forward="true" selection-start-line="370" selection-start-column="40" selection-end-line="370" selection-end-column="40" />
<state relative-caret-position="514">
<caret line="564" column="23" lean-forward="false" selection-start-line="564" selection-start-column="23" selection-end-line="564" selection-end-column="23" />
<folding>
<element signature="e#129#167#0#PHP" expanded="true" />
<element signature="e#373#959#0#PHP" expanded="false" />
... ... @@ -114,8 +113,8 @@
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds">
<option name="x" value="457" />
<option name="y" value="74" />
<option name="x" value="351" />
<option name="y" value="53" />
<option name="width" value="1717" />
<option name="height" value="935" />
</component>
... ... @@ -221,15 +220,15 @@
<workItem from="1568861318343" duration="14697000" />
<workItem from="1568881010503" duration="9880000" />
<workItem from="1568938332139" duration="12331000" />
<workItem from="1568958569115" duration="4802000" />
<workItem from="1568958569115" duration="5082000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="280336000" />
<option name="totallyTimeSpent" value="280616000" />
</component>
<component name="ToolWindowManager">
<frame x="457" y="74" width="1717" height="935" extended-state="0" />
<frame x="351" y="53" width="1717" height="935" extended-state="0" />
<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.16113459" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
... ... @@ -626,8 +625,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/ActiveController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="473">
<caret line="370" column="40" lean-forward="true" selection-start-line="370" selection-start-column="40" selection-end-line="370" selection-end-column="40" />
<state relative-caret-position="514">
<caret line="564" column="23" lean-forward="false" selection-start-line="564" selection-start-column="23" selection-end-line="564" selection-end-column="23" />
<folding>
<element signature="e#129#167#0#PHP" expanded="true" />
<element signature="e#373#959#0#PHP" expanded="false" />
... ...
... ... @@ -371,9 +371,9 @@ class ActiveController extends RestBaseController
// 变大关键字
//"emphasis_keyword" => "keyword1.DATA",
);
$this->success('SUCCESS',$post_data);
$result = json_decode($this->send($post_data),true);
$result = json_decode($this->send($post_data),true);
$this->success('SUCCESS',$post_data);
if(!empty($result['errcode'])){
$this->error(['code'=>40002,'msg'=>$result['errmsg']]);
}
... ... @@ -541,6 +541,7 @@ class ActiveController extends RestBaseController
$res = $common->http_get($url);
$json_arr = json_decode($res,true);
$token = $json_arr['access_token'];
print_r($token);
return $token;
}
function send_post($url, $post_data)
... ... @@ -561,6 +562,7 @@ class ActiveController extends RestBaseController
{
$url = "https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token=" . $this->get_access_token();
$data = json_encode($post_data, true);
print_r($data);
return $this->send_post($url, $data);
}
public function getOpenid($user_id){
... ...