| @@ -2,6 +2,7 @@ | |||
| * 获取用户、登录、注册相关 | |||
| -----------------*/ | |||
| var captchaImage_get = '/captchaImage'; //图形验证码接口 | |||
| var getSmsCode = '/sms/code'; //手机验证码接口 | |||
| var login_post = '/login'; //用户登录接口 | |||
| var getInfo_get = '/getInfo' //获取用户信息 | |||
| @@ -340,10 +340,10 @@ define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, templa | |||
| //标的物类型 | |||
| module.deptType = function (data) { | |||
| if (data.code == 200) { | |||
| var content = [] ; | |||
| for (var i = 0 ; i < 4 ; i++){ | |||
| content[i] = data.data[i]; | |||
| } | |||
| var content = data.data ; | |||
| // for (var i = 0 ; i < 4 ; i++){ | |||
| // content[i] = data.data[i]; | |||
| // } | |||
| module.data.deptTypeList = content; | |||
| var deptTypeData = template('deptTypeData', module.data); | |||
| $("#deptTypeContent").html(deptTypeData); | |||
| @@ -391,7 +391,23 @@ define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, templa | |||
| if (data.code == 200) { | |||
| module.data.serverApi = serverApi; | |||
| var content = data.data; | |||
| module.data.landListList = content; | |||
| for (let i = 0 ; i < 5 ; i++){ | |||
| if (content[i]==undefined){ | |||
| module.data.landListList.push({ | |||
| projectShowStatus:'', | |||
| projectName :'', | |||
| price :'', | |||
| unit :'', | |||
| outName :'', | |||
| signupStopTime :'', | |||
| biddingStopTime :'', | |||
| locationName:'', | |||
| }); | |||
| }else{ | |||
| module.data.landListList.push(content[i]); | |||
| } | |||
| } | |||
| // module.data.landListList = content; | |||
| var landListData = template('landListData', module.data); | |||
| $("#landListContent").html(landListData); | |||
| } | |||
| @@ -458,6 +474,7 @@ define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, templa | |||
| //土地林地四荒地 | |||
| goListingChange = function (id) { | |||
| module.data.landListList = []; | |||
| $('#deptTypeContent').children('span').removeClass('active') ; | |||
| document.getElementById('tab'+id).className = 'm-r-20 active'; | |||
| if (id == 0){ | |||
| @@ -470,7 +487,8 @@ define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, templa | |||
| //土地林地四荒地 | |||
| goListingChanges = function (id) { | |||
| $('#deptTypeContent1').children('span').removeClass('active') ; | |||
| module.data.collectiveAssetsList = []; | |||
| $('#deptTypeContent1').children('span').removeClass('active'); | |||
| document.getElementById('tabs'+id).className = 'm-r-20 active'; | |||
| tools.doGet(needProjectList, {projectNumber:id==0?'':id,pageSize:'5',pageNum:'1'}, module.itemLists, true); | |||
| } | |||
| @@ -6,7 +6,9 @@ | |||
| define(['jquery', "Tools","user"], function ($, Tools) { | |||
| //数据存储 | |||
| var module = { | |||
| uuid: '' //验证码uuid | |||
| uuid: '', //验证码uuid | |||
| computeTime:60, | |||
| timer:null | |||
| }; | |||
| //自定义公共方法 | |||
| var tools = new Tools(); | |||
| @@ -17,8 +19,14 @@ define(['jquery', "Tools","user"], function ($, Tools) { | |||
| $('#login-submit').on('click', module.login) | |||
| //点击图形验证码 | |||
| $('#graphicImg').on('click', module.verificationCode) | |||
| //点击图形验证码 | |||
| $('#mobileGraphicImg').on('click', module.verificationCode1) | |||
| //点击发送验证码 | |||
| $('#getSmsCode').on('click', module.getSmsCode) | |||
| //图形验证码加载 | |||
| module.verificationCode() | |||
| //图形验证码加载 | |||
| module.verificationCode1() | |||
| //背景高度 | |||
| module.register() | |||
| //网站配置信息(网站名称 底部联系方式 公安备案号 网站备案号) | |||
| @@ -31,6 +39,24 @@ define(['jquery', "Tools","user"], function ($, Tools) { | |||
| }; | |||
| }; | |||
| module.getSmsCode = function () { | |||
| var mobile = $('#mobile').val(); | |||
| tools.doPost(getSmsCode, {mobile:mobile,code:$('#mobileCode').val(),uuid:module.uuid}, module.getSmsCodeAjax, true) | |||
| } | |||
| module.getSmsCodeAjax = function (data) { | |||
| module.uuid = data.uuid; | |||
| module.computeTime = 60; | |||
| module.timer = setInterval(() => { | |||
| module.computeTime--; | |||
| document.getElementById('getSmsCode').value = module.computeTime; | |||
| if (module.computeTime <= 0) { | |||
| clearInterval(module.timer); | |||
| document.getElementById('getSmsCode').value = '发送验证码'; | |||
| } | |||
| }, 1000); | |||
| } | |||
| //底部友情链接 | |||
| module.bottomFriendsLinks = function (data) { | |||
| if (data.code == 200) { | |||
| @@ -47,6 +73,11 @@ define(['jquery', "Tools","user"], function ($, Tools) { | |||
| document.getElementById('loginTab').style.display = 'none' | |||
| document.getElementById('phoneTab').style.display = 'none' | |||
| document.getElementById(type+'Tab').style.display = 'block' | |||
| $('#loginBtn').attr('class','') | |||
| $('#phoneBtn').attr('class','') | |||
| $('#'+type+'Btn').attr('class','active') | |||
| } | |||
| //背景高度 | |||
| module.register = function(){ | |||
| @@ -62,6 +93,17 @@ define(['jquery', "Tools","user"], function ($, Tools) { | |||
| module.uuid = data.uuid; | |||
| } | |||
| } | |||
| //图形验证码 | |||
| module.verificationCode1 = function () { | |||
| tools.doGet(captchaImage_get, {}, module.verificationAjax1, true) | |||
| } | |||
| module.verificationAjax1 = function (data) { | |||
| if (data.code == 200) { | |||
| $('#mobileGraphicImg').attr('src', 'data:image/gif;base64,' + data.img) | |||
| module.uuid = data.uuid; | |||
| } | |||
| } | |||
| //用户登录 | |||
| module.login = function () { | |||
| if (module.check()) { | |||
| @@ -54,7 +54,7 @@ | |||
| </div> | |||
| </div> | |||
| <!--LOGO search --> | |||
| <div class="logoSearch w-1200"> | |||
| <div style="height: calc(100vh - (100vh - 112px));" class="logoSearch w-1200"> | |||
| <div class="wid50 logoSearch-div fl"> | |||
| <div class="logo" onclick="goIndex()"></div> | |||
| <h1 class="fl" id="webConfigName" onclick="goIndex()"></h1> | |||
| @@ -134,17 +134,17 @@ | |||
| <table id="phoneTab" style="display: none;"> | |||
| <tr> | |||
| <td width="25%">手机号码</td> | |||
| <td colspan="2"><input type="text" placeholder="请输入手机号"/></td> | |||
| <td colspan="2"><input type="text" placeholder="请输入手机号" id="mobile"/></td> | |||
| </tr> | |||
| <tr> | |||
| <td>验<i style="margin-left: 0.5em;"></i>证<i style="margin-left: 0.5em;"></i>码</td> | |||
| <td width="40%"><input type="text" placeholder="请输入验证码"/></td> | |||
| <td><input type="button" value="发送验证码" class="fsYzm"/></td> | |||
| <td>图形验证</td> | |||
| <td><input type="text" placeholder="请输入验证码" id="mobileCode"/></td> | |||
| <td><img id="mobileGraphicImg" alt=""/></td> | |||
| </tr> | |||
| <tr> | |||
| <td>图形验证</td> | |||
| <td><input type="text"/></td> | |||
| <td><img src="../../static/images/banner.jpg" alt=""/></td> | |||
| <td>验<i style="margin-left: 0.5em;"></i>证<i style="margin-left: 0.5em;"></i>码</td> | |||
| <td width="40%"><input type="text" placeholder="请输入验证码" id="smsCode"/></td> | |||
| <td><input type="button" value="发送验证码" class="fsYzm" id="getSmsCode"/></td> | |||
| </tr> | |||
| </table> | |||
| <div class="remberPsw"> | |||