diff --git a/src/api/admin/product.js b/src/api/admin/product.js
index 108a444..6f3c9df 100644
--- a/src/api/admin/product.js
+++ b/src/api/admin/product.js
@@ -144,4 +144,86 @@ export const updateProductParameterValue = (data) => {
'Content-Type':'multipart/form-data'
}
})
+}
+
+
+/**---------------------------------- */
+/**商品套餐管理 */
+
+/**获取商品套餐列表 */
+export const getProductPlanList = (params) => {
+ return http2.get('/api/v1/admin/good/plan/list', {params: params})
+}
+/**获取商品套餐详情 */
+export const getProductPlanDetail = (params) => {
+ return http2.get('/api/v1/admin/good/plan/detail', {params: params})
+}
+/**创建商品套餐 */
+export const createProductPlan = (data) => {
+ return http2.post('/api/v1/admin/good/plan/create', data,{
+ headers:{
+ 'Content-Type':'multipart/form-data'
+ }
+ })
+}
+/**更新商品套餐 */
+export const updateProductPlan = (data) => {
+ return http2.post('/api/v1/admin/good/plan/update', data,{
+ headers:{
+ 'Content-Type':'multipart/form-data'
+ }
+ })
+}
+/**删除商品套餐 */
+export const deleteProductPlan = (params) => {
+ return http2.delete('/api/v1/admin/good/plan/delete', {params: params})
+}
+/**禁用商品套餐 */
+export const disableProductPlan = (data) => {
+ return http2.post('/api/v1/admin/good/plan/disable', data,{
+ headers:{
+ 'Content-Type':'multipart/form-data'
+ }
+ })
+}
+/**启用商品套餐 */
+export const enableProductPlan = (data) => {
+ return http2.post('/api/v1/admin/good/plan/enable', data,{
+ headers:{
+ 'Content-Type':'multipart/form-data'
+ }
+ })
+}
+
+
+/**---------------------------------- */
+/**商品分组标签管理 */
+
+/**获取商品分组标签列表 */
+export const getProductGroupTagList = (params) => {
+ return http2.get('/api/v1/admin/good/group_tag/list', {params: params})
+}
+/**获取商品分组标签详情 */
+export const getProductGroupTagDetail = (params) => {
+ return http2.get('/api/v1/admin/good/group_tag/detail', {params: params})
+}
+/**创建商品分组标签 */
+export const createProductGroupTag = (data) => {
+ return http2.post('/api/v1/admin/good/group_tag/create', data,{
+ headers:{
+ 'Content-Type':'multipart/form-data'
+ }
+ })
+}
+/**更新商品分组标签 */
+export const updateProductGroupTag = (data) => {
+ return http2.post('/api/v1/admin/good/group_tag/update', data,{
+ headers:{
+ 'Content-Type':'multipart/form-data'
+ }
+ })
+}
+/**删除商品分组标签 */
+export const deleteProductGroupTag = (params) => {
+ return http2.delete('/api/v1/admin/good/group_tag/delete', {params: params})
}
\ No newline at end of file
diff --git a/src/views/marketing/DiscountGoods.vue b/src/views/marketing/DiscountGoods.vue
index 40ce59b..30e0f6c 100644
--- a/src/views/marketing/DiscountGoods.vue
+++ b/src/views/marketing/DiscountGoods.vue
@@ -424,7 +424,7 @@ const fetchProductGroupList = async () => {
try {
const res = await getProductGroupList({
page: 1,
- count: 1000
+ count: 10
})
console.log('获取商品组列表:', res.data)
if (res.data.code === 200) {
diff --git a/src/views/product/ProductGroup.vue b/src/views/product/ProductGroup.vue
index a82d2b9..7edeea3 100644
--- a/src/views/product/ProductGroup.vue
+++ b/src/views/product/ProductGroup.vue
@@ -2,19 +2,52 @@
-
-
-
-
-
- 新增商品分组
-
-
- 刷新
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+ 重置
+
+
+
+
+ 新增顶级分组
+
+
+ 刷新
+
+
+ 树形视图
+
+
+ 列表视图
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+ {{ row.name }}
+
+
+
+
+
+
+
+ {{ getLevelText(row.level) }}
+
+
+
+
+
+
+ handleStatusChange(row, val)"
+ />
+
+
+
+
+
+ 添加子级
+ 编辑
+ 删除
+
+
+
+
+
+
-
-
+
+
+
+
+ {{ row.name }}
+
+
+
+
+
+
+ {{ getLevelText(row.level) }}
+
+
+
+
+
+ {{ getParentName(row.parentId) }}
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
@@ -90,13 +255,96 @@
+
+
+
+
+
+
+
+
+
+
+ 清除
+
+
+
+
+
+
+
+
+
+ 层级根据父级分组自动计算
+
+
+
+
+
+
+
+
+
+
+
+ 清除
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 清除
+
+
+
- 启用
- 禁用
+ 启用
+ 禁用
@@ -107,26 +355,156 @@
+
+
+
+
+
+
+
+
+
+ {{ getLevelText(row.level) }}
+
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.name }}
+
+
+
+
+ 取消
+ 确定
+
+
@@ -281,6 +1057,24 @@ onMounted(() => {
background: #ffffff;
}
+.main-tabs {
+ padding: 0 20px;
+}
+
+.tag-selector-header {
+ display: flex;
+ gap: 12px;
+ margin-bottom: 16px;
+}
+
+:deep(.el-tabs__header) {
+ margin-bottom: 0;
+}
+
+:deep(.el-tabs__content) {
+ padding: 0;
+}
+
.filter-section {
padding: 0;
border-bottom: 1px solid #e1e8ed;
@@ -289,23 +1083,47 @@ onMounted(() => {
.filter-content {
display: flex;
- justify-content: flex-end;
+ justify-content: space-between;
align-items: center;
padding: 16px 20px;
gap: 20px;
flex-wrap: wrap;
}
+.search-form {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ flex-wrap: wrap;
+ margin: 0;
+}
+
+.search-form :deep(.el-form-item) {
+ margin-bottom: 0;
+ margin-right: 0;
+}
+
.action-bar {
display: flex;
gap: 12px;
flex-shrink: 0;
+ flex-wrap: wrap;
}
.table-section {
padding: 0;
}
+.group-name-cell {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+}
+
+.group-name {
+ font-weight: 500;
+}
+
.action-buttons {
display: flex;
gap: 8px;
@@ -327,6 +1145,32 @@ onMounted(() => {
padding: 0;
}
+.text-muted {
+ color: #909399;
+}
+
+.form-tip {
+ font-size: 12px;
+ color: #909399;
+ margin-top: 4px;
+}
+
+/* 推介人选择器样式 */
+.recommend-user-selector {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ width: 100%;
+}
+
+.recommend-user-selector .el-input {
+ flex: 1;
+}
+
+.recommend-user-selector .clear-btn {
+ flex-shrink: 0;
+}
+
/* 表格样式优化 */
:deep(.el-table) {
border: none;
@@ -383,9 +1227,10 @@ onMounted(() => {
border-radius: 4px;
}
-.skeleton-id { width: 100px; }
+.skeleton-id { width: 80px; }
.skeleton-name { width: 200px; }
-.skeleton-note { flex: 1; min-width: 250px; }
+.skeleton-note { flex: 1; min-width: 150px; }
+.skeleton-level { width: 100px; }
.skeleton-status { width: 100px; }
.skeleton-action { width: 180px; height: 32px; }
@@ -393,4 +1238,32 @@ onMounted(() => {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
+
+/* 移动端适配 */
+@media (max-width: 768px) {
+ .filter-content {
+ flex-direction: column;
+ align-items: stretch;
+ gap: 12px;
+ }
+
+ .search-form {
+ flex-direction: column;
+ width: 100%;
+ }
+
+ .search-form :deep(.el-form-item) {
+ width: 100%;
+ }
+
+ .search-form :deep(.el-input),
+ .search-form :deep(.el-select) {
+ width: 100% !important;
+ }
+
+ .action-bar {
+ width: 100%;
+ justify-content: flex-start;
+ }
+}
diff --git a/src/views/product/ProductList.vue b/src/views/product/ProductList.vue
index 16a120c..e213d2c 100644
--- a/src/views/product/ProductList.vue
+++ b/src/views/product/ProductList.vue
@@ -96,9 +96,10 @@
-
+
编辑
+ 套餐
参数
删除
@@ -162,19 +163,32 @@
-
-
-
-
-
-
-
-
- {{ productForm.cover_id ? '更换封面' : '选择封面' }}
-
-
清除
-
ID: {{ productForm.cover_id }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 清除
+
@@ -206,6 +220,14 @@
+
+
+
+
+
+
+ all: 所有参数 / plan: 套餐 / customize: 自定义
+
取消
@@ -408,6 +430,122 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ arg.name || arg.value || `参数${arg.arg_id}` }}
+
+
+ -
+
+
+
+
+
+
+
+ {{ row.disable ? '禁用' : '启用' }}
+
+
+
+
+
+ 编辑
+
+ {{ row.disable ? '启用' : '禁用' }}
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 参数配置为JSON数组格式
+
+
+
+ 多个参数ID用英文逗号分隔
+
+
+
+
+
+
+ 启用
+ 禁用
+
+
+
+
+
+
+
@@ -426,7 +564,14 @@ import { getProductList, createProduct, updateProduct, deleteProduct, getProduct
deleteProductParameter,
addProductParameterValue,
updateProductParameterValue,
- deleteProductParameterValue
+ deleteProductParameterValue,
+ getProductPlanList,
+ getProductPlanDetail,
+ createProductPlan,
+ updateProductPlan,
+ deleteProductPlan,
+ disableProductPlan,
+ enableProductPlan
} from '@/api/admin/product'
// 查询参数
@@ -451,7 +596,8 @@ const productForm = reactive({
pay_num: 1,
expire_time: 0,
recommend: false,
- recommend_rebate: 0
+ recommend_rebate: 0,
+ arg_type: 'all' // 商品参数类型 all/plan/customize
})
const productRules = {
@@ -613,7 +759,8 @@ const handleAdd = () => {
pay_num: 1,
expire_time: 0,
recommend: false,
- recommend_rebate: 0
+ recommend_rebate: 0,
+ arg_type: 'all'
})
productFormRef.value?.resetFields()
}
@@ -637,7 +784,8 @@ const handleEdit = (row) => {
pay_num: row.payNum,
expire_time: row.expireTime,
recommend: row.recommend,
- recommend_rebate: row.recommendRebate
+ recommend_rebate: row.recommendRebate,
+ arg_type: row.argType || 'all'
})
// 加载封面预览
loadCoverPreview(row.coverId)
@@ -732,7 +880,8 @@ const submitForm = () => {
price: Math.round(productForm.price * 100) || 0, // 元转分
pay_num: productForm.pay_num || 1,
expire_time: productForm.expire_time || 0,
- recommend_rebate: productForm.recommend_rebate || 0
+ recommend_rebate: productForm.recommend_rebate || 0,
+ arg_type: productForm.arg_type || 'all' // 商品参数类型
}
console.log('提交的数据:', submitData) // 调试日志
@@ -1091,6 +1240,219 @@ const submitParamValueForm = () => {
})
}
+// ==================== 商品套餐管理 ====================
+const planDialogVisible = ref(false)
+const planLoading = ref(false)
+const planList = ref([])
+const currentPlanProductId = ref(null)
+const currentPlanProductName = ref('')
+
+// 套餐表单
+const planFormDialogVisible = ref(false)
+const planFormType = ref('add')
+const planFormRef = ref(null)
+const planForm = reactive({
+ plan_id: undefined,
+ name: '',
+ note: '',
+ args: '',
+ extra_arg_ids: '',
+ index: 0,
+ disable: false
+})
+
+const planFormRules = {
+ name: [{ required: true, message: '请输入套餐名称', trigger: 'blur' }]
+}
+
+// 打开套餐管理
+const handlePlan = (row) => {
+ currentPlanProductId.value = row.id
+ currentPlanProductName.value = row.name
+ planDialogVisible.value = true
+ fetchPlanList()
+}
+
+// 解析args JSON字符串
+const parseArgs = (argsStr) => {
+ if (!argsStr) return []
+ try {
+ const parsed = JSON.parse(argsStr)
+ return Array.isArray(parsed) ? parsed : []
+ } catch (e) {
+ console.error('解析args失败:', e)
+ return []
+ }
+}
+
+// 格式化显示args
+const formatArgs = (argsParsed) => {
+ if (!argsParsed || argsParsed.length === 0) return '-'
+ return argsParsed.map(arg => arg.name || arg.value).filter(Boolean).join(', ')
+}
+
+// 获取套餐列表
+const fetchPlanList = async () => {
+ if (!currentPlanProductId.value) return
+ planLoading.value = true
+ try {
+ const res = await getProductPlanList({ good_id: String(currentPlanProductId.value) })
+
+ if (res.data.code === 200) {
+ // 兼容两种数据结构
+ let data = res.data.data
+ if (Array.isArray(data)) {
+ // 处理args字段,将JSON字符串解析为对象
+ planList.value = data.map(item => ({
+ ...item,
+ argsParsed: parseArgs(item.args)
+ }))
+ } else if (data && data.list) {
+ planList.value = data.list.map(item => ({
+ ...item,
+ argsParsed: parseArgs(item.args)
+ }))
+ } else if (data && data.data) {
+ planList.value = data.data.map(item => ({
+ ...item,
+ argsParsed: parseArgs(item.args)
+ }))
+ } else {
+ planList.value = []
+ }
+ }
+ } catch (error) {
+ console.error('获取套餐列表失败:', error)
+ ElMessage.error('获取套餐列表失败')
+ } finally {
+ planLoading.value = false
+ }
+}
+
+// 新增套餐
+const handleAddPlan = () => {
+ planFormType.value = 'add'
+ planFormDialogVisible.value = true
+ Object.assign(planForm, {
+ plan_id: undefined,
+ name: '',
+ note: '',
+ args: '',
+ extra_arg_ids: '',
+ index: 0,
+ disable: false
+ })
+ nextTick(() => {
+ planFormRef.value?.resetFields()
+ })
+}
+
+// 编辑套餐
+const handleEditPlan = async (row) => {
+ planFormType.value = 'edit'
+ try {
+ const res = await getProductPlanDetail({ good_id: String(currentPlanProductId.value), plan_id: String(row.id) })
+ if (res.data.code === 200) {
+ const data = res.data.data
+ // 处理args字段:如果是字符串先解析,再格式化为漂亮的JSON
+ let argsValue = ''
+ if (data.args) {
+ try {
+ // 如果args是字符串,先解析为对象
+ const argsObj = typeof data.args === 'string' ? JSON.parse(data.args) : data.args
+ // 格式化为漂亮的JSON(带缩进)
+ argsValue = JSON.stringify(argsObj, null, 2)
+ } catch (e) {
+ // 解析失败则保持原值
+ argsValue = data.args
+ }
+ }
+ Object.assign(planForm, {
+ plan_id: data.id,
+ name: data.name || '',
+ note: data.note || '',
+ args: argsValue,
+ extra_arg_ids: data.extraArgIds ? data.extraArgIds.join(',') : '',
+ index: data.index || 0,
+ disable: data.disable || false
+ })
+ planFormDialogVisible.value = true
+ }
+ } catch (error) {
+ ElMessage.error('获取套餐详情失败')
+ }
+}
+
+// 删除套餐
+const handleDeletePlan = (row) => {
+ ElMessageBox.confirm(`确认删除套餐 ${row.name} 吗?`, '警告', {
+ confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning'
+ }).then(async () => {
+ try {
+ const res = await deleteProductPlan({ good_id: String(currentPlanProductId.value), plan_id: String(row.id) })
+ if (res.data.code === 200) {
+ ElMessage.success('删除成功')
+ fetchPlanList()
+ }
+ } catch (error) {
+ ElMessage.error('删除失败')
+ }
+ }).catch(() => {})
+}
+
+// 切换套餐状态
+const handleTogglePlanStatus = async (row) => {
+ try {
+ const res = row.disable
+ ? await enableProductPlan({ good_id: String(currentPlanProductId.value), plan_id: String(row.id) })
+ : await disableProductPlan({ good_id: String(currentPlanProductId.value), plan_id: String(row.id) })
+ if (res.data.code === 200) {
+ ElMessage.success(row.disable ? '启用成功' : '禁用成功')
+ fetchPlanList()
+ }
+ } catch (error) {
+ ElMessage.error('操作失败')
+ }
+}
+
+// 提交套餐表单
+const submitPlanForm = () => {
+ planFormRef.value?.validate(async (valid) => {
+ if (valid) {
+ try {
+ const submitData = {
+ good_id: String(currentPlanProductId.value),
+ name: planForm.name,
+ note: planForm.note || '',
+ args: planForm.args || '',
+ extra_arg_ids: planForm.extra_arg_ids || '',
+ index: Number(planForm.index) || 0
+ }
+
+ let res
+ if (planFormType.value === 'add') {
+ res = await createProductPlan(submitData)
+ } else {
+ submitData.plan_id = String(planForm.plan_id)
+ submitData.disable = planForm.disable
+ res = await updateProductPlan(submitData)
+ }
+
+ if (res.data.code === 200) {
+ ElMessage.success(planFormType.value === 'add' ? '新增成功' : '修改成功')
+ planFormDialogVisible.value = false
+ fetchPlanList()
+ } else {
+ ElMessage.error(res.data.message || '操作失败')
+ }
+ } catch (error) {
+ console.error('套餐操作失败:', error)
+ ElMessage.error(error.response?.data?.message || '操作失败')
+ }
+ }
+ })
+}
+
diff --git a/问题.MD b/问题.MD
index b921a48..60eeaa1 100644
--- a/问题.MD
+++ b/问题.MD
@@ -1,6 +1,1756 @@
✅已完成、⚠️部分完成、❌未完成这样显示
-----------------------------------------------------------------------------------------------需要解决
+
+{
+ "openapi": "3.0.1",
+ "info": {
+ "title": "默认模块",
+ "description": "",
+ "version": "1.0.0"
+ },
+ "tags": [],
+ "paths": {
+ "/api/v1/admin/good/goods/list": {
+ "get": {
+ "summary": "获取商品列表",
+ "deprecated": false,
+ "description": "",
+ "tags": [],
+ "parameters": [
+ {
+ "name": "count",
+ "in": "query",
+ "description": "获取条数 默认 10",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "page",
+ "in": "query",
+ "description": "获取页码 默认 1",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "good_group_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/goods/tag_list": {
+ "get": {
+ "summary": "获取商品标签列表",
+ "deprecated": false,
+ "description": "",
+ "tags": [],
+ "parameters": [
+ {
+ "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/goods/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": {
+ "name": {
+ "description": "名称",
+ "example": "",
+ "type": "string"
+ },
+ "table": {
+ "description": "商品所属表",
+ "example": "",
+ "type": "string"
+ },
+ "tag": {
+ "description": "商品标签,从 tag_list 接口中获取",
+ "example": "",
+ "type": "string"
+ },
+ "content": {
+ "description": "内容",
+ "example": "",
+ "type": "string"
+ },
+ "cover_id": {
+ "description": "封面id",
+ "example": 0,
+ "type": "integer"
+ },
+ "inventory_control": {
+ "description": "是否开启商品库存",
+ "example": "",
+ "type": "string"
+ },
+ "inventory": {
+ "description": "商品库存",
+ "example": 0,
+ "type": "integer"
+ },
+ "price": {
+ "description": "商品价格",
+ "example": 0,
+ "type": "integer"
+ },
+ "pay_num": {
+ "description": "单个商品数量",
+ "example": 0,
+ "type": "integer"
+ },
+ "expire_time": {
+ "description": "商品购买有效期 /天",
+ "example": 0,
+ "type": "integer"
+ },
+ "recommend": {
+ "description": "是否开启推介",
+ "example": "",
+ "type": "boolean"
+ },
+ "recommend_rebate": {
+ "description": "商品推介返还 /100%",
+ "example": 0,
+ "type": "integer"
+ },
+ "good_group_id": {
+ "description": "商品组id",
+ "example": 0,
+ "type": "integer"
+ },
+ "arg_type": {
+ "description": "商品参数类型 all 所有 / plan 套餐 / customize 自定义",
+ "example": "",
+ "type": "string"
+ }
+ }
+ },
+ "examples": {}
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {}
+ }
+ }
+ },
+ "headers": {}
+ }
+ },
+ "security": []
+ }
+ },
+ "/api/v1/admin/good/goods/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": {
+ "id": {
+ "description": "ID 编号",
+ "example": "",
+ "type": "string"
+ },
+ "name": {
+ "description": "名称",
+ "example": "",
+ "type": "string"
+ },
+ "table": {
+ "description": "商品所属表",
+ "example": "",
+ "type": "string"
+ },
+ "tag": {
+ "description": "商品标签,从 tag_list 接口中获取",
+ "example": "",
+ "type": "string"
+ },
+ "content": {
+ "description": "内容",
+ "example": "",
+ "type": "string"
+ },
+ "cover_id": {
+ "description": "封面id",
+ "example": 0,
+ "type": "integer"
+ },
+ "inventory_control": {
+ "description": "是否开启商品库存",
+ "example": "",
+ "type": "boolean"
+ },
+ "inventory": {
+ "description": "商品库存",
+ "example": 0,
+ "type": "integer"
+ },
+ "price": {
+ "description": "商品价格",
+ "example": 0,
+ "type": "integer"
+ },
+ "pay_num": {
+ "description": "单个商品数量",
+ "example": 0,
+ "type": "integer"
+ },
+ "expire_time": {
+ "description": "商品购买有效期 /天",
+ "example": 0,
+ "type": "integer"
+ },
+ "recommend": {
+ "description": "是否开启推介",
+ "example": "",
+ "type": "boolean"
+ },
+ "recommend_rebate": {
+ "description": "商品推介返还 /100%",
+ "example": 0,
+ "type": "integer"
+ },
+ "good_group_id": {
+ "description": "商品组id",
+ "example": 0,
+ "type": "integer"
+ },
+ "arg_type": {
+ "description": "商品参数类型 all 所有 / plan 套餐 / customize 自定义",
+ "example": "",
+ "type": "string"
+ }
+ }
+ },
+ "examples": {}
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {}
+ }
+ }
+ },
+ "headers": {}
+ }
+ },
+ "security": []
+ }
+ },
+ "/api/v1/admin/good/goods/delete": {
+ "delete": {
+ "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": {
+ "id": {
+ "description": "ID 编号",
+ "example": "",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {}
+ }
+ }
+ },
+ "headers": {}
+ }
+ },
+ "security": []
+ }
+ }
+ },
+ "components": {
+ "schemas": {},
+ "responses": {},
+ "securitySchemes": {}
+ },
+ "servers": [],
+ "security": []
+}
+
+{
+ "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
+ }
+ }
+ },
+ "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": ""
+ }
+ }
+ },
+ "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": []
+ }
+ }
+ },
+ "components": {
+ "schemas": {},
+ "responses": {},
+ "securitySchemes": {}
+ },
+ "servers": [],
+ "security": []
+}
+
+{
+ "openapi": "3.0.1",
+ "info": {
+ "title": "默认模块",
+ "description": "",
+ "version": "1.0.0"
+ },
+ "tags": [],
+ "paths": {
+ "/api/v1/admin/good/group/list": {
+ "get": {
+ "summary": "获取商品分组列表",
+ "deprecated": false,
+ "description": "",
+ "tags": [],
+ "parameters": [
+ {
+ "name": "count",
+ "in": "query",
+ "description": "获取条数 默认 10",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "page",
+ "in": "query",
+ "description": "获取页码 默认 1",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "key",
+ "in": "query",
+ "description": "关键词筛选",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "disable",
+ "in": "query",
+ "description": "筛选 隐藏/显示 的分组",
+ "required": false,
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "name": "level",
+ "in": "query",
+ "description": "筛选分组层级",
+ "required": false,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "name": "parent_id",
+ "in": "query",
+ "description": "筛选父级分组id",
+ "required": false,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "name": "tag",
+ "in": "query",
+ "description": "筛选分组标签",
+ "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/group/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": {
+ "name": {
+ "description": "名称",
+ "example": "",
+ "type": "string"
+ },
+ "note": {
+ "description": "备注",
+ "example": "",
+ "type": "string"
+ },
+ "disable": {
+ "description": "是否隐藏",
+ "example": "",
+ "type": "boolean"
+ },
+ "level": {
+ "description": "分组层级",
+ "example": "",
+ "type": "string"
+ },
+ "parent_id": {
+ "description": "父级分组id",
+ "example": 0,
+ "type": "integer"
+ },
+ "cover_id": {
+ "description": "分组封面id",
+ "example": 0,
+ "type": "integer"
+ },
+ "tag_id": {
+ "description": "分组标签id",
+ "example": 0,
+ "type": "integer"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {}
+ }
+ }
+ },
+ "headers": {}
+ }
+ },
+ "security": []
+ }
+ },
+ "/api/v1/admin/good/group/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": {
+ "id": {
+ "description": "ID 编号",
+ "example": "",
+ "type": "string"
+ },
+ "name": {
+ "description": "名称",
+ "example": "",
+ "type": "string"
+ },
+ "note": {
+ "description": "备注",
+ "example": "",
+ "type": "string"
+ },
+ "disable": {
+ "description": "是否隐藏",
+ "example": "",
+ "type": "boolean"
+ },
+ "level": {
+ "description": "分组层级",
+ "example": "",
+ "type": "string"
+ },
+ "parent_id": {
+ "description": "父级分组id",
+ "example": 0,
+ "type": "integer"
+ },
+ "cover_id": {
+ "description": "分组封面id",
+ "example": 0,
+ "type": "integer"
+ },
+ "tag_id": {
+ "description": "分组标签id",
+ "example": 0,
+ "type": "integer"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {}
+ }
+ }
+ },
+ "headers": {}
+ }
+ },
+ "security": []
+ }
+ },
+ "/api/v1/admin/good/group/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": {
+ "id": {
+ "example": "",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {}
+ }
+ }
+ },
+ "headers": {}
+ }
+ },
+ "security": []
+ }
+ },
+ "/api/v1/admin/good/group/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": {
+ "id": {
+ "description": "ID 编号",
+ "example": "",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {}
+ }
+ }
+ },
+ "headers": {}
+ }
+ },
+ "security": []
+ }
+ },
+ "/api/v1/admin/good/group/delete": {
+ "delete": {
+ "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": {
+ "id": {
+ "description": "ID 编号",
+ "example": "",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {}
+ }
+ }
+ },
+ "headers": {}
+ }
+ },
+ "security": []
+ }
+ }
+ },
+ "components": {
+ "schemas": {},
+ "responses": {},
+ "securitySchemes": {}
+ },
+ "servers": [],
+ "security": []
+}
+
+
+
+
+
+1.http://localhost:5173/product/group分组页的table是需要分页的
+2.点击商品分组页面的添加子级分组点击分组封面并没有弹出
+3.添加顶级分组和添加子级分组失败,
+curl ^"https://apiservertest.s1f.ren/api/v1/admin/good/group/create^" ^
+ -H ^"Accept: application/json, text/plain, */*^" ^
+ -H ^"Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6^" ^
+ -H ^"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzAwNTk3MzYsImlzX2FkbWluIjp0cnVlLCJrZXkiOiJSUkR2MFJmT2RZRXpXaXpPIiwidXNlcl9ncm91cCI6MTEsInVzZXJfaWQiOjQsInVzZXJfbmFtZSI6InNoaXJhbiJ9.R5aT8pnXiHb31raNWyOCd39sPz3voov-OtENWvWCjR0^" ^
+ -H ^"Connection: keep-alive^" ^
+ -H ^"Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryswFqovBifaqLkuBL^" ^
+ -H ^"Origin: http://localhost:5173^" ^
+ -H ^"Referer: http://localhost:5173/^" ^
+ -H ^"Sec-Fetch-Dest: empty^" ^
+ -H ^"Sec-Fetch-Mode: cors^" ^
+ -H ^"Sec-Fetch-Site: cross-site^" ^
+ -H ^"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 Edg/144.0.0.0^" ^
+ -H ^"sec-ch-ua: ^\^"Not(A:Brand^\^";v=^\^"8^\^", ^\^"Chromium^\^";v=^\^"144^\^", ^\^"Microsoft Edge^\^";v=^\^"144^\^"^" ^
+ -H ^"sec-ch-ua-mobile: ?0^" ^
+ -H ^"sec-ch-ua-platform: ^\^"Windows^\^"^" ^
+ --data-raw ^"------WebKitFormBoundaryswFqovBifaqLkuBL^
+
+Content-Disposition: form-data; name=^\^"name^\^"^
+
+^
+
+^ ^ ^ ^
+
+------WebKitFormBoundaryswFqovBifaqLkuBL^
+
+Content-Disposition: form-data; name=^\^"note^\^"^
+
+^
+
+^ ^ ^ ^
+
+------WebKitFormBoundaryswFqovBifaqLkuBL^
+
+Content-Disposition: form-data; name=^\^"disable^\^"^
+
+^
+
+false^
+
+------WebKitFormBoundaryswFqovBifaqLkuBL^
+
+Content-Disposition: form-data; name=^\^"level^\^"^
+
+^
+
+1^
+
+------WebKitFormBoundaryswFqovBifaqLkuBL^
+
+Content-Disposition: form-data; name=^\^"parent_id^\^"^
+
+^
+
+0^
+
+------WebKitFormBoundaryswFqovBifaqLkuBL^
+
+Content-Disposition: form-data; name=^\^"cover_id^\^"^
+
+^
+
+0^
+
+------WebKitFormBoundaryswFqovBifaqLkuBL^
+
+Content-Disposition: form-data; name=^\^"tag_id^\^"^
+
+^
+
+0^
+
+------WebKitFormBoundaryswFqovBifaqLkuBL--^
+
+^"
+4.获取套餐列表失败
+curl ^"https://apiservertest.s1f.ren/api/v1/admin/good/plan/list?good_id=29^" ^
+ -H ^"Accept: application/json, text/plain, */*^" ^
+ -H ^"Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6^" ^
+ -H ^"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzAwNTk3MzYsImlzX2FkbWluIjp0cnVlLCJrZXkiOiJSUkR2MFJmT2RZRXpXaXpPIiwidXNlcl9ncm91cCI6MTEsInVzZXJfaWQiOjQsInVzZXJfbmFtZSI6InNoaXJhbiJ9.R5aT8pnXiHb31raNWyOCd39sPz3voov-OtENWvWCjR0^" ^
+ -H ^"Connection: keep-alive^" ^
+ -H ^"Origin: http://localhost:5173^" ^
+ -H ^"Referer: http://localhost:5173/^" ^
+ -H ^"Sec-Fetch-Dest: empty^" ^
+ -H ^"Sec-Fetch-Mode: cors^" ^
+ -H ^"Sec-Fetch-Site: cross-site^" ^
+ -H ^"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 Edg/144.0.0.0^" ^
+ -H ^"sec-ch-ua: ^\^"Not(A:Brand^\^";v=^\^"8^\^", ^\^"Chromium^\^";v=^\^"144^\^", ^\^"Microsoft Edge^\^";v=^\^"144^\^"^" ^
+ -H ^"sec-ch-ua-mobile: ?0^" ^
+ -H ^"sec-ch-ua-platform: ^\^"Windows^\^"^"
+
+ 5.创建新套餐失败,为什么会发出两个请求一个是options一个是post
+ curl ^"https://apiservertest.s1f.ren/api/v1/admin/good/plan/create^" ^
+ -H ^"Accept: application/json, text/plain, */*^" ^
+ -H ^"Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6^" ^
+ -H ^"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NzAwNTk3MzYsImlzX2FkbWluIjp0cnVlLCJrZXkiOiJSUkR2MFJmT2RZRXpXaXpPIiwidXNlcl9ncm91cCI6MTEsInVzZXJfaWQiOjQsInVzZXJfbmFtZSI6InNoaXJhbiJ9.R5aT8pnXiHb31raNWyOCd39sPz3voov-OtENWvWCjR0^" ^
+ -H ^"Connection: keep-alive^" ^
+ -H ^"Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryKCGyplVDbP3o88BN^" ^
+ -H ^"Origin: http://localhost:5173^" ^
+ -H ^"Referer: http://localhost:5173/^" ^
+ -H ^"Sec-Fetch-Dest: empty^" ^
+ -H ^"Sec-Fetch-Mode: cors^" ^
+ -H ^"Sec-Fetch-Site: cross-site^" ^
+ -H ^"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 Edg/144.0.0.0^" ^
+ -H ^"sec-ch-ua: ^\^"Not(A:Brand^\^";v=^\^"8^\^", ^\^"Chromium^\^";v=^\^"144^\^", ^\^"Microsoft Edge^\^";v=^\^"144^\^"^" ^
+ -H ^"sec-ch-ua-mobile: ?0^" ^
+ -H ^"sec-ch-ua-platform: ^\^"Windows^\^"^" ^
+ --data-raw ^"------WebKitFormBoundaryKCGyplVDbP3o88BN^
+
+Content-Disposition: form-data; name=^\^"good_id^\^"^
+
+^
+
+29^
+
+------WebKitFormBoundaryKCGyplVDbP3o88BN^
+
+Content-Disposition: form-data; name=^\^"name^\^"^
+
+^
+
+adasd^
+
+------WebKitFormBoundaryKCGyplVDbP3o88BN^
+
+Content-Disposition: form-data; name=^\^"note^\^"^
+
+^
+
+adasd^
+
+------WebKitFormBoundaryKCGyplVDbP3o88BN^
+
+Content-Disposition: form-data; name=^\^"args^\^"^
+
+^
+
+^[^{^\^"arg_id^\^":1,^\^"name^\^":^\^"cpu^\^",^\^"attr_id^\^":1,^\^"value^\^":^\^"50BG^\^"^}^]^
+
+------WebKitFormBoundaryKCGyplVDbP3o88BN^
+
+Content-Disposition: form-data; name=^\^"extra_arg_ids^\^"^
+
+^
+
+1^
+
+------WebKitFormBoundaryKCGyplVDbP3o88BN^
+
+Content-Disposition: form-data; name=^\^"index^\^"^
+
+^
+
+1^
+
+------WebKitFormBoundaryKCGyplVDbP3o88BN--^
+
+^"
+
+
+
+6.在商品列表的编辑商品的弹窗中的封面id的点击按钮需要切换为符合整体的样式参照其他选择id,封面的样式,这个使用AvatarSelector组件
+
+
+
+7.创建新产品需要添加一个商品参数类型的选择,修改也是arg_type:商品参数类型 all 所有 / plan 套餐 / customize 自定义
+
+
+
+
+8.新增商品分组标签管理,查看添加到什么位置比较合适
+
+{
+ "openapi": "3.0.1",
+ "info": {
+ "title": "默认模块",
+ "description": "",
+ "version": "1.0.0"
+ },
+ "tags": [],
+ "paths": {
+ "/api/v1/admin/good/group_tag/list": {
+ "get": {
+ "summary": "获取商品分组标签列表",
+ "deprecated": false,
+ "description": "",
+ "tags": [],
+ "parameters": [
+ {
+ "name": "page",
+ "in": "query",
+ "description": "获取页码 默认 1",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "count",
+ "in": "query",
+ "description": "获取条数 默认 10",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "key",
+ "in": "query",
+ "description": "关键词筛选",
+ "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/group_tag/detail": {
+ "get": {
+ "summary": "获取商品分组标签详情",
+ "deprecated": false,
+ "description": "",
+ "tags": [],
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "description": "",
+ "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/group_tag/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": {
+ "name": {
+ "description": "名称",
+ "example": "",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {}
+ }
+ }
+ },
+ "headers": {}
+ }
+ },
+ "security": []
+ }
+ },
+ "/api/v1/admin/good/group_tag/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": {
+ "id": {
+ "description": "ID 编号",
+ "example": "",
+ "type": "string"
+ },
+ "name": {
+ "description": "名称",
+ "example": "",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {}
+ }
+ }
+ },
+ "headers": {}
+ }
+ },
+ "security": []
+ }
+ },
+ "/api/v1/admin/good/group_tag/delete": {
+ "delete": {
+ "summary": "删除商品分组标签",
+ "deprecated": false,
+ "description": "",
+ "tags": [],
+ "parameters": [
+ {
+ "name": "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": []
+ }
+ }
+ },
+ "components": {
+ "schemas": {},
+ "responses": {},
+ "securitySchemes": {}
+ },
+ "servers": [],
+ "security": []
+}
+
+
+
-----------------------------------------------------------------------------------------------需要解决
规则限制:
@@ -172,7 +1922,6 @@ src/
| qrcode | ^1.5.4 |
| dayjs | ^1.11.13 |
------------------------------------------------------------------------------------------------需要解决
## 表单组件优化 ✅已完成
diff --git a/默认模块.openapi.json b/默认模块.openapi.json
deleted file mode 100644
index 570748a..0000000
--- a/默认模块.openapi.json
+++ /dev/null
@@ -1,104 +0,0 @@
-{
- "openapi": "3.0.1",
- "info": {
- "title": "默认模块",
- "description": "",
- "version": "1.0.0"
- },
- "tags": [],
- "paths": {
- "/api/v1/admin/user/user/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": {
- "user_id": {
- "description": "用户ID",
- "example": "",
- "type": "string"
- },
- "sex": {
- "description": "性别 true 男 false 女",
- "example": "",
- "type": "string"
- },
- "age": {
- "description": "年龄",
- "example": "",
- "type": "string"
- },
- "cover_id": {
- "description": "头像id",
- "example": "",
- "type": "string"
- },
- "user_name": {
- "description": "用户名",
- "example": "",
- "type": "string"
- },
- "recommend_id": {
- "description": "推介用户id",
- "example": "",
- "type": "string"
- },
- "phone": {
- "description": "手机号码",
- "example": "",
- "type": "string"
- },
- "email": {
- "description": "邮箱",
- "example": "",
- "type": "string"
- }
- }
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {}
- }
- }
- },
- "headers": {}
- }
- },
- "security": []
- }
- }
- },
- "components": {
- "schemas": {},
- "responses": {},
- "securitySchemes": {}
- },
- "servers": [],
- "security": []
-}
\ No newline at end of file