发布v2.7.0版本

This commit is contained in:
雨中磐石
2025-07-18 14:38:01 +08:00
parent d0c604e040
commit 5cec56526e
31 changed files with 235 additions and 204 deletions

View File

@@ -10,63 +10,7 @@ class openmodhetongClassAction extends openapiAction
public function dataAction()
{
return retuenerror('20240429最新已弃用');
$mobile = $this->get('mobile');
$xcytype = $this->get('xcytype');
$openid = $this->get('openid');
$nickName = $this->jm->base64decode($this->get('nickName'));
$htdata = array();
$db = m('wxxcyus');
$uarr['mobile'] = $mobile;
$uarr['xcytype'] = $xcytype;
$uarr['openid'] = $openid;
$uarr['nickName'] = $nickName;
$uarr['province'] = $this->get('province');
$uarr['city'] = $this->get('city');
$uarr['gender'] = $this->get('gender');
$uarr['dingyue'] = $this->get('dingyue');
$uarr['avatarUrl'] = $this->jm->base64decode($this->get('avatarUrl'));
$where = "`openid`='$openid'";
if($db->rows($where)==0){
$uarr['adddt'] = $this->now;
$where='';
}else{
$uarr['optdt'] = $this->now;
}
$db->record($uarr, $where);
$custid = '0'; //客户id
$rows = m('customer')->getall("`mobile`='$mobile' and `status`=1",'id');
foreach($rows as $k=>$rs)$custid.=','.$rs['id'].'';
if($custid!='0'){
$htrows = m('custract')->getall('custid in('.$custid.')','custid,custname,id,startdt,enddt,signdt,type,money,num','id desc');
$dt = $this->rock->date;
foreach($htrows as $k=>$rs){
if($rs['startdt']>$dt){
$statustext='待生效';
$statuscolor='blue';
}else if($rs['startdt']<=$dt && $rs['enddt']>=$dt){
$statustext='生效中';
$statuscolor='green';
}else if($rs['enddt']<$dt){
$statustext='已过期';
$statuscolor='gray';
}
$htdata[] = array(
'id' => $rs['id'],
'name' => $rs['custname'],
'modenum' => 'custract',
'explain' => '金额:'.$rs['money'].',编号:'.$rs['num'].',有效期:'.$rs['startdt'].'→'.$rs['enddt'].'',
'statustext'=>$statustext,
'statuscolor'=>$statuscolor,
);
}
}
return returnsuccess(array(
'htdata' => $htdata,
));
}
/**
@@ -75,23 +19,6 @@ class openmodhetongClassAction extends openapiAction
public function customerAction()
{
return retuenerror('20240429最新已弃用');
$mobile = $this->get('mobile');
$xcytype = $this->get('xcytype');
$openid = $this->get('openid');
$sql = "select a.id,a.name,a.unitname,b.name as yewuname from [Q]customer a left join [Q]admin b on a.uid=b.id where a.`mobile`='$mobile' and a.`status`=1";
$rows = $this->db->getall($sql);
$custdata = array();
foreach($rows as $k=>$rs){
$custdata[] = array(
'id' => $rs['id'],
'name' => $rs['name'],
'modenum' => 'customer',
'explain' => '业务员:'.$rs['yewuname'].'',
);
}
return returnsuccess(array(
'custdata' => $custdata,
));
}
}

View File

@@ -10,70 +10,5 @@ class openxiangClassAction extends openapiAction
$this->showreturn('', '此页面弃用', 201);//2025-04-09
}
/**
* 详情
*/
public function dataAction()
{
$list['hetong'] = 'custract,customer'; //配置可读取模块
$num = $this->get('num');
$xcytype = $this->get('xcytype');
$mid = (int)$this->get('mid','0');
if(isempt($num) || !$xcytype || $mid==0)return returnerror('num isempt');
$kears = arrvalue($list, $xcytype);
if(!$kears)return returnerror('无效模块1');
if(!in_array($num,explode(',', $kears)))return returnerror('无效模块2');
$flow = m('flow')->initflow($num,$mid, false);
$barr['modename'] = $flow->modename;
$barr['btndata'] = array();
$barr['xiangdata']= array();
if(method_exists($flow,'openxiang')){
$lbarr = $flow->openxiang();
if(is_array($lbarr))foreach($lbarr as $k=>$v)$barr[$k]=$v;
}
return returnsuccess($barr);
}
/**
* 操作菜单
*/
public function optmenuAction()
{
$num = $this->get('num');
$xcytype = $this->get('xcytype');
$mid = (int)$this->get('mid','0');
$menuid = (int)$this->get('menuid','0');
$sm = c('check')->onlysql($this->jm->base64decode($this->get('sm')));
if(isempt($num) || !$xcytype || $mid==0)return returnerror('num isempt');
$flow = m('flow')->initflow($num,$mid, false);
$msg = $flow->optmenu($menuid,1,$sm);
if($msg!='ok')return returnerror($msg);
return returnsuccess($msg);
}
/**
* 下载文件
*/
public function downurlAction()
{
$id = (int)$this->get('id','0');
$openid = $this->get('openid');
if(isempt($openid))return;
if(m('wxxcyus')->rows("`openid`='$openid'")==0)return;
m('file')->show($id, true);
}
/**
* 返回文件详情
*/
public function fileinfoAction()
{
$id = (int)$this->get('id','0');
$openid = $this->get('openid');
if(isempt($openid))return returnerror('无效openid1');
if(m('wxxcyus')->rows("`openid`='$openid'")==0)return returnerror('无效openid');
$frs = m('file')->getone($id,'id,filename,filesize,fileext,filepath,filepathout');
return returnsuccess($frs);
}
}