diff --git a/fangija-zsyf/config.js b/fangija-zsyf/config.js index 375fa77..4d0b28f 100644 --- a/fangija-zsyf/config.js +++ b/fangija-zsyf/config.js @@ -3,6 +3,6 @@ //var BASE_PATH = "http://192.168.10.47:8086"; var BASE_PATH = "http://192.168.10.161:8086"; //var BASE_PATH = "http://192.168.10.53:8084"; -var BASE_PATH = "http://192.168.10.170:8084"; +var BASE_PATH = "http://192.168.10.171:8084"; /**是否显示过启动页面**/ var lauchFlag = false; \ No newline at end of file diff --git a/fangija-zsyf/js/login/codeSms.js b/fangija-zsyf/js/login/codeSms.js index 2d3743a..3258408 100644 --- a/fangija-zsyf/js/login/codeSms.js +++ b/fangija-zsyf/js/login/codeSms.js @@ -1,16 +1,80 @@ -export default { - methods: { - checkPhoneNum (phone) { - alert("1111111111111") - } - } -} var sendPhoneCode = new Vue({ el:'#sendPhoneCode', methods:{ - sendCode:function(){ - alert("222222222") - checkPhoneNum("1352222222") - } } -}) \ No newline at end of file +}) + +function sendCode(){ + var mobile = $("#input_phoneNumber").val(); + if(checkPhoneNum(mobile)){ + timer.start(); + axios.post("/rest/user/sendMobileCode", {mobile: mobile}) + .then(function (response) { + var data = response.data + if(data.code==200){ + $.toast("短信验证码发送成功,请注意查收!") + }else{ + $.toast("验证码发送失败") + timer.cancel() + } + }) + } +} +function checkPhoneNum(phone){ + var reg=11&& /^((13|14|15|17|18)[0-9]{1}\d{8})$/; + if(phone==''){ + $.toast("请输入手机号码"); + return false; + }else if(!reg.test(phone)){ + $.toast("手机格式不正确"); + return false; + }else{ + return true; + } +} +//验证码倒计时 +timer = { + countdown:60, + start:function(){ + countdown = 60 + $(".sendCode").hide() + $(".waiting").empty().append(countdown + " s").show() + timer.down() + }, + down:function(){ + countdown -- + $(".waiting").empty().append(countdown + " s") + if(countdown <= 0){ + $(".sendCode").show() + $(".waiting").hide() + }else{ + setTimeout(timer.down, 1000) + } + }, + cancel:function(){ + countdown = 0 + } + } + +/* 错误提示-快捷登录 */ +$("#login_btn").on("click", function () { + var phoneNum = $("#input_phoneNumber").val(); + var code = $("#input_codeSms").val(); + var protocal = $(".check").find(".checkImg").css("display"); + if(phoneNum == ""){ + $.toast("请输入手机号码"); + return false; + } + if(code == ""){ + $.toast("请输入验证码"); + return false; + } + if(protocal != "block"){ + $.toast("请同意服务协议"); + return false; + } + axios.post("/rest/user/sendMobileCode", {mobile: mobile}) + .then(function (response) { + + }) +}); diff --git a/fangija-zsyf/views/evaluate/evaluateReport.html b/fangija-zsyf/views/evaluate/evaluateReport.html index 7613e72..d526626 100644 --- a/fangija-zsyf/views/evaluate/evaluateReport.html +++ b/fangija-zsyf/views/evaluate/evaluateReport.html @@ -16,6 +16,9 @@ @@ -82,8 +85,8 @@

您的反馈很重要,是我们努力的动力

-
高了
-
低了
+
高了
+
低了
@@ -174,11 +177,15 @@ $.config = {router: false} }, methods:{ - feedback:function(i){ - axios.post("/rest/evaluate/feedBack",{params:{ - hid:hid, - reason:i - }}).then(function(response){ + feedback:function(i,event){ + if($(event.target).hasClass("theme")){ + return; + } + return; + axios.post("/rest/evaluate/feedBack",{ + hid:hid, + reason:i + }).then(function(response){ }).catch(function(error){console.log(error)}) } diff --git a/fangija-zsyf/views/news/newsDetail.html b/fangija-zsyf/views/news/newsDetail.html index 8b785d2..a7884c1 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -28,6 +28,7 @@ + @@ -106,6 +107,7 @@ $.config = {router: false} + @@ -537,6 +539,16 @@ function addComment(){ }); } +mui.init({ + beforeback: function() { +     //获得父页面的webview + var list = plus.webview.getWebviewById('yfindex.html'); +     //触发父页面的自定义事件(refresh),从而进行刷新 + mui.fire(list, 'refresh'); + //返回true,继续页面关闭逻辑 + return true; + } +}); \ No newline at end of file diff --git a/fangija-zsyf/views/login/codeSms.html b/fangija-zsyf/views/user/codeSms.html similarity index 89% rename from fangija-zsyf/views/login/codeSms.html rename to fangija-zsyf/views/user/codeSms.html index f8d4d9e..8815ac2 100644 --- a/fangija-zsyf/views/login/codeSms.html +++ b/fangija-zsyf/views/user/codeSms.html @@ -37,7 +37,7 @@
@@ -92,15 +92,14 @@ $.config = {router: false} + + + diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index dc80aa0..6c6500d 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -2537,6 +2537,10 @@ function openNewsView(newId) { $("#visitCount_"+newId).text(count+'人'); } +window.addEventListener('refresh', function(e){//执行刷新 + alert("aa"); +}); +