|
@@ -3,19 +3,23 @@ package services
|
|
|
import (
|
|
|
"fmt"
|
|
|
"github.com/rdlucklib/rdluck_tools/http"
|
|
|
+ "hongze/hongtao3_watch/global"
|
|
|
"net/url"
|
|
|
)
|
|
|
|
|
|
const (
|
|
|
// RefreshUrl 值示例:http://127.0.0.1:7007/hongtao/refresh?FilePath=E:\hz\hongtao3_data\excel\Oneline\%E7%83%A7%E7%A2%B1.xlsx
|
|
|
- RefreshUrl = "http://127.0.0.1:7007/hongtao/refresh"
|
|
|
+ DefaultRefreshUrl = "http://127.0.0.1:7007/"
|
|
|
)
|
|
|
|
|
|
// InvokeRefreshServer 调用红桃3刷新数据的服务(目前是python)
|
|
|
func InvokeRefreshServer(filePath string) {
|
|
|
var refreshUrl string
|
|
|
+ if global.CONFIG.Serve.RefreshUrl == "" {
|
|
|
+ refreshUrl = DefaultRefreshUrl
|
|
|
+ }
|
|
|
//filePathStr:=url.PathEscape(filePath)
|
|
|
- refreshUrl = RefreshUrl + "?FilePath=" + url.QueryEscape(filePath)
|
|
|
+ refreshUrl = refreshUrl + "hongtao/refresh?FilePath=" + url.QueryEscape(filePath)
|
|
|
fmt.Println("红桃3刷新,文件路径:", filePath, ";刷新URL:"+refreshUrl)
|
|
|
body, err := http.Get(refreshUrl)
|
|
|
if err != nil {
|