|
@@ -656,7 +656,17 @@ namespace TEAMModelOS.Controllers.Client
|
|
School school_base = await client.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>($"{school_code}", new PartitionKey("Base"));
|
|
School school_base = await client.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>($"{school_code}", new PartitionKey("Base"));
|
|
if (!string.IsNullOrWhiteSpace(school_base.id))
|
|
if (!string.IsNullOrWhiteSpace(school_base.id))
|
|
{
|
|
{
|
|
- lang = (school_base.region.Equals("中国")) ? "zh-cn" : (school_base.region.Equals("臺灣")) ? "zh-tw" : "en-us"; //語系
|
|
|
|
|
|
+ //語系取得
|
|
|
|
+ if (!string.IsNullOrEmpty(school_base.region))
|
|
|
|
+ {
|
|
|
|
+ if (school_base.region.Equals("中国")) lang = "zh-cn";
|
|
|
|
+ else if (school_base.region.Equals("臺灣")) lang = "zh-tw";
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ if (_option.Location.Equals("China")) lang = "zh-cn";
|
|
|
|
+ }
|
|
|
|
+ //年級、科目、評測類型取得
|
|
foreach (Period periodinfo in school_base.period)
|
|
foreach (Period periodinfo in school_base.period)
|
|
{
|
|
{
|
|
periods.Add(new { id= periodinfo.id, name= periodinfo.name });
|
|
periods.Add(new { id= periodinfo.id, name= periodinfo.name });
|