Mike %!s(int64=9) %!d(string=hai) anos
pai
achega
ae20b508dc
Modificáronse 2 ficheiros con 6 adicións e 2 borrados
  1. 1 1
      wl/config.xml
  2. 5 1
      wl/www/js/config/router.js

+ 1 - 1
wl/config.xml

xqd
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<widget id="com.uhisport.football" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+<widget id="net.yihankeji.demo" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
   <name>掌上物流网</name>
   <description>
         An Ionic Framework and Cordova project.

+ 5 - 1
wl/www/js/config/router.js

xqd
@@ -213,6 +213,10 @@
                 }
             }
         })
-        $urlRouterProvider.otherwise('/wl/home');
+        if(localStorage['user']){
+            $urlRouterProvider.otherwise('/wl/home');
+        }else{
+            $urlRouterProvider.otherwise('/account/login');
+        }
     }]);
 })(angular.module('app'));