# 3. 新增/编辑

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /app_adminsmartpark/v1.news/edit:
    post:
      summary: 3. 新增/编辑
      deprecated: false
      description: 使用场景：后台新增/编辑 新闻资讯
      tags:
        - admin 👨‍💻/smartpark/v1/News
        - admin
      parameters:
        - name: X-Client
          in: header
          description: ''
          required: true
          example: '{{x_client}}'
          schema:
            type: string
        - name: X-ApifoxUser
          in: header
          description: ''
          required: true
          example: '{{apifox_user}}'
          schema:
            type: string
        - name: X-Time
          in: header
          description: ''
          required: true
          example: '{{timestamp}}'
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                id:
                  description: 编辑时传入
                  example: ''
                  type: string
                smartpark_id:
                  description: 园区ID
                  example: ''
                  type: string
                news_type_id:
                  description: 分类id
                  example: ''
                  type: string
                cover:
                  description: 封面图
                  example: ''
                  type: string
                title:
                  description: 标题
                  example: ''
                  type: string
                desc:
                  description: 简介
                  example: ''
                  type: string
                content:
                  description: 内容
                  example: ''
                  type: string
                is_top:
                  description: 是否置顶
                  example: ''
                  type: string
                is_hot:
                  description: 是否热门
                  example: ''
                  type: string
                is_del:
                  description: 是否标记删除了，编辑时可传
                  example: ''
                  type: string
                status:
                  description: 状态（0-未发布。1-已发布）
                  example: ''
                  type: string
                comment_num:
                  description: 评论数
                  example: ''
                  type: string
                good_num:
                  description: 点赞数
                  example: ''
                  type: string
                views_num:
                  description: 浏览量
                  example: ''
                  type: string
                sort:
                  description: 排序
                  example: ''
                  type: string
              required:
                - smartpark_id
                - news_type_id
                - cover
                - title
                - desc
                - content
                - status
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    x-apifox-orders: []
                  msg:
                    type: string
                  code:
                    type: integer
                required:
                  - data
                  - msg
                  - code
                x-apifox-orders:
                  - data
                  - msg
                  - code
              examples:
                '1':
                  summary: success
                  value:
                    data: {}
                    msg: ''
                    code: 1
                '2':
                  summary: error
                  value:
                    data: []
                    msg: ''
                    code: 1
          headers: {}
          x-apifox-name: ok
      security: []
      x-apifox-folder: admin 👨‍💻/smartpark/v1/News
      x-apifox-status: developing
      x-run-in-apifox: https://app.apifox.com/web/project/2493394/apis/api-70864352-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: http://admin.api.test.domain.cn
    description: 测试环境
security: []

```
