Browse Source

修改access_token的获取

master v0.1.0
guzeng 2 years ago
parent
commit
2d7aec5d53
3 changed files with 7 additions and 9 deletions
  1. +7
    -7
      access_token.go
  2. +0
    -1
      message.go
  3. +0
    -1
      qrcode.go

+ 7
- 7
access_token.go View File

@ -5,6 +5,13 @@ import (
"log"
)
type wx_access_token_res struct {
AccessToken string `json:"access_token"`
ExpiresIn int `json:"expires_in"`
Errcode int `json:"errcode"`
Errmsg string `json:"errmsg"`
}
/**
* 从微信api取access_token
*/
@ -14,13 +21,6 @@ func GetAccessToken(appid, secret string) (wx_access_token_res, error) {
data_byte, err := SendHttp("GET", url, nil)
type wx_access_token_res struct {
AccessToken string `json:"access_token"`
ExpiresIn int `json:"expires_in"`
Errcode int `json:"errcode"`
Errmsg string `json:"errmsg"`
}
var data wx_access_token_res
if err == nil {


+ 0
- 1
message.go View File

@ -2,7 +2,6 @@ package wechat
import (
"fmt"
"log"
)
//发送订阅消息返回结果


+ 0
- 1
qrcode.go View File

@ -7,7 +7,6 @@ import (
"log"
"git.tetele.net/tgo/helper"
"git.tetele.net/tgo/network"
)
// 获取小程序码


Loading…
Cancel
Save