Skip to content
This repository has been archived by the owner on Dec 25, 2023. It is now read-only.

Commit

Permalink
修改默认配置文件
Browse files Browse the repository at this point in the history
  • Loading branch information
YukiCoco committed Dec 13, 2020
1 parent 4b4ae13 commit 92ab232
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 30 deletions.
2 changes: 1 addition & 1 deletion ChpStmScraper.WebApi/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/net5.0/linux-x64/ChpStmScraper.WebApi.dll",
"program": "${workspaceFolder}/bin/Debug/net5.0/ChpStmScraper.WebApi.dll",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
Expand Down
7 changes: 6 additions & 1 deletion ChpStmScraper.WebApi/ChpStmScraper.WebApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<RuntimeIdentifiers>win10-x64;osx-x64;linux-x64</RuntimeIdentifiers>
<EnableDefaultContentItems>false</EnableDefaultContentItems>
</PropertyGroup>

<ItemGroup>
Expand All @@ -14,6 +15,10 @@

<ItemGroup>
<ProjectReference Include="..\ChpStmScraper\ChpStmScraper.csproj" />
<Content Include="ChpStmScraper.Template.db" CopyToOutputDirectory="Always" ExcludeFromSingleFile="true"/>
<Content Include="appsettings.json" CopyToOutputDirectory="Always" ExcludeFromSingleFile="true"/>
<Content Include="wwwroot\**\*.*" CopyToOutputDirectory="Always" ExcludeFromSingleFile="true"/>
<Content Update="appsettings.Development.json" CopyToPublishDirectory="Never" ExcludeFromSingleFile="true"/>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion ChpStmScraper.WebApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class Program
{
public static void Main(string[] args)
{

Init();
CreateHostBuilder(args).Build().Run();
}

Expand Down
15 changes: 6 additions & 9 deletions ChpStmScraper.WebApi/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Default": "Warning",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
"Microsoft.Hosting.Lifetime": "Warning"
}
},
"AllowedHosts": "*",
"ProxyUrl": "http://127.0.0.1:7890",
"ProxyUrl": "",
"BuffUrl": "https://buff.163.com/api/market/goods?game=csgo&min_price=20",
"BuffSession": "",
"SteamCookies": "",
"MaxThread": 4,
"CsgoMinSellCount": 30,
"Dota2MinSellCount": 15,
"MinSellPrice": 10,
"ConnectionString": "",
"MysqlVersion": "8.0.22",
"IsEnableScraper" : false,
"MinSellCount": 30,
"ConnectionString": "Data Source=ChpStmScraper.db",
"IsEnableScraper" : true,
"ListeningUrls": [
"http://127.0.0.1:1272"
]
Expand Down
20 changes: 10 additions & 10 deletions ChpStmScraper/ChpStmScraper.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<RuntimeIdentifiers>win10-x64;osx-x64;linux-x64</RuntimeIdentifiers>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -15,6 +15,6 @@
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="5.0.0-alpha.2" />
</ItemGroup>

</Project>
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions ChpStmScraper/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@ static Configuration()
/// CSGO 物品最小在售数
/// </summary>
/// <value></value>
public static int CsgoMinSellCount => int.Parse(configurationRoot["CsgoMinSellCount"]);
public static int MinSellCount => int.Parse(configurationRoot["MinSellCount"]);

/// <summary>
/// DOTA2 物品最小在售数
/// </summary>
/// <value></value>
public static int Dota2MinSellCount => int.Parse(configurationRoot["Dota2MinSellCount"]);
//public static int Dota2MinSellCount => int.Parse(configurationRoot["Dota2MinSellCount"]);

/// <summary>
/// 最小售价
/// </summary>
/// <value></value>
public static int MinSellPrice => int.Parse(configurationRoot["MinSellPrice"]);
//public static int MinSellPrice => int.Parse(configurationRoot["MinSellPrice"]);

/// <summary>
/// Steam Cookies
Expand Down
4 changes: 2 additions & 2 deletions ChpStmScraper/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ public static void Start()
switch (jItem["game"].ToString() == "csgo" ? Goods.GameKind.CSGO : Goods.GameKind.DOTA2)
{
case Goods.GameKind.CSGO:
if (buffSellNum < Configuration.CsgoMinSellCount)
if (buffSellNum < Configuration.MinSellCount)
{
continue;
}
break;
case Goods.GameKind.DOTA2:
if (buffSellNum < Configuration.Dota2MinSellCount)
if (buffSellNum < Configuration.MinSellCount)
{
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion ChpStmScraper/ScraperDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class ScraperDbContext : DbContext
public DbSet<Goods> Goods {get ;set;}
protected override void OnConfiguring(DbContextOptionsBuilder options)
{
options.UseSqlite("Data Source=ChpStmScraper.db");
options.UseSqlite(Configuration.ConnectionString);
//var verionArray = Configuration.MysqlVersion.Split(".");
//options.UseMySql(Configuration.ConnectionString,new MySqlServerVersion(new Version(int.Parse(verionArray[0]),int.Parse(verionArray[1]),int.Parse(verionArray[2]))));
}
Expand Down
8 changes: 8 additions & 0 deletions chpstm.web/public/guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
### 欢迎使用
Cheap Steam 为您提供 STEAM 与 BUFF 的饰品价格对比数据,您可以从此快速找出价格合适的饰品,在 BUFF 购买然后在 Steam 市场出售,以此赚取大额的差价。
### 注意事项
1. 请留意数据的更新日期,并在 BUFF 和 STEAM 中进行比对,其中的某些条目可能存在更新延迟。
2. 表中 STEAM 出售比例,STEAM 收购比例 均计算为税后结果。
3. 请优先考虑 STEAM 收购比例较低的饰品,它可以快速地收购价出手。
4. 入手 STEAM 出售比例较低的饰品时,请留意在售数。在售数过低的饰品会导致 STEAM 市场降价,难以出手。
5. 提交 BUG 和提出建议请发送电邮到 [email protected].
2 changes: 1 addition & 1 deletion chpstm.web/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</v-main>
<v-footer >
<v-col class="text-center" style="padding:3px;" cols="12">
<p style="padding:0px;margin:0px;">{{ new Date().getFullYear() }} — <strong><a class="" href="">Cheap Steam</a></strong></p>
<p style="padding:0px;margin:0px;">{{ new Date().getFullYear() }} — <strong><a class="" href="https://github.com/YukiCoco/CheapSteam">Cheap Steam</a></strong></p>
<p style="padding:0px;margin:0px;" class="font-weight-medium">[email protected]</p>
</v-col>
</v-footer>
Expand Down
5 changes: 4 additions & 1 deletion chpstm.web/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ module.exports = {
"transpileDependencies": [
"vuetify"
],

chainWebpack: config => {
config
.plugin('html')
.tap(args => {
args[0].title = 'Cheap Steam - Steam 市场对比站'
return args
})
}
},

outputDir: '../ChpStmScraper.WebApi/wwwroot'
}

0 comments on commit 92ab232

Please sign in to comment.