Ver código fonte

😎代码优化

zuohuaijun 1 ano atrás
pai
commit
d0b3797168

+ 2 - 2
Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj

@@ -36,8 +36,8 @@
     <PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="3.5.0" />
     <PackageReference Include="SqlSugarCore" Version="5.1.4.159" />
     <PackageReference Include="SSH.NET" Version="2024.0.0" />
-    <PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.1" />
-    <PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1033" />
+    <PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.2" />
+    <PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1034" />
     <PackageReference Include="UAParser" Version="3.1.47" />
     <PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
   </ItemGroup>

+ 0 - 2
Admin.NET/Admin.NET.Core/Logging/DatabaseLoggingWriter.cs

@@ -4,8 +4,6 @@
 //
 // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
 
-using IPTools.Core;
-
 namespace Admin.NET.Core;
 
 /// <summary>

+ 6 - 6
Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs

@@ -239,15 +239,15 @@ public class SysAuthService : IDynamicApiController, ITransient
 
         // 更新用户登录信息
         user.LastLoginIp = _httpContextAccessor.HttpContext.GetRemoteIp();
-        (user.LastLoginAddress, _, _) = CommonUtil.GetIpAddress(user.LastLoginIp);
+        (user.LastLoginAddress, double? longitude, double? latitude) = CommonUtil.GetIpAddress(user.LastLoginIp);
         user.LastLoginTime = DateTime.Now;
         user.LastLoginDevice = CommonUtil.GetClientDeviceInfo(_httpContextAccessor.HttpContext?.Request?.Headers?.UserAgent);
-        await _sysUserRep.AsUpdateable(user).UpdateColumns(it => new
+        await _sysUserRep.AsUpdateable(user).UpdateColumns(u => new
         {
-            it.LastLoginIp,
-            it.LastLoginAddress,
-            it.LastLoginTime,
-            it.LastLoginDevice,
+            u.LastLoginIp,
+            u.LastLoginAddress,
+            u.LastLoginTime,
+            u.LastLoginDevice,
         }).ExecuteCommandAsync();
 
         return new LoginOutput

+ 2 - 2
Web/src/components/table/index.vue

@@ -7,7 +7,7 @@
 			<div v-loading="state.exportLoading" class="table-footer-tool">
 				<SvgIcon v-if="!config.hideRefresh" name="iconfont icon-shuaxin" :size="22" title="刷新" @click="onRefreshTable" />
 				<el-tooltip effect="light" :content="state.switchFixedContent" placement="bottom-start" :show-after="200" v-if="state.haveFixed">
-					<el-icon :style="{color: state.fixedIconColor}" @click="switchFixed"><ele-Switch /></el-icon>
+					<el-icon :style="{ color: state.fixedIconColor }" @click="switchFixed"><ele-Switch /></el-icon>
 				</el-tooltip>
 				<el-dropdown v-if="!config.hideExport" trigger="click">
 					<SvgIcon name="iconfont icon-yunxiazai_o" :size="22" title="导出" />
@@ -428,7 +428,7 @@ const setTableData = (data: Array<EmptyObjectType>, add: boolean = false) => {
 
 const clearFixed = () => {
 	for (let item of state.columns) {
-		delete item['fixed']
+		delete item['fixed'];
 	}
 };