feat 增加定位权限
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import wifi from '@/utils/wifi'
|
||||
|
||||
const wifiEnabled = ref(true)
|
||||
|
||||
const networks = ref([
|
||||
@@ -14,6 +16,12 @@ function handleDisconnect(name: string) {
|
||||
function handleConnect(name: string) {
|
||||
console.log('连接', name)
|
||||
}
|
||||
|
||||
async function handleRefreshWifi() {
|
||||
console.log('点击了搜索WiFi')
|
||||
const result = await wifi.scanWifi()
|
||||
console.log('扫描到的WiFi:', result)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -42,7 +50,7 @@ function handleConnect(name: string) {
|
||||
<text class="card-title">
|
||||
可用网络
|
||||
</text>
|
||||
<wd-icon name="refresh" size="20px" class="refresh-icon" />
|
||||
<wd-icon name="refresh" size="20px" class="refresh-icon" @click="handleRefreshWifi" />
|
||||
</view>
|
||||
<view class="network-list">
|
||||
<view v-for="(network, index) in networks" :key="index" class="network-item">
|
||||
|
||||
Reference in New Issue
Block a user