generated from panliang/owl-admin-starter
build:h5
parent
0713fc5614
commit
d36be767cf
|
|
@ -130,22 +130,23 @@ class UserScoreController extends AdminController
|
|||
|
||||
public function detail(): Form
|
||||
{
|
||||
return $this->baseDetail()->title('')->body([
|
||||
amisMake()->TextControl()->name('id')->label(__('user_score.id'))->static(),
|
||||
amisMake()->TextControl()->name('type.name')->label(__('user_score.type_id'))->static(),
|
||||
amisMake()->TextControl()->name('cate.name')->label(__('user_score.cate_id'))->static(),
|
||||
amisMake()->TextControl()->name('user.name')->label(__('user_score.user_id'))->static(),
|
||||
amisMake()->TextControl()->name('title')->label(__('user_score.title'))->static(),
|
||||
amisMake()->TextareaControl()->name('content')->label(__('user_score.content'))->static(),
|
||||
amisMake()->TextControl()->name('images')->label(__('user_score.images'))->static()->staticSchema(amisMake()->Images()),
|
||||
amisMake()->TextControl()->name('file')->label(__('user_score.file'))->static()->staticSchema(amisMake()->Link()->body('${file}')->href('${file}')->blank()),
|
||||
amisMake()->TextControl()->name('check_status_text')->label(__('user_score.check_status'))->static(),
|
||||
amisMake()->TextControl()->name('check_user.name')->label(__('user_score.check_user_id'))->static(),
|
||||
amisMake()->TextControl()->name('check_remarks')->label(__('user_score.check_remarks'))->static(),
|
||||
amisMake()->TextControl()->name('check_at')->label(__('user_score.check_at'))->static(),
|
||||
amisMake()->TextControl()->name('score')->label(__('user_score.score'))->static(),
|
||||
amisMake()->TextControl()->name('created_at')->label(__('user_score.created_at'))->static(),
|
||||
]);
|
||||
return $this->baseDetail()->title('')->body(amisMake()->Property()->items([
|
||||
['label' => __('user_score.user_id'), 'content' => '${user.name}'],
|
||||
['label' => __('user_score.cate_id'), 'content' => '${cate.name}'],
|
||||
['label' => __('user_score.type_id'), 'content' => '${type.name}'],
|
||||
['label' => __('user_score.check_status'), 'content' => '${check_status_text}'],
|
||||
['label' => __('user_score.check_user_id'), 'content' => '${check_user.name}'],
|
||||
['label' => __('user_score.check_remarks'), 'content' => '${check_remarks}'],
|
||||
|
||||
['label' => __('user_score.score'), 'content' => '${score}'],
|
||||
['label' => __('user_score.created_at'), 'content' => '${created_at}', 'span' => 2],
|
||||
|
||||
['label' => __('user_score.title'), 'content' => '${title}', 'span' => 3],
|
||||
['label' => __('user_score.content'), 'content' => amisMake()->TextareaControl()->labelWidth('0px')->static()->value('${content}'), 'span' => 3],
|
||||
['label' => __('user_score.content'), 'content' => amisMake()->Images()->source('${images}')->defaultImage(null), 'span' => 3],
|
||||
['label' => __('user_score.file'), 'content' => amisMake()->Link()->body('${file}')->href('${file}')->blank(), 'span' => 3],
|
||||
|
||||
]));
|
||||
}
|
||||
|
||||
public function check($id, Request $request)
|
||||
|
|
|
|||
|
|
@ -15,4 +15,11 @@ class KeywordController extends Controller
|
|||
|
||||
return $this->response()->success(KeywordResource::collection($list));
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$info = Keyword::findOrFail($id);
|
||||
|
||||
return $this->response()->success(KeywordResource::make($info));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,15 +40,21 @@ class UserScoreController extends Controller
|
|||
return $this->response()->fail($service->getError());
|
||||
}
|
||||
|
||||
public function update(Request $request)
|
||||
public function update($id, Request $request)
|
||||
{
|
||||
$user = auth('api')->user();
|
||||
$info = $user->scores()->findOrFail($id);
|
||||
if ($info->check_status == CheckStatus::Success) {
|
||||
return $this->response()->fail('审核已通过, 无法修改');
|
||||
}
|
||||
|
||||
$info->update($request->only(['title', 'content', 'images', 'file']));
|
||||
$params = $request->only(['title', 'content', 'images', 'file']);
|
||||
if ($info->check_status == CheckStatus::Fail) {
|
||||
$params['created_at'] = now();
|
||||
$params['check_status'] = CheckStatus::None;
|
||||
$params['check_at'] = null;
|
||||
$params['check_user_id'] = null;
|
||||
}
|
||||
$info->update($params);
|
||||
|
||||
return $this->response()->success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>五星党建</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
||||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel="stylesheet" href="/h5/static/index.5841170f.css"/><script defer="defer" src="/h5/static/js/chunk-vendors.49434503.js"></script><script defer="defer" src="/h5/static/js/index.19712fcf.js"></script></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div></body></html>
|
||||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel="stylesheet" href="/h5/static/index.5841170f.css"/><script defer="defer" src="/h5/static/js/chunk-vendors.49434503.js"></script><script defer="defer" src="/h5/static/js/index.aad67428.js"></script></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div></body></html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -17,6 +17,7 @@ use Illuminate\Support\Facades\Route;
|
|||
Route::post('web/upload', [\App\Http\Controllers\WebController::class, 'upload']);
|
||||
|
||||
Route::get('keyword', [\App\Http\Controllers\Api\KeywordController::class, 'index']);
|
||||
Route::get('keyword/{id}', [\App\Http\Controllers\Api\KeywordController::class, 'show']);
|
||||
Route::get('banner', [\App\Http\Controllers\Api\BannerController::class, 'index']);
|
||||
|
||||
Route::post('login', [\App\Http\Controllers\Api\AuthController::class, 'login']);
|
||||
|
|
|
|||
Loading…
Reference in New Issue