// succ.wxml <view>WIFI ssid:{{wifissid}}</view> <view>WIFI bssid:{{wifiBssid}}</view> // succ.js var app = getApp() Page({ data: { wifissid: ‘‘, // WIFI ssid wifiBssid: ‘‘ // WIFI bssid }, onLoad: function (e) { // 获取参数 var that = this; wx.getConnectedWifi({ success: function(e){ that.setData({ wifissid: e.wifi.SSID, wifiBssid: e.wifi.BSSID }) } }) } })
原文地址:https://www.cnblogs.com/aaronthon/p/11673471.html
时间: 2024-11-10 07:47:20