12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- namespace app\index\controller;
- use app\index\logic\companylogic;
- use app\index\logic\partylogic;
- use think\Controller;
- class Party extends Base
- {
- /**
- * 根据时间获取活动信息
- * 20220119
- * wj
- */
- public function getinfobytime()
- {
- $param = request()->param();
- $l_p = new partylogic();
- $time =date('Y-m-d H:i:s');
- $param['time'] = $time;
- $result = $l_p->getinfobytime($param);
- if (1 != $result['status']) {
- return backjson(0, $result['msg']);
- }
- return backjson(200, $result['data']);
- }
- /**
- * 企业报名
- * 20220119
- * wj
- */
- public function companysignup()
- {
- $param = request()->param();
- $l_p = new partylogic();
- $result = $l_p->companysingup($param);
- if (1 != $result['status']) {
- return backjson(0, $result['msg']);
- }
- return backjson(200, $result['data']);
- }
- /**
- * 获取报名的企业列表
- * 20220119
- * wj
- */
- public function getcompanylist()
- {
- $param = request()->param();
- $l_p = new partylogic();
- $result = $l_p->getlistcompanybypartyid($param);
- if (1 != $result['status']) {
- return backjson(0, $result['msg']);
- }
- $uselist = [];
- $list = $result['data'];
- $l_c = new companylogic();
- foreach ($list as $key => $value) {
- $where = ['id'=>$value['company_id'],'activestate'=>1];
- $result = $l_c->getinfowitchinventbyid($where);
- if(1==$result['status']){
- $uselist[] = $result['data'];
- }
- }
- return backjson(200, $uselist);
- }
- }
|