feat 增加定位权限

This commit is contained in:
Ironsp
2026-09-12 16:28:37 +08:00
parent 8d97b532ea
commit 6d3e975f49
4 changed files with 511 additions and 3 deletions

View File

@@ -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">