File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -535,24 +535,28 @@ module openflow {
535535 console . error ( error ) ;
536536 }
537537 }
538- async QRScannerHit ( err , contents ) {
538+ async QRScannerHit ( err , value ) {
539539 try {
540540 console . log ( "QRScannerHit" ) ;
541541 if ( err ) {
542542 // console.error(err._message);
543543 console . error ( err ) ;
544544 return ;
545545 }
546- console . log ( contents ) ;
546+ console . log ( value ) ;
547547 QRScanner . hide ( ) ;
548548 QRScanner . destroy ( ) ;
549549
550- console . log ( "set mobiledomain to " + contents ) ;
551- await this . writefile ( "mobiledomain.txt" , contents ) ;
552- window . location . replace ( "https://" + contents ) ;
550+ console . log ( "set mobiledomain to " + value ) ;
551+ await this . writefile ( "mobiledomain.txt" , value ) ;
553552
554553 this . scanning = false ;
555554 if ( ! this . $scope . $$phase ) { this . $scope . $apply ( ) ; }
555+ if ( value !== null && value !== undefined && value !== "" ) {
556+ console . log ( value ) ;
557+ var config = JSON . parse ( value ) ;
558+ window . location . replace ( config . url ) ;
559+ }
556560 } catch ( error ) {
557561 console . error ( "Error QRScannerHit" ) ;
558562 console . error ( error ) ;
Original file line number Diff line number Diff line change 1- 0.0.152
1+ 0.0.153
You can’t perform that action at this time.
0 commit comments