mirror of https://gitee.com/apiumc/Gateway.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
2.1 KiB
C#
59 lines
2.1 KiB
C#
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using UMC.Web;
|
|
using UMC.Data.Entities;
|
|
using UMC.ITME.Entities;
|
|
using System.IO;
|
|
using UMC.Data;
|
|
using System.Text.RegularExpressions;
|
|
|
|
namespace UMC.ITME.Activities
|
|
{
|
|
[UMC.Web.Apiumc("UI", "Config", Auth = WebAuthType.All)]
|
|
public class UIConfigActivity : UMC.Web.WebActivity
|
|
{
|
|
public override void ProcessActivity(WebRequest request, WebResponse response)
|
|
{
|
|
var config = this.AsyncDialog("Type", "defalut");
|
|
switch (config)
|
|
{
|
|
case "Bar":
|
|
break;
|
|
default:
|
|
case "Home":
|
|
|
|
var footBar = new List<WebMeta>
|
|
{
|
|
new WebMeta().Put("text", "云桌面", "key", "Pager", "cmd", "UI", "model", "Proxy", "icon", "\uf1b3", "RefreshEvent", "Proxy.Site"),
|
|
new WebMeta("text", "发布应用", "icon", "\ue907").Put("max", true).Put("click", new UIClick("Proxy", "Setup")),
|
|
new WebMeta().Put("text", "我的", "key", "Pager", "cmd", "Self", "model", "Account", "icon", "", "RefreshEvent", "UI.Setting").Put("search", new WebMeta("Type", "Setting"))
|
|
};
|
|
this.Context.Reset(new WebMeta().Put("footBar", footBar));
|
|
break;
|
|
}
|
|
}
|
|
|
|
}
|
|
// public class
|
|
|
|
[Apiumc("System", "Scanning", Auth = WebAuthType.All, Desc = "移动扫描", Weight = 1)]
|
|
class SiteScanningActivity : UMC.Web.Activities.SystemScanningActivity
|
|
{
|
|
protected override void Scanning(Uri url)
|
|
{
|
|
if (url.Host.Contains("apiumc.cn") || url.Host.Contains("apiumc.com"))
|
|
{
|
|
if (url.AbsolutePath.StartsWith("/UMC/Platform/Apper"))
|
|
{
|
|
var Setup = System.Web.HttpUtility.ParseQueryString(url.Query).Get("Setup");
|
|
this.Context.Send(new UIClick("Proxy", "Setup").Send(new WebMeta("_", Setup)), true);
|
|
|
|
|
|
}
|
|
}
|
|
base.Scanning(url);
|
|
}
|
|
}
|
|
} |