42 Commits (01adc65b74fe0c948c56e2d13915cd46770d212d)

Autore SHA1 Messaggio Data
  XMTT 84cebf3dc1 文章接口变动 6 anni fa
  luyanan 2f79c8fb34 定时发布时间选取 6 anni fa
  luyanan d06be80644 时间插件改中文 6 anni fa
  li 9acc2fc6a3 文章 6 anni fa
  luyanan 51d486a199 删除之前废弃咨询模块 6 anni fa
  luyanan 670710ea8b 关键词录入回车问题 7 anni fa
  luyanan 7e71b5b178 Merge branch 'test' 7 anni fa
  luyanan cdf64d71dd 统一更改添加关键词的enter事件 7 anni fa
  luyanan f3e2206efb Merge remote-tracking branch 'origin/dev' 7 anni fa
  luyanan 16487fa789 需求列表以及搜索 7 anni fa
  luyanan 239afcf80e Merge remote-tracking branch 'origin/test' 7 anni fa
  jack 84fd232acc 文章资源解决网速慢点击预览出现多个文章的问题 7 anni fa
  luyanan 0a8119c39f 发布的时候改写栏目值,搜索关键词跳转搜索 7 anni fa
  jack c61a71072c 关键词修改 7 anni fa
  jack ec4be0e53a Merge remote-tracking branch 'origin/test' 7 anni fa
  luyanan bef5944f3d 修改文章时定时发布显示的默认时间 7 anni fa
  luyanan 6b0b9ce8b0 检索资源修改 7 anni fa
  luyanan be6b713cf3 修改1.9.1 bug 7 anni fa
  luyanan da684516ff 1.9.0版本相关bug 7 anni fa
  jack c4f7a6f6b9 Merge remote-tracking branch 'origin/test' 7 anni fa
  jack 97c47450e4 文章修改 7 anni fa
  jack d8da3fe28a 11 7 anni fa
  jack ea5fb8c156 定时发布加上两位字符 7 anni fa
  jack d7cdb37237 11 7 anni fa
  xuchuntyang 9c0cf57e1a 关键词修改 7 anni fa
  happy ec4a08607f 文章修改 7 anni fa
  xuchunyang 17c6d74f74 个人用户为登录跳转登录页面 7 anni fa
  luyanan 611c60b5da 文章发布修改的关键词搜索 7 anni fa
  luyanan 3ee04055b6 企业文章 7 anni fa
  jack 7ea37144bc 文章 7 anni fa
  luyanan cdc4a8bc0d 文章发布修改关键词列表显示隐藏 7 anni fa
  jack fc18a7e5b6 文章修改 7 anni fa
  luyanan 5c058fe202 显示时间规则,相关资源文章专家有数据显示无数据隐藏 7 anni fa
  xuchunyang 33c10e072b 文章,添加修改相关资源增加了企业资源 7 anni fa
  xuchunyang 1528a2a6ad 文章修改 7 anni fa
  luyanan 521e811fd1 个人信息展示时居中显示信息 7 anni fa
  xuchunyang 1e1857d6d0 文章修改 7 anni fa
  luyanan 825d36fbd8 个人版修改文章 7 anni fa
  happy 32de5baee0 文章详情页面 7 anni fa
  xuchunyang 8ba1cfbc67 新文章功能 7 anni fa
  happy f062e7709e Merge branch 'dev' of http://121.42.53.174:3000/jiapeng/portal-front.git 7 anni fa
  xuchunyang 0583012266 新文章功能 7 anni fa
ekexiu.app - Gogs: Go Git Service

Nav apraksta

studentUpdate1.js 6.1KB

    mui.ready(function() { mui.plusReady(function() { var userid = plus.storage.getItem('userid'); var ws = plus.webview.currentWebview(); var str = JSON.stringify(ws); var oDt = document.getElementsByClassName("frmtype"); var dataProvince = document.getElementById("data-province"); var dataAddress = document.getElementById("data-address"); var oAddress = document.getElementById("addressa") var telePhone = document.getElementById("telePhone"); var mail = document.getElementById("mail"); var authu = document.getElementsByClassName("authu"); var authStatus; var name; var org; function personalMessage() { mui.ajax(baseUrl + "/ajax/professor/info/" + userid, { dataType: 'json', //数据格式类型 type: 'GET', //http请求类型 timeout: 10000, //超时设置 success: function(data) { plus.nativeUI.closeWaiting();; //新webview的载入完毕后关闭等待框 ws.show("slide-in-right", 150); var $data = data.data; if($data.authStatus == 0) { authu[0].innerText = "未认证" } else if($data.authStatus == 1) { authu[0].innerText = "已认证" } authStatus = $data.authStatus; name = $data.name; org = $data.orgName; //学术领域 oDt[0].value = $data.name oDt[1].value = $data.orgName; oDt[2].value = $data.department; oAddress.innerText = $data.province + " " + $data.address; dataProvince.value = $data.province; dataAddress.value = $data.address; if($data.email) { mail.value = $data.email } if($data.phone) { telePhone.value = $data.phone } }, error: function() { plus.nativeUI.toast("服务器链接超时", toastStyle); return; } }); } function trim(str) { //删除左右两端的空格    return str.replace(/(^\s*)|(\s*$)/g, "");   } oDt[0].addEventListener("focus", function() { if(authStatus == 1) { plus.nativeUI.toast("修改姓名后,身份认证失效,需重新认证"); } else { var length = trim(oDt[0].value); if(!length) plus.nativeUI.toast("姓名不能为空"); } }); oDt[1].addEventListener("focus", function() { if(authStatus == 1) { plus.nativeUI.toast("修改所在高校后,身份认证失效,需重新认证"); } else { var length = trim(oDt[1].value); if(!length) plus.nativeUI.toast("所在高校不能为空"); } }); /*选择地址*/ var cityPicker = new mui.PopPicker({ layer: 2 }); cityPicker.setData(cityData); var showCityPickerButton = document.getElementById('showCityPicker'); showCityPickerButton.addEventListener('tap', function(event) { cityPicker.show(function(items) { oAddress.innerText = items[0].text + " " + items[1].text; dataProvince.value = items[0].text; dataAddress.value = items[1].text; //返回 false 可以阻止选择框的关闭 //return false; }); }, false); //更新认证状态函数 var upStatus = function() { mui.ajax(baseUrl + "/ajax/professor/authStatus", { dataType: 'json', //数据格式类型 type: 'post', //http请求类型 data: { authStatus: 0, id: userid }, timeout: 10000, //超时设置 success: function(data) { if(data.success) { }else{ } } }) } function savePro() { var mess = {}; mess.name = oDt[0].value; mess.orgName = oDt[1].value; mess.department = oDt[2].value; mess.province = dataProvince.value; mess.address = dataAddress.value; mess.email = trim(mail.value); mess.phone = trim(telePhone.value); mess.id = userid; var mess1 = JSON.stringify(mess); $.ajax({ "url": baseUrl + '/ajax/professor', "type": "PUT", "async": true, "data": mess1, "contentType": "application/json", "success": function(data) { if(data.success) { plus.nativeUI.showWaiting(); var web = plus.webview.getWebviewById("html/studentUpdata.html"); mui.fire(web, "newId"); mui.back(); var web3 = plus.webview.getWebviewById("html/myaccount.html"); mui.fire(web3, "photoUser"); } else { plus.nativeUI.toast("服务器链接超时", toastStyle); return; } } }); } /*校验手机号*/ function phoneVal() { var hunPhone = /^1[3|4|5|7|8]\d{9}$/; if(!hunPhone.test(trim(telePhone.value))) { plus.nativeUI.toast("请输入正确的手机号码", toastStyle); return 0; } } telePhone.addEventListener("blur", function() { phoneVal() }) /*校验用户账号*/ function userEmail() { var gunf = /^\w+@\w+\.((cn)|(com)|(com\.cn))$/; if(!gunf.test(trim(mail.value))) { plus.nativeUI.toast("请输入正确的邮箱", toastStyle); return 0; } } mail.addEventListener("blur", function() { userEmail(); }) var save = function() { if(trim(telePhone.value)) { var t = phoneVal(); if(t == 0) { return; } } if(trim(mail.value)) { var mt = userEmail(); if(mt == 0) { return; } } var length1 = trim(oDt[0].value); var length2 = trim(oDt[1].value); if(length1 && length2) { plus.nativeUI.showWaiting(); savePro(); } else if(!length1 && length2) { plus.nativeUI.toast("姓名不能为空"); } else if(length1 && !length2) { plus.nativeUI.toast("所在高校不能为空"); } else if(!length1 && !length2) { plus.nativeUI.toast("姓名不能为空&&所在高校不能为空"); } } document.getElementsByClassName("topsave")[0].addEventListener("click", function() { if(authStatus == 1 && (name != oDt[0].value || org != oDt[1].value)) { plus.nativeUI.confirm("确认修改?", function(e) { if(e.index == 0) { upStatus(); save(); } }, "修改姓名或所在高校后,身份认证失效,需重新认证", ["确认", "取消"]); } else { save(); } }); personalMessage(); }); })