|
@@ -1027,6 +1027,9 @@ class ApiAction extends Action {
|
|
public function get_contact_us( ){
|
|
public function get_contact_us( ){
|
|
$this->token_verify();
|
|
$this->token_verify();
|
|
$typeid = M('jms_yy_config_type')->where(array('CityId'=>'0','TypeCode'=>'CZAPP_ContactUs'))->getField('ID');
|
|
$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');
|
|
$where = array('TypeId'=>$typeid,'Name'=>'联系我们','CityId'=>'0');
|
|
$msg = M('jms_yy_config')->where($where)->find();
|
|
$msg = M('jms_yy_config')->where($where)->find();
|
|
if(!$msg){
|
|
if(!$msg){
|
|
@@ -1039,6 +1042,9 @@ class ApiAction extends Action {
|
|
public function get_about_us( ){
|
|
public function get_about_us( ){
|
|
$this->token_verify();
|
|
$this->token_verify();
|
|
$typeid = M('jms_yy_config_type')->where(array('CityId'=>'0','TypeCode'=>'CZAPP_AboutUs'))->getField('ID');
|
|
$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');
|
|
$where = array('TypeId'=>$typeid,'Name'=>'关于我们','CityId'=>'0');
|
|
$msg = M('jms_yy_config')->where($where)->find();
|
|
$msg = M('jms_yy_config')->where($where)->find();
|
|
if(!$msg){
|
|
if(!$msg){
|