|
作者:xiaochun365,來(lái)自原文地址
一:判斷接口是否可用
-
//判斷接口是否可用if (wx.openBluetoothAdapter) {
-
wx.openBluetoothAdapter()
-
} else {
-
// 如果希望用戶在最新版本的客戶端上體驗(yàn)?zāi)男〕绦颍梢赃@樣子提示
-
wx.showModal({
-
title: '提示',
-
content: '當(dāng)前微信版本過(guò)低,無(wú)法使用該功能,請(qǐng)升級(jí)到最新微信版本后重試。'
-
})
-
}
二:方法之間的值傳遞
-
onLoad: function () {
-
this.getExpress("123", function (e) {
-
console.log(e) //getExpress方法返回~
-
})},
-
-
getExpress: function (num, fn) {
-
fn("getExpress方法返回~")
-
}
|