更新记录
1.0.1(2024-05-14)
修复可能出现两个应用图标的问题
1.0.0(2024-04-10)
插件发布
平台兼容性
uni-app
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
√ | √ | - | - | - | - | 4.4 | × | - |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
× | × | × | × | × | × | - | × | × | × | × |
uni-app x
Chrome | Safari | Android | iOS | 鸿蒙 | 微信小程序 |
---|---|---|---|---|---|
- | - | 5.0 | × | - | × |
nfc-uts
插件示例使用
1、通过插件市场“使用 HBuilderX 导入示例项目”下载插件示例项目
2、通过插件市场“试用”导入插件到示例项目中
3、打包并运行自定义基座
引入插件对象
import * as nfc from "@/uni_modules/nfc-uts";
调起NFC识别
onLoad() {
this.getNfcActivity();//调起NFC识别,并监听回调
},
methods: {
getNfcActivity() {
let that=this;
nfc.gotoDemoActivity(function(result){
uni.showModal({
title: '提示',
content: result.message,
confirmText:'继续',
success: function (res) {
if (res.confirm) {
that.getNfcActivity();//继续识别
console.log('用户点击继续!');
} else if (res.cancel) {
console.log('用户点击取消!');
}
}
});
console.log('NFC',result);
});
}
}