getContext()->getRequest(); $m = addslashes(trim($request->getParameter('m'))); if($m){ $this->$m(); } return; } public function getRequestMethods(){ return Request :: POST; } //获取系统配置信息 public function getAppInfo(){ $db = DBAction::getInstance(); $img = ""; $sql = "select * from lkt_config where id = 1"; $r_1 = $db->select($sql); $uploadImg_domain = $r_1[0]->uploadImg_domain; // 图片上传域名 $uploadImg = $r_1[0]->uploadImg; // 图片上传位置 if(strpos($uploadImg,'../') === false){ // 判断字符串是否存在 ../ $img = $uploadImg_domain . $uploadImg; // 图片路径 }else{ // 不存在 $img = $uploadImg_domain . substr($uploadImg,2); // 图片路径 } $title = $r_1[0]->company; $logo = $img.$r_1[0]->logo; $appid = $r_1[0]->appid; // 小程序唯一标识 $appsecret = $r_1[0]->appsecret; // 小程序的 app secret $array = array(); $array['imageRootUrl'] = $img; $array['appName'] = $title; $array['logo'] = $logo; $array['uploadImgUrl'] = $uploadImg_domain; $array['appid'] = $appid; $array['appsecret'] = $appsecret; return $array; } } ?>