|
@@ -903,8 +903,12 @@ class PublicRpcService implements PublicRpcServiceInterface
|
|
|
if (!empty($rector)) {
|
|
|
return Result::error("此皮肤已被绑定通栏,不可删除", 0);
|
|
|
}
|
|
|
- $template = WebsiteTemplateInfo::where('template_id', $data['id'])->first();
|
|
|
- if (empty($template)) {
|
|
|
+ $template = Template::where('id', $data['id'])->first();
|
|
|
+ if(empty($template)){
|
|
|
+ return Result::error("此皮肤不存在!", 0);
|
|
|
+ }
|
|
|
+ $web_template = WebsiteTemplateInfo::where('template_id', $template['template_id'])->first();
|
|
|
+ if (empty($web_template)) {
|
|
|
return Result::error("此皮肤已被绑定网站,不可删除", 0);
|
|
|
}
|
|
|
if ($template->type == 1) {
|