Selaa lähdekoodia

自助建站-修改 添加、修改皮肤的接口(转换json形式的 关键词)

15313670163 1 viikko sitten
vanhempi
sitoutus
f3e56cc436
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      app/JsonRpc/PublicRpcService.php

+ 2 - 0
app/JsonRpc/PublicRpcService.php

@@ -829,6 +829,7 @@ class PublicRpcService implements PublicRpcServiceInterface
         if ($template) {
             return Result::error("皮肤名称或者皮肤编号已存在,不可添加!", 0);
         }
+        $data['template_keyword'] = json_encode($data['template_keyword']) ?? '';
         $result = Template::insertGetId($data);
         if(empty($result)){
             return Result::error("创建失败", 0);
@@ -871,6 +872,7 @@ class PublicRpcService implements PublicRpcServiceInterface
         if ($template) {
             return Result::error("皮肤名称或者皮肤编号已存在,不可编辑!", 0);
         }
+        $data['template_keyword'] = json_encode($data['template_keyword']) ?? '';
         $result = Template::where('id', $data['id'])->update($data);
         var_dump($result, '-------------------update');
         if (!$result) {