|
|
|
@ -74,7 +74,10 @@ class Wxserver extends BaseController |
|
|
|
|
$model->update($up, ['appid' => $appid]); |
|
|
|
|
} |
|
|
|
|
echo 'success'; |
|
|
|
|
} elseif ($data['MsgType'] == 'text') { |
|
|
|
|
} elseif ($data['MsgType'] == 'text' && !empty($data['Content'])) { |
|
|
|
|
if ($data['Content'] == 'TESTCOMPONENT_MSG_TYPE_TEXT') { |
|
|
|
|
$data['Content'] = 'TESTCOMPONENT_MSG_TYPE_TEXT_callback'; |
|
|
|
|
} |
|
|
|
|
echo $this->responseText($data); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -92,7 +95,7 @@ class Wxserver extends BaseController |
|
|
|
|
</xml>"; |
|
|
|
|
$fromUser = $data['ToUserName']; |
|
|
|
|
$toUser = $data['FromUserName']; |
|
|
|
|
$content = !empty($data['Content']) ? $data['Content'] : '收到你的信息了'; |
|
|
|
|
$content = !empty($data['Content']) ? $data['Content'] : 'success'; |
|
|
|
|
$time = time(); |
|
|
|
|
$msgType = 'text'; |
|
|
|
|
return sprintf($template, $toUser, $fromUser, $time, $msgType, $content); |
|
|
|
|