-
-
Save Hawksbillcat/2afeb39549339bfe5b5c3da4af430a3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.get_romig_24g=function(){ | |
$scope.handle().then(function(res){ | |
console.log("$scope.ip[0] "+ $scope.ip[0]) | |
console.log("res "+res) | |
let url= "http://"+res+"/boafrm/formWlanRedirect?redirect-url=/wladvanced.htm&wlan_id=1" | |
return url | |
},function(err){ | |
console.log(err) | |
err=err+"no ip" | |
return err | |
}).then(function(url){ | |
return new Promise(function(resolve,reject){ | |
$scope.ReadWeb_promise(url).then(function(text){//這樣? | |
resolve(text) | |
// console.log(text) | |
var G24_r1 = $scope.GetTokenFromText(text,"var dot11k_enable = ",";"); | |
var G24_r2 = $scope.GetTokenFromText(text,"var IEEE80211r_enable = ",";"); | |
var G24_r3 = $scope.GetTokenFromText(text,"var IEEE80211v_enable = ",";"); | |
//alert("G24_r1 G24_r2 G24_r3 "+G24_r1 +G24_r2 +G24_r3 ) | |
if ( G24_r1 == 1 && G24_r2 == 1 && G24_r3 == 1){ | |
$scope.Status["G24_r1"]=1; | |
$scope.Status["G24_roming_enable"]=true; | |
console.log($scope.Status["G24_roming_enable"]+" 這是g24的roming promise") | |
} | |
else{ | |
$scope.Status["G24_r1"]=0; | |
$scope.Status["G24_roming_enable"]=false; | |
console.log($scope.Status["G24_roming_enable"]+" 這是g24的roming promise") | |
} | |
return text; | |
}) | |
}) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment