|
|
@@ -27,7 +27,7 @@ func NewWxApiService(masterId, componentAppid, componentAppsecret string) (wxApi |
|
|
|
wxApiService.ComponentAppsecret = componentAppsecret |
|
|
|
wxApiService.Host = "http://super.advertisement.dengbiao.top" |
|
|
|
if cfg.Prd { |
|
|
|
wxApiService.Host = "http://www.baidu.com" |
|
|
|
wxApiService.Host = "http://ad.zhios.cn" |
|
|
|
} |
|
|
|
cacheKey := fmt.Sprintf(md.MasterComponentVerifyTicket, wxApiService.MasterId) |
|
|
|
cacheComponentVerifyTicket, _ := cache.GetString(cacheKey) |
|
|
@@ -86,6 +86,10 @@ func (wxApiService *WxApiService) GetComponentAccessToken() (cacheComponentAcces |
|
|
|
func (wxApiService *WxApiService) GetAuth(appId string) (cacheApiAuthorizerToken string, err error) { // set方法 |
|
|
|
userWxAppletListDb := implement.NewUserWxAppletListDb(db.Db) |
|
|
|
userWxAppletList, err1 := userWxAppletListDb.GetUserWxAppletListByAppId(appId) |
|
|
|
fmt.Println(db.Db) |
|
|
|
fmt.Println(appId) |
|
|
|
fmt.Println(userWxAppletList) |
|
|
|
fmt.Println(err1) |
|
|
|
if err1 != nil { |
|
|
|
return cacheApiAuthorizerToken, err1 |
|
|
|
} |
|
|
|