-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat:新增JS-SDK使用权限签名 #796
base: v2
Are you sure you want to change the base?
feat:新增JS-SDK使用权限签名 #796
Conversation
func (js *Js) GetAgentConfig(uri string) (config *Config, err error) { | ||
config = new(Config) | ||
var accessToken string | ||
accessToken, err = js.GetAccessToken() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
73,74合并处理,下面的78,79也是一样,以及83-86 是不是可以合并定义呢?
if isApp { | ||
url = fmt.Sprintf(getQyAppTicketURL, accessToken) | ||
} | ||
response, err = util.HTTPGet(url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
67行的定义可以延后定义,在72行在定义,72和73可以合并处理,下面76、77 也可以合并处理,其他函数也是同样处理一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感谢
// GetAgentConfig 获取jssdk需要的配置参数 | ||
// uri 为当前网页地址 | ||
func (js *Js) GetAgentConfig(uri string) (config *Config, err error) { | ||
config = new(Config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议 Config
对象在使用时在创建,如在88行之前创建。GetConfig
方法也是同样建议
https://developer.work.weixin.qq.com/document/path/90506