feat: 添加新增套餐是否展示在首页参数
This commit is contained in:
@@ -1,601 +1,13 @@
|
||||
✅已完成、⚠️部分完成、❌未完成这样显示
|
||||
-----------------------------------------------------------------------------------------------需要解决
|
||||
|
||||
1.商品套餐添加了些参数和接口,需要调整对接,新增禁用套餐固定价格和启用套餐固定价格,在更新商品套餐和创建商品套餐新增参数fixed_price和enable_fixed_price,两个接口都需要这两个参数
|
||||
{
|
||||
"openapi": "3.0.1",
|
||||
"info": {
|
||||
"title": "默认模块",
|
||||
"description": "",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"tags": [],
|
||||
"paths": {
|
||||
"/api/v1/admin/good/plan/list": {
|
||||
"get": {
|
||||
"summary": "获取商品套餐列表",
|
||||
"deprecated": false,
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "good_id",
|
||||
"in": "query",
|
||||
"description": "商品id",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"description": "",
|
||||
"example": "Bearer {{token}}",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"default": "Bearer {{token}}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"headers": {}
|
||||
}
|
||||
},
|
||||
"security": []
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/good/plan/create": {
|
||||
"post": {
|
||||
"summary": "创建商品套餐",
|
||||
"deprecated": false,
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"description": "",
|
||||
"example": "Bearer {{token}}",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"default": "Bearer {{token}}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"multipart/form-data": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"good_id": {
|
||||
"description": "商品id",
|
||||
"example": "",
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"description": "名称",
|
||||
"example": "",
|
||||
"type": "string"
|
||||
},
|
||||
"note": {
|
||||
"description": "说明",
|
||||
"example": "",
|
||||
"type": "string"
|
||||
},
|
||||
"args": {
|
||||
"description": "参数 json\n{\n\"arg_id\": 参数id,\n\"name\": \"参数名称\",\n\"attr_id\": 参数值id,\n\"value\": \"参数值\"(如果是 select 或 string 类型),\n\"number\": 参数值(如果是 number 类型),\n}",
|
||||
"example": "",
|
||||
"type": "string"
|
||||
},
|
||||
"extra_arg_ids": {
|
||||
"description": "额外参数 示例:1,2,3,4",
|
||||
"example": "",
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"type": "integer",
|
||||
"description": "套餐排序索引",
|
||||
"example": 0
|
||||
},
|
||||
"inventory": {
|
||||
"type": "integer",
|
||||
"description": "库存数量",
|
||||
"example": 0
|
||||
},
|
||||
"fixed_price": {
|
||||
"type": "integer",
|
||||
"description": "套餐固定价格",
|
||||
"example": 0
|
||||
},
|
||||
"enable_fixed_price": {
|
||||
"type": "integer",
|
||||
"description": "是否启用套餐固定价格",
|
||||
"example": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"headers": {}
|
||||
}
|
||||
},
|
||||
"security": []
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/good/plan/detail": {
|
||||
"get": {
|
||||
"summary": "获取商品套餐详情",
|
||||
"deprecated": false,
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "good_id",
|
||||
"in": "query",
|
||||
"description": "商品id",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "plan_id",
|
||||
"in": "query",
|
||||
"description": "套餐id",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"description": "",
|
||||
"example": "Bearer {{token}}",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"default": "Bearer {{token}}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"headers": {}
|
||||
}
|
||||
},
|
||||
"security": []
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/good/plan/update": {
|
||||
"post": {
|
||||
"summary": "更新商品套餐",
|
||||
"deprecated": false,
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"description": "",
|
||||
"example": "Bearer {{token}}",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"default": "Bearer {{token}}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"multipart/form-data": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"good_id": {
|
||||
"description": "商品id",
|
||||
"example": "",
|
||||
"type": "string"
|
||||
},
|
||||
"plan_id": {
|
||||
"description": "套餐id",
|
||||
"example": "",
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"description": "名称",
|
||||
"example": "",
|
||||
"type": "string"
|
||||
},
|
||||
"note": {
|
||||
"description": "说明",
|
||||
"example": "",
|
||||
"type": "string"
|
||||
},
|
||||
"args": {
|
||||
"description": "参数 json\n{\n\"arg_id\": 参数id,\n\"name\": \"参数名称\",\n\"attr_id\": 参数值id,\n\"value\": \"参数值\"(如果是 select 或 string 类型),\n\"number\": 参数值(如果是 number 类型),\n}",
|
||||
"example": "",
|
||||
"type": "string"
|
||||
},
|
||||
"extra_arg_ids": {
|
||||
"description": "额外参数 示例:1,2,3,4",
|
||||
"example": "",
|
||||
"type": "string"
|
||||
},
|
||||
"index": {
|
||||
"description": "套餐排序索引",
|
||||
"example": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"disable": {
|
||||
"type": "boolean",
|
||||
"description": "是否禁用",
|
||||
"example": ""
|
||||
},
|
||||
"inventory": {
|
||||
"type": "integer",
|
||||
"description": "库存数量",
|
||||
"example": 0
|
||||
},
|
||||
"fixed_price": {
|
||||
"type": "integer",
|
||||
"description": "套餐固定价格",
|
||||
"example": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"headers": {}
|
||||
}
|
||||
},
|
||||
"security": []
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/good/plan/delete": {
|
||||
"delete": {
|
||||
"summary": "删除商品套餐",
|
||||
"deprecated": false,
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "good_id",
|
||||
"in": "query",
|
||||
"description": "商品id",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "plan_id",
|
||||
"in": "query",
|
||||
"description": "套餐id",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"description": "",
|
||||
"example": "Bearer {{token}}",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"default": "Bearer {{token}}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"headers": {}
|
||||
}
|
||||
},
|
||||
"security": []
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/good/plan/disable": {
|
||||
"post": {
|
||||
"summary": "禁用商品套餐",
|
||||
"deprecated": false,
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"description": "",
|
||||
"example": "Bearer {{token}}",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"default": "Bearer {{token}}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"multipart/form-data": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"good_id": {
|
||||
"type": "integer",
|
||||
"description": "商品id",
|
||||
"example": 0
|
||||
},
|
||||
"plan_id": {
|
||||
"type": "integer",
|
||||
"description": "套餐id",
|
||||
"example": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"headers": {}
|
||||
}
|
||||
},
|
||||
"security": []
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/good/plan/enable": {
|
||||
"post": {
|
||||
"summary": "启用商品套餐",
|
||||
"deprecated": false,
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"description": "",
|
||||
"example": "Bearer {{token}}",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"default": "Bearer {{token}}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"multipart/form-data": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"good_id": {
|
||||
"description": "商品id",
|
||||
"example": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"plan_id": {
|
||||
"description": "套餐id",
|
||||
"example": 0,
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"headers": {}
|
||||
}
|
||||
},
|
||||
"security": []
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/good/plan/disable_fixed_price": {
|
||||
"post": {
|
||||
"summary": "禁用套餐固定价格",
|
||||
"deprecated": false,
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"description": "",
|
||||
"example": "Bearer {{token}}",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"default": "Bearer {{token}}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"multipart/form-data": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"good_id": {
|
||||
"description": "商品id",
|
||||
"example": "",
|
||||
"type": "string"
|
||||
},
|
||||
"plan_id": {
|
||||
"description": "套餐id",
|
||||
"example": "",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": []
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/good/plan/enable_fixed_price": {
|
||||
"post": {
|
||||
"summary": "启用套餐固定价格",
|
||||
"deprecated": false,
|
||||
"description": "",
|
||||
"tags": [],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"in": "header",
|
||||
"description": "",
|
||||
"example": "Bearer {{token}}",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"default": "Bearer {{token}}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"multipart/form-data": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"good_id": {
|
||||
"description": "商品id",
|
||||
"example": "",
|
||||
"type": "string"
|
||||
},
|
||||
"plan_id": {
|
||||
"description": "套餐id",
|
||||
"example": "",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"headers": {}
|
||||
}
|
||||
},
|
||||
"security": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {},
|
||||
"responses": {},
|
||||
"securitySchemes": {}
|
||||
},
|
||||
"servers": [],
|
||||
"security": []
|
||||
}
|
||||
|
||||
|
||||
|
||||
自行访问下面的接口地址内容
|
||||
|
||||
1.添加了参数show_home 用于控制商品套餐是否在首页显示,http://localhost:5174/product/list在该页面的编辑弹窗和新增弹窗添加show_home参数,是否展示按钮,这是个boolean值,true为展示,false为不展示 ✅已完成
|
||||
创建商品套餐
|
||||
POST /api/v1/admin/good/plan/create
|
||||
接口ID:412068533
|
||||
接口地址:https://app.apifox.com/link/project/5145887/apis/api-412068533
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------需要解决
|
||||
|
||||
Reference in New Issue
Block a user