File tree Expand file tree Collapse file tree 1 file changed +21
-16
lines changed Expand file tree Collapse file tree 1 file changed +21
-16
lines changed Original file line number Diff line number Diff line change 2727 <!-- </div>-->
2828 <div class =" form-group" >
2929 <input type =" username" name =" username" id =" username" class =" form-control input-lg"
30- value =" qxl1231 "
30+ value =" "
3131 placeholder =" username " >
3232 </div >
3333 <div class =" form-group" >
3434 <input type =" password" name =" password" id =" password" class =" form-control input-lg"
35- placeholder =" Password" value =" 1231 " >
35+ placeholder =" Password" value =" " >
3636 </div >
3737 <!-- <span class="button-checkbox">-->
3838 <!-- <button type="button" class="btn" data-color="info">Remember Me</button>-->
128128 module .exports = {
129129
130130 http: {
131- root: ' /api'
131+ root: ' /api/v1 '
132132 },
133133 data : function () {
134134 return {
135135 user: {
136136 usename: " " ,
137137 email: " " ,
138- pwd: " "
138+ pwd: " " ,
139+ access_token: " "
139140 }
140141 }
141142 },
142143 methods: {
143144 login : function () {
145+ var self = this ;
146+
144147 var username = $ (' #username' ).val ();
145148 var password = $ (' #password' ).val ();
146149// console.log(username + password)
147150
148151 var settings = {
149152 " async" : true ,
150153 " crossDomain" : true ,
151- " url" : " /api/Users/login" ,
154+ " url" : " /api/v1/ Users/login" ,
152155 " method" : " POST" ,
153156 " headers" : {
154157 " content-type" : " application/json" ,
161164 }
162165
163166 $ .ajax (settings).done (function (response ) {
164- self .user = response;
165- if (response && response .userId ) {
166- $ (" fieldset" ).hide ();
167- $ (" .table" ).show ();
168- $ (" #selectid" ).show ();
169-
170- $ (" button" ).show ();
171-
167+ // self.user = response;
168+ console .log (self );
169+ if (response && response .userId && response .id ) {
170+ localStorage .setItem (' access_token' ,response .id );
171+ // $("fieldset").hide();
172+ // $(".table").show();
173+ // $("#selectid").show();
174+ // $("button").show();
175+ // self.$route.router.go('/appversion');
176+ self .$route .router .go (' /select' );
172177 }
173178
174179 }).error (function (err ) {
175- $ (" fieldset" ).show ();
176- $ (" .alert" ).show ();
180+ // $("fieldset").show();
181+ // $(".alert").show();
177182 });
178183 }
179184 }
180185 }
181186
182- </script >
187+ </script >
You can’t perform that action at this time.
0 commit comments