异常状态码若为成功, 文案后不带状态码后缀
This commit is contained in:
parent
54b77a714f
commit
b301bd1849
@ -4,9 +4,7 @@
|
||||
<option name="autoReloadType" value="ALL" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="0c7a619f-b520-4d41-ab0d-cfa1799d3cdf" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/code.go" beforeDir="false" afterPath="$PROJECT_DIR$/code.go" afterDir="false" />
|
||||
</list>
|
||||
<list default="true" id="0c7a619f-b520-4d41-ab0d-cfa1799d3cdf" name="Changes" comment="" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
|
4
code.go
4
code.go
@ -75,6 +75,10 @@ func getMessage(code interface{}) string {
|
||||
return fmt.Sprintf("未知错误【%v】", codeTable)
|
||||
}
|
||||
if messageWithCode {
|
||||
if code == defaultSuccessCode {
|
||||
// 请求成功, 一直不带状态码后缀
|
||||
return message[defaultLanguage]
|
||||
}
|
||||
return fmt.Sprintf(message[defaultLanguage]+"【%v】", code)
|
||||
}
|
||||
return message[defaultLanguage]
|
||||
|
Loading…
Reference in New Issue
Block a user