兼容V2.8,修复错误的连接

This commit is contained in:
ZJY 2021-08-29 22:50:52 +08:00
parent 493fd9059f
commit 6effcfb172
9 changed files with 10 additions and 10 deletions

View File

@ -27,7 +27,7 @@ func main() {
})
web.Get("/", func(ctx *context.Context) {
if models.Config.Theme == "" {
models.Config.Theme = models.GhProxy + "https://raw.githubusercontent.com/cdle/xdd/main/theme/bidong.html"
models.Config.Theme = models.GhProxy + "https://raw.githubusercontent.com/764763903a/xdd/main/theme/noodin.html"
}
if theme != "" {
ctx.WriteString(theme)

View File

@ -61,7 +61,7 @@ func initConfig() {
s, _ := ioutil.ReadAll(f)
if len(s) == 0 {
logs.Info("下载配置%s", name)
r, err := httplib.Get(GhProxy + "https://raw.githubusercontent.com/cdle/xdd/main/conf/demo_" + name).Response()
r, err := httplib.Get(GhProxy + "https://raw.githubusercontent.com/764763903a/xdd/main/conf/demo_" + name).Response()
if err == nil {
io.Copy(f, r.Body)
}

View File

@ -113,7 +113,7 @@ func initContainer() {
func (c *Container) write(cks []JdCookie) error {
switch c.Type {
case "ql":
if c.Version == "2.9"{
if (c.Version == "2.9" || c.Version == "2.8"){
if len(c.Delete) > 0 {
c.request("/api/envs", DELETE, fmt.Sprintf(`[%s]`, strings.Join(c.Delete, ",")))
}
@ -237,7 +237,7 @@ func (c *Container) read() error {
c.Available = true
switch c.Type {
case "ql":
if c.Version == "2.9" {
if (c.Version == "2.9" || c.Version == "2.8") {
type AutoGenerated struct {
Code int `json:"code"`
Data []struct {

View File

@ -25,7 +25,7 @@ func initUserAgent() {
} else {
logs.Info("更新User-Agent")
var err error
ua, err = httplib.Get(GhProxy + "https://raw.githubusercontent.com/cdle/xdd/main/ua.txt").String()
ua, err = httplib.Get(GhProxy + "https://raw.githubusercontent.com/764763903a/xdd/main/ua.txt").String()
if err != nil {
logs.Info("更新User-Agent失败")
}

View File

@ -21,7 +21,7 @@ func initVersion() {
version = Config.Version
}
logs.Info("检查更新" + version)
value, err := httplib.Get(GhProxy + "https://raw.githubusercontent.com/cdle/xdd/main/models/version.go").String()
value, err := httplib.Get(GhProxy + "https://raw.githubusercontent.com/764763903a/xdd/main/models/version.go").String()
if err != nil {
logs.Info("更新版本的失败")
} else {

View File

@ -78,7 +78,7 @@
var timer;
var qrcode = document.getElementById("qrcode")
var loginUrl = ""
var success = "https://ghproxy.com/https://raw.githubusercontent.com/cdle/xdd/main/static/ok.svg";
var success = "https://ghproxy.com/https://raw.githubusercontent.com/764763903a/xdd/main/static/ok.svg";
var jumpapp = document.getElementById('jumpapp')
var hd = document.getElementById("hd")

View File

@ -79,7 +79,7 @@
var timer;
var qrcode = document.getElementById("qrcode")
var loginUrl = ""
var success = "https://ghproxy.com/https://raw.githubusercontent.com/cdle/jd_study/main/xdd/static/ok.svg";
var success = "https://ghproxy.com/https://raw.githubusercontent.com/764763903a/xdd/main/static/ok.svg";
var jumpapp = document.getElementById('jumpapp')
var hd = document.getElementById("hd")
function GetQrCode() {

View File

@ -90,7 +90,7 @@
var timer;
var qrcode = document.getElementById("qrcode")
var loginUrl = ""
var success = "https://ghproxy.com/https://raw.githubusercontent.com/cdle/xdd/main/static/ok.svg";
var success = "https://ghproxy.com/https://raw.githubusercontent.com/764763903a/xdd/main/static/ok.svg";
var jumpapp = document.getElementById('jumpapp')
var hd = document.getElementById("hd")
function showQrcode() {

View File

@ -91,7 +91,7 @@
var timer;
var qrcode = document.getElementById("qrcode")
var loginUrl = ""
var success = "https://ghproxy.com/https://raw.githubusercontent.com/cdle/jd_study/main/jdc/static/ok.svg";
var success = "https://ghproxy.com/https://raw.githubusercontent.com/764763903a/xdd/main/static/ok.svg";
var jumpapp = document.getElementById('jumpapp')
var hd = document.getElementById("hd")