| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- using System.Collections.Generic;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.Extensions.Logging;
- using MySystem.MainModels;
- using System.Linq;
- using Library;
- namespace MySystem.Controllers
- {
- public class HomeController : Controller
- {
- private readonly ILogger<HomeController> _logger;
- public HomeController(ILogger<HomeController> logger)
- {
- _logger = logger;
- }
- public IActionResult Index()
- {
- return View();
- }
- public IActionResult Error()
- {
- string isapi = Request.Headers["Api"].ToString();
- if (isapi != "1")
- {
- if (Response.StatusCode == 500)
- {
- return Redirect("/public/errpage/pc/500.html");
- }
- else if (Response.StatusCode == 502)
- {
- return Redirect("/public/errpage/pc/502.html");
- }
- else if (Response.StatusCode == 404)
- {
- return Redirect("/public/errpage/pc/404.html");
- }
- }
- return View();
- }
- #region ios配置文件
- [Route("/apple-app-site-association")]
- public Dictionary<string, object> iosSetting()
- {
- Dictionary<string, object> result = new Dictionary<string, object>();
- Dictionary<string, object> webcredentials = new Dictionary<string, object>();
- List<string> apps = new List<string>();
- apps.Add("7HQBL6X2N5.com.kexiaoshuang.creator");
- webcredentials.Add("apps", apps);
- result.Add("webcredentials", webcredentials);
- Dictionary<string, object> applinks = new Dictionary<string, object>();
- apps = new List<string>();
- applinks.Add("apps", apps);
- List<Dictionary<string, object>> details = new List<Dictionary<string, object>>();
- Dictionary<string, object> detailsItem = new Dictionary<string, object>();
- detailsItem.Add("appID", "7HQBL6X2N5.com.kexiaoshuang.creator");
- detailsItem.Add("paths", "/creator/ios/*");
- details.Add(detailsItem);
- applinks.Add("details", details);
- result.Add("applinks", applinks);
- return result;
- }
- #endregion
- }
- }
|