Skip to content
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

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from
Open

Conversation

hb1707
Copy link

@hb1707 hb1707 commented Sep 27, 2024

func (js *Js) GetAgentConfig(uri string) (config *Config, err error) {
config = new(Config)
var accessToken string
accessToken, err = js.GetAccessToken()
Copy link
Collaborator

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)
Copy link
Collaborator

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 也可以合并处理,其他函数也是同样处理一下

Copy link
Collaborator

@houseme houseme left a 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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议 Config 对象在使用时在创建,如在88行之前创建。GetConfig 方法也是同样建议

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants