cp合作方获取接口添加

master
zhengyongxing 5 years ago
parent ec4d180287
commit c10e05e688

@ -0,0 +1,26 @@
<?php
namespace Api\Controller;
use Think\Controller;
use User\Api\MemberApi;
/**
* 用户操作接口
*
*/
class PartnerController extends Controller{
public function getPartnerList() {
// var_dump(md5(sha1('PARTNER_ID') . 'PARTNER_ID'));die();
if (md5(sha1('PARTNER_ID') . 'PARTNER_ID') != $_REQUEST['code']){
exit("error");
}
$data = M('partner','tab_')->field("id,partner name")->select();
header('Content-Type:application/json; charset=utf-8');
exit(json_encode($data));
}
}

@ -0,0 +1,42 @@
<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
if(version_compare(PHP_VERSION,'5.3.0','<')) die('require PHP > 5.3.0 !');
/**
* 系统调试设置
* 项目正式部署后请设置为false
*/
define('APP_DEBUG', true );
define('BIND_MODULE','Api');
define('ROOTTT',dirname(__FILE__).'/');
define('ROOTTTTT',dirname(__FILE__));
define('FONTS',dirname(__FILE__).'/Public/Admin/fonts/');
/**
* 应用目录设置
* 安全期间建议安装调试完成后移动到非WEB目录
*/
define ( 'APP_PATH', './Application/' );
if(!is_file(APP_PATH . 'User/Conf/config.php')){
header('Location: ./install.php');
exit;
}
/**
* 缓存目录设置
* 此目录必须可写建议移动到非WEB目录
*/
define ( 'RUNTIME_PATH', './Runtime/' );
/**
* 引入核心入口
* ThinkPHP亦可移动到WEB以外的目录
*/
require './ThinkPHP/ThinkPHP.php';
Loading…
Cancel
Save