Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
39893ce4
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
12 个月 前同步成功
通知
11
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zentaoatf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
39893ce4
编写于
3月 11, 2022
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change to use new rest interface
上级
a9c41cae
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
180 addition
and
133 deletion
+180
-133
internal/comm/consts/var.go
internal/comm/consts/var.go
+2
-1
internal/comm/helper/zentao/bug.go
internal/comm/helper/zentao/bug.go
+3
-3
internal/comm/helper/zentao/case.go
internal/comm/helper/zentao/case.go
+14
-24
internal/comm/helper/zentao/request.go
internal/comm/helper/zentao/request.go
+26
-1
internal/comm/helper/zentao/result.go
internal/comm/helper/zentao/result.go
+2
-2
internal/comm/helper/zentao/zentao.go
internal/comm/helper/zentao/zentao.go
+68
-97
internal/pkg/lib/http/http.go
internal/pkg/lib/http/http.go
+60
-5
xdoc/t.json
xdoc/t.json
+5
-0
未找到文件。
internal/comm/consts/var.go
浏览文件 @
39893ce4
...
...
@@ -35,7 +35,8 @@ var (
ProductId
string
ZenTaoVersion
string
SessionVar
string
Token
=
"Token"
SessionVar
=
"zentaosid"
SessionId
string
RequestFix
string
...
...
internal/comm/helper/zentao/bug.go
浏览文件 @
39893ce4
...
...
@@ -38,11 +38,11 @@ func CommitBug(ztfBug commDomain.ZtfBug, projectPath string) (err error) {
params
=
fmt
.
Sprintf
(
"productID=%s&branch=0&$extras=%s"
,
ztfBug
.
Product
,
extras
)
}
//params = ""
url
:=
config
.
Url
+
GenApiUri
(
"bug"
,
"create"
,
params
)
url
:=
config
.
Url
+
GenApiUri
Old
(
"bug"
,
"create"
,
params
)
bug
:=
commDomain
.
ZentaoBug
{}
copier
.
Copy
(
&
bug
,
ztfBug
)
_
,
err
=
httpUtils
.
Post
(
url
,
bug
,
true
)
_
,
err
=
httpUtils
.
Post
WithFormat
(
url
,
bug
,
true
)
msg
:=
""
...
...
@@ -137,7 +137,7 @@ func GetBugFiledOptions(req commDomain.FuncResult, projectPath string) (
params
=
fmt
.
Sprintf
(
"productID=%d"
,
req
.
ProductId
)
}
url
:=
config
.
Url
+
GenApiUri
(
"bug"
,
"ajaxGetBugFieldOptions"
,
params
)
url
:=
config
.
Url
+
GenApiUri
Old
(
"bug"
,
"ajaxGetBugFieldOptions"
,
params
)
bytes
,
err
:=
httpUtils
.
Get
(
url
)
if
err
==
nil
{
jsonData
:=
&
simplejson
.
Json
{}
...
...
internal/comm/helper/zentao/case.go
浏览文件 @
39893ce4
...
...
@@ -121,7 +121,7 @@ func ListCaseByProduct(baseUrl string, productId int) []commDomain.ZtfCase {
params
=
fmt
.
Sprintf
(
"productID=%d&branch=&browseType=byModule¶m=0&orderBy=id_desc&recTotal=0&recPerPage=10000"
,
productId
)
}
url
:=
baseUrl
+
GenApiUri
(
"testcase"
,
"browse"
,
params
)
url
:=
baseUrl
+
GenApiUri
Old
(
"testcase"
,
"browse"
,
params
)
dataStr
,
err
:=
httpUtils
.
Get
(
url
)
if
err
==
nil
{
...
...
@@ -156,7 +156,7 @@ func ListCaseByModule(baseUrl string, productId, moduleId int) []commDomain.ZtfC
productId
,
moduleId
)
}
url
:=
baseUrl
+
GenApiUri
(
"testcase"
,
"browse"
,
params
)
url
:=
baseUrl
+
GenApiUri
Old
(
"testcase"
,
"browse"
,
params
)
bytes
,
err
:=
httpUtils
.
Get
(
url
)
if
err
==
nil
{
...
...
@@ -190,7 +190,7 @@ func ListCaseBySuite(baseUrl string, productId, suiteId int) []commDomain.ZtfCas
params
=
fmt
.
Sprintf
(
"suiteID=%d&orderBy=id_asc&recTotal=0&recPerPage=10000"
,
suiteId
)
}
url
:=
baseUrl
+
GenApiUri
(
"testsuite"
,
"view"
,
params
)
url
:=
baseUrl
+
GenApiUri
Old
(
"testsuite"
,
"view"
,
params
)
bytes
,
err
:=
httpUtils
.
Get
(
url
)
if
err
==
nil
{
...
...
@@ -225,7 +225,7 @@ func ListCaseByTask(baseUrl string, productId, taskId int) []commDomain.ZtfCase
params
=
fmt
.
Sprintf
(
"taskID=%d&browseType=all¶m=0&orderBy=id_asc&recTotal=0&recPerPage=10000"
,
taskId
)
}
url
:=
baseUrl
+
GenApiUri
(
"testtask"
,
"cases"
,
params
)
url
:=
baseUrl
+
GenApiUri
Old
(
"testtask"
,
"cases"
,
params
)
bytes
,
err
:=
httpUtils
.
Get
(
url
)
if
err
==
nil
{
...
...
@@ -265,28 +265,18 @@ func genCaseSteps(csWithSteps commDomain.ZtfCase) (ret []commDomain.ZtfStep) {
return
}
func
GetCaseById
(
baseUrl
string
,
caseId
string
)
commDomain
.
ZtfCase
{
// $caseID, $version = 0, $from = 'testcase', $taskID = 0
func
GetCaseById
(
baseUrl
string
,
caseId
string
)
(
cs
commDomain
.
ZtfCase
)
{
uri
:=
fmt
.
Sprintf
(
"/testcases/%s"
,
caseId
)
url
:=
GenApiUrl
(
uri
,
nil
,
baseUrl
)
params
:=
""
if
commConsts
.
RequestType
==
commConsts
.
PathInfo
{
params
=
fmt
.
Sprintf
(
"%s-0-testcase-0"
,
caseId
)
}
else
{
params
=
fmt
.
Sprintf
(
"caseID=%s&version=0&$from=testcase&taskID=0"
,
caseId
)
}
url
:=
baseUrl
+
GenApiUri
(
"testcase"
,
"view"
,
params
)
bytes
,
err
:=
httpUtils
.
Get
(
url
)
if
err
==
nil
{
var
csw
commDomain
.
ZtfCaseWrapper
json
.
Unmarshal
(
bytes
,
&
csw
)
cs
:=
csw
.
Case
return
cs
if
err
!=
nil
{
return
}
return
commDomain
.
ZtfCase
{}
json
.
Unmarshal
(
bytes
,
&
cs
)
return
}
func
CommitCase
(
caseId
int
,
title
string
,
...
...
@@ -306,7 +296,7 @@ func CommitCase(caseId int, title string,
params
=
fmt
.
Sprintf
(
"caseID=%d&comment=0"
,
caseId
)
}
url
:=
config
.
Url
+
GenApiUri
(
"testcase"
,
"edit"
,
params
)
url
:=
config
.
Url
+
GenApiUri
Old
(
"testcase"
,
"edit"
,
params
)
requestObj
:=
map
[
string
]
interface
{}{
"title"
:
title
,
"steps"
:
commonUtils
.
LinkedMapToMap
(
stepMap
),
...
...
@@ -329,7 +319,7 @@ func CommitCase(caseId int, title string,
}
if
yes
{
_
,
err
=
httpUtils
.
Post
(
url
,
requestObj
,
true
)
_
,
err
=
httpUtils
.
Post
WithFormat
(
url
,
requestObj
,
true
)
if
err
==
nil
{
logUtils
.
Infof
(
i118Utils
.
Sprintf
(
"success_to_commit_case"
,
caseId
)
+
"
\n
"
)
}
...
...
internal/comm/helper/zentao/request.go
浏览文件 @
39893ce4
...
...
@@ -7,10 +7,35 @@ import (
commConsts
"github.com/aaronchen2k/deeptest/internal/comm/consts"
i118Utils
"github.com/aaronchen2k/deeptest/internal/pkg/lib/i118"
serverDomain
"github.com/aaronchen2k/deeptest/internal/server/modules/v1/domain"
"path"
"strings"
)
func
GenApiUri
(
module
string
,
methd
string
,
param
string
)
string
{
const
(
ApiPath
=
"api.php/v1/"
)
func
GenApiUrl
(
pth
string
,
params
map
[
string
]
interface
{},
baseUrl
string
)
(
url
string
)
{
uri
:=
path
.
Join
(
ApiPath
,
pth
)
index
:=
0
for
key
,
val
:=
range
params
{
if
index
==
0
{
uri
+=
"?"
}
else
{
uri
+=
"&"
}
uri
+=
fmt
.
Sprintf
(
"%v=%v"
,
key
,
val
)
index
++
}
url
=
baseUrl
+
uri
return
}
func
GenApiUriOld
(
module
string
,
methd
string
,
param
string
)
string
{
var
uri
string
if
commConsts
.
RequestType
==
commConsts
.
PathInfo
{
...
...
internal/comm/helper/zentao/result.go
浏览文件 @
39893ce4
...
...
@@ -30,8 +30,8 @@ func CommitResult(report commDomain.ZtfReport, productId, taskId string, project
config
:=
configUtils
.
LoadByProjectPath
(
projectPath
)
Login
(
config
)
url
:=
config
.
Url
+
GenApiUri
(
"ci"
,
"commitResult"
,
""
)
ret
,
err
:=
httpUtils
.
Post
(
url
,
report
,
false
)
url
:=
config
.
Url
+
GenApiUri
Old
(
"ci"
,
"commitResult"
,
""
)
ret
,
err
:=
httpUtils
.
Post
WithFormat
(
url
,
report
,
false
)
msg
:=
""
if
err
==
nil
{
...
...
internal/comm/helper/zentao/zentao.go
浏览文件 @
39893ce4
package
zentaoHelper
import
(
"encoding/json"
"errors"
"fmt"
commConsts
"github.com/aaronchen2k/deeptest/internal/comm/consts"
...
...
@@ -16,42 +17,6 @@ import (
"strings"
)
func
Login
(
config
commDomain
.
ProjectConf
)
(
err
error
)
{
err
=
GetConfig
(
config
.
Url
)
if
err
!=
nil
{
logUtils
.
Infof
(
i118Utils
.
Sprintf
(
"fail_to_login"
))
return
}
uri
:=
""
if
commConsts
.
RequestType
==
commConsts
.
PathInfo
{
uri
=
"user-login.json"
}
else
{
uri
=
"index.php?m=user&f=login&t=json"
}
url
:=
config
.
Url
+
uri
params
:=
make
(
map
[
string
]
string
)
params
[
"account"
]
=
config
.
Username
params
[
"password"
]
=
config
.
Password
var
bodyBytes
[]
byte
bodyBytes
,
err
=
httpUtils
.
PostStr
(
url
,
params
)
if
err
!=
nil
||
(
err
==
nil
&&
strings
.
Index
(
string
(
bodyBytes
),
"title"
)
>
0
)
{
// use PostObject to login again for new system
_
,
err
=
httpUtils
.
Post
(
url
,
params
,
true
)
}
if
err
==
nil
{
if
commConsts
.
Verbose
{
logUtils
.
Info
(
i118Utils
.
Sprintf
(
"success_to_login"
))
}
}
else
{
logUtils
.
Errorf
(
i118Utils
.
Sprintf
(
"fail_to_login"
))
}
return
}
func
GetConfig
(
baseUrl
string
)
(
err
error
)
{
//if commConsts.RequestType != "" {
// return true
...
...
@@ -87,6 +52,39 @@ func GetConfig(baseUrl string) (err error) {
return
}
func
Login
(
config
commDomain
.
ProjectConf
)
(
err
error
)
{
err
=
GetConfig
(
config
.
Url
)
if
err
!=
nil
{
logUtils
.
Infof
(
i118Utils
.
Sprintf
(
"fail_to_login"
))
return
}
url
:=
GenApiUrl
(
"tokens"
,
nil
,
config
.
Url
)
params
:=
map
[
string
]
string
{
"account"
:
config
.
Username
,
"password"
:
config
.
Password
,
}
bodyBytes
,
err
:=
httpUtils
.
Post
(
url
,
params
)
if
err
!=
nil
{
logUtils
.
Errorf
(
i118Utils
.
Sprintf
(
"fail_to_login"
))
}
if
commConsts
.
Verbose
{
logUtils
.
Info
(
i118Utils
.
Sprintf
(
"success_to_login"
)
+
string
(
bodyBytes
))
}
jsn
,
_
:=
simplejson
.
NewJson
(
bodyBytes
)
mp
,
_
:=
jsn
.
Map
()
val
,
ok
:=
mp
[
"token"
]
if
ok
{
commConsts
.
SessionId
=
val
.
(
string
)
}
return
}
func
ListLang
()
(
langs
[]
serverDomain
.
ZentaoLang
,
err
error
)
{
for
key
,
_
:=
range
langUtils
.
LangMap
{
langs
=
append
(
langs
,
serverDomain
.
ZentaoLang
{
Code
:
key
,
Name
:
key
})
...
...
@@ -107,62 +105,29 @@ func ListProduct(projectPath string) (products []serverDomain.ZentaoProduct, err
return
}
// $productID = 0, $branch = 0, $browseType = '', $param = 0, $storyType = 'story',
// $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1, $projectID = 0)
params
:=
""
if
commConsts
.
RequestType
==
commConsts
.
PathInfo
{
params
=
fmt
.
Sprintf
(
"-----id_asc-0-10000-1-0"
)
}
else
{
params
=
fmt
.
Sprintf
(
"orderBy=id_asc&recTotal=0&recPerPage=10000"
)
}
url
:=
config
.
Url
+
GenApiUri
(
"product"
,
"browse"
,
params
)
url
:=
GenApiUrl
(
"products"
,
nil
,
config
.
Url
)
bytes
,
err
:=
httpUtils
.
Get
(
url
)
if
err
!=
nil
{
return
}
jsn
,
_
:=
simplejson
.
NewJson
(
bytes
)
productMap
,
err
:=
jsn
.
Get
(
"products"
)
.
Map
()
for
key
,
val
:=
range
productMap
{
id
,
_
:=
strconv
.
Atoi
(
key
)
products
=
append
(
products
,
serverDomain
.
ZentaoProduct
{
Id
:
id
,
Name
:
val
.
(
string
)})
}
return
}
func
ListModuleByProduct
(
productId
int
,
projectPath
string
)
(
modules
[]
serverDomain
.
ZentaoModule
,
err
error
)
{
config
:=
configUtils
.
LoadByProjectPath
(
projectPath
)
err
=
Login
(
config
)
jsn
,
err
:=
simplejson
.
NewJson
(
bytes
)
if
err
!=
nil
{
return
}
// tree-browse-1-story.html#app=product
params
:=
""
if
commConsts
.
RequestType
==
commConsts
.
PathInfo
{
params
=
fmt
.
Sprintf
(
"%d-story"
,
productId
)
}
else
{
params
=
fmt
.
Sprintf
(
"rootID=%d&viewType=story"
,
productId
)
}
url
:=
config
.
Url
+
GenApiUri
(
"tree"
,
"browse"
,
params
)
url
+=
"#app=product"
bytes
,
err
:=
httpUtils
.
Get
(
url
)
items
,
err
:=
jsn
.
Get
(
"products"
)
.
Array
()
if
err
!=
nil
{
return
}
jsn
,
_
:=
simplejson
.
NewJson
(
bytes
)
arr
,
_
:=
jsn
.
Get
(
"tree"
)
.
Array
()
for
_
,
item
:=
range
arr
{
mp
:=
item
.
(
map
[
string
]
interface
{})
mp
[
"level"
]
=
0
GenModuleData
(
mp
,
&
modules
)
for
_
,
item
:=
range
items
{
productMap
,
_
:=
item
.
(
map
[
string
]
interface
{})
id
,
_
:=
productMap
[
"id"
]
.
(
json
.
Number
)
.
Int64
()
name
,
_
:=
productMap
[
"name"
]
.
(
string
)
products
=
append
(
products
,
serverDomain
.
ZentaoProduct
{
Id
:
int
(
id
),
Name
:
name
})
}
return
...
...
@@ -183,7 +148,7 @@ func ListModuleForCase(productId int, projectPath string) (modules []serverDomai
params
=
fmt
.
Sprintf
(
"rootID=%d&viewType=case&from=qa"
,
productId
)
}
url
:=
config
.
Url
+
GenApiUri
(
"tree"
,
"browse"
,
params
)
url
:=
config
.
Url
+
GenApiUri
Old
(
"tree"
,
"browse"
,
params
)
url
+=
"#app=product"
bytes
,
err
:=
httpUtils
.
Get
(
url
)
...
...
@@ -237,7 +202,7 @@ func ListSuiteByProduct(productId int, projectPath string) (suites []serverDomai
params
=
fmt
.
Sprintf
(
"productID=%d&orderBy=id_asc&recTotal=0&recPerPage=10000"
,
productId
)
}
url
:=
config
.
Url
+
GenApiUri
(
"testsuite"
,
"browse"
,
params
)
url
:=
config
.
Url
+
GenApiUri
Old
(
"testsuite"
,
"browse"
,
params
)
bytes
,
err
:=
httpUtils
.
Get
(
url
)
if
err
!=
nil
{
...
...
@@ -261,36 +226,42 @@ func ListSuiteByProduct(productId int, projectPath string) (suites []serverDomai
func
ListTaskByProduct
(
productId
int
,
projectPath
string
)
(
tasks
[]
serverDomain
.
ZentaoTask
,
err
error
)
{
config
:=
configUtils
.
LoadByProjectPath
(
projectPath
)
if
config
.
Url
==
""
{
err
=
errors
.
New
(
i118Utils
.
Sprintf
(
"pls_config_project"
))
return
}
err
=
Login
(
config
)
if
err
!=
nil
{
return
}
// $productID = 0, $branch = '', $type = 'local,totalStatus', $orderBy = 'id_asc', $recTotal = 0, $recPerPage = 20, $pageID = 1, $beginTime = 0, $endTime = 0)
params
:=
""
if
commConsts
.
RequestType
==
commConsts
.
PathInfo
{
params
=
fmt
.
Sprintf
(
"%d--local,totalStatus-id_asc-0-10000-1"
,
productId
)
}
else
{
params
=
fmt
.
Sprintf
(
"productID=%d&type=local,totalStatus&orderBy=id_asc&recTotal=0&recPerPage=10000"
,
productId
)
params
:=
map
[
string
]
interface
{}{
"product"
:
productId
,
"limit"
:
10000
,
}
url
:=
config
.
Url
+
GenApiUri
(
"testtask"
,
"browse"
,
params
)
url
:=
GenApiUrl
(
"testtasks"
,
params
,
config
.
Url
)
bytes
,
err
:=
httpUtils
.
Get
(
url
)
if
err
!=
nil
{
return
}
jsn
,
err
:=
simplejson
.
NewJson
(
bytes
)
if
err
!=
nil
{
return
}
items
,
err
:=
jsn
.
Get
(
"testtasks"
)
.
Array
()
if
err
!=
nil
{
return
}
jsn
,
_
:=
simplejson
.
NewJson
(
bytes
)
mp
,
_
:=
jsn
.
Get
(
"tasks"
)
.
Map
()
for
_
,
item
:=
range
mp
{
mp
:=
item
.
(
map
[
string
]
interface
{})
for
_
,
item
:=
range
items
{
taskMap
,
_
:=
item
.
(
map
[
string
]
interface
{})
idStr
:=
mp
[
"id"
]
.
(
string
)
id
,
_
:=
strconv
.
Atoi
(
idStr
)
name
:=
mp
[
"name"
]
.
(
string
)
id
,
_
:=
taskMap
[
"id"
]
.
(
json
.
Number
)
.
Int64
()
name
,
_
:=
taskMap
[
"name"
]
.
(
string
)
tasks
=
append
(
tasks
,
serverDomain
.
ZentaoTask
{
Id
:
i
d
,
Name
:
name
})
tasks
=
append
(
tasks
,
serverDomain
.
ZentaoTask
{
Id
:
i
nt
(
id
)
,
Name
:
name
})
}
return
...
...
internal/pkg/lib/http/http.go
浏览文件 @
39893ce4
...
...
@@ -18,9 +18,6 @@ import (
)
func
Get
(
url
string
)
(
ret
[]
byte
,
err
error
)
{
if
strings
.
Index
(
url
,
"mode=getconfig"
)
<
0
{
url
=
AddToken
(
url
)
}
if
commConsts
.
Verbose
{
logUtils
.
Info
(
url
)
}
...
...
@@ -33,6 +30,10 @@ func Get(url string) (ret []byte, err error) {
return
}
if
strings
.
Index
(
url
,
"user-login"
)
<
0
&&
strings
.
Index
(
url
,
"mode=getconfig"
)
<
0
{
req
.
Header
.
Add
(
commConsts
.
Token
,
commConsts
.
SessionId
)
}
resp
,
err
:=
client
.
Do
(
req
)
if
err
!=
nil
{
logUtils
.
Infof
(
color
.
RedString
(
"get request failed, error: %s."
,
err
.
Error
()))
...
...
@@ -82,7 +83,61 @@ func Get(url string) (ret []byte, err error) {
return
}
func
Post
(
url
string
,
data
interface
{},
useFormFormat
bool
)
(
ret
[]
byte
,
err
error
)
{
func
Post
(
url
string
,
data
interface
{})
(
ret
[]
byte
,
err
error
)
{
if
commConsts
.
Verbose
{
logUtils
.
Infof
(
i118Utils
.
Sprintf
(
"server_address"
)
+
url
)
}
client
:=
&
http
.
Client
{}
dataBytes
,
err
:=
json
.
Marshal
(
data
)
if
err
!=
nil
{
logUtils
.
Infof
(
color
.
RedString
(
"marshal request failed, error: %s."
,
err
.
Error
()))
return
}
dataStr
:=
string
(
dataBytes
)
if
commConsts
.
Verbose
{
logUtils
.
Infof
(
i118Utils
.
Sprintf
(
"request_content"
))
logUtils
.
Infof
(
dataStr
)
}
req
,
err
:=
http
.
NewRequest
(
"POST"
,
url
,
strings
.
NewReader
(
dataStr
))
if
err
!=
nil
{
logUtils
.
Infof
(
color
.
RedString
(
"post request failed, error: %s."
,
err
.
Error
()))
return
}
if
strings
.
Index
(
url
,
"/tokens"
)
<
0
{
req
.
Header
.
Add
(
commConsts
.
Token
,
commConsts
.
SessionId
)
}
//req.Header.Set("Content-Type", "application/json")
req
.
Header
.
Set
(
"Content-Type"
,
"application/x-www-form-urlencoded"
)
resp
,
err
:=
client
.
Do
(
req
)
if
err
!=
nil
{
logUtils
.
Infof
(
color
.
RedString
(
"post request failed, error: %s."
,
err
.
Error
()))
return
}
bodyBytes
,
err
:=
ioutil
.
ReadAll
(
resp
.
Body
)
if
err
!=
nil
{
logUtils
.
Infof
(
color
.
RedString
(
"read response failed, error: %s."
,
err
.
Error
()))
return
}
if
commConsts
.
Verbose
{
logUtils
.
Infof
(
i118Utils
.
Sprintf
(
"request_response"
))
logUtils
.
Infof
(
logUtils
.
ConvertUnicode
(
bodyBytes
))
}
defer
resp
.
Body
.
Close
()
ret
,
err
=
GetRespErr
(
bodyBytes
,
url
)
return
}
func
PostWithFormat
(
url
string
,
data
interface
{},
useFormFormat
bool
)
(
ret
[]
byte
,
err
error
)
{
url
=
AddToken
(
url
)
if
commConsts
.
Verbose
{
...
...
@@ -233,7 +288,7 @@ func AddToken(url string) (ret string) {
paramPir
:=
commConsts
.
SessionVar
+
"="
+
commConsts
.
SessionId
if
commConsts
.
RequestType
==
commConsts
.
PathInfo
{
if
commConsts
.
RequestType
==
commConsts
.
PathInfo
&&
strings
.
Index
(
address
,
"?"
)
<
0
{
address
=
address
+
"?"
+
paramPir
}
else
{
address
=
address
+
"&"
+
paramPir
...
...
xdoc/t.json
0 → 100644
浏览文件 @
39893ce4
{
"status"
:
"success"
,
"data"
:
""
,
"md5"
:
"892b6c49eee86c8a4273c6707e1a2f04"
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录