Restore part of df878ae Change

This commit is contained in:
Zhong Lufan 2021-04-18 17:09:40 +08:00
parent d81cede0fa
commit a90d906afc
No known key found for this signature in database
GPG Key ID: 373C08F7FFF84D26
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ aliapi_rpc() {
_key=${_ali_key[$i]}
_value=${_ali_value[$i]}
# 参数值如果是以 () 结束,代表需要执行函数获取值,如果函数不存在,使用原始值。
[[ (${_value%()} != "$_value}" && $(type -t "${_value:0:-2}") == "function") ]] && _value=$(${_value:0:-2})
[[ ($(grep -E "^.+\(\)$" <<< "$_value") == "$_value" && $(type -t "${_value:0:-2}") == "function") ]] && _value=$(${_value:0:-2})
_value=$(_urlencode "$_value")
_query_str+="$_key=$_value&"
done