Compare commits
2 Commits
e420668a44
...
55af3cb570
| Author | SHA1 | Date | |
|---|---|---|---|
| 55af3cb570 | |||
| 6c4fc6bff6 |
@@ -30,7 +30,7 @@ return [
|
||||
'title' => '存储桶名称',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => 'zhongyi542',
|
||||
'value' => 'doxixi',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '存储桶名称',
|
||||
@@ -54,7 +54,7 @@ return [
|
||||
'title' => '上传接口地址',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => 'https://zhongyi542.obs.cn-south-1.myhuaweicloud.com',
|
||||
'value' => 'https://doxixi.obs.cn-south-1.myhuaweicloud.com',
|
||||
'rule' => 'required;uploadurl',
|
||||
'msg' => '',
|
||||
'tip' => '请使用存储桶->基本信息->访问域名的值,并在前面加上http://或https://',
|
||||
@@ -66,7 +66,7 @@ return [
|
||||
'title' => 'CDN地址',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => 'https://zhongyi542.obs.cn-south-1.myhuaweicloud.com',
|
||||
'value' => 'https://doxixi.obs.cn-south-1.myhuaweicloud.com',
|
||||
'rule' => 'required;cdnurl',
|
||||
'msg' => '',
|
||||
'tip' => '如果你的云存储有绑定自定义域名,请输入自定义域名',
|
||||
@@ -183,7 +183,7 @@ return [
|
||||
1 => '开启',
|
||||
0 => '关闭',
|
||||
],
|
||||
'value' => '0',
|
||||
'value' => '1',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
@@ -235,7 +235,7 @@ return [
|
||||
'index' => '前台',
|
||||
'admin' => '后台',
|
||||
],
|
||||
'value' => '',
|
||||
'value' => 'api,index',
|
||||
'rule' => '',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
|
||||
@@ -2,16 +2,17 @@
|
||||
|
||||
namespace addons\hwobs\controller;
|
||||
|
||||
use addons\hwobs\library\Auth;
|
||||
use addons\hwobs\library\Signer;
|
||||
use app\common\exception\UploadException;
|
||||
use app\common\library\Upload;
|
||||
use app\common\model\Attachment;
|
||||
use Obs\Internal\Common\Model;
|
||||
use Obs\Internal\Signature\DefaultSignature;
|
||||
use Obs\ObsClient;
|
||||
use think\addons\Controller;
|
||||
use think\Config;
|
||||
use Obs\ObsClient;
|
||||
use addons\hwobs\Hwobs;
|
||||
use think\addons\Controller;
|
||||
use addons\hwobs\library\Auth;
|
||||
use app\common\library\Upload;
|
||||
use Obs\Internal\Common\Model;
|
||||
use addons\hwobs\library\Signer;
|
||||
use app\common\model\Attachment;
|
||||
use app\common\exception\UploadException;
|
||||
use Obs\Internal\Signature\DefaultSignature;
|
||||
|
||||
class Index extends Controller
|
||||
{
|
||||
@@ -31,6 +32,13 @@ class Index extends Controller
|
||||
$this->error("当前插件暂无前台页面");
|
||||
}
|
||||
|
||||
public function config()
|
||||
{
|
||||
$upload = [];
|
||||
(new Hwobs)->uploadConfigInit($upload);
|
||||
$this->success('', null, $upload);
|
||||
}
|
||||
|
||||
public function params()
|
||||
{
|
||||
$this->check();
|
||||
@@ -83,8 +91,7 @@ class Index extends Controller
|
||||
$signature = $obs->createPostSignature([
|
||||
'Bucket' => $config['bucket'],
|
||||
'Key' => $key,
|
||||
'FormParams' => [
|
||||
]
|
||||
'FormParams' => []
|
||||
]);
|
||||
$params['key'] = $key;
|
||||
$params['AccessKeyId'] = $config['accessKey'];
|
||||
@@ -328,5 +335,4 @@ class Index extends Controller
|
||||
$this->error("请求已经超时");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -71,6 +71,24 @@ class Club extends Base
|
||||
$this->success('Success', ['list' => $list, 'count' => $res->total()]);
|
||||
}
|
||||
|
||||
public function view()
|
||||
{
|
||||
$model = $this->model->get($this->request->param('id'))->toarray();
|
||||
|
||||
if (empty($model)) {
|
||||
$this->error(__('No rows were found'));
|
||||
}
|
||||
$menber = Menber::alias('m')
|
||||
->join([User::$tableName => 'u'], 'u.id = m.user_id')
|
||||
->where('club_id', $model['id'])->field('gender,count(*) as num')->group('u.gender')
|
||||
->column('count(*) as num','gender');
|
||||
$model['gender0'] = $menber[0] ?? 0;
|
||||
$model['gender1'] = $menber[1] ?? 0;
|
||||
$this->model->where('id', $model['id'])->setInc('attention');
|
||||
|
||||
$this->success('Success', $model);
|
||||
}
|
||||
|
||||
public function add()
|
||||
{
|
||||
$result = false;
|
||||
|
||||
@@ -63,6 +63,7 @@ class Game extends Base
|
||||
$this->error(__('No rows were found'));
|
||||
}
|
||||
|
||||
$this->model->where('id', $model['id'])->setInc('attention');
|
||||
$model['cost'] = json_decode($model['cost'] ?? '[]', true);
|
||||
$model['referee'] = explode(',', $model['referee']);
|
||||
|
||||
|
||||
@@ -66,10 +66,10 @@ return [
|
||||
"Type0" => "一次性",
|
||||
"Type1" => "周期性",
|
||||
|
||||
"Status0" => "未开始",
|
||||
"Status0" => "发布",
|
||||
"Status1" => "报名中",
|
||||
"Status2" => "进行中",
|
||||
"Status3" => "已结束",
|
||||
"Status2" => "比赛中",
|
||||
"Status3" => "结束",
|
||||
|
||||
"Week0" => "周日",
|
||||
"Week1" => "周一",
|
||||
|
||||
@@ -593,13 +593,14 @@ if (!function_exists('dd')) {
|
||||
*/
|
||||
function dd(...$params)
|
||||
{
|
||||
echo '<pre>';
|
||||
echo '
|
||||
';
|
||||
foreach ($params as $p) {
|
||||
print_r($p);
|
||||
echo '
|
||||
<br>';
|
||||
';
|
||||
}
|
||||
echo '</pre>';
|
||||
// echo '</pre>';
|
||||
die;
|
||||
}
|
||||
}
|
||||
@@ -610,9 +611,10 @@ if (!function_exists('getsql')) {
|
||||
*/
|
||||
function getsql($query)
|
||||
{
|
||||
echo '<pre>';
|
||||
echo '
|
||||
';
|
||||
print_r($query->fetchSql()->select());
|
||||
echo '</pre>';
|
||||
// echo '</pre>';
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class Controller extends \think\Controller
|
||||
* @param Request $request Request对象
|
||||
* @access public
|
||||
*/
|
||||
public function __construct(Request $request = null)
|
||||
public function __construct(?Request $request = null)
|
||||
{
|
||||
if (is_null($request)) {
|
||||
$request = Request::instance();
|
||||
|
||||
Reference in New Issue
Block a user