Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
search_server
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
3834d28d
authored
Jul 24, 2020
by
huangchengyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1.0
parent
7ff1937b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
71 deletions
controller/mouser_controller.go
controller/mouser_controller.go
deleted
100644 → 0
View file @
7ff1937b
package
controller
import
(
"encoding/json"
"fmt"
"github.com/gin-gonic/gin"
"search_server/service/ly"
"time"
)
//搜索型号
func
GetMouserData
(
c
*
gin
.
Context
)
{
goodsName
,
_
:=
c
.
GetPostForm
(
"goods_name"
)
//lycon := new(ly.CommonLyService)
//调外链拿数据
apiData
:=
ly
.
OutLinkMouser
(
&
goodsName
,
"-1"
)
//var shu string
//for _, info := range apiData {
//
// //PrintHtml(t.ctx,&t.flag,"snSku:"+snSku+" 查询得出sku"+skuId+" info",info)
// //jsonDatas,_ := json.Marshal(map[string]interface{}{
// // "dddd":"333333",
// // "ninifa":"333333",
// // "3333":"333333",
// // "gagaga":"333333",
// //})
// //fmt.Println(len(info))
// josn, errs := json.Marshal(info)
// if errs != nil {
// fmt.Println("错误")
// }
// shu += string(josn)
//}
// jsonDatas,_ := json.Marshal(map[string]interface{}{
// "dddd":"333333",
// "ninifa":"333333",
// "3333":"333333",
// "gagaga":"333333",
// })
josn
,
errs
:=
json
.
Marshal
(
apiData
)
if
errs
!=
nil
{
fmt
.
Println
(
"错误"
)
}
time
.
Sleep
(
1
*
time
.
Second
)
temp
:=
string
(
josn
)
c
.
JSON
(
200
,
temp
)
return
//供应商详情
//supplierInfo := model.SUPPLIER_REDIS_INFO{
// SupplierId:14,
// SupplierNickname: "mouser",
//}
//err := lycon.GetSkuByGoodsSn(apiData,&supplierInfo)
//var errCode int
//if !err {
// errCode = 1
//}
//res := common.BomResponse{
// ErrCode: errCode,
// ErrMsg: "",
// Data: "",
//}
//c.JSON(200, map[string]interface{}{
// "error_code":777777,
// "err_msg":"ddddd2",
//})
}
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