Browse Source

自助建站-修改 更新风格的接口

15313670163 1 tuần trước cách đây
mục cha
commit
cef6792811
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      app/JsonRpc/PublicRpcService.php

+ 2 - 1
app/JsonRpc/PublicRpcService.php

@@ -716,7 +716,7 @@ class PublicRpcService implements PublicRpcServiceInterface
         $where = [
         $where = [
             'id' => $data['id'],
             'id' => $data['id'],
         ];
         ];
-        $template_class = TemplateClass::where('id', $data['id'])->first();
+        $template_class = TemplateClass::where($where)->first();
         if (empty($template_class)) {
         if (empty($template_class)) {
             return Result::error("未查询到风格", 0);
             return Result::error("未查询到风格", 0);
         }
         }
@@ -733,6 +733,7 @@ class PublicRpcService implements PublicRpcServiceInterface
         $updateData = [
         $updateData = [
             'name' => $data['name'],
             'name' => $data['name'],
             'keyword' => json_encode($data['keyword']),
             'keyword' => json_encode($data['keyword']),
+            'class_id' => $data['class_id'],
         ];
         ];
         $result = TemplateClass::where($where)->update($updateData);
         $result = TemplateClass::where($where)->update($updateData);
         if (empty($result)) {
         if (empty($result)) {