private function unbind($xml) { $from = $xml->FromUserName; $to = $xml->ToUserName; $connect = WxConnect::get_by('wx_openid', $from); if ($connect) { $profile = Profile::get($connect->user_id); $name = $profile->name; WxConnect::delete($connect->id); $this->wx_reply->imm_reply_text($to, $from, "尊敬的" . $name . ",您已经成功取消微信账号和懒投资账号绑定。"); } else { $this->wx_reply->imm_reply_text($to, $from, "尊敬的用户,您未绑定微信账号和懒投资账号。"); } }