Giter Club home page Giter Club logo

Comments (4)

moeshin avatar moeshin commented on June 16, 2024

改 appsettings.json 这个没用,默认值被我写死了

var enableWeiApi = false;
var webApi = userConfig.WebApi;
if (webApi != null)
{
string rule = null;
// ReSharper disable once ConvertIfStatementToSwitchStatement
if (webApi.Type == JTokenType.Boolean)
{
if (webApi.Value<bool>())
{
rule = "http://localhost:5743";
}
}
else if (webApi.Type == JTokenType.String)
{
rule = webApi.Value<string>();
}
if (rule != null)
{
// 启动 WebApi 服务
enableWeiApi = true;
Log.Information("启动 WebApi 服务");
WebApi.Startup.Rule = rule;
WebApi.IntervalData.Status = new WebApi.Status
{
Username = username,
CxAutoSignEnabled = true
};
_ = Task.Run(() => { WebApi.Program.Main(null); });
}
}

或者直接在用户配置里写规则吧

from cx-auto-sign.

moeshin avatar moeshin commented on June 16, 2024

日志没有被打印出来,你更新看看?

from cx-auto-sign.

XYZliang avatar XYZliang commented on June 16, 2024

我试试

from cx-auto-sign.

XYZliang avatar XYZliang commented on June 16, 2024

我之前使用的是Release页面中的版本。使用了Action编译的最新测试版后,api可以正常访问

from cx-auto-sign.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.