You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
986 B
36 lines
986 B
package controller
|
|
|
|
import (
|
|
"flag"
|
|
"main_exam_server/common"
|
|
"main_exam_server/config"
|
|
"main_exam_server/loges"
|
|
"net/http"
|
|
"os"
|
|
)
|
|
|
|
var (
|
|
wechatConfigFiles = flag.String("wechatconfigFile", "iniconfig/workWechatConfig.ini", "APP配置文件")
|
|
)
|
|
|
|
func Shiyan(ret *http.Request) (prt common.JsonOut) {
|
|
// flag.Parse()
|
|
getdddAppConfig := config.LoadWorkWechatConfig(*wechatConfigFiles, "CompanySet")
|
|
if getdddAppConfig != nil {
|
|
loges.LongInit("App配置文件读取错误!")
|
|
os.Exit(3)
|
|
}
|
|
getddoAppConfig := config.LoadWorkWechatConfig(*wechatConfigFiles, "MailList")
|
|
if getddoAppConfig != nil {
|
|
loges.LongInit("App配置文件读取错误!")
|
|
os.Exit(3)
|
|
}
|
|
|
|
getToken := "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" + config.WorkWechatInfo.CompanyId + "&corpsecret=" + config.WorkWechatInfo.SecretStr
|
|
|
|
returData := common.MapOut()
|
|
returData["alenda"] = config.WorkWechatInfo
|
|
returData["body"] = common.CurlGet(getToken)
|
|
prt.Data = returData
|
|
return
|
|
}
|
|
|