ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
#### 类型列表 ~~~[api] get:/index.php?ctl=Api_Goods_Type&met=lists&typ=json int:page=1#页数 int:rows#每页记录数 <<< success { "cmd_id":-140, "status":200, "msg":"success", "data":{ "page":1, "total":36, "totalsize":"36", "records":"36", "items":[{ "type_id":"161", "type_name":"德玛西亚", //类型名称 "type_displayorder":"0", //排序 "cat_id":"-1", //仅仅定位,无用 "cat_name":"", "type_draft":"0", //草稿:只允许存在一条记录 "id":"161" }]}} <<< error ~~~ #### 新增类型 ~~~[api] get:/index.php?ctl=Api_Goods_Type&typ=json&met=addType string:type_name#类型名称 int:type_displayorder#排序 row:type_brand#类型相关联品牌 row:type_spec#类型相关联规格 row:type_property#类型相关联属性 <<< success { "cmd_id":-140, "status":200, "msg":"success", "data":{ "type_name":"男装", //类型名称 "type_displayorder":1, //排序 "type_draft":0, //草稿:只允许存在一条记录 "type_id":"162" //类型id }} <<< error ~~~ ``` $type_brand=Array ( [0] => 1 //品牌id [1] => 3 ) $type_spec=Array ( [0] => 6 //规格id [1] => 59 ) ``` #### 编辑类型 ~~~[api] get:/index.php?ctl=Api_Goods_Type&typ=json&met=editType int:id#类型id string:type_name#类型名称 int:type_displayorder#排序 row:type_brand#类型相关联品牌 row:type_spec#类型相关联规格 row:type_property#类型相关联属性 <<< success { "cmd_id":-140, "status":200, "msg":"success", "data":{ "type_name":"男装", //类型名称 "type_displayorder":1 //排序 }} <<< error ~~~ ``` $type_brand=Array ( [0] => 1 //品牌id [1] => 3 ) $type_spec = Array ( [0] => 1 //规格id [1] => 6 ) type_property = Array ( [0] => Array ( [property_id] => 126 //商品属性 [property_name] => 德玛 //属性名称 [type_id] => 161 //所属类型id [property_item] => 11 //属性值列 [property_is_search] => 0 //是否被搜索。0为不搜索、1为搜索 [property_format] => select //显示类型 [property_displayorder] => 1 //排序 [id] => 126 [property_values] => Array ( [179] => Array //属性值id ( [property_value_id] => 179 //属性值id [property_value_name] => 11 //属性值名称 [property_id] => 126 //所属属性id [property_value_displayorder] => 1 //属性值排序 [id] => 179 ) ) ) [1] => Array ( [property_id] => 127 [property_name] => 德玛西亚 [type_id] => 161 [property_item] => 12,12 [property_is_search] => 1 [property_format] => select [property_displayorder] => 1 [id] => 127 [property_values] => Array ( [180] => Array ( [property_value_id] => 180 [property_value_name] => 12 [property_id] => 127 [property_value_displayorder] => 1 [id] => 180 ) [181] => Array ( [property_value_id] => 181 [property_value_name] => 12 [property_id] => 127 [property_value_displayorder] => 2 [id] => 181 ) ) ) ) ``` #### 删除类型 ~~~[api] get:/index.php?ctl=Api_Goods_Type&met=remove&typ=json int:type_id#类型id <<< success {"cmd_id":-140,"status":200,"msg":"success","data":{"type_id":[162]}} <<< error ~~~ #### 新增类型属性 ~~~[api] get:/index.php?ctl=Api_Goods_Property&met=addProperty&typ=json int:type_id#类型id string:property_format#显示类型 select int:property_is_search#是否被搜索 0不搜索 1搜索 string:property_name#属性名称 int:property_displayorder#排序 row:property_rows#属性值 <<< success {"cmd_id":-140, "status":200, "msg":"success", "data":{ "type_id":1, "property_format":"select", "property_is_search":1, "property_name":"虾皮颜色", "property_displayorder":1, "property_item":"白皮,红皮", "property_id":3, "id":3 }} <<< error ~~~ ``` property_rows= Array ( [0] => Array ( [property_value_displayorder] => 2 //排序 [property_value_name] => 白皮 //属性值名称 [property_value_id] => 0 //新增属性,默认为0 ) [1] => Array ( [property_value_displayorder] => 1 [property_value_name] => 红皮 [property_value_id] => 0 ) ) ``` #### 修改类型属性 ~~~[api] get:/index.php?ctl=Api_Goods_Property&met=editProperty&typ=json int:property_id#属性id string:property_name#属性名称 int:property_displayorder#排序 int:property_is_search#是否被搜索 0不搜索 1搜索 string:property_format#显示类型 row:property_rows#属性值 name#说明文字 <<< success {"cmd_id":-140, "status":200, "msg":"success", "data":{ "property_is_search":1, //是否被搜索 "property_name":"虾皮颜色", //属性名称 "property_format":"select", //显示类型 "property_displayorder":1, //排序 "property_item":"白皮,红皮", //属性值列 "property_id":3, //属性id "id":3 }} <<< error ~~~ ``` property_rows= Array ( [0] => Array ( [property_value_displayorder] => 2 //排序 [property_value_name] => 白皮 //属性值名称 [property_value_id] => 3 ) [1] => Array ( [property_value_displayorder] => 1 [property_value_name] => 红皮 [property_value_id] => 4 ) ) ``` #### 删除类型属性 ~~~[api] get:/index.php?ctl=Api_Goods_Property&met=remove&typ=json *int:id#属性id <<< success {"cmd_id":-140, "status":200, "msg":"success", "data":{ "id":4 //属性id }} <<< error ~~~