|
@@ -10,10 +10,10 @@ import (
|
|
|
"encoding/hex"
|
|
|
"encoding/json"
|
|
|
"errors"
|
|
|
+ "eta/eta_task/models/data_manage"
|
|
|
+ "eta/eta_task/services/alarm_msg"
|
|
|
+ "eta/eta_task/utils"
|
|
|
"fmt"
|
|
|
- "hongze/hongze_task_trial/models/data_manage"
|
|
|
- "hongze/hongze_task_trial/services/alarm_msg"
|
|
|
- "hongze/hongze_task_trial/utils"
|
|
|
"io/ioutil"
|
|
|
"net/http"
|
|
|
"net/url"
|
|
@@ -22,7 +22,7 @@ import (
|
|
|
"time"
|
|
|
)
|
|
|
|
|
|
-//有色网
|
|
|
+// 有色网
|
|
|
func GetSmmIndex() {
|
|
|
//
|
|
|
//dataUrl := `https://data.smm.cn/api/dataapi_center/get_my_data?api_name=&auth_module=api`
|
|
@@ -629,7 +629,7 @@ type TokenData struct {
|
|
|
Token string `json:"Token"`
|
|
|
}
|
|
|
|
|
|
-//获取token
|
|
|
+// 获取token
|
|
|
func getToken(userName string, password string) (string, error) {
|
|
|
encryptAuth := md5.New()
|
|
|
encryptAuth.Write([]byte(password)) //encrypt password with md5
|
|
@@ -664,21 +664,21 @@ func getToken(userName string, password string) (string, error) {
|
|
|
return token, nil
|
|
|
}
|
|
|
|
|
|
-//request response
|
|
|
+// request response
|
|
|
type DataResp struct {
|
|
|
Code int `json:"Code"`
|
|
|
Msg string `json:"Msg"`
|
|
|
Data *ApiData `json:"Data"`
|
|
|
}
|
|
|
|
|
|
-//api data response
|
|
|
+// api data response
|
|
|
type ApiData struct {
|
|
|
Status int `json:"Status"` //0 no permission,1 ok
|
|
|
Field []ApiField `json:"Field"`
|
|
|
Content [][]string `json:"Content"`
|
|
|
}
|
|
|
|
|
|
-//api title
|
|
|
+// api title
|
|
|
type ApiField struct {
|
|
|
Unit string `json:"Unit"`
|
|
|
Info string `json:"Info"`
|