Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
php_frq_api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
68705a40
authored
Mar 18, 2021
by
hcy001
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1
parent
1c8052b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
app/Model/SearchModel.php
app/Model/SearchModel.php
View file @
68705a40
...
@@ -21,18 +21,23 @@ class SearchModel
...
@@ -21,18 +21,23 @@ class SearchModel
/*
/*
* 批量获取spu+品牌分类信息
* 批量获取spu+品牌分类信息
*@param json $data eg: [{"spu_name":"RCP0603W110RGS3","brand_name":"vishay"}]
*@param json $data eg: [{"spu_name":"RCP0603W110RGS3","brand_name":"vishay"}]
*
*
* 返回:
*Array
(
[RCP0603W110RGS3#VISHAY] => Array // (大写(型号名称)#品牌)
(
[class_id2] => 13803
[class_id2_name] => 片式电阻器 - 表面贴装
)
)
*
* 调用例子:
* 调用例子:
* $param = [
* $param = [
["spu_name"=>"RCP0603W110RGS3","brand_name"=>"vishay"]
["spu_name"=>"RCP0603W110RGS3","brand_name"=>"vishay"]
];
];
$res = (new SearchModel())->getClassName(json_encode($param));
$res = (new SearchModel())->getClassName(json_encode($param));
print_r($res);
print_r($res);
*
*
* 返回:
* {"code":0,"msg":"查询成功","data":{"RCP0603W110RGS3#VISHAY":{"class_id2":13803,"class_id2_name":"片式电阻器 - 表面贴装"}}}
*
*/
*/
public
function
getClassName
(
$data
){
public
function
getClassName
(
$data
){
$param
=
[
"data"
=>
$data
];
$param
=
[
"data"
=>
$data
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment