diff --git a/fangija-zsyf/js/login/codeSms.js b/fangija-zsyf/js/login/codeSms.js index b994a94..7fccf62 100644 --- a/fangija-zsyf/js/login/codeSms.js +++ b/fangija-zsyf/js/login/codeSms.js @@ -78,6 +78,7 @@ $("#login_btn").on("click", function () { var token = resData.data; localStorage.setItem("user_token", token); $.toast(resData.message); + back(); } else { $.toast(resData.message); } diff --git a/fangija-zsyf/views/news/newsDetail.html b/fangija-zsyf/views/news/newsDetail.html index e47913b..66a0bfd 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -473,10 +473,21 @@ $(".praise").on("click", function () { //收藏 $(".collection").on("click", function () { + //doCollect(); collect(); }); - +function doCollect() { + if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { + clicked('../user/codeSms.html',true,false,{},{},function(){ + doCollect(); + }) + return; + } else { + collect(); + } +} function collect(){ + axios.post("/rest/news/collect",{newsId : id}).then(function (response) { var msg = response.data.message diff --git a/fangija-zsyf/views/user/codeSms.html b/fangija-zsyf/views/user/codeSms.html index dd132a4..5476d8a 100644 --- a/fangija-zsyf/views/user/codeSms.html +++ b/fangija-zsyf/views/user/codeSms.html @@ -64,7 +64,7 @@
diff --git a/fangija-zsyf/views/user/passLogin.html b/fangija-zsyf/views/user/passLogin.html index 99897ad..6278e5f 100644 --- a/fangija-zsyf/views/user/passLogin.html +++ b/fangija-zsyf/views/user/passLogin.html @@ -59,7 +59,7 @@
@@ -151,10 +151,6 @@ new Vue({ $(".list-block .item-after .icon-eye-orange").hide(); $(".list-block .item-after .icon-eye-grey").show(); $("#input_password").attr("type","password"); - }, - // 打开验证码登录页面 - openSmsLoginPage: function() { - back(),plus.nativeUI.closeWaiting(); } } });