当前位置: 首页>>代码示例>>PHP>>正文


PHP Reply::transmitNews方法代码示例

本文整理汇总了PHP中Reply::transmitNews方法的典型用法代码示例。如果您正苦于以下问题:PHP Reply::transmitNews方法的具体用法?PHP Reply::transmitNews怎么用?PHP Reply::transmitNews使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Reply的用法示例。


在下文中一共展示了Reply::transmitNews方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: responseMsg


//.........这里部分代码省略.........
                                                 $course_name = $resultArr[0]['course_name'];
                                                 // 课程名
                                                 $teaching_building = $resultArr[0]['teaching_building'];
                                                 // 教学楼
                                                 $teaching_number = $resultArr[0]['teaching_number'];
                                                 // 教室
                                                 $course_teacher = $resultArr[0]['course_teacher'];
                                                 // 老师
                                                 $startWeekly = $resultArr[0]['startWeekly'];
                                                 // 开始周
                                                 $endWeekly = $resultArr[0]['endWeekly'];
                                                 // 结束周
                                                 if (!empty($resultArr[1]['course_name'])) {
                                                     $course_name2 = $resultArr[1]['course_name'];
                                                     // 课程名
                                                     $teaching_building2 = $resultArr[1]['teaching_building'];
                                                     // 教学楼
                                                     $teaching_number2 = $resultArr[1]['teaching_number'];
                                                     // 教室
                                                     $course_teacher2 = $resultArr[1]['course_teacher'];
                                                     // 老师
                                                     $startWeekly2 = $resultArr[1]['startWeekly'];
                                                     // 开始周
                                                     $endWeekly2 = $resultArr[1]['endWeekly'];
                                                     // 结束周
                                                     $title2 = "\n--------\n" . $course_name2 . "\n📍" . $teaching_building2 . $teaching_number2 . "\n🕘" . $course_teacher2 . "({$startWeekly2}-{$endWeekly2} 周上)";
                                                 }
                                                 $title = "{$sectionTo1}-{$sectionTo2} 节:\n" . $course_name . "\n📍" . $teaching_building . $teaching_number . "\n🕘" . $course_teacher . "({$startWeekly}-{$endWeekly} 周上)" . $title2;
                                                 $content[] = array("Title" => "{$title}", "Description" => "", "PicUrl" => "", "Url" => "ifreeweixin.sinaapp.com/kcbView/kcbView.php?openid={$fromUsername}");
                                             }
                                             $title2 = "";
                                         }
                                         $content[] = array("Title" => "💬回复课表+数字可以查看任意星期的课表哦,如【课表,1】\n㊙点击可以查看全周课表", "Description" => "", "PicUrl" => "", "Url" => "ifreeweixin.sinaapp.com/kcbView/kcbView.php?openid={$fromUsername}");
                                         echo $replyObj->transmitNews($object, $content);
                                         return;
                                     }
                                 }
                             }
                         } else {
                             if ($keyword == "朗读") {
                                 $json_string = file_get_contents('http://apix.sinaapp.com/daily/?appkey=ifreeweixin&type=listening');
                                 // 读取文件
                                 $obj = json_decode($json_string);
                                 $title = "每日英语朗读";
                                 $description = "听不懂,点击【每日英语】查看";
                                 $musicUrl = $obj->MusicUrl;
                                 $content = array("Title" => "{$title}", "Description" => "{$description}", "MusicUrl" => "{$musicUrl}", "HQMusicUrl" => "{$musicUrl}");
                                 echo $replyObj->transmitMusic($object, $content);
                                 return;
                             } else {
                                 if (substr_count($keyword, '成绩')) {
                                     /**
                                      * 判断用户是否已经认证
                                      */
                                     // $mmc_Openid = memcache_get ( $mmc, $fromUsername . "zjh" );
                                     if (empty($studentName)) {
                                         // 成绩未认证转到认证页面
                                         $scoreUrl = "http://218.196.240.171/weixinapi/index.php/Home/Jiaowu/loginview/openid/{$fromUsername}";
                                         // 体育未认证转到认证页面
                                         $peUrl = "http://218.196.240.171/weixinapi/index.php/Home/Jiaowu/loginview/openid/{$fromUsername}";
                                     } else {
                                         // 已经认证转到成绩页面
                                         $scoreUrl = "http://ifreeweixin.sinaapp.com/scoreView/scoreResultView.php?openid={$fromUsername}";
                                         // 已经认证转到体育达标页面
                                         $peUrl = "http://ifreeweixin.sinaapp.com/peQuery/peView.php?openid={$fromUsername}";
                                     }
开发者ID:mesfreeman,项目名称:ifreeweixin,代码行数:67,代码来源:replyIndex.php


注:本文中的Reply::transmitNews方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。