提交 e6bc0112 authored 作者: blu's avatar blu

new feature: evwifi

上级 6a1cc314
......@@ -61,6 +61,7 @@
<script>
import axios from "axios";
const apiHost = 'http://192.168.0.1';
export default {
async mounted() {
try {
......@@ -73,14 +74,14 @@ export default {
data() {
return {
connectWifi: async e => {
let response = await axios.get(`http://192.168.1.104/wifi?mode=2&ssid=${this.ssid}&password=${this.password}`);
let response = await axios.get(`${apiHost}/wifi?mode=2&ssid=${this.ssid}&password=${this.password}`);
return response;
},
getWifiData: async e => {
this.bInScan = true;
let param = e ? "true" : "false";
let response = await axios.get(
`http://192.168.1.104/wifi?scan=${param}`
`${apiHost}/wifi?scan=${param}`
);
this.wifiData = response.data.wifiData;
this.ssids = Array.from(new Set(this.wifiData.wifi.ssids))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论