|
@@ -46,20 +46,22 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- cardIds:function(){
|
|
|
+ cardIds: function () {
|
|
|
return this.$store.getters.nfcreadtxt;
|
|
|
}
|
|
|
},
|
|
|
- watch:{
|
|
|
- cardIds:{
|
|
|
- handler(newV,oldV){
|
|
|
- console.log(newV,'newV------------------------')
|
|
|
+ watch: {
|
|
|
+ cardIds: {
|
|
|
+ handler(newV, oldV) {
|
|
|
+ console.log(newV, 'newV------------------------')
|
|
|
this.getCardLists(newV)
|
|
|
},
|
|
|
+ immediate: true
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
testNfc.listenNFCStatus()
|
|
|
+ // testNfc.Into()
|
|
|
},
|
|
|
methods: {
|
|
|
//获取NFC卡读取内容
|
|
@@ -114,6 +116,9 @@ export default {
|
|
|
icon: false,
|
|
|
message: response.data.message,
|
|
|
})
|
|
|
+ // 调用 js 文件里面的方法
|
|
|
+ // testNfc.setTxt(that.cardId);
|
|
|
+ // testNfc.writeData();
|
|
|
}
|
|
|
})
|
|
|
|