微调
This commit is contained in:
@@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Admin\Controllers\Activity;
|
namespace App\Admin\Controllers\Activity;
|
||||||
|
|
||||||
use App\Admin\Renderable\Activity\Grants;
|
|
||||||
use App\Models\Activity;
|
use App\Models\Activity;
|
||||||
use App\Models\ActivityGrant;
|
|
||||||
use App\Models\ActivityRule;
|
use App\Models\ActivityRule;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Encore\Admin\Controllers\HasResourceActions;
|
use Encore\Admin\Controllers\HasResourceActions;
|
||||||
@@ -37,10 +35,9 @@ class IndexController extends AdminController
|
|||||||
*/
|
*/
|
||||||
public function index(Content $content)
|
public function index(Content $content)
|
||||||
{
|
{
|
||||||
return $content
|
return $content->title($this->title())
|
||||||
->title($this->title())
|
->description($this->description['index'] ?? trans('admin.list'))
|
||||||
->description($this->description['index'] ?? trans('admin.list'))
|
->body($this->grid());
|
||||||
->body($this->grid());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -51,10 +48,9 @@ class IndexController extends AdminController
|
|||||||
*/
|
*/
|
||||||
public function edit($id, Content $content)
|
public function edit($id, Content $content)
|
||||||
{
|
{
|
||||||
return $content
|
return $content->title($this->title())
|
||||||
->title($this->title())
|
->description($this->description['edit'] ?? trans('admin.edit'))
|
||||||
->description($this->description['edit'] ?? trans('admin.edit'))
|
->body($this->form($id)->edit($id));
|
||||||
->body($this->form($id)->edit($id));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -64,10 +60,9 @@ class IndexController extends AdminController
|
|||||||
*/
|
*/
|
||||||
public function create(Content $content)
|
public function create(Content $content)
|
||||||
{
|
{
|
||||||
return $content
|
return $content->title($this->title())
|
||||||
->title($this->title())
|
->description($this->description['create'] ?? trans('admin.create'))
|
||||||
->description($this->description['create'] ?? trans('admin.create'))
|
->body($this->form());
|
||||||
->body($this->form());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function grid()
|
protected function grid()
|
||||||
@@ -83,11 +78,6 @@ class IndexController extends AdminController
|
|||||||
$filter->column(1 / 2, function ($filter) {
|
$filter->column(1 / 2, function ($filter) {
|
||||||
$filter->equal('status', '状态')->select(Activity::STATUS);
|
$filter->equal('status', '状态')->select(Activity::STATUS);
|
||||||
$filter->equal('type', '类型')->select(Activity::TYPES);
|
$filter->equal('type', '类型')->select(Activity::TYPES);
|
||||||
|
|
||||||
$users = User::whereHas('identity', function ($query) {
|
|
||||||
$query->where('identity_id', 1);
|
|
||||||
})->get()->pluck('nickname', 'id');
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$filter->column(1 / 2, function ($filter) {
|
$filter->column(1 / 2, function ($filter) {
|
||||||
@@ -257,9 +247,11 @@ class IndexController extends AdminController
|
|||||||
$users = [];
|
$users = [];
|
||||||
foreach ($form->grants['user_id'] as $key => $user_id) {
|
foreach ($form->grants['user_id'] as $key => $user_id) {
|
||||||
if ($user_id) {
|
if ($user_id) {
|
||||||
$form->model()->grants()->updateOrCreate([
|
$form->model()
|
||||||
'user_id' => $user_id,
|
->grants()
|
||||||
]);
|
->updateOrCreate([
|
||||||
|
'user_id' => $user_id,
|
||||||
|
]);
|
||||||
$users[] = $user_id;
|
$users[] = $user_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -267,9 +259,11 @@ class IndexController extends AdminController
|
|||||||
$users = [];
|
$users = [];
|
||||||
foreach ($form->verifications['user_id'] as $key => $user_id) {
|
foreach ($form->verifications['user_id'] as $key => $user_id) {
|
||||||
if ($user_id) {
|
if ($user_id) {
|
||||||
$form->model()->verifications()->updateOrCreate([
|
$form->model()
|
||||||
'user_id' => $user_id,
|
->verifications()
|
||||||
]);
|
->updateOrCreate([
|
||||||
|
'user_id' => $user_id,
|
||||||
|
]);
|
||||||
$users[] = $user_id;
|
$users[] = $user_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ class TestController
|
|||||||
|
|
||||||
use ApiResponse;
|
use ApiResponse;
|
||||||
|
|
||||||
|
public $baseUrl;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->baseUrl = env('BASE_URL');
|
$this->baseUrl = env('BASE_URL');
|
||||||
@@ -42,6 +44,8 @@ class TestController
|
|||||||
* Notes: 发券
|
* Notes: 发券
|
||||||
* @Author: 玄尘
|
* @Author: 玄尘
|
||||||
* @Date : 2020/6/29 13:57
|
* @Date : 2020/6/29 13:57
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function grant(Request $request)
|
public function grant(Request $request)
|
||||||
{
|
{
|
||||||
|
|||||||
12
composer.lock
generated
12
composer.lock
generated
@@ -5798,16 +5798,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "xuanchen/unionpay",
|
"name": "xuanchen/unionpay",
|
||||||
"version": "2.7",
|
"version": "2.9",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/xuanchen120/unionpay.git",
|
"url": "https://github.com/xuanchen120/unionpay.git",
|
||||||
"reference": "877342101be87fb82f92681578953733bf2f93f7"
|
"reference": "985072f96993f3fc1d0c2e7fb8cfd5e457d65741"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/xuanchen120/unionpay/zipball/877342101be87fb82f92681578953733bf2f93f7",
|
"url": "https://api.github.com/repos/xuanchen120/unionpay/zipball/985072f96993f3fc1d0c2e7fb8cfd5e457d65741",
|
||||||
"reference": "877342101be87fb82f92681578953733bf2f93f7",
|
"reference": "985072f96993f3fc1d0c2e7fb8cfd5e457d65741",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -5847,9 +5847,9 @@
|
|||||||
"description": "第三方银联对接",
|
"description": "第三方银联对接",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/xuanchen120/unionpay/issues",
|
"issues": "https://github.com/xuanchen120/unionpay/issues",
|
||||||
"source": "https://github.com/xuanchen120/unionpay/tree/2.7"
|
"source": "https://github.com/xuanchen120/unionpay/tree/2.9"
|
||||||
},
|
},
|
||||||
"time": "2021-01-31T06:20:57+00:00"
|
"time": "2021-02-18T09:50:47+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
//是否调试
|
||||||
|
'debug' => false,
|
||||||
//环境变量
|
//环境变量
|
||||||
'this_type' => 'test',
|
'this_type' => 'test',
|
||||||
//添加日志
|
//添加日志
|
||||||
|
|||||||
Reference in New Issue
Block a user