kwonghinho 7 роки тому
батько
коміт
81346a45e6
1 змінених файлів з 12 додано та 1 видалено
  1. 12 1
      wx.demo.ywtinfo.com/js/asset/base.min.js

+ 12 - 1
wx.demo.ywtinfo.com/js/asset/base.min.js

@@ -647,7 +647,11 @@
                 if (this.options.current == this.options.idx[s]) {
                     v += " current"
                 }
-                t += '<li class="count' + v + '"><a><i class="' + this.options.icons[this.options.idx[s]] + '"></i><span>' + this.options.titles[this.options.idx[s]] + "</span></a></li>"
+                if(this.options.titles[this.options.idx[s]]=='门诊服务'){
+                    t += '<li class="count' + v + '"><a><i class="' + this.options.icons[this.options.idx[s]] + '"></i><span>' + this.options.titles[this.options.idx[s]] + "</span></a></li>"
+                }else{
+                    t += '<li class="count' + v + '"><a class="needlogin"><i class="' + this.options.icons[this.options.idx[s]] + '"></i><span>' + this.options.titles[this.options.idx[s]] + "</span></a></li>"
+                }
             }
             t += "</ul></div>";
             this.el.html(t);
@@ -655,6 +659,13 @@
         }, _addEvent: function () {
             var s = this;
             this.el.find(".listNav li").bind("tap", function () {
+                var token = window.hzAPI.getToken().token;//token
+                //判断token是否存在
+                if(!token){
+                    window.location.href = 'login.html';
+                    e.preventDefault();
+                    return false;
+                }
                 var t = 0;
                 if (h(this).find("i").hasClass("*.home")) {
                     t = 1