作者 lyh

gx

@@ -165,10 +165,26 @@ class LoginController extends BaseController @@ -165,10 +165,26 @@ class LoginController extends BaseController
165 * @time :2023/8/24 9:30 165 * @time :2023/8/24 9:30
166 */ 166 */
167 public function eventMessage(){ 167 public function eventMessage(){
168 -// $message = file_get_contents("php://input");  
169 -// $message = simplexml_load_string($message, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOERROR);  
170 -// @file_put_contents(storage_path('logs/lyh_error.log'), $message . PHP_EOL, FILE_APPEND);  
171 - $this->response('success'); 168 + $message = file_get_contents("php://input");
  169 + $message = simplexml_load_string($message, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOERROR);
  170 + $arr = [
  171 + 'ToUserName' => 'gh_27174ac5c9d8',
  172 + 'FromUserName' => 'oMbcI6gRzvfrU8ssGsEyvzXOO94w',
  173 + 'CreateTime' => '1693385898',
  174 + 'MsgType' => 'event',
  175 + 'Event' => 'subscribe',
  176 + 'EventKey' => 'qrscene_global-v6_v6',
  177 + 'Ticket' => 'gQF27zwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyWnppdHhWTlRjOEcxTlBpTE5BY2IAAgRjBO9kAwQQDgAA',
  178 + ];
  179 +
  180 + @file_put_contents(storage_path('logs/lyh_error.log'), var_export($message, true) . PHP_EOL, FILE_APPEND);
  181 + return "<xml>
  182 + <ToUserName><![CDATA[$message->FromUserName]]></ToUserName>
  183 + <FromUserName><![CDATA[$message->ToUserName]]></FromUserName>
  184 + <CreateTime>".time()."</CreateTime>
  185 + <MsgType><![CDATA[text]]></MsgType>
  186 + <Content><![CDATA[扫码成功了]]></Content>
  187 + </xml>";
172 } 188 }
173 189
174 190
@@ -74,8 +74,8 @@ class ProjectLogic extends BaseLogic @@ -74,8 +74,8 @@ class ProjectLogic extends BaseLogic
74 * @time :2023/8/30 11:57 74 * @time :2023/8/30 11:57
75 */ 75 */
76 public function projectSave(){ 76 public function projectSave(){
77 - DB::beginTransaction();  
78 - try { 77 +// DB::beginTransaction();
  78 +// try {
79 $this->createProjectData($this->param); 79 $this->createProjectData($this->param);
80 //保存项目信息 80 //保存项目信息
81 $this->saveProject($this->param); 81 $this->saveProject($this->param);
@@ -87,11 +87,11 @@ class ProjectLogic extends BaseLogic @@ -87,11 +87,11 @@ class ProjectLogic extends BaseLogic
87 $this->saveProjectDeployOptimize($this->param['deploy_optimize']); 87 $this->saveProjectDeployOptimize($this->param['deploy_optimize']);
88 //保存售后信息 88 //保存售后信息
89 $this->saveProjectAfter($this->param['project_after']); 89 $this->saveProjectAfter($this->param['project_after']);
90 - DB::commit();  
91 - }catch (\Exception $e){  
92 - DB::rollBack();  
93 - $this->fail('error');  
94 - } 90 +// DB::commit();
  91 +// }catch (\Exception $e){
  92 +// DB::rollBack();
  93 +// $this->fail('error');
  94 +// }
95 return $this->success(); 95 return $this->success();
96 } 96 }
97 97