From f8c5875e074983f1820b46f35691a64d8e062acc Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Thu, 17 Mar 2022 21:58:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5mds=E5=90=AF=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BBWY.Client/App.xaml.cs | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/BBWY.Client/App.xaml.cs b/BBWY.Client/App.xaml.cs index 0de8fb93..69618b2d 100644 --- a/BBWY.Client/App.xaml.cs +++ b/BBWY.Client/App.xaml.cs @@ -28,24 +28,24 @@ namespace BBWY.Client { var gl = new GlobalContext(); string userToken = string.Empty; -//#if DEBUG +#if DEBUG userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNDA1MTUxNjE5NTk0NTg4MTYwIiwidGVhbUlkIjoiMTQzOTg5OTEyMzk1NTI3MzcyOCIsImV4cCI6MTY3MTkwMTU1NH0.UaUubqP442qxVc6ppQt7FO0jcFs3w6KR6q1OeBuL1i8"; //齐越小一 -//#else -// var uid = e.Args.Count() > 0 ? e.Args.LastOrDefault(args => args.StartsWith("uid:")) : string.Empty; -// if (string.IsNullOrEmpty(uid)) -// { -// MessageBox.Show("缺少启动参数", "提示"); -// Environment.Exit(0); -// } -// var tokenResult = ReadMMF(uid); -// if (tokenResult.isOk) -// userToken = tokenResult.content; -// else -// { -// MessageBox.Show($"读取内存数据失败\r\n{tokenResult.content}", "提示"); -// Environment.Exit(0); -// } -//#endif +#else + var uid = e.Args.Count() > 0 ? e.Args.LastOrDefault(args => args.StartsWith("uid:")) : string.Empty; + if (string.IsNullOrEmpty(uid)) + { + MessageBox.Show("缺少启动参数", "提示"); + Environment.Exit(0); + } + var tokenResult = ReadMMF(uid); + if (tokenResult.isOk) + userToken = tokenResult.content; + else + { + MessageBox.Show($"读取内存数据失败\r\n{tokenResult.content}", "提示"); + Environment.Exit(0); + } +#endif gl.UserToken = userToken; #region 注册全局异常