You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.4 KiB
52 lines
1.4 KiB
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
using System.Windows;
|
|
|
|
namespace WebTest
|
|
{
|
|
[ClassInterface(ClassInterfaceType.AutoDual)]
|
|
[ComVisible(true)]
|
|
public class GlobalContext
|
|
{
|
|
public User User { get; set; }
|
|
|
|
public string UserToken { get; set; }
|
|
|
|
|
|
#region APIHost
|
|
public string BBYWApiHost { get; set; }
|
|
|
|
public string MDSApiHost { get; set; }
|
|
#endregion
|
|
|
|
public string GetUserString()
|
|
{
|
|
return JsonConvert.SerializeObject(User);
|
|
}
|
|
|
|
public string GetClientApiVersion()
|
|
{
|
|
return "10123";
|
|
}
|
|
|
|
public void CallALiWangWang(string sellerLoginId)
|
|
{
|
|
var url = $"aliim:sendmsg?siteid=cnalichn&portalId=&gid=&itemsId=&touid=cnalichn{sellerLoginId}&status=1";
|
|
try
|
|
{
|
|
//Process.Start("explorer.exe", url);
|
|
ShellExecuteHelper.ShellExecute(IntPtr.Zero, "open", url, string.Empty, string.Empty, ShellExecuteHelper.ShowCommands.SW_SHOWNORMAL);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
try
|
|
{
|
|
Clipboard.SetText(url);
|
|
}
|
|
catch { }
|
|
MessageBox.Show($"{ex.Message}\r\n唤醒旺旺失败,唤醒链接已复制到剪切板,请手动打开浏览器唤醒", "提示");
|
|
}
|
|
}
|
|
}
|
|
}
|