|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System.Reflection.Emit;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading;
|
|
|
|
@ -82,6 +83,13 @@ namespace UMC.Proxy.Activities
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
var ks = Key.Split('_');
|
|
|
|
|
|
|
|
|
|
var typeKey = String.Empty;
|
|
|
|
|
if (ks.Length == 2)
|
|
|
|
|
{
|
|
|
|
|
typeKey = ks[1].ToUpper();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var Model = this.AsyncDialog("Model", g =>
|
|
|
|
|
{
|
|
|
|
@ -93,18 +101,17 @@ namespace UMC.Proxy.Activities
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ui = UISection.Create(title);
|
|
|
|
|
if (mainKey.EndsWith("_LOGIN"))
|
|
|
|
|
{
|
|
|
|
|
title.Title = "登录接口";
|
|
|
|
|
}
|
|
|
|
|
else if (mainKey.EndsWith("_UPDATE"))
|
|
|
|
|
switch (typeKey)
|
|
|
|
|
{
|
|
|
|
|
title.Title = "密码托管接口";
|
|
|
|
|
}
|
|
|
|
|
else if (mainKey.EndsWith("_CHECK"))
|
|
|
|
|
{
|
|
|
|
|
title.Title = "账户检测接口";
|
|
|
|
|
|
|
|
|
|
case "LOGIN":
|
|
|
|
|
title.Title = "登录接口";
|
|
|
|
|
break;
|
|
|
|
|
case "UPDATE":
|
|
|
|
|
title.Title = "密码托管接口";
|
|
|
|
|
break;
|
|
|
|
|
case "CHECK":
|
|
|
|
|
title.Title = "账户检测接口";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var Method = value["Method"] as string;
|
|
|
|
@ -155,126 +162,134 @@ namespace UMC.Proxy.Activities
|
|
|
|
|
var content = value["Content"] as string;
|
|
|
|
|
|
|
|
|
|
ui.NewSection().AddCell("提交内容", String.IsNullOrEmpty(content) ? "未设置" : "已设置", new UIClick(new WebMeta(request.Arguments).Put(g, "Content")).Post(request.Model, request.Command));
|
|
|
|
|
}
|
|
|
|
|
else if (mainKey.EndsWith("_LOGIN") == false && mainKey.EndsWith("_UPDATE") == false && mainKey.EndsWith("_CHECK") == false)
|
|
|
|
|
{
|
|
|
|
|
var content = value["Content"] as string;
|
|
|
|
|
// }
|
|
|
|
|
// else if (mainKey.EndsWith("_LOGIN") == false && mainKey.EndsWith("_UPDATE") == false && mainKey.EndsWith("_CHECK") == false)
|
|
|
|
|
// {
|
|
|
|
|
// var content = value["Content"] as string;
|
|
|
|
|
|
|
|
|
|
ui.NewSection().AddCell("脚本环境", String.IsNullOrEmpty(content) ? "未设置" : "已设置", new UIClick(new WebMeta(request.Arguments).Put(g, "Content")).Post(request.Model, request.Command));
|
|
|
|
|
// ui.NewSection().AddCell("脚本环境", String.IsNullOrEmpty(content) ? "未设置" : "已设置", new UIClick(new WebMeta(request.Arguments).Put(g, "Content")).Post(request.Model, request.Command));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (mainKey.EndsWith("_LOGIN") || mainKey.EndsWith("_UPDATE") || mainKey.EndsWith("_CHECK"))
|
|
|
|
|
switch (typeKey)
|
|
|
|
|
{
|
|
|
|
|
var Finish = value["Finish"] as string;
|
|
|
|
|
var root = Key.Substring(0, Key.LastIndexOf('_'));
|
|
|
|
|
case "LOGIN":
|
|
|
|
|
case "UPDATE":
|
|
|
|
|
case "CHECK":
|
|
|
|
|
var Finish = value["Finish"] as string;
|
|
|
|
|
var root = Key.Substring(0, Key.LastIndexOf('_'));
|
|
|
|
|
|
|
|
|
|
ui.NewSection().AddCell("检测格式", String.IsNullOrEmpty(Finish) ? "未设置" : "已设置", new UIClick(new WebMeta(request.Arguments).Put(g, "Finish")).Post(request.Model, request.Command));
|
|
|
|
|
ui.NewSection().AddCell("检测格式", String.IsNullOrEmpty(Finish) ? "未设置" : "已设置", new UIClick(new WebMeta(request.Arguments).Put(g, "Finish")).Post(request.Model, request.Command));
|
|
|
|
|
|
|
|
|
|
var fui = ui.NewSection();
|
|
|
|
|
fui.AddCell("扩展字段", "新增", new UIClick(new WebMeta(request.Arguments).Put(g, "Feilds")).Post(request.Model, request.Command));
|
|
|
|
|
var feilds = value["Feilds"] as Hashtable;
|
|
|
|
|
if (feilds != null && feilds.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
var fd = feilds.Keys.Cast<String>().OrderBy(r => r).GetEnumerator();
|
|
|
|
|
|
|
|
|
|
while (fd.MoveNext())
|
|
|
|
|
var fui = ui.NewSection();
|
|
|
|
|
fui.AddCell("扩展字段", "新增", new UIClick(new WebMeta(request.Arguments).Put(g, "Feilds")).Post(request.Model, request.Command));
|
|
|
|
|
var feilds = value["Feilds"] as Hashtable;
|
|
|
|
|
if (feilds != null && feilds.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
var cell = new WebMeta().Put("value", fd.Current).Put("text", feilds[fd.Current]);
|
|
|
|
|
var fd = feilds.Keys.Cast<String>().OrderBy(r => r).GetEnumerator();
|
|
|
|
|
|
|
|
|
|
cell.Put("click", new UIClick(new WebMeta().Put("Key", Key + "_" + fd.Current)).Post(request.Model, request.Command));
|
|
|
|
|
while (fd.MoveNext())
|
|
|
|
|
{
|
|
|
|
|
var cell = new WebMeta().Put("value", fd.Current).Put("text", feilds[fd.Current]);
|
|
|
|
|
|
|
|
|
|
cell.Put("click", new UIClick(new WebMeta().Put("Key", Key + "_" + fd.Current)).Post(request.Model, request.Command));
|
|
|
|
|
var uICell = UICell.Create("Cell", cell);
|
|
|
|
|
if (fd.Current == "LoginAfter")
|
|
|
|
|
{
|
|
|
|
|
uICell.Style.Name("value").Color(0xff4949);
|
|
|
|
|
// uICell.Style.Name("text").Color(0xff4949);
|
|
|
|
|
}
|
|
|
|
|
fui.Delete(uICell, new UIEventText("移除").Click(new UIClick(new WebMeta(request.Arguments).Put(g, fd.Current)).Post(request.Model, request.Command)));
|
|
|
|
|
|
|
|
|
|
fui.Delete(UICell.Create("Cell", cell), new UIEventText("移除").Click(new UIClick(new WebMeta(request.Arguments).Put(g, fd.Current)).Post(request.Model, request.Command)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (mainKey.EndsWith("_LOGIN"))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
ui.NewSection().AddCell("登录清空会话", value.ContainsKey("IsNotCookieClear") ? "不清空" : "清空", new UIClick(new WebMeta(request.Arguments).Put(g, "IsNotCookieClear")).Post(request.Model, request.Command));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (value.ContainsKey("IsLoginHTML"))
|
|
|
|
|
switch (typeKey)
|
|
|
|
|
{
|
|
|
|
|
case "LOGIN":
|
|
|
|
|
{
|
|
|
|
|
ui.NewSection().AddCell("登录清空会话", value.ContainsKey("IsNotCookieClear") ? "不清空" : "清空", new UIClick(new WebMeta(request.Arguments).Put(g, "IsNotCookieClear")).Post(request.Model, request.Command));
|
|
|
|
|
|
|
|
|
|
ui.NewSection()
|
|
|
|
|
.AddCell("内容转化配置", new UIClick(new WebMeta(request.Arguments).Put(g, "Script")).Post(request.Model, request.Command))
|
|
|
|
|
.NewSection().AddCell("前端页面登录", "已启用", new UIClick(new WebMeta(request.Arguments).Put(g, "IsLoginHTML")).Post(request.Model, request.Command))
|
|
|
|
|
|
|
|
|
|
.AddCell("前端页面内容配置", new UIClick(String.Format("{0}_HTML", mainKey).ToUpper()).Post(request.Model, "Conf"));
|
|
|
|
|
if (value.ContainsKey("IsLoginHTML"))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
ui.NewSection()
|
|
|
|
|
.AddCell("内容转化配置", new UIClick(new WebMeta(request.Arguments).Put(g, "Script")).Post(request.Model, request.Command))
|
|
|
|
|
.NewSection().AddCell("前端页面登录", "已启用", new UIClick(new WebMeta(request.Arguments).Put(g, "IsLoginHTML")).Post(request.Model, request.Command))
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ui.NewSection().AddCell("前端页面登录", "未启用", new UIClick(new WebMeta(request.Arguments).Put(g, "IsLoginHTML")).Post(request.Model, request.Command));
|
|
|
|
|
}
|
|
|
|
|
.AddCell("前端页面内容配置", new UIClick(String.Format("{0}_HTML", mainKey).ToUpper()).Post(request.Model, "Conf"));
|
|
|
|
|
|
|
|
|
|
var Callback = value["Callback"] as string;
|
|
|
|
|
ui.NewSection().AddCell("跳转参数", String.IsNullOrEmpty(Callback) ? "未设置" : "已设置", new UIClick(new WebMeta(request.Arguments).Put(g, "Callback")).Post(request.Model, request.Command));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ui.NewSection().AddCell("前端页面登录", "未启用", new UIClick(new WebMeta(request.Arguments).Put(g, "IsLoginHTML")).Post(request.Model, request.Command));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else if (mainKey.EndsWith("_UPDATE"))
|
|
|
|
|
{
|
|
|
|
|
var UpdateModel = value["UpdateModel"] as String ?? "Selected";
|
|
|
|
|
switch (UpdateModel)
|
|
|
|
|
{
|
|
|
|
|
case "Selected":
|
|
|
|
|
UpdateModel = "默认选中";
|
|
|
|
|
break;
|
|
|
|
|
case "Select":
|
|
|
|
|
UpdateModel = "默认不选中";
|
|
|
|
|
break;
|
|
|
|
|
case "Compel":
|
|
|
|
|
UpdateModel = "强制托管";
|
|
|
|
|
break;
|
|
|
|
|
case "Disable":
|
|
|
|
|
UpdateModel = "禁用托管";
|
|
|
|
|
break;
|
|
|
|
|
var Callback = value["Callback"] as string;
|
|
|
|
|
ui.NewSection().AddCell("跳转参数", String.IsNullOrEmpty(Callback) ? "未设置" : "已设置", new UIClick(new WebMeta(request.Arguments).Put(g, "Callback")).Post(request.Model, request.Command));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
ui.NewSection().AddCell("密码托管模式", UpdateModel, new UIClick(new WebMeta(request.Arguments).Put(g, "UpdateModel")).Post(request.Model, request.Command));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "UPDATE":
|
|
|
|
|
{
|
|
|
|
|
var UpdateModel = value["UpdateModel"] as String ?? "Selected";
|
|
|
|
|
switch (UpdateModel)
|
|
|
|
|
{
|
|
|
|
|
case "Selected":
|
|
|
|
|
UpdateModel = "默认选中";
|
|
|
|
|
break;
|
|
|
|
|
case "Select":
|
|
|
|
|
UpdateModel = "默认不选中";
|
|
|
|
|
break;
|
|
|
|
|
case "Compel":
|
|
|
|
|
UpdateModel = "强制托管";
|
|
|
|
|
break;
|
|
|
|
|
case "Disable":
|
|
|
|
|
UpdateModel = "禁用托管";
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else if (mainKey.EndsWith("_CHECK"))
|
|
|
|
|
{
|
|
|
|
|
var site = DataFactory.Instance().Site(root.ToLower());
|
|
|
|
|
if (site != null)
|
|
|
|
|
{
|
|
|
|
|
var userM = "未启用";
|
|
|
|
|
switch (site.UserModel ?? UserModel.Standard)
|
|
|
|
|
{
|
|
|
|
|
case UserModel.Check:
|
|
|
|
|
userM = "自主选择";
|
|
|
|
|
break;
|
|
|
|
|
case UserModel.Checked:
|
|
|
|
|
userM = "自动检测";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
ui.NewSection().AddCell("密码托管模式", UpdateModel, new UIClick(new WebMeta(request.Arguments).Put(g, "UpdateModel")).Post(request.Model, request.Command));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
ui.NewSection()
|
|
|
|
|
.AddCell("功能启用", userM, new UIClick(new WebMeta(request.Arguments).Put(g, "UserModel")).Post(request.Model, request.Command))
|
|
|
|
|
.AddCell("检测账户", String.IsNullOrEmpty(site.Account) ? "未设置" : site.Account, new UIClick("Key", site.Root, "Model", "Account").Post(request.Model, "Site"))
|
|
|
|
|
.AddCell("检测登录", value.ContainsKey("IsNotLoginApi") ? "不是" : "是", new UIClick(new WebMeta(request.Arguments).Put(g, "IsNotLoginApi")).Post(request.Model, request.Command));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "CHECK":
|
|
|
|
|
{
|
|
|
|
|
var site = DataFactory.Instance().Site(root.ToLower());
|
|
|
|
|
if (site != null)
|
|
|
|
|
{
|
|
|
|
|
var userM = "未启用";
|
|
|
|
|
switch (site.UserModel ?? UserModel.Standard)
|
|
|
|
|
{
|
|
|
|
|
case UserModel.Check:
|
|
|
|
|
userM = "自主选择";
|
|
|
|
|
break;
|
|
|
|
|
case UserModel.Checked:
|
|
|
|
|
userM = "自动检测";
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
ui.NewSection()
|
|
|
|
|
.AddCell("功能启用", userM, new UIClick(new WebMeta(request.Arguments).Put(g, "UserModel")).Post(request.Model, request.Command))
|
|
|
|
|
.AddCell("检测账户", String.IsNullOrEmpty(site.Account) ? "未设置" : site.Account, new UIClick("Key", site.Root, "Model", "Account").Post(request.Model, "Site"))
|
|
|
|
|
.AddCell("检测登录", value.ContainsKey("IsNotLoginApi") ? "不是" : "是", new UIClick(new WebMeta(request.Arguments).Put(g, "IsNotLoginApi")).Post(request.Model, request.Command));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
ui.NewSection().AddCell("内容转化配置", new UIClick(new WebMeta(request.Arguments).Put(g, "Script")).Post(request.Model, request.Command));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
ui.NewSection().AddCell("内容转化配置", new UIClick(new WebMeta(request.Arguments).Put(g, "Script")).Post(request.Model, request.Command));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ui.NewSection().AddCell("记住选择内容", value.ContainsKey("RememberValue") ? "记住" : "不记住", new UIClick(new WebMeta(request.Arguments).Put(g, "RememberValue")).Post(request.Model, request.Command));
|
|
|
|
|
|
|
|
|
|
var defautValue = value["DefautValue"] as string;
|
|
|
|
|
ui.NewSection().AddCell("内容默认值", String.IsNullOrEmpty(defautValue) ? "未设置" : "已设置", new UIClick(new WebMeta(request.Arguments).Put(g, "DefautValue")).Post(request.Model, request.Command));
|
|
|
|
|
ui.NewSection().AddCell("记住选择内容", value.ContainsKey("RememberValue") ? "记住" : "不记住", new UIClick(new WebMeta(request.Arguments).Put(g, "RememberValue")).Post(request.Model, request.Command));
|
|
|
|
|
|
|
|
|
|
var defautValue = value["DefautValue"] as string;
|
|
|
|
|
ui.NewSection().AddCell("内容默认值", String.IsNullOrEmpty(defautValue) ? "未设置" : "已设置", new UIClick(new WebMeta(request.Arguments).Put(g, "DefautValue")).Post(request.Model, request.Command));
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -329,6 +344,7 @@ namespace UMC.Proxy.Activities
|
|
|
|
|
from4.AddText("字段标题", "Value", "");
|
|
|
|
|
from4.AddText("字段标识", "Name", "");
|
|
|
|
|
from4.Submit("确认", "Mime.Config");
|
|
|
|
|
from4.AddFooter("当标识为“LoginAfter”,表示登录之后请求的网络配置");
|
|
|
|
|
return from4;
|
|
|
|
|
});
|
|
|
|
|
var feilds = value["Feilds"] as Hashtable ?? new Hashtable();
|
|
|
|
|