Quellcode durchsuchen

关于我们接口升级

git vor 5 Jahren
Ursprung
Commit
90aac2535b
2 geänderte Dateien mit 7 neuen und 1 gelöschten Zeilen
  1. 6 0
      Home/Lib/Action/ApiAction.class.php
  2. 1 1
      czapp

+ 6 - 0
Home/Lib/Action/ApiAction.class.php

@@ -1027,6 +1027,9 @@ class ApiAction extends Action {
 	public  function get_contact_us(  ){
 		$this->token_verify();
 		$typeid = M('jms_yy_config_type')->where(array('CityId'=>'0','TypeCode'=>'CZAPP_ContactUs'))->getField('ID');
+		if(!$typeid){
+			$this->api_fail(C('FAIL'),'联系我们类型不存在');
+		}
 		$where = array('TypeId'=>$typeid,'Name'=>'联系我们','CityId'=>'0');
 		$msg = M('jms_yy_config')->where($where)->find();
 		if(!$msg){
@@ -1039,6 +1042,9 @@ class ApiAction extends Action {
 	public  function get_about_us(  ){
 		$this->token_verify();
 		$typeid = M('jms_yy_config_type')->where(array('CityId'=>'0','TypeCode'=>'CZAPP_AboutUs'))->getField('ID');
+		if(!$typeid){
+			$this->api_fail(C('FAIL'),'关于我们类型不存在');
+		}
 		$where = array('TypeId'=>$typeid,'Name'=>'关于我们','CityId'=>'0');
 		$msg = M('jms_yy_config')->where($where)->find();
 		if(!$msg){

+ 1 - 1
czapp

@@ -1 +1 @@
-Subproject commit 4fffcb43b83dc6361074606c08a714f86f2d62f0
+Subproject commit 926b05c84d5e38f6a1fd796a1016c6ff04384bff