From 7e63a420494324943aa8e547b967bba2a3087e6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Wed, 24 Aug 2022 09:19:24 +0800 Subject: [PATCH 01/28] =?UTF-8?q?app2.2.0=20=E6=8E=8C=E4=B8=8A=E8=AF=84?= =?UTF-8?q?=E6=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/common/custompage.js | 7 +- .../LearunApp-2.2.0/config.js | 2 +- .../LearunApp-2.2.0/pages.json | 9 + .../EvaluationTeach/list.vue | 9 +- .../EvaluationTeach/single.vue | 236 +++++++++--------- .../LearunApp-2.2.0/pages/onlienpay/list.vue | 4 + .../pages/onlienpay/payInvioce.vue | 63 +++++ .../pages/onlienpay/payqrcode.vue | 47 ++++ .../LearunApp-2.2.0/pages/studentSee/list.vue | 1 - 9 files changed, 249 insertions(+), 129 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/onlienpay/payInvioce.vue create mode 100644 Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/onlienpay/payqrcode.vue diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js index b48efc4f9..ca07b8ddd 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js @@ -1,3 +1,4 @@ +import { conforms } from 'lodash' import get from 'lodash/get' import omit from 'lodash/omit' import moment from 'moment' @@ -233,7 +234,11 @@ export default { } else { for (const [fieldName, scheme] of Object.entries(schemeItem)) { const dataSource = get(this.dataSource, `${tableName}.${fieldName}`) - data[tableName][fieldName] = await this.convertToFormValue(scheme, data[tableName][fieldName], dataSource) + if(data[tableName]){ + data[tableName][fieldName] = await this.convertToFormValue(scheme, data[tableName][fieldName], dataSource) + }else{ + this.scheme[tableName][fieldName] = await this.convertToFormValue(scheme, this.scheme[tableName][fieldName], dataSource) + } } } } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index 0320df8cd..5521fbc3b 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -28,7 +28,7 @@ export default { // 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 "devAccount": [ // 20201130230 21364200000400266 老师 420528196310072253 学生 420528200606205026 420528200507261428 - { username: "system", password: "www.qj.com" } + { username: "2020040101", password: "www.qj.com" } ], //是否分布式部署 指WebApi与Web不在一台服务器 "isDistributed":true, diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json index cae16912a..327e0751c 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json @@ -1028,6 +1028,15 @@ } } + ,{ + "path" : "pages/onlienpay/payInvioce", + "style" : + { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + + } ], // 全局样式 diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/list.vue index 805993be7..65c230123 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/list.vue @@ -3,7 +3,8 @@ - {{ tips }} + + {{ tips }} @@ -26,14 +27,14 @@ {{ displayListItem(item, 'EmpName') }} - + 课程名称: - {{ displayListItem(item, 'LessonName') }} + {{ displayListItem(item, 'LessonName') }} 评教状态: {{ displayListItem(item, 'UID') }} - + diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/single.vue index b0163ef76..6922bac11 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/single.vue @@ -1,69 +1,63 @@ \ No newline at end of file + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/onlienpay/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/onlienpay/list.vue index 12e6bc94c..6d4a550f6 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/onlienpay/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/onlienpay/list.vue @@ -14,6 +14,7 @@ 支 付 + 查看发票 @@ -44,6 +45,9 @@ export default { this.TOAST('缴费成功'); } }); + }, + lookInvoice(){ + this.NAV_TO("./payInvioce") } }, created() { diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/onlienpay/payInvioce.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/onlienpay/payInvioce.vue new file mode 100644 index 000000000..48f5000dd --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/onlienpay/payInvioce.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/onlienpay/payqrcode.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/onlienpay/payqrcode.vue new file mode 100644 index 000000000..b9a1b61c0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/onlienpay/payqrcode.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentSee/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentSee/list.vue index f798c045f..7a944a59d 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentSee/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentSee/list.vue @@ -72,7 +72,6 @@ export default { '加载数据时出错' ).then( res => { this.HIDE_LOADING() - // console.log(res) if (res == null || JSON.stringify(res) == '{}') { _this.flag = false; return; From d171ea6957df3b2d759ada949075b5ffeb5a233c Mon Sep 17 00:00:00 2001 From: liangkun Date: Wed, 24 Aug 2022 18:23:21 +0800 Subject: [PATCH 02/28] =?UTF-8?q?=E5=BC=80=E5=8F=91=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=BC=BA=E5=AF=86=E7=A0=81=E9=AA=8C=E8=AF=81=E5=8E=BB=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.Web/XmlConfig/system.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config index e17755adc..26ba167ed 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config @@ -154,7 +154,7 @@ - + From ce38cd533182f298b4da4421b00a9679be3e3c53 Mon Sep 17 00:00:00 2001 From: liangkun Date: Thu, 25 Aug 2022 11:28:01 +0800 Subject: [PATCH 03/28] =?UTF-8?q?=E7=BC=B4=E8=B4=B9=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.WebApi.csproj | 5 + .../Modules/StuFreshPayFeeApi.cs | 216 ++++++++++++++++++ .../Modules/StuPayFeeApi.cs | 212 +++++++++++++++++ .../Modules/WeixinApi.cs | 73 ++++++ .../XmlConfig/system.config | 1 + .../Learun.Application.WebApi/packages.config | 1 + 6 files changed, 508 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuFreshPayFeeApi.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuPayFeeApi.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj index b15e9bd60..9d30b0df7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj @@ -156,6 +156,9 @@ + + ..\packages\ThoughtWorks.QRCode.1.1.0\lib\ThoughtWorks.QRCode.dll + ..\packages\WebGrease.1.5.2\lib\WebGrease.dll @@ -192,6 +195,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuFreshPayFeeApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuFreshPayFeeApi.cs new file mode 100644 index 000000000..4610f9a20 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuFreshPayFeeApi.cs @@ -0,0 +1,216 @@ +using System; +using Learun.Application.Organization; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Application.TwoDevelopment.EvaluationTeach; +using Learun.Util; +using Nancy; +using System.Collections.Generic; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Web; +using System.Web.Mvc; +using Learun.Application.Base.SystemModule; +using Learun.Application.TwoDevelopment.Ask; +using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; +using Newtonsoft.Json; +using ThoughtWorks.QRCode.Codec; + +namespace Learun.Application.WebApi.Modules +{ + /// + /// 版 本 Learun-ADMS V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创建人:数字化智慧校园-框架开发组 + /// 日 期:2018.01.04 + /// 描 述:部门管理 + /// + public class StuFreshPayFeeApi : BaseApi + { + public StuFreshPayFeeApi() + : base("/learun/freshpayfee") + { + Get["/getpayfeelist"] = GetPayfeeList;// 获取缴费列表 + Get["/getpayfeeinfo"] = GetPayfeeInfo;//获取缴费明细 + Post["/generateqrcode"] = PayFeeQRCode; + } + + private StuInfoFreshIBLL stuInfoFreshIBLL = new StuInfoFreshBLL(); + private FinaChargesStandardIBLL finaChargesStandardIBLL = new FinaChargesStandardBLL(); + + /// + /// 获取问卷 + /// + /// + /// + public Response GetPayfeeList(dynamic _) + { + ReqPageParam parameter = this.GetReqData(); + var data = stuInfoFreshIBLL.GetPageList(parameter.pagination, parameter.queryJson); + var jsonData = new + { + rows = data, + total = parameter.pagination.total, + page = parameter.pagination.page, + records = parameter.pagination.records + }; + return Success(jsonData); + } + + public Response GetPayfeeInfo(dynamic _) + { + string keyValue = Request.Query["keyValue"]; + int jiaoFeiYear = DateTime.Now.Year; + var StuInfoFreshData = stuInfoFreshIBLL.GetStuInfoFreshEntity(keyValue); + var stuInfoFreshFamily = stuInfoFreshIBLL.GetStuInfoFreshFamilyList(keyValue); + //当前年度缴费记录 + var FeeOrderList = stuInfoFreshIBLL.GetFeeOrderList(StuInfoFreshData.StuNo, jiaoFeiYear); + var FinaChargesStandardList = new List(); + FinaChargesStandardList = finaChargesStandardIBLL.GetFinaChargesStandardListByYongYou(StuInfoFreshData.StuNo, jiaoFeiYear).ToList(); + var PayFeeTotal = FinaChargesStandardList.Select(x => x.Standard).Sum(); + var jsonData = new + { + StuInfoFreshData = StuInfoFreshData, + FinaChargesStandardList = FinaChargesStandardList, + StuInfoFreshFamilyList = stuInfoFreshFamily, + PayFeeTotal = PayFeeTotal, + YJAmount = FeeOrderList.Sum(x => x.SJAmount) + }; + return Success(jsonData); + } + + + public class PayfeeRequest + { + public string strEntity { get; set; } + public string detailList { get; set; } + } + + /// + /// 生成缴费二维码 + /// + /// + public Response PayFeeQRCode(dynamic _) + { + string keyValue = Request.Query["keyValue"]; + PayfeeRequest parameter = this.GetReqData(); + StuInfoFreshEntity entity = parameter.strEntity.ToObject(); + List list = parameter.detailList.ToObject>(); + var model = stuInfoFreshIBLL.GetStuInfoFreshEntity(keyValue); + var imgUrl = ""; + Random ran = new Random(); + string merchantid = "105000082201406";//商户号 + string posid = "043724806";//商户柜台代码 + string branchid = "510000000";//分行代码 + string orderid = DateTime.Now.ToString("yyyyMMddhhmmss") + ran.Next(0, 100000); + string payment = entity.PayMoney.ToString(); + string curcode = "01"; + string txcode = "530550"; + string remark1 = model.StuNo; + string remark2 = "20" + model.Grade; + string returntype = "3"; + string timeout = DateTime.Now.AddMinutes(10).ToString("yyyyMMddHHmmss"); + string pub32tr2 = "40d987faa793a0a27e7a86ef020111"; + string bankURL = "https://ibsbjstar.ccb.com.cn/CCBIS/ccbMain?CCB_IBSVersion=V6"; + string tmp = "MERCHANTID=" + merchantid + "&POSID=" + posid + "&BRANCHID=" + branchid + "&ORDERID=" + orderid; + tmp += "&PAYMENT=" + payment + "&CURCODE=" + curcode + "&TXCODE=" + txcode + "&REMARK1=" + remark1; + tmp += "&REMARK2=" + remark2 + "&RETURNTYPE=" + returntype + "&TIMEOUT=" + timeout; + MD5 md5 = MD5.Create(); + string tmp1 = tmp; + tmp += "&PUB=" + pub32tr2; + byte[] buffer = Encoding.Default.GetBytes(tmp); + byte[] md5Buffer = md5.ComputeHash(buffer); + string strMd5 = ""; + //hdnOrderId.Value = orderid; + foreach (byte item in md5Buffer) + { + strMd5 += item.ToString("x2"); + } + string url = bankURL + "&" + tmp1 + "&MAC=" + strMd5; + string reJson = HttpMethods.Post(url); + LogEntity logEntity = new LogEntity(); + logEntity.F_CategoryId = 121; + logEntity.F_ExecuteResultJson = reJson; + logEntity.WriteLog(); + //HttpConnect conn = new HttpConnect(); + //string reJson = conn.Post(url, ""); + JsonBean MemberInfoList = JsonConvert.DeserializeObject(reJson); + if (MemberInfoList.SUCCESS.Equals("true")) + { + string imgCode = HttpMethods.Post(MemberInfoList.PAYURL); + logEntity.F_CategoryId = 121; + logEntity.F_ExecuteResultJson = imgCode; + logEntity.WriteLog(); + MemberInfoList = JsonConvert.DeserializeObject(imgCode); + if (MemberInfoList.SUCCESS.Equals("true")) + { + imgUrl = CreateQRImg(MemberInfoList.QRURL, orderid); + } + } + + if (!string.IsNullOrEmpty(imgUrl)) + { + // model.PayFeeDetail = entity.PayFeeDetail; + // model.PayMoney = entity.PayMoney; + model.LoanMoney = entity.LoanMoney; + model.orderid = orderid; + stuInfoFreshIBLL.SaveFeeData(keyValue, model, list); + } + + return Success(imgUrl); + } + + public class JsonBean + { + /// + /// + /// + public string SUCCESS { get; set; } + public string PAYURL { get; set; } + public string QRURL { get; set; } + } + /// + /// 生成并保存二维码图片的方法 + /// + /// 输入的内容 + public string CreateQRImg(string str, string orderId) + { + string QRCodeFile = Config.GetValue("QRCodeFile"); + Random ran = new Random(); + Bitmap bt; + str = HttpUtility.UrlDecode(str); + string enCodeString = str; + //生成设置编码实例 + QRCodeEncoder qrCodeEncoder = new QRCodeEncoder(); + //设置二维码的规模,默认4 + qrCodeEncoder.QRCodeScale = 3; + //设置二维码的版本,默认7 + qrCodeEncoder.QRCodeVersion = 7; + //设置错误校验级别,默认中等 + qrCodeEncoder.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M; + //生成二维码图片 + bt = qrCodeEncoder.Encode(enCodeString, Encoding.UTF8); + //二维码图片的名称 + string filename = orderId; + if (!DirFileHelper.IsExistFile(QRCodeFile + "/Content/images/QRCode/")) + { + Directory.CreateDirectory(QRCodeFile + "/Content/images/QRCode/"); + } + var path = QRCodeFile + "/Content/images/QRCode/" + filename + ".jpg"; + //保存二维码图片在photos路径下 + try + { + bt.Save(path); + } + catch (Exception ex) + { + return ""; + } + + //图片控件要显示的二维码图片路径 + return QRCodeFile + "/Content/images/QRCode/" + filename + ".jpg"; + } + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuPayFeeApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuPayFeeApi.cs new file mode 100644 index 000000000..76afef7bb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuPayFeeApi.cs @@ -0,0 +1,212 @@ +using System; +using Learun.Application.Organization; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Application.TwoDevelopment.EvaluationTeach; +using Learun.Util; +using Nancy; +using System.Collections.Generic; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Web; +using System.Web.Mvc; +using Learun.Application.Base.SystemModule; +using Learun.Application.TwoDevelopment.Ask; +using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; +using Newtonsoft.Json; +using ThoughtWorks.QRCode.Codec; + +namespace Learun.Application.WebApi.Modules +{ + /// + /// 版 本 Learun-ADMS V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创建人:数字化智慧校园-框架开发组 + /// 日 期:2018.01.04 + /// 描 述:部门管理 + /// + public class StuPayFeeApi : BaseApi + { + public StuPayFeeApi() + : base("/learun/payfee") + { + Get["/getpayfeelist"] = GetPayfeeList;// 获取缴费列表 + Get["/getpayfeeinfo"] = GetPayfeeInfo;//获取缴费明细 + Post["/generateqrcode"] = PayFeeQRCode; + } + + private StuInfoBasic_PayFeeIBLL stuInfoBasic_PayFeeIBLL = new StuInfoBasic_PayFeeBLL(); + private StuInfoBasicIBLL stuInfoBasicIbll = new StuInfoBasicBLL(); + private StuInfoFreshIBLL stuInfoFreshIBLL = new StuInfoFreshBLL(); + private FinaChargesStandardIBLL finaChargesStandardIBLL = new FinaChargesStandardBLL(); + + /// + /// 获取问卷 + /// + /// + /// + public Response GetPayfeeList(dynamic _) + { + ReqPageParam parameter = this.GetReqData(); + var data = stuInfoBasic_PayFeeIBLL.GetPageList(parameter.pagination, parameter.queryJson); + var jsonData = new + { + rows = data, + total = parameter.pagination.total, + page = parameter.pagination.page, + records = parameter.pagination.records + }; + return Success(jsonData); + } + + public Response GetPayfeeInfo(dynamic _) + { + string keyValue = Request.Query["keyValue"]; + var stuInfoBasic_PayFeeEntity = stuInfoBasic_PayFeeIBLL.GetStuInfoBasic_PayFeeEntity(keyValue); + var StuInfoFreshData = stuInfoBasicIbll.GetStuInfoBasicEntityByStuNo(stuInfoBasic_PayFeeEntity.StuNo); + //当前年度缴费记录 + var FinaChargesStandardList = new List(); + FinaChargesStandardList = finaChargesStandardIBLL.GetFinaChargesStandardListByYongYou(StuInfoFreshData.StuNo, stuInfoBasic_PayFeeEntity.PayYear.Value).ToList(); + var PayFeeTotal = FinaChargesStandardList.Select(x => x.SJAmount).Sum(); + var jsonData = new + { + StuInfoFreshData = StuInfoFreshData, + FinaChargesStandardList = FinaChargesStandardList, + PayFeeTotal = PayFeeTotal, + YJAmount = FinaChargesStandardList.Sum(x => x.PayedMoney) + }; + return Success(jsonData); + } + + + public class PayfeeRequest + { + public string strEntity { get; set; } + public string detailList { get; set; } + } + + /// + /// 生成缴费二维码 + /// + /// + public Response PayFeeQRCode(dynamic _) + { + string keyValue = Request.Query["keyValue"]; + PayfeeRequest parameter = this.GetReqData(); + StuInfoFreshEntity entity = parameter.strEntity.ToObject(); + List list = parameter.detailList.ToObject>(); + var model = stuInfoBasic_PayFeeIBLL.GetStuInfoBasic_PayFeeEntity(keyValue); + var imgUrl = ""; + Random ran = new Random(); + string merchantid = "105000082201406";//商户号 + string posid = "043724806";//商户柜台代码 + string branchid = "510000000";//分行代码 + string orderid = DateTime.Now.ToString("yyyyMMddhhmmss") + ran.Next(0, 100000); + string payment = entity.PayMoney.ToString(); + string curcode = "01"; + string txcode = "530550"; + string remark1 = model.StuNo; + string remark2 = model.PayYear.ToString(); + string returntype = "3"; + string timeout = DateTime.Now.AddMinutes(10).ToString("yyyyMMddHHmmss"); + string pub32tr2 = "40d987faa793a0a27e7a86ef020111"; + string bankURL = "https://ibsbjstar.ccb.com.cn/CCBIS/ccbMain?CCB_IBSVersion=V6"; + string tmp = "MERCHANTID=" + merchantid + "&POSID=" + posid + "&BRANCHID=" + branchid + "&ORDERID=" + orderid; + tmp += "&PAYMENT=" + payment + "&CURCODE=" + curcode + "&TXCODE=" + txcode + "&REMARK1=" + remark1; + tmp += "&REMARK2=" + remark2 + "&RETURNTYPE=" + returntype + "&TIMEOUT=" + timeout; + MD5 md5 = MD5.Create(); + string tmp1 = tmp; + tmp += "&PUB=" + pub32tr2; + byte[] buffer = Encoding.Default.GetBytes(tmp); + byte[] md5Buffer = md5.ComputeHash(buffer); + string strMd5 = ""; + //hdnOrderId.Value = orderid; + foreach (byte item in md5Buffer) + { + strMd5 += item.ToString("x2"); + } + string url = bankURL + "&" + tmp1 + "&MAC=" + strMd5; + string reJson = HttpMethods.Post(url); + LogEntity logEntity = new LogEntity(); + logEntity.F_CategoryId = 121; + logEntity.F_ExecuteResultJson = reJson; + logEntity.WriteLog(); + //HttpConnect conn = new HttpConnect(); + //string reJson = conn.Post(url, ""); + JsonBean MemberInfoList = JsonConvert.DeserializeObject(reJson); + if (MemberInfoList.SUCCESS.Equals("true")) + { + string imgCode = HttpMethods.Post(MemberInfoList.PAYURL); + logEntity.F_CategoryId = 121; + logEntity.F_ExecuteResultJson = imgCode; + logEntity.WriteLog(); + MemberInfoList = JsonConvert.DeserializeObject(imgCode); + if (MemberInfoList.SUCCESS.Equals("true")) + { + imgUrl = CreateQRImg(MemberInfoList.QRURL, orderid); + } + } + + if (!string.IsNullOrEmpty(imgUrl)) + { + model.orderid = orderid; + stuInfoFreshIBLL.SaveFeeData(keyValue, model, list); + } + + return Success(imgUrl); + } + + public class JsonBean + { + /// + /// + /// + public string SUCCESS { get; set; } + public string PAYURL { get; set; } + public string QRURL { get; set; } + } + /// + /// 生成并保存二维码图片的方法 + /// + /// 输入的内容 + public string CreateQRImg(string str, string orderId) + { + string QRCodeFile = Config.GetValue("QRCodeFile"); + Random ran = new Random(); + Bitmap bt; + str = HttpUtility.UrlDecode(str); + string enCodeString = str; + //生成设置编码实例 + QRCodeEncoder qrCodeEncoder = new QRCodeEncoder(); + //设置二维码的规模,默认4 + qrCodeEncoder.QRCodeScale = 3; + //设置二维码的版本,默认7 + qrCodeEncoder.QRCodeVersion = 7; + //设置错误校验级别,默认中等 + qrCodeEncoder.QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M; + //生成二维码图片 + bt = qrCodeEncoder.Encode(enCodeString, Encoding.UTF8); + //二维码图片的名称 + string filename = orderId; + if (!DirFileHelper.IsExistFile(QRCodeFile+"/Content/images/QRCode/")) + { + Directory.CreateDirectory(QRCodeFile + "/Content/images/QRCode/"); + } + var path = QRCodeFile + "/Content/images/QRCode/" + filename + ".jpg"; + //保存二维码图片在photos路径下 + try + { + bt.Save(path); + } + catch (Exception ex) + { + return ""; + } + + //图片控件要显示的二维码图片路径 + return QRCodeFile + "/Content/images/QRCode/" + filename + ".jpg"; + } + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WeixinApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WeixinApi.cs index ee3d82139..50306a2bc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WeixinApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WeixinApi.cs @@ -36,6 +36,8 @@ namespace Learun.Application.WebApi.Modules Get["/weixinconfig"] = GetWeixinConfig; Post["/getweixinaccess_token"] = GetWeixinAccess_token; Post["/login"] = Login; + //新生首次登陆 + Post["/loginbyidcard"] = LoginByIdCard; Get["/getweixinwebaccess_token"] = GetWeixinWebaccess_token; //获取ACIp Get["/GetACIp"] = GetACIp; @@ -241,6 +243,77 @@ namespace Learun.Application.WebApi.Modules #endregion } + private Response LoginByIdCard(dynamic _) + { + LoginModel loginModel = this.GetReqData(); + + #region 内部账户验证 + UserEntity userEntity = userIbll.CheckLoginByIdCard(loginModel.username, loginModel.password); + + #region 写入日志 + LogEntity logEntity = new LogEntity(); + logEntity.F_CategoryId = 1; + logEntity.F_OperateTypeId = ((int)OperationType.Login).ToString(); + logEntity.F_OperateType = EnumAttribute.GetDescription(OperationType.Login); + logEntity.F_OperateAccount = loginModel.username + "(" + userEntity.F_RealName + ")"; + logEntity.F_OperateUserId = !string.IsNullOrEmpty(userEntity.F_UserId) ? userEntity.F_UserId : loginModel.username; + logEntity.F_Module = Config.GetValue("SoftName"); + logEntity.F_Description = "移动端"; + #endregion + + if (!userEntity.LoginOk)//登录失败 + { + //写入日志 + logEntity.F_ExecuteResult = 0; + logEntity.F_ExecuteResultJson = "登录失败:" + userEntity.LoginMsg; + logEntity.WriteLog(); + return Fail(userEntity.LoginMsg); + } + else + { + ReqParameter req = this.Bind(); + string token = OperatorHelper.Instance.AddLoginUser(userEntity.F_Account, "Learun_ADMS_6.1_App", req.loginMark, false);//写入缓存信息 + //写入日志 + logEntity.F_ExecuteResult = 1; + logEntity.F_ExecuteResultJson = "登录成功"; + logEntity.WriteLog(); + OperatorResult res = OperatorHelper.Instance.IsOnLine(token, req.loginMark); + res.userInfo.password = null; + res.userInfo.secretkey = null; + var studententity = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(userEntity.F_Account); + if (studententity != null) + { + res.userInfo.grade = studententity.Grade; + var majorinfo = majorIbll.GetCdMajorEntityByMajorNo(studententity.MajorNo); + if (majorinfo != null) + { + res.userInfo.majorno = majorinfo.ID ?? ""; + } + + } + //是否强密码验证 + bool pwd = false; + if (!string.IsNullOrEmpty(ConfigurationManager.AppSettings["verifypwd"]) && ConfigurationManager.AppSettings["verifypwd"] == "true" && loginModel.up == false) + { + pwd = true; + } + else + { + //保存用户设备号 + userIbll.UpdateWeixinOpenId(userEntity.F_UserId, loginModel.openid); + } + var jsonData = new + { + baseinfo = res.userInfo, + post = postIBLL.GetListByPostIds(res.userInfo.postIds), + role = roleIBLL.GetListByRoleIds(res.userInfo.roleIds), + pwd = pwd + }; + return Success(jsonData); + } + #endregion + } + public Response GetWeixinWebaccess_token(dynamic _) { var entity = weChatConfigIbll.GetEnableEntity(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config index 0fac6f538..39f36d613 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config @@ -66,6 +66,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/packages.config b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/packages.config index b9d939563..05bbc23ba 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/packages.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/packages.config @@ -30,6 +30,7 @@ + \ No newline at end of file From 7313353032daa99c14d44bfa914c794c978c7807 Mon Sep 17 00:00:00 2001 From: liangkun Date: Thu, 25 Aug 2022 11:36:35 +0800 Subject: [PATCH 04/28] =?UTF-8?q?=E5=BC=80=E7=A5=A8=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/StuFreshPayFeeApi.cs | 15 +++++++++------ .../Modules/StuPayFeeApi.cs | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuFreshPayFeeApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuFreshPayFeeApi.cs index 4610f9a20..961802cc4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuFreshPayFeeApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuFreshPayFeeApi.cs @@ -34,17 +34,20 @@ namespace Learun.Application.WebApi.Modules { Get["/getpayfeelist"] = GetPayfeeList;// 获取缴费列表 Get["/getpayfeeinfo"] = GetPayfeeInfo;//获取缴费明细 - Post["/generateqrcode"] = PayFeeQRCode; + Post["/generateqrcode"] = PayFeeQRCode;//生成缴费二维码 + Get["/getinvoice"] = GetInvoice;//获取发票 } private StuInfoFreshIBLL stuInfoFreshIBLL = new StuInfoFreshBLL(); private FinaChargesStandardIBLL finaChargesStandardIBLL = new FinaChargesStandardBLL(); - /// - /// 获取问卷 - /// - /// - /// + public Response GetInvoice(dynamic _) + { + string keyValue = Request.Query["keyValue"]; + var list = stuInfoFreshIBLL.GetStuEnrollFeeOrder(keyValue, true); + return Success(list); + } + public Response GetPayfeeList(dynamic _) { ReqPageParam parameter = this.GetReqData(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuPayFeeApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuPayFeeApi.cs index 76afef7bb..52cc62442 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuPayFeeApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuPayFeeApi.cs @@ -34,19 +34,22 @@ namespace Learun.Application.WebApi.Modules { Get["/getpayfeelist"] = GetPayfeeList;// 获取缴费列表 Get["/getpayfeeinfo"] = GetPayfeeInfo;//获取缴费明细 - Post["/generateqrcode"] = PayFeeQRCode; + Post["/generateqrcode"] = PayFeeQRCode;//生成缴费二维码 + Get["/getinvoice"] = GetInvoice;//获取发票 } private StuInfoBasic_PayFeeIBLL stuInfoBasic_PayFeeIBLL = new StuInfoBasic_PayFeeBLL(); private StuInfoBasicIBLL stuInfoBasicIbll = new StuInfoBasicBLL(); private StuInfoFreshIBLL stuInfoFreshIBLL = new StuInfoFreshBLL(); private FinaChargesStandardIBLL finaChargesStandardIBLL = new FinaChargesStandardBLL(); + + public Response GetInvoice(dynamic _) + { + string keyValue = Request.Query["keyValue"]; + var list = stuInfoFreshIBLL.GetStuEnrollFeeOrder(keyValue, false); + return Success(list); + } - /// - /// 获取问卷 - /// - /// - /// public Response GetPayfeeList(dynamic _) { ReqPageParam parameter = this.GetReqData(); From 227b5af8d21aff8081b1f739296b0885a1d4680d Mon Sep 17 00:00:00 2001 From: liangkun Date: Mon, 22 Aug 2022 18:17:39 +0800 Subject: [PATCH 05/28] =?UTF-8?q?=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/AnnexesApiWx.cs | 260 +++++++++--------- .../components/learun-app/upload-file.vue | 2 +- .../LearunApp-2.2.0/config.js | 6 +- 3 files changed, 134 insertions(+), 134 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AnnexesApiWx.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AnnexesApiWx.cs index 4795d3d47..4054c0a35 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AnnexesApiWx.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/AnnexesApiWx.cs @@ -7,136 +7,136 @@ using System.IO; namespace Learun.Application.WebApi.Modules { - public class AnnexesApiWx : BaseApi - { - public AnnexesApiWx() - : base("/learun/adms/annexes") + public class AnnexesApiWx : BaseApi { - Get["/wxlist"] = WxGetList; - Get["/wxdown"] = WxDownload; - Get["/wxfileinfo"] = WxFileInfo; - Post["/wxupload"] = WxUpload; - Post["/wxdelete"] = WxDeleteFile; + public AnnexesApiWx() + : base("/learun/adms/annexes") + { + Get["/wxlist"] = WxGetList; + Get["/wxdown"] = WxDownload; + Get["/wxfileinfo"] = WxFileInfo; + Post["/wxupload"] = WxUpload; + Post["/wxdelete"] = WxDeleteFile; + } + private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); + + /// + /// 获取附件列表 + /// + /// + /// + public Response WxGetList(dynamic _) + { + var keyValue = this.GetReqData(); + var list = annexesFileIBLL.GetList(keyValue); + + return Success(list); + } + + /// + /// 上传附件图片文件 + /// + /// + public Response WxUpload(dynamic _) + { + var files = (List)this.Context.Request.Files; + //var folderId = this.GetReqData(); + string folderId = Guid.NewGuid().ToString(); + string filePath = Config.GetValue("AnnexesFile"); + string uploadDate = DateTime.Now.ToString("yyyyMMdd"); + string fileEextension = Path.GetExtension(files[0].Name); + string fileType = fileEextension.Replace(".", ""); + string fileGuid = Guid.NewGuid().ToString(); + + string virtualPath = string.Format("{0}/{1}/{2}/{3}{4}", filePath, userInfo.userId, uploadDate, fileGuid, fileEextension); + + //创建文件夹 + string path = Path.GetDirectoryName(virtualPath); + Directory.CreateDirectory(path); + AnnexesFileEntity fileAnnexesEntity = new AnnexesFileEntity(); + if (!System.IO.File.Exists(virtualPath)) + { + byte[] bytes = new byte[files[0].Value.Length]; + files[0].Value.Read(bytes, 0, bytes.Length); + FileInfo file = new FileInfo(virtualPath); + FileStream fs = file.Create(); + fs.Write(bytes, 0, bytes.Length); + fs.Close(); + + //文件信息写入数据库 + fileAnnexesEntity.F_Id = fileGuid; + fileAnnexesEntity.F_FileName = files[0].Name; + fileAnnexesEntity.F_FilePath = virtualPath; + fileAnnexesEntity.F_FileSize = files[0].Value.Length.ToString(); + fileAnnexesEntity.F_FileExtensions = fileEextension; + fileAnnexesEntity.F_FileType = fileType; + fileAnnexesEntity.F_CreateUserId = userInfo.userId; + fileAnnexesEntity.F_CreateUserName = userInfo.realName; + + annexesFileIBLL.SaveEntity(folderId, fileAnnexesEntity); + } + + return SuccessString(folderId); + } + + /// + /// 获取文件信息 + /// + /// + /// + public Response WxFileInfo(dynamic _) + { + var fileId = this.GetReqData(); + var fileEntity = annexesFileIBLL.GetEntity(fileId); + + return Success(fileEntity); + } + + /// + /// 删除文件 + /// + /// + /// + public Response WxDeleteFile(dynamic _) + { + var fileId = this.GetReqData(); + AnnexesFileEntity fileInfoEntity = annexesFileIBLL.GetEntity(fileId); + annexesFileIBLL.DeleteEntity(fileId); + //删除文件 + if (System.IO.File.Exists(fileInfoEntity.F_FilePath)) + { + System.IO.File.Delete(fileInfoEntity.F_FilePath); + } + + return Success("删除成功"); + } + + /// + /// 下载文件,微信小程序用 + /// + /// 微信小程序可以预览图片、文档 + /// 支持的图片格式:.jpg .png .webp .gif + /// 支持的文档格式:.doc(x) .xls(x) .ppt(x) .pdf + /// + /// 对于其他格式的文件,微信小程序官方未提供打开或预览的 API,文件对用户来说不可访问 + /// + /// + /// + public Response WxDownload(dynamic _) + { + string name = this.GetReqData(); + string fileId = name.Split('.')[0]; + var fileEntity = annexesFileIBLL.GetEntity(fileId); + string filepath = fileEntity.F_FilePath; + + if (!FileDownHelper.FileExists(filepath)) + { + return 404; + } + + FileDownHelper.DownLoadWx(filepath, fileEntity.F_FileType); + + return Success(""); + } } - private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); - - /// - /// 获取附件列表 - /// - /// - /// - public Response WxGetList(dynamic _) - { - var keyValue = this.GetReqData(); - var list = annexesFileIBLL.GetList(keyValue); - - return Success(list); - } - - /// - /// 上传附件图片文件 - /// - /// - public Response WxUpload(dynamic _) - { - var files = (List)this.Context.Request.Files; - var folderId = this.GetReqData(); - - string filePath = Config.GetValue("AnnexesFile"); - string uploadDate = DateTime.Now.ToString("yyyyMMdd"); - string fileEextension = Path.GetExtension(files[0].Name); - string fileType = fileEextension.Replace(".", ""); - string fileGuid = Guid.NewGuid().ToString(); - - string virtualPath = string.Format("{0}/{1}/{2}/{3}{4}", filePath, userInfo.userId, uploadDate, fileGuid, fileEextension); - - //创建文件夹 - string path = Path.GetDirectoryName(virtualPath); - Directory.CreateDirectory(path); - AnnexesFileEntity fileAnnexesEntity = new AnnexesFileEntity(); - if (!System.IO.File.Exists(virtualPath)) - { - byte[] bytes = new byte[files[0].Value.Length]; - files[0].Value.Read(bytes, 0, bytes.Length); - FileInfo file = new FileInfo(virtualPath); - FileStream fs = file.Create(); - fs.Write(bytes, 0, bytes.Length); - fs.Close(); - - //文件信息写入数据库 - fileAnnexesEntity.F_Id = fileGuid; - fileAnnexesEntity.F_FileName = files[0].Name; - fileAnnexesEntity.F_FilePath = virtualPath; - fileAnnexesEntity.F_FileSize = files[0].Value.Length.ToString(); - fileAnnexesEntity.F_FileExtensions = fileEextension; - fileAnnexesEntity.F_FileType = fileType; - fileAnnexesEntity.F_CreateUserId = userInfo.userId; - fileAnnexesEntity.F_CreateUserName = userInfo.realName; - - annexesFileIBLL.SaveEntity(folderId, fileAnnexesEntity); - } - - return SuccessString(fileGuid); - } - - /// - /// 获取文件信息 - /// - /// - /// - public Response WxFileInfo(dynamic _) - { - var fileId = this.GetReqData(); - var fileEntity = annexesFileIBLL.GetEntity(fileId); - - return Success(fileEntity); - } - - /// - /// 删除文件 - /// - /// - /// - public Response WxDeleteFile(dynamic _) - { - var fileId = this.GetReqData(); - AnnexesFileEntity fileInfoEntity = annexesFileIBLL.GetEntity(fileId); - annexesFileIBLL.DeleteEntity(fileId); - //删除文件 - if (System.IO.File.Exists(fileInfoEntity.F_FilePath)) - { - System.IO.File.Delete(fileInfoEntity.F_FilePath); - } - - return Success("删除成功"); - } - - /// - /// 下载文件,微信小程序用 - /// - /// 微信小程序可以预览图片、文档 - /// 支持的图片格式:.jpg .png .webp .gif - /// 支持的文档格式:.doc(x) .xls(x) .ppt(x) .pdf - /// - /// 对于其他格式的文件,微信小程序官方未提供打开或预览的 API,文件对用户来说不可访问 - /// - /// - /// - public Response WxDownload(dynamic _) - { - string name = this.GetReqData(); - string fileId = name.Split('.')[0]; - var fileEntity = annexesFileIBLL.GetEntity(fileId); - string filepath = fileEntity.F_FilePath; - - if (!FileDownHelper.FileExists(filepath)) - { - return 404; - } - - FileDownHelper.DownLoadWx(filepath, fileEntity.F_FileType); - - return Success(""); - } - } } \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/upload-file.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/upload-file.vue index 969f835be..e2300312a 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/upload-file.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/upload-file.vue @@ -89,7 +89,7 @@ export default { // #endif // #ifndef MP-DINGTALK - uni.chooseImage({ + uni.chooseFile({ count: Number(this.number), sizeType: ['original', 'compressed'], sourceType: ['album', 'camera'], diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index 5521fbc3b..7670bf973 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -21,14 +21,14 @@ export default { // "http://192.168.2.98:8088/" // ], "apiHost": [ - "http://192.168.10.68:8002/" - // "http://192.168.10.85:8088/" + // "http://localhost:31173/" + "http://192.168.10.68:8002/" ], "webHost":"http://localhost:20472/", // 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 "devAccount": [ // 20201130230 21364200000400266 老师 420528196310072253 学生 420528200606205026 420528200507261428 - { username: "2020040101", password: "www.qj.com" } + { username: "system", password: "www.qj.com" } ], //是否分布式部署 指WebApi与Web不在一台服务器 "isDistributed":true, From e6446694aeea42614c999213432e15cd6751d39d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Mon, 22 Aug 2022 15:29:29 +0800 Subject: [PATCH 06/28] =?UTF-8?q?app2.2.0=20=E6=88=91=E7=9A=84=E5=AE=A1?= =?UTF-8?q?=E6=89=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/common/customform.js | 7 +- .../LearunApp-2.2.0/common/mixins.js | 11 +- .../components/learun-app/customform.vue | 7 +- .../components/upload-file.vue | 535 +++++++++--------- .../pages/nworkflow/myflow/single.vue | 3 +- .../pages/nworkflow/releasetask/single.vue | 5 +- .../pages/nworkflow/workflow.js | 5 +- .../LearunApp-2.2.0/pages/timeTable/list.vue | 4 +- 8 files changed, 294 insertions(+), 283 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js index 4a171f0b1..bde9e0c04 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js @@ -211,7 +211,7 @@ export default { const fileType = fileInfo.F_FileType const fileSize = fileInfo.F_FileSize - const path = this.API + '/learun/adms/annexes/wxdown?' + this.URL_QUERY(uid, true) + const path = this.API + '/annexes/wxdown?' + this.URL_QUERY(uid, true) fileList.push({ path, type: fileType, uid, size: fileSize }) } @@ -274,13 +274,14 @@ export default { case 'upload': const uploadUid = [] - // { path, uid } + console.log(val,'val上传前') + for (const item of val) { if (item.uid) { uploadUid.push(item.uid) continue } - + const fileId = await this.HTTP_UPLOAD(item.path||item) if (fileId) { uploadUid.push(fileId) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js index a796f6dac..1efbf2cfe 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js @@ -259,6 +259,7 @@ export default { // filePath 为临时文件的路径 // formData 为请求附带的提交数据 async HTTP_UPLOAD(filePath, formData) { + const [err, res] = await this.UPLOAD('/learun/adms/annexes/wxupload', filePath, formData) return this.handleResult(err, res) @@ -276,7 +277,7 @@ export default { // url 为请求地址 // formData 为请求附带的提交数据 async HTTP_DOWNLOAD(formData) { - const [err, res] = await this.DOWNLOAD('/learun/adms/annexes/wxdown', formData) + const [err, res] = await this.DOWNLOAD('/annexes/wxdown', formData) return this.handleResult(err, res) }, @@ -341,7 +342,7 @@ export default { // }) // }) // #endif - + console.log(filePath,'filePath上传内') // #ifndef MP-DINGTALK return uni.uploadFile({ url: uploadUrl, @@ -351,9 +352,11 @@ export default { formData: query }).then(([err, result]) => { if (!err) { + result.data = JSON.parse(result.data) return [null, result] } else { + return [err, null] } @@ -683,13 +686,13 @@ export default { if(result.data.code != 200){ uni.hideLoading() uni.showToast({ - title: tips||result.data.info||"未知错误", + title: result.data.info, icon: 'none' }) return null } - return result.data.data||true + return result.data.data }, // 【即将废弃】请使用 this.CONFIG() 来替代 diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customform.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customform.vue index 9ff9a6f73..3dafa1ce7 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customform.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customform.vue @@ -194,12 +194,14 @@ export default { // 依次验证表单项,返回一个所有错误提示的数组,如果为空数组则表示无错误 verifyValue() { const errorList = [] - + console.log(this.scheme) this.scheme .filter(t => t.verify) .forEach(schemeItem => { if (schemeItem.table && schemeItem.field) { + console.log(schemeItem.verify,'hemeItem.verify') const verifyFunc = this.verify[schemeItem.verify] + console.log(schemeItem.verify) const verifyResult = verifyFunc(this.getValue(schemeItem.__valuePath__)) if (verifyResult !== true) { errorList.push(`[${schemeItem.title}]: ${verifyResult}`) @@ -304,7 +306,8 @@ export default { MobileOrPhoneOrNull: t => t.length <= 0 || /^1[0-9]{10}$/.test(t) || /^[+0-9- ]*$/.test(t) || '须留空或符合手机/电话号码格式', Uri: t => /^[a-zA-z]+:\/\/[^\s]*$/.test(t) || '须符合网址Url格式', - UriOrNull: t => t.length <= 0 || /^[a-zA-z]+:\/\/[^\s]*$/.test(t) || '须留空或符合网址Url格式' + UriOrNull: t => t.length <= 0 || /^[a-zA-z]+:\/\/[^\s]*$/.test(t) || '须留空或符合网址Url格式', + PositiveFloatint:t=> /^([1-9]\d*|(0|[1-9]\d*)\.\d*[1-9])$/.test(t) || '请输入正确的整数或小数(不能为零和负数)' } } } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/upload-file.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/upload-file.vue index 6927690a6..f3947f199 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/upload-file.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/upload-file.vue @@ -1,296 +1,293 @@ diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/weixinLogin.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/weixinLogin.vue index 4a7041cc3..64fccc7a5 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/weixinLogin.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/weixinLogin.vue @@ -31,7 +31,7 @@ - 确 认 + 确 认 常规登陆 @@ -68,11 +68,14 @@