Browse Source

添加英文研报的测试环境

xiexiaoyuan 2 years ago
parent
commit
1626b6f410
3 changed files with 6 additions and 4 deletions
  1. 1 1
      services/english_policy_report.go
  2. 4 0
      utils/config.go
  3. 1 3
      utils/constants.go

+ 1 - 1
services/english_policy_report.go

@@ -155,7 +155,7 @@ func PullEnglishPolicyReportSingle(sourceId int) (ret tables.PullEnglishPolicyDa
 func getOriginPolicyReportDetail(id int) (detail EnPolicyReportDataListItem, err error) {
 	//设置接口地址
 	//处理返回值
-	url := utils.EN_POLICY_REPORT_URL + `articles/en/%d`
+	url := utils.EnPolicyReportUrl + `articles/en/%d`
 	url = fmt.Sprintf(url, id)
 	utils.FileLog.Info("url:%s", url)
 	body, err := http.Get(url)

+ 4 - 0
utils/config.go

@@ -43,6 +43,8 @@ var (
 	QsUserName  string
 )
 
+var EnPolicyReportUrl string
+
 func init() {
 	tmpRunMode, err := web.AppConfig.String("run_mode")
 	if err != nil {
@@ -95,6 +97,7 @@ func init() {
 		ReportAppid = "CQWx3EqDLNk7bVHo"                  //Appid
 		ReportSecret = "vRVFCk182Hpv8CyrHsxaHhA3CgGhh4Uu" //AppSecret
 		YIDONG_HONGZE_KEY = "YIDONG20220816VshIcFonYccA"  //易董加密的盐值
+		EnPolicyReportUrl = "https://en.hzinsights.com/v2api/"
 	} else {
 		ApiLog = log.Init("20060102.api")
 		ResearchReportUrl = "http://advisoryadmin.brilliantstart.cn/xcx_h5/"
@@ -102,6 +105,7 @@ func init() {
 		ReportAppid = "VH2ou4EKlYZz58Uj"                  //Appid
 		ReportSecret = "Q6Y5vwmx1IAA9OPkobl8qWvrnV7dGJ4k" //AppSecret
 		YIDONG_HONGZE_KEY = "YIDONG20220816QxbNHiYNnnhT"  //易董加密的盐值
+		EnPolicyReportUrl = "https://beta.internal.hzinsights.com/v2api/"
 	}
 
 	//初始化系统用户角色map集合

+ 1 - 3
utils/constants.go

@@ -108,6 +108,4 @@ const (
 const ALIYUN_YBIMG_HOST = "https://hzstatic.hzinsights.com/static/yb_wx/"
 const HZ_DEFAULT_AVATAR = "https://hzstatic.hzinsights.com/static/yb_wx/hz_default_avatar.png"
 
-const HZPHONE = "057187186319" //弘则电话
-
-const EN_POLICY_REPORT_URL = "https://en.hzinsights.com/v2api/"
+const HZPHONE = "057187186319" //弘则电话