更换WIFI
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
const app = getApp();
|
||||
|
||||
Component({
|
||||
data: {
|
||||
wifiList: []
|
||||
},
|
||||
|
||||
// 生命周期方法
|
||||
lifetimes: {
|
||||
attached() {
|
||||
|
||||
},
|
||||
detached() {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
// 组件的方法
|
||||
methods: {
|
||||
getWiFiList() {
|
||||
app.globalData.ppScale.activeProtocol.dataFindSurroundDevice((res) => {
|
||||
console.log("connectedDevice ===》dataFindSurroundDevice", res);
|
||||
|
||||
this.setData({
|
||||
wifiList: res
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
selectDevice(e) {
|
||||
this.triggerEvent('wifiEvent', {
|
||||
status: true,
|
||||
data: e.currentTarget.dataset.item
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user