|
|
@@ -0,0 +1,39 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace app\api\controller;
|
|
|
+
|
|
|
+use app\common\controller\Api;
|
|
|
+use \think\Request;
|
|
|
+use \think\Db;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 客户管理接口
|
|
|
+ */
|
|
|
+class Custom extends Api
|
|
|
+{
|
|
|
+ protected $noNeedLogin = ['*'];
|
|
|
+ protected $noNeedRight = ['*'];
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 首页
|
|
|
+ *
|
|
|
+ */
|
|
|
+ public function index()
|
|
|
+ {
|
|
|
+ $this->success('请求成功');
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 获取客户信息
|
|
|
+ *
|
|
|
+ * @ApiMethod GET
|
|
|
+ *
|
|
|
+ */
|
|
|
+ public function getCustom(){
|
|
|
+ if (Request::instance()->isGet() == false){
|
|
|
+ $this->error('非法请求');
|
|
|
+ }
|
|
|
+ $field = '客户编号,客户名称';
|
|
|
+ $list = Db::name('产品_基本资料')->distinct(true)->field($field)->order('客户编号 asc')->select();
|
|
|
+ $this->success('请求成功',$list);
|
|
|
+ }
|
|
|
+}
|