fix:完善前台代码块、代码块类目接口
This commit is contained in:
parent
fca56bf280
commit
9683b9b55f
@ -5,6 +5,7 @@ namespace app\api\controller\CodeCustomer;
|
||||
use app\BaseController;
|
||||
use app\common\model\Code\CodeModule as ModelCodeModule;
|
||||
use app\api\logic\Code\CodeModule as LogicCodeModule;
|
||||
use app\common\model\Token as ModelToken;
|
||||
use app\common\logic\Code\CodeModuleCategory as CommonLogicCodeModuleCategory;
|
||||
use app\Request;
|
||||
use think\Validate;
|
||||
@ -43,6 +44,7 @@ class CodeModule extends BaseController
|
||||
Tool::adminLockTableWrite(['code_module', 'code_module_category']);
|
||||
try {
|
||||
BaseModel::setUserGuid(false);
|
||||
$params['customer_guid'] = ModelToken::getCurrentCustomer()->customer_guid;
|
||||
ModelCodeModule::create($params, [
|
||||
'code_module_category_guid',
|
||||
'code_module_name',
|
||||
@ -81,9 +83,8 @@ class CodeModule extends BaseController
|
||||
'code_module_category_guid|类目' => 'require',
|
||||
'code_module_name|代码块名称' => 'require',
|
||||
'code_module_html|html内容' => 'require',
|
||||
'code_module_guid|代码块' => 'require',
|
||||
'code_module_sort|排序' => 'require',
|
||||
'code_module_audit|审核状态' => 'require',
|
||||
'code_module_guid|代码块' => 'require'
|
||||
]);
|
||||
$model = ModelCodeModule::where('code_module_guid', $params['code_module_guid'])->find();
|
||||
if (!$model) {
|
||||
|
@ -77,6 +77,8 @@ class CodeModuleCategory extends BaseController
|
||||
'code_module_category_sort|排序' => 'require',
|
||||
'code_module_category_global_mode|全局模式' => 'require',
|
||||
'code_module_category_library_type|库类型' => 'require',
|
||||
'code_module_category_guid|类目' => 'require',
|
||||
'code_module_category_parent_guid|上级类目guid' => 'require',
|
||||
]);
|
||||
$model = ModelCodeModuleCategory::where('code_module_category_guid', $params['code_module_category_guid'])->find();
|
||||
if (!$model) {
|
||||
|
Loading…
Reference in New Issue
Block a user