';
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/workspace/workspace.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/workspace/workspace.js
index 530662f21..5431f8df3 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/workspace/workspace.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/workspace/workspace.js
@@ -6,6 +6,7 @@
var page = {
init: function ($page) {
+
var _html = '';
_html += '
';
_html += '
';
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/scripts/_sgbak/learun-custmerform.js.26692.2.2020-08-04.14-24-39.5824 b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/scripts/_sgbak/learun-custmerform.js.26692.2.2020-08-04.14-24-39.5824
deleted file mode 100644
index e92414898..000000000
--- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/scripts/_sgbak/learun-custmerform.js.26692.2.2020-08-04.14-24-39.5824
+++ /dev/null
@@ -1,838 +0,0 @@
-/*
- * 版 本 Learun-ADMS V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2017 北京泉江科技有限公司
- * 创建人:数字化智慧校园-前端开发组
- * 日 期:2018.7.12
- * 描 述:数字化智慧校园移动端框架(ADMS) 自定义表单
- */
-
-(function ($, learun, window) {
- // 加载自定义表单模板
- learun.custmerform = {
- loadScheme: function (schemeIds, callback) {// formIds表单主键集合,callback回调函数
- if (learun.type(schemeIds) === 'string') {
- schemeIds = [schemeIds];
- }
-
- var req = [];
- var scheme = {};
- $.each(schemeIds, function (_index, _item) {
- var formId = 'lrform' + _item;
- var formScheme = learun.storage.get(formId);// 从缓存中获取表单模板数据
- if (!formScheme) {
- req.push({ id: _item, ver: "" });
- }
- else {
- scheme[_item] = JSON.parse(formScheme.content);
- req.push({ id: _item, ver: formScheme.ver });
- }
- });
- // 加载自定义表单模板
- learun.httpget(config.webapi + "learun/adms/form/scheme", req, (data) => {
- if (data) {
- $.each(data, function (_index, _item) {
- scheme[_index] = JSON.parse(_item.F_Scheme);
- var formScheme = { ver: _item.F_Id, content: _item.F_Scheme };
- learun.storage.set('lrform' + _index,formScheme);
- });
- }
- callback(scheme);
- });
- }
- };
- // 自定义表单初始化
- $.fn.custmerform = function (formScheme) {
- var $this = $(this);
- $this.scroll();
- var $container = $this.find('.f-scroll');
-
- $.each(formScheme, function (_id, _scheme) {
- custmerformRender($container, _scheme.data, _id);
- });
- $this = null;
- $container = null;
- };
- // 获取自定义表单数据
- $.fn.custmerformGet = function () {
- var res = {};
- var validateflag = true;
- $(this).find('.lrcomponts').each(function () {
- var $this = $(this);
- var schemeInfoId = $this.attr('data-id');
- var _componts = $this[0].componts;
- res[schemeInfoId] = res[schemeInfoId] || {};
- // 遍历自定义表单控件
- $.each(_componts, function (_index, _item) {
- var _fn = componts[_item.type].get;
- if (_fn) {
- var compontData = _fn(_item, $this);
- if (compontData.isHad) {
- if (_item.verify) {
- var checkfn = window.fui.validator['is' + _item.verify];
- var r = checkfn(compontData.value);
- if (!r.code) {
- validateflag = false;
- window.fui.dialog({ msg: r.msg });
- return false;
- }
- }
- res[schemeInfoId][_item.id] = compontData.value;
- }
- }
- });
- $this = null;
- if (!validateflag) {
- return false;
- }
- });
- if (!validateflag) {
- return null;
- }
- return res;
- };
- // 设置自定义表单数据
- $.fn.custmerformSet = function (data) {
- var $this = $(this);
- function set($this, data) {
- if ($this.find('.lrcomponts').length > 0) {
- $this.find('.lrcomponts').each(function () {
- var $this = $(this);
- var schemeInfoId = $this.attr('data-id');
- var _componts = $this[0].componts;
- var _data = {};
- $.each(data[schemeInfoId] || [], function (_index, _item) {
- $.each(_item[0] || [], function (_id, _jitem) {
- _data[_index.toLowerCase() + _id] = _jitem;
- });
- });
- // 遍历自定义表单控件
- $.each(_componts, function (_index, _item) {
- var _fn = componts[_item.type].set;
- if (_fn) {
- if (_item.table && _item.field) {
- _fn(_item, _data[(_item.table + _item.field).toLowerCase()], $this);
- }
- else if (_item.table){// 表格
- _fn(_item, data[schemeInfoId][_item.table], $this);
- }
- }
- });
- $this = null;
- });
- }
- else {
- setTimeout(function () {
- set($this, data);
- }, 100);
- }
- }
- set($this, data);
- };
-
- function getFontHtml(verify) {
- var res = "";
- switch (verify) {
- case "NotNull":
- case "Num":
- case "Email":
- case "EnglishStr":
- case "Phone":
- case "Fax":
- case "Mobile":
- case "MobileOrPhone":
- case "Uri":
- res = '
*';
- break;
- }
- return res;
- }
- function loadCheck(data, text, value, compontId) {
- var $row = $('#' + compontId);
- if ($row.length === 0) {
- setTimeout(function () {
- loadCheck(data, text, value, compontId);
- }, 100);
- }
- else {
- var $Last = $row;
- $.each(data, function (_index, _item) {
- $div = $('
');
- $Last.after($div);
- $div.find('.checkbox').lrswitch();
- $Last = $div;
- $div = null;
- });
- if ($Last) {
- $Last.after('
');
- $Last = null;
- }
- }
- $row = null;
- }
- function organizeRegister1(_compont) {
- if ($('#' + _compont.relation).length > 0) {
- $('#' + _compont.relation).on('change', { myId: _compont.id }, function (e) {
- e = e || window.event;
- var myId = e.data.myId;
- var value = $(this).lrselectGet();
- $('#' + myId).lrselectUpdate({
- companyId: value,
- needPre: value === '' ? true : false
- });
- });
- }
- else {
- setTimeout(function () { organizeRegister1(_compont); }, 100);
- }
- }
- function organizeRegister2(_compont) {
- if ($('#' + _compont.relation).length > 0) {
- $('#' + _compont.relation).on('change', { myId: _compont.id }, function (e) {
- e = e || window.event;
- var myId = e.data.myId;
- var value = $(this).lrselectGet();
- $('#' + myId).lrselectUpdate({
- departmentId: value,
- needPre: value === '' ? true : false
- });
- });
- }
- else {
- setTimeout(function () { organizeRegister2(_compont); }, 100);
- }
- }
-
- function loadGridComponts(compont) {
- }
- function loadGridButton(compont) {// 编辑表格增加按钮
- var $row = $('#' + compont.id);
- if ($row.length === 0) {
- setTimeout(function () {
- loadGridButton(compont);
- }, 100);
- }
- else {
- var $btn = $('
增加' + (compont.title || '') + '
');
- $btn[0].compont = compont;
-
- $btn.on('tap', { compont: compont }, function (e) {
- e = e || window.event;
- });
-
- $row.after($btn);
- }
- $row = null;
- }
-
- // 渲染自定义表单
- function custmerformRender($container, scheme, schemeInfoId) {
- var loaddataComponts = [];
- $.each(scheme, function (_index, _item) {
- var $list = $('
');
- $list[0].componts = _item.componts;
- $.each(_item.componts, function (_jindex, _jitem) {
- var $row = $('
');
- if (componts[_jitem.type].render($row, _jitem)) {
- $list.append($row);
- $row.prepend(getFontHtml(_jitem.verify));
- }
- });
- $container.append($list);
- });
-
- $container = null;
- }
-
- var componts = {
- label: {
- render: function ($row, compont) {
- $row.addClass('lr-form-row-title');
- return true;
- }
- },
- html: {
- render: function ($row, compont) {
- return false;
- }
- },
- text: {
- render: function ($row, compont) {
- var $compont = $('
');
- $row.append($compont);
- $compont.val(compont.dfvalue || '');
-
- $compont = null;
- $row = null;
- if (compont.isHide === '1') {
- return false;
- }
-
- return true;
- },
- get: function (compont, $container) {
- var res = {};
- var $compont = $container.find('#' + compont.id);
- res.isHad = $compont.length > 0 ? true : false;
- if (res.isHad) {
- res.value = $compont.val();
- }
- $compont = null;
- return res;
- },
- set: function (compont, value, $container) {
- $container.find('#' + compont.id).val(value || '');
- }
- },
- textarea: {
- render: function ($row, compont) {
- $row.addClass('lr-form-row-multi');
- var $compont = $('
');
- $compont.text(compont.dfvalue || '');
- $row.append($compont);
- $compont = null;
- $row = null;
- return true;
- },
- get: function (compont, $container) {
- var res = {};
- var $compont = $container.find('#' + compont.id);
- res.isHad = $compont.length > 0 ? true : false;
- if (res.isHad) {
- res.value = $compont.val();
- }
- $compont = null;
- return res;
- },
- set: function (compont, value, $container) {
- $container.find('#' + compont.id).val(value || '');
- }
- },
- texteditor: {
- render: function ($row, compont) {
- $row.addClass('lr-form-row-multi');
- var $compont = $('
');
- $compont.text(compont.dfvalue || '');
- $row.append($compont);
- $compont = null;
- $row = null;
- return true;
- },
- get: function (compont, $container) {
- var res = {};
- var $compont = $container.find('#' + compont.id);
- res.isHad = $compont.length > 0 ? true : false;
- if (res.isHad) {
- res.value = $compont.val();
- }
- $compont = null;
- return res;
- },
- set: function (compont, value, $container) {
- $container.find('#' + compont.id).val(value || '');
- }
- },
- radio: {
- render: function ($row, compont) {// 单选改用和下拉一致
- var $compont = $('
');
- $row.append($compont);
- if (compont.dataSource === '0') {
- $compont.lrpickerex({
- code: compont.itemCode,
- type: 'dataItem'
- });
- } else {
- var vlist = compont.dataSourceId.split(',');
- $compont.lrpickerex({
- code: vlist[0],
- type: 'sourceData',
- ivalue: vlist[2],
- itext: vlist[1]
- });
- }
-
- $compont = null;
- $row = null;
- return true;
- },
- get: function (compont, $container) {
- var res = {};
- var $compont = $container.find('#' + compont.id);
- res.isHad = $compont.length > 0 ? true : false;
- if (res.isHad) {
- res.value = $compont.lrpickerGet();
- }
- $compont = null;
- return res;
- },
- set: function (compont, value, $container) {
- $container.find('#' + compont.id).lrpickerSet(value);
- }
- },
- checkbox: {
- render: function ($row, compont) {
- var $compont = $('
');
- $row.append($compont);
- if (compont.dataSource === '0') {
- $compont.lrcheckboxex({
- code: compont.itemCode,
- type: 'dataItem'
- });
- } else {
- var vlist = compont.dataSourceId.split(',');
- $compont.lrcheckboxex({
- code: vlist[0],
- type: 'sourceData',
- ivalue: vlist[2],
- itext: vlist[1]
- });
- }
-
- $compont = null;
- $row = null;
- return true;
- },
- get: function (compont, $container) {
- var res = {};
- var $compont = $container.find('#' + compont.id);
- res.isHad = $compont.length > 0 ? true : false;
- if (res.isHad) {
- res.value = $compont.lrcheckboxGet();
- }
- $compont = null;
- return res;
- },
- set: function (compont, value, $container) {
- $container.find('#' + compont.id).lrcheckboxSet(value);
- }
- },
- select: {
- render: function ($row, compont) {//
- var $compont = $('
');
- $row.append($compont);
- if (compont.dataSource === '0') {
- $compont.lrpickerex({
- code: compont.itemCode,
- type: 'dataItem'
- });
- } else {
- var vlist = compont.dataSourceId.split(',');
- $compont.lrpickerex({
- code: vlist[0],
- type: 'sourceData',
- ivalue: vlist[2],
- itext: vlist[1]
- });
- }
-
- $compont = null;
- $row = null;
- return true;
- },
- get: function (compont, $container) {
- var res = {};
- var $compont = $container.find('#' + compont.id);
- res.isHad = $compont.length > 0 ? true : false;
- if (res.isHad) {
- res.value = $compont.lrpickerGet();
- }
- $compont = null;
- return res;
- },
- set: function (compont, value, $container) {
- $container.find('#' + compont.id).lrpickerSet(value);
- }
- },
- datetime: {
- render: function ($row, compont) {//
- var $compont = $('
');
- $row.append($compont);
- if (compont.dateformat === '0') {
- $compont.lrdate({
- type: 'date'
- });
- }
- else {
- $compont.lrdate();
- }
- $compont = null;
- $row = null;
- return true;
- },
- get: function (compont, $container) {
- var res = {};
- var $compont = $container.find('#' + compont.id);
- res.isHad = $compont.length > 0 ? true : false;
- if (res.isHad) {
- res.value = $compont.lrdateGet();
- }
- $compont = null;
- return res;
- },
- set: function (compont, value, $container) {
- if (compont.dateformat === '0') {
- value = learun.date.format(value, 'yyyy-MM-dd');
- }
- else {
- value = learun.date.format(value, 'yyyy-MM-dd hh:mm');
- }
-
- $container.find('#' + compont.id).lrdateSet(value);
- }
- },
- datetimerange: {
- render: function ($row, compont) {//
- var $compont = $('
');
- function register(_compont) {
- if ($('#' + _compont.startTime).length > 0 && $('#' + _compont.endTime).length > 0) {
- $('#' + _compont.startTime).on('change', { myId: _compont.id, end: _compont.endTime }, function (e) {
- e = e || window.event;
- var end = e.data.end;
- var myId = e.data.myId;
- var st = $(this).lrdateGet();
- var et = $('#' + end).lrdateGet();
- if (!!st && !!et) {
- var diff = learun.date.parse(st).DateDiff('d', et) + 1;
- $('#' + myId).val(diff);
- }
- });
- $('#' + _compont.endTime).on('change', { myId: _compont.id, begin: _compont.startTime }, function (e) {
- e = e || window.event;
- var begin = e.data.begin;
- var myId = e.data.myId;
-
- var st = $('#' + begin).lrdateGet();
- var et = $(this).lrdateGet();
- if (!!st && !!et) {
- var diff = learun.date.parse(st).DateDiff('d', et) + 1;
- $('#' + myId).val(diff);
- }
- });
- }
- else {
- setTimeout(function () {
- register(_compont);
- }, 100);
- }
- }
- if (!!compont.startTime && compont.endTime) {
- register(compont);
- }
- $row.append($compont);
- $compont = null;
- $row = null;
- return true;
- },
- get: function (compont, $container) {
- var res = {};
- var $compont = $container.find('#' + compont.id);
- res.isHad = $compont.length > 0 ? true : false;
- if (res.isHad) {
- res.value = $compont.val();
- }
- $compont = null;
- return res;
- },
- set: function (compont, value, $container) {
- $container.find('#' + compont.id).val(value);
- }
- },
- encode: {
- render: function ($row, compont) {
- var $compont = $('
');
- compont.isInit = false;
- learun.getRuleCode(compont.rulecode, function (data) {
- if (!compont.isInit) {
- compont.isInit = true;
- $('#' + compont.id).val(data);
- }
- });
- $row.append($compont);
- $compont = null;
- $row = null;
- return true;
- },
- get: function (compont, $container) {
- var res = {};
- var $compont = $container.find('#' + compont.id);
- res.isHad = $compont.length > 0 ? true : false;
- if (res.isHad) {
- res.value = $compont.val();
- }
- $compont = null;
- return res;
- },
- set: function (compont, value, $container) {
- compont.isInit = true;
- $container.find('#' + compont.id).val(value);
- }
- },
- organize: {
- render: function ($row, compont) {
- var $compont = $('
');
- $row.append($compont);
- switch (compont.dataType) {
- case "company"://公司
- $compont.lrselect();
- break;
- case "department"://部门
- $compont.lrselect({
- type: 'department',
- needPre: compont.relation === '' ? false : true
- });
-
- organizeRegister1(compont);
- break;
- case "user"://用户
- $compont.lrselect({
- type: 'user',
- needPre: compont.relation === '' ? false : true
- });
- organizeRegister2(compont);
- break;
- }
- $compont = null;
- $row = null;
- return true;
- },
- get: function (compont, $container) {
- var res = {};
- var $compont = $container.find('#' + compont.id);
- res.isHad = $compont.length > 0 ? true : false;
- if (res.isHad) {
- res.value = $compont.lrselectGet();
- }
- $compont = null;
- return res;
- },
- set: function (compont, value, $container) {
- $container.find('#' + compont.id).lrselectSet(value);
- }
- },
- currentInfo: {
- render: function ($row, compont) {
- var $compont = $('
');
- var userinfo = learun.storage.get('userinfo');
- switch (compont.dataType) {
- case 'company':
- compont.value = userinfo.baseinfo.companyId;
- if (compont.isHide !== '1') {
- learun.clientdata.get('company', {
- key: compont.value,
- compont: compont,
- callback: function (item, _op) {
- if (!_op.compont.isEdit) {
- $(_op.compont.id).val(item.name);
- }
- }
- });
- }
- break;
- case 'department':
- compont.value = userinfo.baseinfo.departmentId;
- if (compont.isHide !== '1') {
- learun.clientdata.get('department', {
- key: compont.value,
- compont: compont,
- callback: function (item, _op) {
- if (!_op.compont.isEdit) {
- $(_op.compont.id).val(item.name);
- }
- }
- });
- }
- break;
- case 'user':
- $compont.val(userinfo.baseinfo.realName);
- compont.value = userinfo.baseinfo.userId;
- break;
- case 'time':
- compont.value = learun.date.format(new Date(), 'yyyy-MM-dd hh:mm:ss');
- $compont.val(compont.value);
- break;
- case 'guid':
- compont.value = learun.guid();
- $compont.val(compont.value);
- break;
- }
- if (compont.isHide === '1') {
- $compont = null;
- $row = null;
- return false;
- }
- else {
- $row.append($compont);
- $compont = null;
- $row = null;
- }
- return true;
- },
- get: function (compont, $container) {
- var res = {};
- var $compont = $container.find('#' + compont.id);
- res.isHad = $compont.length > 0 ? true : false;
- if (res.isHad) {
- res.value = compont.value;
- }
- $compont = null;
- return res;
- },
- set: function (compont, value, $container) {
- if (value) {
- var organization = learun.storage.get('organization');
- compont.isEdit = true;
- switch (compont.dataType) {
- case 'company':
- compont.value = value;
- if (compont.isHide !== '1') {
- learun.clientdata.get('company', {
- key: compont.value,
- compont: compont,
- callback: function (item, _op) {
- $container.find('#' + _op.compont.id).val(item.name || '');
- }
- });
- }
- break;
- case 'department':
- compont.value = value;
- if (compont.isHide !== '1') {
- learun.clientdata.get('department', {
- key: compont.value,
- compont: compont,
- callback: function (item, _op) {
- $container.find('#' + _op.compont.id).val(item.name || '');
- }
- });
- }
- break;
- case 'user':
- compont.value = value;
- if (compont.isHide !== '1') {
- learun.clientdata.get('user', {
- key: compont.value,
- compont: compont,
- callback: function (item, _op) {
- $container.find('#' + _op.compont.id).val(item.name || '');
- }
- });
- }
- break;
- case 'time':
- compont.value = value;
- if (compont.isHide !== '1') {
- $container.find('#' + compont.id).val(value);
- }
- break;
- case 'guid':
- compont.value = value;
- if (compont.isHide !== '1') {
- $container.find('#' + compont.id).val(value);
- }
- break;
- }
- }
- }
- },
- guid: {
- render: function ($row, compont) {
- compont.value = learun.guid();
- $row.remove();
- return false;
- },
- get: function (compont) {
- var res = {};
- res.isHad = true;
- res.value = compont.value;
- return res;
- },
- set: function (compont, value) {
- compont.value = value;
- }
- },
- upload: {
- render: function ($row, compont) {
- $row.addClass('lr-form-row-multi');
- var $compont = $('
');
- $row.append($compont);
- $compont.lrImagepicker();
- $compont = null;
- $row = null;
- return true;
- },
- get: function (compont, $container) {
- var res = {};
- var $compont = $container.find('#' + compont.id);
- res.isHad = $compont.length > 0 ? true : false;
- if (res.isHad) {
- res.value = $compont.imagepickerGet();
- }
- $compont = null;
- return res;
- },
- set: function (compont, value, $container) {
- $container.find('#' + compont.id).imagepickerSet(value);
- }
- },
- girdtable: {
- render: function ($row, compont) {
- var gridCompont = [];
- $.each(compont.fieldsData, function (_index, _item) {
- if (_item.field) {
- switch (_item.type) {
- case 'radio':
- case 'select':
- case 'checkbox':
- if (_item.dataSource === '0') {
- _item.code = _item.itemCode;
- _item.datatype = 'dataItem';
- }
- else {
- _item.code = _item.dataSourceId;
- _item.ivalue = _item.saveField;
- _item.itext = _item.showField;
- _item.datatype = 'sourceData';
- }
- break;
- case 'layer':
- if (_item.dataSource === '0') {
- _item.code = _item.itemCode;
- _item.datatype = 'dataItem';
- }
- else {
- _item.code = _item.dataSourceId;
- _item.datatype = 'sourceData';
- }
- break;
- }
-
-
- gridCompont.push(_item);
- }
- });
- $row.attr('id', compont.id);
- $row.lrgrid({
- title: compont.title,
- componts: gridCompont,
- isToLowerCase: true
- });
- $row = null;
- return true;
- },
- get: function (compont, $container) {
- var res = {};
- var $compont = $container.find('#' + compont.id);
- res.isHad = $compont.length > 0 ? true : false;
- if (res.isHad) {
- res.value = $compont.lrgridGet();
- }
- $compont = null;
- return res;
- },
- set: function (compont, value, $container) {
- $container.find('#' + compont.id).lrgridSet(value);
- }
- }
- };
-
-})(window.jQuery, window.lrmui, window);
-
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/scripts/weixinlogin.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/scripts/weixinlogin.js
index 3a453d948..25040bdd0 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/scripts/weixinlogin.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/scripts/weixinlogin.js
@@ -29,6 +29,7 @@
$(".login-content").show();
$("#accountopenid").val(res.data.openid);
$("#loginBtn").on("click", function () {
+ var up = true;
var account = $('#account').val();
var password = $('#password').val();
if (account === "") {
@@ -36,10 +37,15 @@
} else if (password === "") {
learun.layer.warning('密码不能为空!', function () { }, '提示', '关闭');
} else {
+ var reg = /^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*,\.])[0-9a-zA-Z!@#$%^&*,\.]{8,20}$/;
+ if (!reg.test(password)) {
+ up = false;
+ }
var data = {
username: account,
password: $.md5(password),
- openid: $("#accountopenid").val()
+ openid: $("#accountopenid").val(),
+ up: up
};
var postdata = {
token: '',
@@ -55,7 +61,6 @@
return;
}
if (res.code === 200) {
- console.log(res);
var logininfo = {
account: account,
token: res.data.baseinfo.token,
@@ -65,6 +70,12 @@
learun.storage.set('userinfo', res.data);
$('#account').val('');
$('#password').val('');
+ if (res.data.pwd === true) {
+ learun.storage.set('pwd', true);
+ learun.layer.warning("绑定失败!您的密码不满足强度要求,请您先修改密码后再执行系统其他操作");
+ } else {
+ learun.storage.set('pwd', false);
+ }
location.href = "http://" + window.location.host;
} else {
learun.layer.warning(res.info, function () { }, '提示', '关闭');
@@ -74,7 +85,6 @@
});
}
} else {
- console.log(res.info);
learun.layer.warning(res.info);
location.href = "http://" + window.location.host;
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/UserApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/UserApi.cs
index e4367664b..3ede02163 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/UserApi.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/UserApi.cs
@@ -5,6 +5,7 @@ using Learun.Util;
using Learun.Util.Operat;
using Nancy;
using System.Collections.Generic;
+using System.Configuration;
using System.Linq;
namespace Learun.Application.WebApi
@@ -33,7 +34,7 @@ namespace Learun.Application.WebApi
Get["/img"] = GetImg;
Get["/imgfordc"] = GetImgForDC;
Get["/saveMap"] = GetSaveClassMap;
-
+
}
private UserIBLL userIBLL = new UserBLL();
private PostIBLL postIBLL = new PostBLL();
@@ -41,7 +42,7 @@ namespace Learun.Application.WebApi
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
CdMajorIBLL majorIbll = new CdMajorBLL();
-
+
///
/// 登录接口
@@ -100,13 +101,18 @@ namespace Learun.Application.WebApi
res.userInfo.majorno = majorinfo.ID ?? "";
}
}
-
-
+ //是否强密码验证
+ bool pwd = false;
+ if (!string.IsNullOrEmpty(ConfigurationManager.AppSettings["verifypwd"]) && ConfigurationManager.AppSettings["verifypwd"] == "true" && loginModel.up == false)
+ {
+ pwd = true;
+ }
var jsonData = new
{
baseinfo = res.userInfo,
post = postIBLL.GetListByPostIds(res.userInfo.postIds),
- role = roleIBLL.GetListByRoleIds(res.userInfo.roleIds)
+ role = roleIBLL.GetListByRoleIds(res.userInfo.roleIds),
+ pwd= pwd
};
return Success(jsonData);
}
@@ -365,6 +371,11 @@ namespace Learun.Application.WebApi
/// 密码
///
public string password { get; set; }
+ ///
+ /// 是否强密码
+ ///
+ public bool up { get; set; }
+
///
/// 设备号
///
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 831876e87..ee3d82139 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WeixinApi.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/WeixinApi.cs
@@ -204,10 +204,6 @@ namespace Learun.Application.WebApi.Modules
logEntity.F_ExecuteResult = 1;
logEntity.F_ExecuteResultJson = "登录成功";
logEntity.WriteLog();
-
- //保存用户设备号
- userIbll.UpdateWeixinOpenId(userEntity.F_UserId, loginModel.openid);
-
OperatorResult res = OperatorHelper.Instance.IsOnLine(token, req.loginMark);
res.userInfo.password = null;
res.userInfo.secretkey = null;
@@ -222,13 +218,23 @@ namespace Learun.Application.WebApi.Modules
}
}
-
-
+ //是否强密码验证
+ 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)
+ role = roleIBLL.GetListByRoleIds(res.userInfo.roleIds),
+ pwd = pwd
};
return Success(jsonData);
}
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 82bb88321..96db78846 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config
@@ -96,6 +96,8 @@
+
+
\ No newline at end of file