信呼v2.5.1版本
This commit is contained in:
@@ -36,7 +36,7 @@ class apiAction extends ActionNot
|
||||
$this->adminname = '';
|
||||
$boss = (M == 'login|api');
|
||||
if(!$boss){
|
||||
if($this->isempt($this->token))$this->showreturn('','token invalid', 199);
|
||||
if(isempt($this->token))$this->showreturn('','token invalid', 199);
|
||||
$lodb = m('login');
|
||||
$onto = $lodb->getone("`uid`='$this->adminid' and `token`='$this->token' and `online`=1");
|
||||
if(!$onto)$this->showreturn('','登录失效,请重新登录', 199);
|
||||
|
||||
@@ -105,8 +105,10 @@ class loginClassAction extends apiAction
|
||||
public function getmaxupAction()
|
||||
{
|
||||
$maxup = c('upfile')->getmaxzhao();
|
||||
$upkey = md5('upkey'.time().$this->jm->getRandkey());
|
||||
$this->showreturn(array(
|
||||
'maxup' => $maxup
|
||||
'maxup' => $maxup,
|
||||
'upkey' => $upkey
|
||||
));
|
||||
}
|
||||
|
||||
@@ -268,4 +270,26 @@ class loginClassAction extends apiAction
|
||||
'logo' => 'images/logo.png'
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取第三方上传图片地址
|
||||
*/
|
||||
public function upimagepathAction()
|
||||
{
|
||||
$fileid = (int)$this->get('fileid');
|
||||
$fid = $this->get('fid');
|
||||
$adddt = date('Y-m-d H:i:s', time()-20);
|
||||
$frs = m('file')->getone("`id`='$fileid' and `adddt`>'$adddt'");
|
||||
if(!$frs)return returnerror('404');
|
||||
$path = '';
|
||||
if(!isempt($frs['thumbplat'])){
|
||||
$path = str_replace('_s.','.',$frs['thumbplat']);
|
||||
}
|
||||
$filepathout = arrvalue($frs,'filepathout');
|
||||
if($filepathout)$path = $filepathout;
|
||||
return returnsuccess(array(
|
||||
'path' => $path,
|
||||
'fid' => $fid,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ class uploadClassAction extends apiAction
|
||||
$upses = $upimg->up('file');
|
||||
if(!is_array($upses))exit($upses);
|
||||
$arr = c('down')->uploadback($upses);
|
||||
$arr['autoup'] = getconfig('qcloudCos_autoup') ? 1 : 0; //是否上传其他平台
|
||||
$arr['autoup'] = (getconfig('qcloudCos_autoup') || getconfig('alioss_autoup')) ? 1 : 0; //是否上传其他平台
|
||||
$this->returnjson($arr);
|
||||
}
|
||||
|
||||
|
||||
25
webmain/task/api/uploawAction.php
Normal file
25
webmain/task/api/uploawAction.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
class uploawClassAction extends apiAction
|
||||
{
|
||||
public function initAction()
|
||||
{
|
||||
$this->display= false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*/
|
||||
public function upfileAction()
|
||||
{
|
||||
if(!$_FILES)exit('sorry!');
|
||||
$upimg = c('upfile');
|
||||
$maxsize= (int)$this->get('maxsize', $upimg->getmaxzhao());//上传最大M
|
||||
$uptypes= 'jpg|png|docx|doc|pdf|xlsx|xls|zip|rar';
|
||||
$upimg->initupfile($uptypes, ''.UPDIR.'|'.date('Y-m').'', $maxsize);
|
||||
$upses = $upimg->up('file');
|
||||
if(!is_array($upses))exit($upses);
|
||||
$arr = c('down')->uploadback($upses);
|
||||
$arr['autoup'] = (getconfig('qcloudCos_autoup') || getconfig('alioss_autoup')) ? 1 : 0; //是否上传其他平台
|
||||
return $arr;
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ class openbaseClassAction extends openapiAction
|
||||
if(!$arr)return returnerror('not data');
|
||||
|
||||
$modenum = $arr['basemodenum'];
|
||||
$adminid = $arr['baseoptid']; //提交的用户
|
||||
$adminid = $this->rock->xssrepstr($arr['baseoptid']); //提交的用户
|
||||
if(isempt($modenum))return returnerror('modenum is empty');
|
||||
$uid = $this->getuserid($adminid);
|
||||
if($uid==0)return returnerror('['.$adminid.']用户不存在');
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?php
|
||||
class carmClassAction extends runtAction
|
||||
{
|
||||
//车辆提醒,每天运行
|
||||
//车辆提醒,每天运行(此文件2022-10-18)弃用
|
||||
public function runAction()
|
||||
{
|
||||
return m('flow')->initflow('carms')->todocarms($this->runrs['todoid']);
|
||||
//return m('flow')->initflow('carms')->todocarms($this->runrs['todoid']);
|
||||
return 'success';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
<?php
|
||||
class crmClassAction extends runtAction
|
||||
{
|
||||
//每天运行
|
||||
//每天运行(此文件2022-10-18)弃用
|
||||
public function runAction()
|
||||
{
|
||||
//客户合同到期
|
||||
m('flow')->initflow('custract')->custractdaoqi();
|
||||
//m('flow')->initflow('custract')->custractdaoqi();
|
||||
|
||||
//自动放入公海
|
||||
m('flow')->initflow('customer')->addgonghai();
|
||||
//m('flow')->initflow('customer')->addgonghai();
|
||||
|
||||
//计划跟进提醒
|
||||
if(m('mode')->iscun('custplan'))m('flow')->initflow('custplan')->plantodo();
|
||||
//if(m('mode')->iscun('custplan'))m('flow')->initflow('custplan')->plantodo();
|
||||
|
||||
return 'success';
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ class dayClassAction extends runtAction
|
||||
|
||||
if($this->moderock('meet'))m('flow')->initflow('meet')->createmeet(); //会议生成
|
||||
|
||||
$this->crmrun();
|
||||
|
||||
return 'success';
|
||||
}
|
||||
|
||||
@@ -19,4 +21,19 @@ class dayClassAction extends runtAction
|
||||
{
|
||||
return TITLE;
|
||||
}
|
||||
|
||||
public function crmrun()
|
||||
{
|
||||
//客户提醒
|
||||
if($this->moderock('custract'))m('flow')->initflow('custract')->custractdaoqi();
|
||||
|
||||
//自动放入公海
|
||||
if($this->moderock('customer'))m('flow')->initflow('customer')->addgonghai();
|
||||
|
||||
//计划跟进提醒
|
||||
if($this->moderock('custplan'))m('flow')->initflow('custplan')->plantodo();
|
||||
|
||||
//车辆提醒
|
||||
if($this->moderock('carms'))m('flow')->initflow('carms')->todocarms('');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user