Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.TVP.CBA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘龙飞
VIZ.TVP.CBA
Commits
427b17a4
Commit
427b17a4
authored
Apr 19, 2023
by
wangonghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加获取篮球和足球Http地址bug
parent
5eaee7f5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
23 deletions
+84
-23
VIZ.MIGU.CBA.Module/Common/JsonModel.cs
+27
-6
VIZ.MIGU.CBA.Module/HeaderPage/ViewModel/DateHeaderViewModel.cs
+10
-6
VIZ.TVP.FTB.Module/Common/JsonModel.cs
+39
-5
VIZ.TVP.FTB.Module/HeaderPage/ViewModel/DateHeaderViewModel.cs
+8
-6
No files found.
VIZ.MIGU.CBA.Module/Common/JsonModel.cs
View file @
427b17a4
...
@@ -63,6 +63,24 @@ namespace VIZ.TVP.CBA.Module
...
@@ -63,6 +63,24 @@ namespace VIZ.TVP.CBA.Module
//public static string TommorrowMatch_Path(string date);
//public static string TommorrowMatch_Path(string date);
public
static
void
GethttpUrl
()
{
if
(
dataFromSource
)
{
strUrl
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
Url
;
appID
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
AppId
;
appKey
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
AppKey
;
}
else
{
JsonModel
.
strUrl
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
BUrl
;
JsonModel
.
appKey
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
BAppKey
;
JsonModel
.
appID
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
BAppId
;
}
}
/// <summary>
/// <summary>
/// 明日赛程数据服务器接口
/// 明日赛程数据服务器接口
/// </summary>
/// </summary>
...
@@ -82,7 +100,6 @@ namespace VIZ.TVP.CBA.Module
...
@@ -82,7 +100,6 @@ namespace VIZ.TVP.CBA.Module
Dayschedules
dayschedules
=
new
Dayschedules
();
Dayschedules
dayschedules
=
new
Dayschedules
();
try
try
{
{
await
Task
.
Run
(()
=>
await
Task
.
Run
(()
=>
{
{
...
@@ -128,7 +145,7 @@ namespace VIZ.TVP.CBA.Module
...
@@ -128,7 +145,7 @@ namespace VIZ.TVP.CBA.Module
/// <returns></returns>
/// <returns></returns>
public
async
static
Task
<
Dayschedules
>
PostTomorrowMatch_Path
(
string
date
)
public
async
static
Task
<
Dayschedules
>
PostTomorrowMatch_Path
(
string
date
)
{
{
GethttpUrl
();
//Dictionary<string, string> dict = new Dictionary<string, string>();
//Dictionary<string, string> dict = new Dictionary<string, string>();
//dict.Add("leagueid", "401");
//dict.Add("leagueid", "401");
//dict.Add("date", "2022-12-17");
//dict.Add("date", "2022-12-17");
...
@@ -303,7 +320,7 @@ namespace VIZ.TVP.CBA.Module
...
@@ -303,7 +320,7 @@ namespace VIZ.TVP.CBA.Module
PlayerSeasonData
playerSeasonData
=
new
PlayerSeasonData
();
PlayerSeasonData
playerSeasonData
=
new
PlayerSeasonData
();
try
try
{
{
GethttpUrl
();
await
Task
.
Run
(()
=>
await
Task
.
Run
(()
=>
{
{
string
PlayerSeasonDataPath
=
strUrl
+
"player/getplayerstats"
;
string
PlayerSeasonDataPath
=
strUrl
+
"player/getplayerstats"
;
...
@@ -384,6 +401,7 @@ namespace VIZ.TVP.CBA.Module
...
@@ -384,6 +401,7 @@ namespace VIZ.TVP.CBA.Module
{
{
try
try
{
{
GethttpUrl
();
string
GameRoundDataPath
=
strUrl
+
"schedule/getschedulelist"
;
string
GameRoundDataPath
=
strUrl
+
"schedule/getschedulelist"
;
//MessageBox.Show(PlayerSeasonDataPath);
//MessageBox.Show(PlayerSeasonDataPath);
...
@@ -462,8 +480,7 @@ namespace VIZ.TVP.CBA.Module
...
@@ -462,8 +480,7 @@ namespace VIZ.TVP.CBA.Module
{
{
try
try
{
{
GethttpUrl
();
string
OnAirDataPath
=
strUrl
+
"live"
;
string
OnAirDataPath
=
strUrl
+
"live"
;
//MessageBox.Show(OnAirDataPath);
//MessageBox.Show(OnAirDataPath);
Console
.
WriteLine
(
"全量直播数据==>:"
+
OnAirDataPath
);
Console
.
WriteLine
(
"全量直播数据==>:"
+
OnAirDataPath
);
...
@@ -547,7 +564,7 @@ namespace VIZ.TVP.CBA.Module
...
@@ -547,7 +564,7 @@ namespace VIZ.TVP.CBA.Module
try
try
{
{
GethttpUrl
();
await
Task
.
Run
(()
=>
await
Task
.
Run
(()
=>
{
{
string
TeamSeasonDataPath
=
strUrl
+
"team/getteamstats"
;
string
TeamSeasonDataPath
=
strUrl
+
"team/getteamstats"
;
...
@@ -627,6 +644,7 @@ namespace VIZ.TVP.CBA.Module
...
@@ -627,6 +644,7 @@ namespace VIZ.TVP.CBA.Module
{
{
try
try
{
{
GethttpUrl
();
string
TeamScoreDataPath
=
strUrl
+
"team/getteamstanding"
;
string
TeamScoreDataPath
=
strUrl
+
"team/getteamstanding"
;
...
@@ -650,6 +668,8 @@ namespace VIZ.TVP.CBA.Module
...
@@ -650,6 +668,8 @@ namespace VIZ.TVP.CBA.Module
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
TeamRanks
teamRanks
=
JsonConvert
.
DeserializeObject
<
TeamRanks
>(
result
,
settings
);
TeamRanks
teamRanks
=
JsonConvert
.
DeserializeObject
<
TeamRanks
>(
result
,
settings
);
if
(
teamRanks
==
null
)
return
null
;
var
sortRanks
=
teamRanks
.
teamrank
.
OrderBy
(
a
=>
a
.
CBARank
).
ToList
();
var
sortRanks
=
teamRanks
.
teamrank
.
OrderBy
(
a
=>
a
.
CBARank
).
ToList
();
teamRanks
.
teamrank
=
sortRanks
;
teamRanks
.
teamrank
=
sortRanks
;
...
@@ -717,6 +737,7 @@ namespace VIZ.TVP.CBA.Module
...
@@ -717,6 +737,7 @@ namespace VIZ.TVP.CBA.Module
{
{
try
try
{
{
GethttpUrl
();
string
MatchDataPath
=
strUrl
+
"matchSeason"
;
string
MatchDataPath
=
strUrl
+
"matchSeason"
;
Dictionary
<
string
,
string
>
dict
=
new
Dictionary
<
string
,
string
>();
Dictionary
<
string
,
string
>
dict
=
new
Dictionary
<
string
,
string
>();
...
...
VIZ.MIGU.CBA.Module/HeaderPage/ViewModel/DateHeaderViewModel.cs
View file @
427b17a4
...
@@ -171,11 +171,13 @@ namespace VIZ.TVP.CBA.Module
...
@@ -171,11 +171,13 @@ namespace VIZ.TVP.CBA.Module
if
(
mainDataConnection
)
if
(
mainDataConnection
)
{
{
JsonModel
.
strUrl
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
Url
;
//
JsonModel.strUrl = AppSetup_InitCBALiteDB.HttpUrlConfigEntity.Url;
JsonModel
.
appKey
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
AppKey
;
//
JsonModel.appKey = AppSetup_InitCBALiteDB.HttpUrlConfigEntity.AppKey;
JsonModel
.
appID
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
AppId
;
//
JsonModel.appID = AppSetup_InitCBALiteDB.HttpUrlConfigEntity.AppId;
JsonModel
.
dataFromSource
=
true
;
JsonModel
.
dataFromSource
=
true
;
JsonModel
.
GethttpUrl
();
}
}
}
}
}
}
...
@@ -196,11 +198,13 @@ namespace VIZ.TVP.CBA.Module
...
@@ -196,11 +198,13 @@ namespace VIZ.TVP.CBA.Module
this
.
RaisePropertyChanged
(
nameof
(
BackDataConnection
));
this
.
RaisePropertyChanged
(
nameof
(
BackDataConnection
));
if
(
backDataConnection
)
if
(
backDataConnection
)
{
{
JsonModel
.
strUrl
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
BUrl
;
//
JsonModel.strUrl = AppSetup_InitCBALiteDB.HttpUrlConfigEntity.BUrl;
JsonModel
.
appKey
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
BAppKey
;
//
JsonModel.appKey = AppSetup_InitCBALiteDB.HttpUrlConfigEntity.BAppKey;
JsonModel
.
appID
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
BAppId
;
//
JsonModel.appID = AppSetup_InitCBALiteDB.HttpUrlConfigEntity.BAppId;
JsonModel
.
dataFromSource
=
false
;
JsonModel
.
dataFromSource
=
false
;
JsonModel
.
GethttpUrl
();
}
}
}
}
}
}
...
...
VIZ.TVP.FTB.Module/Common/JsonModel.cs
View file @
427b17a4
...
@@ -43,6 +43,28 @@ namespace VIZ.TVP.FTB.Module
...
@@ -43,6 +43,28 @@ namespace VIZ.TVP.FTB.Module
/// <summary>
/// <summary>
/// 获取URl地址
/// </summary>
public
static
void
GethttpUrl
()
{
if
(
dataFromSource
)
{
strUrl
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
Url
;
appID
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
AppId
;
appKey
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
AppKey
;
}
else
{
JsonModel
.
strUrl
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
BUrl
;
JsonModel
.
appKey
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
BAppKey
;
JsonModel
.
appID
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
BAppId
;
}
}
/// <summary>
/// 艾果平台的明日赛程数据服务器接口
/// 艾果平台的明日赛程数据服务器接口
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
...
@@ -54,6 +76,7 @@ namespace VIZ.TVP.FTB.Module
...
@@ -54,6 +76,7 @@ namespace VIZ.TVP.FTB.Module
try
try
{
{
GethttpUrl
();
await
Task
.
Run
(()
=>
await
Task
.
Run
(()
=>
{
{
string
GameRoundDataPath
=
strUrl
+
"schedule/getschedulelist"
;
string
GameRoundDataPath
=
strUrl
+
"schedule/getschedulelist"
;
...
@@ -79,10 +102,13 @@ namespace VIZ.TVP.FTB.Module
...
@@ -79,10 +102,13 @@ namespace VIZ.TVP.FTB.Module
JsonSerializerSettings
settings
=
new
JsonSerializerSettings
();
JsonSerializerSettings
settings
=
new
JsonSerializerSettings
();
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
dayschedules
=
JsonConvert
.
DeserializeObject
<
Dayschedules
>(
str
,
settings
);
dayschedules
=
JsonConvert
.
DeserializeObject
<
Dayschedules
>(
str
,
settings
);
if
(
dayschedules
!=
null
)
{
var
sortList
=
dayschedules
.
schedulelist
.
OrderBy
(
b
=>
Convert
.
ToDateTime
(
b
.
dates
)).
ThenBy
(
a
=>
a
.
time
).
ToList
();
var
sortList
=
dayschedules
.
schedulelist
.
OrderBy
(
b
=>
Convert
.
ToDateTime
(
b
.
dates
)).
ThenBy
(
a
=>
a
.
time
).
ToList
()
;
dayschedules
.
schedulelist
=
sortList
;
}
dayschedules
.
schedulelist
=
sortList
;
});
});
...
@@ -106,6 +132,7 @@ namespace VIZ.TVP.FTB.Module
...
@@ -106,6 +132,7 @@ namespace VIZ.TVP.FTB.Module
{
{
try
try
{
{
GethttpUrl
();
string
TeamScoreDataPath
=
strUrl
+
"team/getteamstats"
;
string
TeamScoreDataPath
=
strUrl
+
"team/getteamstats"
;
...
@@ -131,6 +158,7 @@ namespace VIZ.TVP.FTB.Module
...
@@ -131,6 +158,7 @@ namespace VIZ.TVP.FTB.Module
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
TeamRanks
teamRanks
=
JsonConvert
.
DeserializeObject
<
TeamRanks
>(
result
,
settings
);
TeamRanks
teamRanks
=
JsonConvert
.
DeserializeObject
<
TeamRanks
>(
result
,
settings
);
if
(
teamRanks
==
null
)
return
null
;
var
sortRanks
=
teamRanks
.
teamstats
.
OrderByDescending
(
a
=>
a
.
score
).
ToList
();
var
sortRanks
=
teamRanks
.
teamstats
.
OrderByDescending
(
a
=>
a
.
score
).
ToList
();
teamRanks
.
teamstats
=
sortRanks
;
teamRanks
.
teamstats
=
sortRanks
;
...
@@ -155,6 +183,7 @@ namespace VIZ.TVP.FTB.Module
...
@@ -155,6 +183,7 @@ namespace VIZ.TVP.FTB.Module
{
{
try
try
{
{
GethttpUrl
();
Seasons
seasons
=
new
Seasons
();
Seasons
seasons
=
new
Seasons
();
await
Task
.
Run
(()
=>
await
Task
.
Run
(()
=>
{
{
...
@@ -179,8 +208,12 @@ namespace VIZ.TVP.FTB.Module
...
@@ -179,8 +208,12 @@ namespace VIZ.TVP.FTB.Module
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
seasons
=
JsonConvert
.
DeserializeObject
<
Seasons
>(
result
,
settings
);
seasons
=
JsonConvert
.
DeserializeObject
<
Seasons
>(
result
,
settings
);
var
sortSeason
=
seasons
.
matchseason
.
OrderByDescending
(
a
=>
a
.
seasonName
).
ToList
();
seasons
.
matchseason
=
sortSeason
;
if
(
seasons
!=
null
)
{
var
sortSeason
=
seasons
.
matchseason
.
OrderByDescending
(
a
=>
a
.
seasonName
).
ToList
();
seasons
.
matchseason
=
sortSeason
;
}
Console
.
WriteLine
(
"足球赛季数据=========>"
+
MatchDataPath
);
Console
.
WriteLine
(
"足球赛季数据=========>"
+
MatchDataPath
);
});
});
...
@@ -205,6 +238,7 @@ namespace VIZ.TVP.FTB.Module
...
@@ -205,6 +238,7 @@ namespace VIZ.TVP.FTB.Module
{
{
try
try
{
{
GethttpUrl
();
ShootPlayerRanks
shootPlayerRanks
=
new
ShootPlayerRanks
();
ShootPlayerRanks
shootPlayerRanks
=
new
ShootPlayerRanks
();
await
Task
.
Run
(()
=>
await
Task
.
Run
(()
=>
{
{
...
...
VIZ.TVP.FTB.Module/HeaderPage/ViewModel/DateHeaderViewModel.cs
View file @
427b17a4
...
@@ -56,10 +56,11 @@ namespace VIZ.TVP.FTB.Module
...
@@ -56,10 +56,11 @@ namespace VIZ.TVP.FTB.Module
if
(
mainDataConnection
)
if
(
mainDataConnection
)
{
{
JsonModel
.
strUrl
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
Url
;
//
JsonModel.strUrl = AppSetup_InitLiteDB.HttpUrlConfigEntity.Url;
JsonModel
.
appKey
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
AppKey
;
//
JsonModel.appKey = AppSetup_InitLiteDB.HttpUrlConfigEntity.AppKey;
JsonModel
.
appID
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
AppId
;
//
JsonModel.appID = AppSetup_InitLiteDB.HttpUrlConfigEntity.AppId;
JsonModel
.
dataFromSource
=
true
;
JsonModel
.
dataFromSource
=
true
;
JsonModel
.
GethttpUrl
();
}
}
}
}
}
}
...
@@ -80,10 +81,11 @@ namespace VIZ.TVP.FTB.Module
...
@@ -80,10 +81,11 @@ namespace VIZ.TVP.FTB.Module
this
.
RaisePropertyChanged
(
nameof
(
BackDataConnection
));
this
.
RaisePropertyChanged
(
nameof
(
BackDataConnection
));
if
(
backDataConnection
)
if
(
backDataConnection
)
{
{
JsonModel
.
strUrl
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
BUrl
;
//
JsonModel.strUrl = AppSetup_InitLiteDB.HttpUrlConfigEntity.BUrl;
JsonModel
.
appKey
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
BAppKey
;
//
JsonModel.appKey = AppSetup_InitLiteDB.HttpUrlConfigEntity.BAppKey;
JsonModel
.
appID
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
BAppId
;
//
JsonModel.appID = AppSetup_InitLiteDB.HttpUrlConfigEntity.BAppId;
JsonModel
.
dataFromSource
=
false
;
JsonModel
.
dataFromSource
=
false
;
JsonModel
.
GethttpUrl
();
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment