From 5b0e9768812322637e4e20e250177c7658ea4387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E6=AC=A2?= Date: Fri, 30 Mar 2018 16:29:48 +0800 Subject: [PATCH 1/2] commit --- fangija-zsyf/js/login/codeSms.js | 1 + fangija-zsyf/views/news/newsDetail.html | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) 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 a7884c1..5e65366 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -472,10 +472,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 From 617779b8e4e6f5536b94f51457542f3a00c97dfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E6=AC=A2?= Date: Fri, 30 Mar 2018 16:32:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/user/codeSms.html | 2 +- fangija-zsyf/views/user/passLogin.html | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) 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(); } } });