Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
kaopu-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
677ffce0
authored
Dec 19, 2019
by
Joneq
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改ip的访问
parent
6f9bea3a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
cmd/main.go
internal/logic/tianyancha.go
cmd/main.go
View file @
677ffce0
package
main
package
main
import
"
kaopu-server/internal/logic
"
import
"
fmt
"
func
main
()
{
func
main
()
{
logic
.
NetBasicHttpGet
(
logic
.
COMPANYINFOURL
,
"深圳市禾田普达科技有限公司"
)
fmt
.
Print
(
1
)
}
}
...
...
internal/logic/tianyancha.go
View file @
677ffce0
...
@@ -118,7 +118,7 @@ func HttpGet(companyName string)(returnDatas map[string]string) {
...
@@ -118,7 +118,7 @@ func HttpGet(companyName string)(returnDatas map[string]string) {
return
returnData
return
returnData
}
}
func
BasicHttpGet
(
url
,
name
string
)(
respBody
[]
byte
)
{
func
Net
BasicHttpGet
(
url
,
name
string
)(
respBody
[]
byte
)
{
req
,
err
:=
http
.
NewRequest
(
"GET"
,
url
,
nil
)
req
,
err
:=
http
.
NewRequest
(
"GET"
,
url
,
nil
)
...
@@ -139,9 +139,9 @@ func BasicHttpGet(url,name string)(respBody []byte) {
...
@@ -139,9 +139,9 @@ func BasicHttpGet(url,name string)(respBody []byte) {
}
}
//内网访问
//内网访问
func
Net
BasicHttpGet
(
url
,
name
string
)(
respBody
[]
byte
)
{
func
BasicHttpGet
(
url
,
name
string
)(
respBody
[]
byte
)
{
req
,
err
:=
http
.
NewRequest
(
"GET"
,
"http://
localhost
/tyc_turn.php"
,
nil
)
req
,
err
:=
http
.
NewRequest
(
"GET"
,
"http://
172.18.137.21
/tyc_turn.php"
,
nil
)
q
:=
req
.
URL
.
Query
()
q
:=
req
.
URL
.
Query
()
q
.
Add
(
"pageNum"
,
"1"
)
q
.
Add
(
"pageNum"
,
"1"
)
...
...
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