From af72bbe347f31125e5a7d3381c650cf4157219c9 Mon Sep 17 00:00:00 2001 From: dao Date: Wed, 15 Jan 2025 13:17:59 +0800 Subject: [PATCH] --- .../Modules/Hetian/HeTianApi.cs | 51 ++- .../Learun.Application.WebApi/Web.config | 2 +- .../LearunApp-2.2.0/manifest.json | 390 +++++++++--------- .../LearunApp-2.2.0/pages/my.vue | 2 +- 4 files changed, 241 insertions(+), 204 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Hetian/HeTianApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Hetian/HeTianApi.cs index 8979a8071..1f751f0bb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Hetian/HeTianApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Hetian/HeTianApi.cs @@ -17,15 +17,18 @@ using System.Net; using System.Text; using System.Threading.Tasks; using Microsoft.Ajax.Utilities; +using DotNetCasClient.Configuration; +using System.Web; namespace Learun.Application.WebApi.Modules.Hetian { public class HeTianApi : BaseApi { //ht 和田 sx 实习 - public HeTianApi() : base("/api/ht/") + public HeTianApi() : base("/api/ht") { Post["/ticket"] = CheckTicket; + Get["/out"] = Logout; Get["/sx/comp"] = GetComp;// 实习单位列表 Get["/sx/pos"] = GetPos;// 实习岗位列表 Get["/sx/list"] = GetBaomin;// 获取报名列表 @@ -59,6 +62,10 @@ namespace Learun.Application.WebApi.Modules.Hetian if (!string.IsNullOrEmpty(ticket)) { string validationUrl = UrlUtil.ConstructValidateUrl(ticket, CasAuthentication.Gateway, CasAuthentication.Renew, new NameValueCollection()); + var url= new EnhancedUriBuilder(EnhancedUriBuilder.Combine(CasAuthentication.CasServerUrlPrefix, "serviceValidate")); + + url.QueryItems.Add("service", HttpUtility.UrlEncode(CasAuthentication.ServerName)); + url.QueryItems.Add("ticket", HttpUtility.UrlEncode(ticket)); LogHelper.WriteToLog($"validationUrl:{validationUrl}"); var a = PerformHttpGet(validationUrl, true); LogHelper.WriteToLog($"a :{a}"); @@ -139,6 +146,36 @@ namespace Learun.Application.WebApi.Modules.Hetian } return Fail("未确定用户"); } + + private Response Logout(dynamic _) + { + var acc = userInfo.account; + LogEntity logEntity = new LogEntity(); + logEntity.F_CategoryId = 1; + logEntity.F_OperateTypeId = ((int)OperationType.Exit).ToString(); + logEntity.F_OperateType = EnumAttribute.GetDescription(OperationType.Exit); + logEntity.F_OperateAccount = userInfo.account + "(" + userInfo.realName + ")"; + logEntity.F_OperateUserId = userInfo.userId; + logEntity.F_ExecuteResult = 1; + logEntity.F_ExecuteResultJson = "退出系统"; + logEntity.F_Module = "登录"; + logEntity.F_Description = "APP"; + logEntity.WriteLog(); + OperatorHelper.Instance.EmptyCurrent(token, loginMark); + //Session.Abandon(); //清除当前会话 + //Session.Clear(); //清除当前浏览器所有Session + //OperatorHelper.Instance.EmptyCurrent(); + + if (CasAuthentication.ServiceTicketManager != null) + { + CasAuthentication.ClearAuthCookie(); + //Session.Clear(); + } + var singleSignOutRedirectUrl = $"{CasClientConfiguration.Config.CasServerUrlPrefix}logout?service={HttpUtility.UrlEncode(CasClientConfiguration.Config.ServerName + "/")}"; + //HttpGet(singleSignOutRedirectUrl); + var d = new { info = singleSignOutRedirectUrl }; + return Success(d); + } /// /// 获取IP /// @@ -229,7 +266,7 @@ namespace Learun.Application.WebApi.Modules.Hetian /// 实习单位 /// /// - public Response GetComp(dynamic _) + private Response GetComp(dynamic _) { var data = dataSourceIBLL.GetDataTable("PracticeBase", ""); return Success(data); @@ -238,7 +275,7 @@ namespace Learun.Application.WebApi.Modules.Hetian /// 实习岗位 /// /// - public Response GetPos(dynamic _) + private Response GetPos(dynamic _) { var dw = GetReqData(); var data = dataSourceIBLL.GetDataTable("PBPost", "PBID='" + dw + "'"); @@ -250,7 +287,7 @@ namespace Learun.Application.WebApi.Modules.Hetian /// /// /// - public Response GetBaomin(dynamic _) + private Response GetBaomin(dynamic _) { var id = GetReqData(); var list = internShipSignUpIBLL.GetMyList(userInfo.account,id); @@ -288,7 +325,7 @@ namespace Learun.Application.WebApi.Modules.Hetian /// /// /// - public Response Baomin(dynamic _) + private Response Baomin(dynamic _) { var queryJson = GetReqData(); var queryParam = queryJson.ToObject(); @@ -302,7 +339,7 @@ namespace Learun.Application.WebApi.Modules.Hetian /// /// /// - public Response GetZongjie(dynamic _) + private Response GetZongjie(dynamic _) { var list = internShipSummaryIBLL.GetMy(userInfo.account); @@ -313,7 +350,7 @@ namespace Learun.Application.WebApi.Modules.Hetian /// /// /// - public Response Zongjie(dynamic _) + private Response Zongjie(dynamic _) { var queryJson = GetReqData(); var queryParam = queryJson.ToObject(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Web.config b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Web.config index e9190c039..b9d2f801c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Web.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Web.config @@ -126,5 +126,5 @@ - + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/manifest.json b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/manifest.json index d1374302e..d0a73b259 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/manifest.json +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/manifest.json @@ -1,196 +1,196 @@ { - "name": "智慧校园", - "appid": "__UNI__7C24C09", - "description": "智慧校园移动端", - "versionName": "2.2.0.250110", - "versionCode": 20200, - "transformPx": false, - /* 5+App特有相关 */ - "app-plus": { - "usingComponents": true, - "softinputNavBar": "none", - "splashscreen": { - "alwaysShowBeforeRender": true, - "waiting": false, - "autoclose": true, - "delay": 0 - }, - /* 模块配置 */ - "modules": {}, - /* 应用发布信息 */ - "distribute": { - /* android打包配置 */ - "android": { - "permissions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - /* ios打包配置 */ - "ios": { - "privacyDescription": { - "NSPhotoLibraryUsageDescription": "工作流程中需要相册权限以选择并上传图片", - "NSPhotoLibraryAddUsageDescription": "将图片保存到本机", - "NSCameraUsageDescription": "工作流程中需要相机权限以选择并上传图片" - }, - "idfa": false - }, - /* SDK配置 */ - "sdkConfigs": { - "ad": {} - }, - "icons": { - "android": { - "hdpi": "unpackage/res/icons/72x72.png", - "xhdpi": "unpackage/res/icons/96x96.png", - "xxhdpi": "unpackage/res/icons/144x144.png", - "xxxhdpi": "unpackage/res/icons/192x192.png" - }, - "ios": { - "appstore": "unpackage/res/icons/1024x1024.png", - "ipad": { - "app": "unpackage/res/icons/76x76.png", - "app@2x": "unpackage/res/icons/152x152.png", - "notification": "unpackage/res/icons/20x20.png", - "notification@2x": "unpackage/res/icons/40x40.png", - "proapp@2x": "unpackage/res/icons/167x167.png", - "settings": "unpackage/res/icons/29x29.png", - "settings@2x": "unpackage/res/icons/58x58.png", - "spotlight": "unpackage/res/icons/40x40.png", - "spotlight@2x": "unpackage/res/icons/80x80.png" - }, - "iphone": { - "app@2x": "unpackage/res/icons/120x120.png", - "app@3x": "unpackage/res/icons/180x180.png", - "notification@2x": "unpackage/res/icons/40x40.png", - "notification@3x": "unpackage/res/icons/60x60.png", - "settings@2x": "unpackage/res/icons/58x58.png", - "settings@3x": "unpackage/res/icons/87x87.png", - "spotlight@2x": "unpackage/res/icons/80x80.png", - "spotlight@3x": "unpackage/res/icons/120x120.png" - } - } - }, - "splashscreen": { - "android": { - "xxhdpi": "G:/薛礼根/2018/数字化校园/数字化校园png/北京泉江/数字化校园APP----引导页1080_1882.png", - "xhdpi": "G:/薛礼根/2018/数字化校园/数字化校园png/北京泉江/数字化校园APP----引导页720_1242.png", - "hdpi": "G:/薛礼根/2018/数字化校园/数字化校园png/北京泉江/数字化校园APP----引导页480_762.png" - }, - "ios": { - "iphone": { - "portrait-896h@3x": "res/startup/startup-ios-x.png", - "portrait-896h@2x": "res/startup/startup-ios-x.png", - "iphonex": "res/startup/startup-ios-x.png", - "retina55": "res/startup/startup-ios-16-9.png", - "retina47": "res/startup/startup-ios-16-9.png", - "retina40": "res/startup/startup-ios-3-2.png", - "retina35": "res/startup/startup-ios-3-2.png" - } - } - } - }, - "uniStatistics": { - "enable": false - }, - "nvueLaunchMode": "fast" - }, - /* 快应用特有相关 */ - "quickapp": {}, - /* 小程序特有相关 */ - "mp-weixin": { - "appid": "wxbc18c9bf92c86d28", - "setting": { - "urlCheck": false, - "es6": true, - "postcss": false, - "minified": true - }, - "usingComponents": true, - "optimization": { - "subPackages": true - }, - "uniStatistics": { - "enable": false - } - }, - "mp-alipay": { - "usingComponents": true, - "component2": true, - "enableParallelLoader": true, - "uniStatistics": { - "enable": false - }, - "appid": "" - }, - "mp-dingtalk": { - "usingComponents": true, - "component2": true, - "enableParallelLoader": true, - "uniStatistics": { - "enable": false - }, - "appid": "" - }, - "mp-baidu": { - "usingComponents": true, - "uniStatistics": { - "enable": false - } - }, - "mp-toutiao": { - "usingComponents": true, - "uniStatistics": { - "enable": false - } - }, - "h5": { - "uniStatistics": { - "enable": false - }, - "router": { - "mode": "hash", - "base": "" - }, - "title": "数字化智慧校园", - "template": "index.html", - "optimization": { - "treeShaking": { - "enable": false - } - }, - "domain": "testapp.bjquanjiang.com", - "devServer": { - "port": 80, - "https": false - } - }, - "mp-qq": { - "uniStatistics": { - "enable": false - } - }, - "uniStatistics": { - "enable": false - } -} \ No newline at end of file + "name" : "智慧校园", + "appid" : "__UNI__7C24C09", + "description" : "智慧校园移动端", + "versionName" : "2.2.0.250115", + "versionCode" : 20200, + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "softinputNavBar" : "none", + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : false, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : { + "privacyDescription" : { + "NSPhotoLibraryUsageDescription" : "工作流程中需要相册权限以选择并上传图片", + "NSPhotoLibraryAddUsageDescription" : "将图片保存到本机", + "NSCameraUsageDescription" : "工作流程中需要相机权限以选择并上传图片" + }, + "idfa" : false + }, + /* SDK配置 */ + "sdkConfigs" : { + "ad" : {} + }, + "icons" : { + "android" : { + "hdpi" : "unpackage/res/icons/72x72.png", + "xhdpi" : "unpackage/res/icons/96x96.png", + "xxhdpi" : "unpackage/res/icons/144x144.png", + "xxxhdpi" : "unpackage/res/icons/192x192.png" + }, + "ios" : { + "appstore" : "unpackage/res/icons/1024x1024.png", + "ipad" : { + "app" : "unpackage/res/icons/76x76.png", + "app@2x" : "unpackage/res/icons/152x152.png", + "notification" : "unpackage/res/icons/20x20.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "proapp@2x" : "unpackage/res/icons/167x167.png", + "settings" : "unpackage/res/icons/29x29.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "spotlight" : "unpackage/res/icons/40x40.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png" + }, + "iphone" : { + "app@2x" : "unpackage/res/icons/120x120.png", + "app@3x" : "unpackage/res/icons/180x180.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "notification@3x" : "unpackage/res/icons/60x60.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "settings@3x" : "unpackage/res/icons/87x87.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png", + "spotlight@3x" : "unpackage/res/icons/120x120.png" + } + } + }, + "splashscreen" : { + "android" : { + "xxhdpi" : "G:/薛礼根/2018/数字化校园/数字化校园png/北京泉江/数字化校园APP----引导页1080_1882.png", + "xhdpi" : "G:/薛礼根/2018/数字化校园/数字化校园png/北京泉江/数字化校园APP----引导页720_1242.png", + "hdpi" : "G:/薛礼根/2018/数字化校园/数字化校园png/北京泉江/数字化校园APP----引导页480_762.png" + }, + "ios" : { + "iphone" : { + "portrait-896h@3x" : "res/startup/startup-ios-x.png", + "portrait-896h@2x" : "res/startup/startup-ios-x.png", + "iphonex" : "res/startup/startup-ios-x.png", + "retina55" : "res/startup/startup-ios-16-9.png", + "retina47" : "res/startup/startup-ios-16-9.png", + "retina40" : "res/startup/startup-ios-3-2.png", + "retina35" : "res/startup/startup-ios-3-2.png" + } + } + } + }, + "uniStatistics" : { + "enable" : false + }, + "nvueLaunchMode" : "fast" + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "wxbc18c9bf92c86d28", + "setting" : { + "urlCheck" : false, + "es6" : true, + "postcss" : false, + "minified" : true + }, + "usingComponents" : true, + "optimization" : { + "subPackages" : true + }, + "uniStatistics" : { + "enable" : false + } + }, + "mp-alipay" : { + "usingComponents" : true, + "component2" : true, + "enableParallelLoader" : true, + "uniStatistics" : { + "enable" : false + }, + "appid" : "" + }, + "mp-dingtalk" : { + "usingComponents" : true, + "component2" : true, + "enableParallelLoader" : true, + "uniStatistics" : { + "enable" : false + }, + "appid" : "" + }, + "mp-baidu" : { + "usingComponents" : true, + "uniStatistics" : { + "enable" : false + } + }, + "mp-toutiao" : { + "usingComponents" : true, + "uniStatistics" : { + "enable" : false + } + }, + "h5" : { + "uniStatistics" : { + "enable" : false + }, + "router" : { + "mode" : "hash", + "base" : "" + }, + "title" : "数字化智慧校园", + "template" : "index.html", + "optimization" : { + "treeShaking" : { + "enable" : false + } + }, + "domain" : "testapp.bjquanjiang.com", + "devServer" : { + "port" : 80, + "https" : false + } + }, + "mp-qq" : { + "uniStatistics" : { + "enable" : false + } + }, + "uniStatistics" : { + "enable" : false + } +} diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my.vue index fca5b3b98..4209d9e79 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my.vue @@ -83,7 +83,7 @@ ) console.log(res, "退出返回信息"); this.CLEAR_GLOBAL() - window.open(res.info) + window.open(res.info,"_self") // this.RELAUNCH_TO('/pages/login') },