mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
ComposerUpdate
This commit is contained in:
parent
cb2f92772e
commit
1ef99e4d80
@ -17,6 +17,7 @@ namespace app\wechat\controller;
|
|||||||
|
|
||||||
use app\wechat\service\WechatService;
|
use app\wechat\service\WechatService;
|
||||||
use think\admin\Controller;
|
use think\admin\Controller;
|
||||||
|
use think\admin\Exception;
|
||||||
use think\exception\HttpResponseException;
|
use think\exception\HttpResponseException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,6 +76,13 @@ class Fans extends Controller
|
|||||||
$this->success('创建任务成功,请等待完成!', $code);
|
$this->success('创建任务成功,请等待完成!', $code);
|
||||||
} catch (HttpResponseException $exception) {
|
} catch (HttpResponseException $exception) {
|
||||||
throw $exception;
|
throw $exception;
|
||||||
|
} catch (Exception $exception) {
|
||||||
|
$queue = $exception->getData();
|
||||||
|
if (isset($queue['code'])) {
|
||||||
|
$this->success('任务已经存在,无需再次创建!', $queue['code']);
|
||||||
|
} else {
|
||||||
|
$this->error($exception->getMessage());
|
||||||
|
}
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
$this->error("创建任务失败,{$exception->getMessage()}");
|
$this->error("创建任务失败,{$exception->getMessage()}");
|
||||||
}
|
}
|
||||||
@ -96,7 +104,7 @@ class Fans extends Controller
|
|||||||
} catch (HttpResponseException $exception) {
|
} catch (HttpResponseException $exception) {
|
||||||
throw $exception;
|
throw $exception;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->error("拉入黑名单失败,请稍候再试!{$e->getMessage()}");
|
$this->error("拉入黑名单失败,请稍候再试!<br>{$e->getMessage()}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
8
composer.lock
generated
8
composer.lock
generated
@ -909,12 +909,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||||
"reference": "3283e44ab0cce56c4054623497ff4f4fec195374"
|
"reference": "54d332d3a8bd5771dc8f84d052338b1191f260b7"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/3283e44ab0cce56c4054623497ff4f4fec195374",
|
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/54d332d3a8bd5771dc8f84d052338b1191f260b7",
|
||||||
"reference": "3283e44ab0cce56c4054623497ff4f4fec195374",
|
"reference": "54d332d3a8bd5771dc8f84d052338b1191f260b7",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -958,7 +958,7 @@
|
|||||||
],
|
],
|
||||||
"description": "ThinkPHP v6.0 Development Library",
|
"description": "ThinkPHP v6.0 Development Library",
|
||||||
"homepage": "http://framework.thinkadmin.top",
|
"homepage": "http://framework.thinkadmin.top",
|
||||||
"time": "2020-03-22T13:13:51+00:00"
|
"time": "2020-03-22T14:10:23+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "zoujingli/wechat-developer",
|
"name": "zoujingli/wechat-developer",
|
||||||
|
@ -741,7 +741,6 @@ $(function () {
|
|||||||
if (this.action.length < 1) return $.msg.tips('任务地址不能为空!');
|
if (this.action.length < 1) return $.msg.tips('任务地址不能为空!');
|
||||||
$.form.load(this.action, {}, 'post', function (ret) {
|
$.form.load(this.action, {}, 'post', function (ret) {
|
||||||
if (typeof ret.data === 'string' && ret.data.indexOf('Q') === 0) {
|
if (typeof ret.data === 'string' && ret.data.indexOf('Q') === 0) {
|
||||||
$.msg.tips(ret.msg);
|
|
||||||
return $.loadQueue(ret.data), false;
|
return $.loadQueue(ret.data), false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -756,7 +755,7 @@ $(function () {
|
|||||||
' <div class="margin-top-15 layui-progress layui-progress-big" lay-showPercent="yes">' +
|
' <div class="margin-top-15 layui-progress layui-progress-big" lay-showPercent="yes">' +
|
||||||
' <div class="layui-progress-bar" lay-percent="0.00%"></div>' +
|
' <div class="layui-progress-bar" lay-percent="0.00%"></div>' +
|
||||||
' </div>' +
|
' </div>' +
|
||||||
' <textarea class="margin-top-15 layui-textarea transition color-text" disabled style="resize:none"></textarea>' +
|
' <textarea class="margin-top-15 layui-textarea transition color-text" disabled style="resize:none;min-height:190px"></textarea>' +
|
||||||
'</div>'
|
'</div>'
|
||||||
});
|
});
|
||||||
(function loadprocess(code, $box) {
|
(function loadprocess(code, $box) {
|
||||||
@ -770,7 +769,7 @@ $(function () {
|
|||||||
this.lines.push('[ ' + lines[this.i].progress + '% ] ' + lines[this.i].message);
|
this.lines.push('[ ' + lines[this.i].progress + '% ] ' + lines[this.i].message);
|
||||||
}
|
}
|
||||||
this.$textarea = $box.find('textarea').val(this.lines.join("\n"));
|
this.$textarea = $box.find('textarea').val(this.lines.join("\n"));
|
||||||
this.$textarea.animate({scrollTop: this.$textarea[0].scrollHeight + 'px'}, 800)
|
this.$textarea.animate({scrollTop: this.$textarea[0].scrollHeight + 'px'}, 100)
|
||||||
})(ret.data.history);
|
})(ret.data.history);
|
||||||
$box.find('.layui-progress div').attr('lay-percent', ret.data.progress + '%');
|
$box.find('.layui-progress div').attr('lay-percent', ret.data.progress + '%');
|
||||||
$box.find('[data-message-title]').html(ret.data.message);
|
$box.find('[data-message-title]').html(ret.data.message);
|
||||||
@ -787,10 +786,10 @@ $(function () {
|
|||||||
$box.find('[data-message-state]').html('处理状态:<b class="color-red">任务处理失败</b>');
|
$box.find('[data-message-state]').html('处理状态:<b class="color-red">任务处理失败</b>');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return setTimeout(function () {
|
return setTimeout(function () {
|
||||||
loadprocess(code);
|
loadprocess(code);
|
||||||
}, 1000), false;
|
}, 200), false;
|
||||||
|
}
|
||||||
}, false);
|
}, false);
|
||||||
})(code)
|
})(code)
|
||||||
};
|
};
|
||||||
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
@ -935,12 +935,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||||
"reference": "3283e44ab0cce56c4054623497ff4f4fec195374"
|
"reference": "54d332d3a8bd5771dc8f84d052338b1191f260b7"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/3283e44ab0cce56c4054623497ff4f4fec195374",
|
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/54d332d3a8bd5771dc8f84d052338b1191f260b7",
|
||||||
"reference": "3283e44ab0cce56c4054623497ff4f4fec195374",
|
"reference": "54d332d3a8bd5771dc8f84d052338b1191f260b7",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -956,7 +956,7 @@
|
|||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"topthink/framework": "^6.0"
|
"topthink/framework": "^6.0"
|
||||||
},
|
},
|
||||||
"time": "2020-03-22T13:13:51+00:00",
|
"time": "2020-03-22T14:10:23+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"think": {
|
"think": {
|
||||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// This file is automatically generated at:2020-03-22 21:37:43
|
// This file is automatically generated at:2020-03-22 22:15:13
|
||||||
declare (strict_types = 1);
|
declare (strict_types = 1);
|
||||||
return array (
|
return array (
|
||||||
0 => 'think\\app\\Service',
|
0 => 'think\\app\\Service',
|
||||||
|
22
vendor/zoujingli/think-library/src/Exception.php
vendored
22
vendor/zoujingli/think-library/src/Exception.php
vendored
@ -24,7 +24,7 @@ class Exception extends \Exception
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 异常数据对象
|
* 异常数据对象
|
||||||
* @var array
|
* @var mixed
|
||||||
*/
|
*/
|
||||||
protected $data = [];
|
protected $data = [];
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ class Exception extends \Exception
|
|||||||
* Exception constructor.
|
* Exception constructor.
|
||||||
* @param string $message
|
* @param string $message
|
||||||
* @param integer $code
|
* @param integer $code
|
||||||
* @param array $data
|
* @param array|mixed $data
|
||||||
*/
|
*/
|
||||||
public function __construct($message = "", $code = 0, $data = [])
|
public function __construct($message = "", $code = 0, $data = [])
|
||||||
{
|
{
|
||||||
@ -42,4 +42,22 @@ class Exception extends \Exception
|
|||||||
parent::__construct($message, $code);
|
parent::__construct($message, $code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置异常停止数据
|
||||||
|
* @param mixed $data
|
||||||
|
*/
|
||||||
|
public function setData($data)
|
||||||
|
{
|
||||||
|
$this->data = $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取异常停止数据
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getData()
|
||||||
|
{
|
||||||
|
return $this->data;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user