fix: 修复客户端旧版本更新任务出现已完成列表中有状态为“进行中”的情况
This commit is contained in:
parent
605aee35c4
commit
d951da2c02
@ -490,6 +490,10 @@ class ProjectTask extends AbstractModel
|
||||
public function updateTask($data, &$updateMarking = [])
|
||||
{
|
||||
AbstractModel::transaction(function () use ($data, &$updateMarking) {
|
||||
// 判断版本
|
||||
if (version_compare(Base::getClientVersion(), '0.6.0', '<')) {
|
||||
throw new ApiException('当前版本过低');
|
||||
}
|
||||
// 工作流
|
||||
if (Arr::exists($data, 'flow_item_id')) {
|
||||
if ($this->flow_item_id == $data['flow_item_id']) {
|
||||
|
@ -74,6 +74,19 @@ class Base
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客户端版本号
|
||||
* @return string
|
||||
*/
|
||||
public static function getClientVersion()
|
||||
{
|
||||
global $_A;
|
||||
if (!isset($_A["__static_client_version"])) {
|
||||
$_A["__static_client_version"] = Request::header('version') ?: '0.0.1';
|
||||
}
|
||||
return $_A["__static_client_version"];
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否域名格式
|
||||
* @param $domain
|
||||
|
@ -11,7 +11,7 @@
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<title>{{ config('app.name', 'WebPage') }}</title>
|
||||
<link rel="shortcut icon" href="{{ asset_main('favicon.ico') }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ mix('css/app.css') }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ mix('css/app.css') }}?v={{ $version }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset_main('css/iview.css') }}">
|
||||
<script src="{{ asset_main('js/language.all.js') }}"></script>
|
||||
<script src="{{ asset_main('js/scroll-into-view.min.js') }}"></script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user