Browse Source

财务端取消验证

qianyi
shanji 3 years ago
parent
commit
fbc37da5e4
  1. 12
      BBWY.Client/ViewModels/MainViewModel.cs
  2. 2
      BBWY.Client/Views/MainWindow.xaml

12
BBWY.Client/ViewModels/MainViewModel.cs

@ -147,8 +147,11 @@ namespace BBWY.Client.ViewModels
GlobalContext.User = mdsUserResponse.Data.Map<User>(); GlobalContext.User = mdsUserResponse.Data.Map<User>();
#if RELEASE #if RELEASE
if (GlobalContext.User.TeamName != "财务部") if (GlobalContext.User.TeamName == "财务部")
App.Current.Dispatcher.Invoke(() => MenuList.RemoveAt(MenuList.Count() - 1)); App.Current.Dispatcher.Invoke(() =>
{
for (var i = 0; i < 3; i++) { MenuList.RemoveAt(0); }
});
#endif #endif
//请求用户信息接口 //请求用户信息接口
@ -165,6 +168,8 @@ namespace BBWY.Client.ViewModels
// } // }
//}; //};
if (GlobalContext.User.TeamName != "财务部")
{
var shopListResponse = mdsApiService.GetShopsByUserTeam(GlobalContext.User.Id); var shopListResponse = mdsApiService.GetShopsByUserTeam(GlobalContext.User.Id);
if (!shopListResponse.Success) if (!shopListResponse.Success)
throw new Exception(shopListResponse.Msg); throw new Exception(shopListResponse.Msg);
@ -185,6 +190,7 @@ namespace BBWY.Client.ViewModels
ShowShopChoosePanel = true; ShowShopChoosePanel = true;
} }
} }
}
catch (Exception ex) catch (Exception ex)
{ {
App.Current.Dispatcher.Invoke(() => App.Current.Dispatcher.Invoke(() =>
@ -275,6 +281,6 @@ namespace BBWY.Client.ViewModels
{ {
Wb2DownloadProgress = e.ProgressPercentage; Wb2DownloadProgress = e.ProgressPercentage;
} }
#endregion #endregion
} }
} }

2
BBWY.Client/Views/MainWindow.xaml

@ -26,7 +26,7 @@
<!--<TextBlock Text="{Binding GlobalContext.User.TeamName}" Margin="5,0,0,0"/> <!--<TextBlock Text="{Binding GlobalContext.User.TeamName}" Margin="5,0,0,0"/>
<TextBlock Text="{Binding GlobalContext.User.Shop.Platform}" Margin="5,0,0,0"/>--> <TextBlock Text="{Binding GlobalContext.User.Shop.Platform}" Margin="5,0,0,0"/>-->
<TextBlock Text="{Binding GlobalContext.User.Shop.Name}" Margin="5,0,0,0"/> <TextBlock Text="{Binding GlobalContext.User.Shop.Name}" Margin="5,0,0,0"/>
<TextBlock Text="v10015" Margin="5,0,0,0"/> <TextBlock Text="v10016" Margin="5,0,0,0"/>
</StackPanel> </StackPanel>
</Border> </Border>
<Grid Grid.Row="1"> <Grid Grid.Row="1">

Loading…
Cancel
Save