diff --git a/pages/adminNfc/components/bindDialog.vue b/pages/adminNfc/components/bindDialog.vue
index 8f200d9..7a2d840 100644
--- a/pages/adminNfc/components/bindDialog.vue
+++ b/pages/adminNfc/components/bindDialog.vue
@@ -8,7 +8,7 @@
-
+
-
+
@@ -26,7 +28,8 @@
- 共{{sonForm.countData}}个子区域,其中{{sonForm.countData - sonForm.bindData}}个未绑定
+ 共{{ sonForm.countData }}个子区域,其中{{ sonForm.countData -
+ sonForm.bindData }}个未绑定
@@ -42,7 +45,8 @@
-
+
@@ -110,10 +114,43 @@ export default {
},
methods: {
dialogShowFn(row) {
+ // 给安卓传参
+ let u = navigator.userAgent;
+ let isAndroid = u.indexOf("Android") > -1 || u.indexOf("Adr") > -1; //android
+ // 添加的时候给安卓传参
+ if (row.state === false) {
+ try {
+ if (isAndroid && AndroidJs) {
+ console.log("%c%s", "color:red", "安卓--调用方法");
+ const reqRow = {
+ name: "area",
+ data: {
+ state: row.state,
+ areaId: row.id,
+ },
+ };
+ console.log(reqRow, 'reqRow--')
+ AndroidJs.func(JSON.stringify(reqRow)); // 给安卓传参
+ } else {
+ console.log("%c%s", "color:red", "苹果--调用方法");
+ const reqRow = {
+ name: "back-iphone",
+ data: "",
+ };
+ window.webkit.messageHandlers.func.postMessage(JSON.stringify(reqRow)); // 给ios 传参
+ }
+ } catch (e) {
+ console.log(e, "e-----判断安卓苹果类型出错");
+ }
+ }
+
console.log(JSON.parse(JSON.stringify(row)), 'row--')
this.currentRow = row
this.$refs.dialogRef.isChange = row.state // 重置弹窗状态
this.$refs.dialogRef.step = 0 // 重置弹窗状态
+ if (row.state === false) {
+ this.$refs.dialogRef.step = 1 // 重置弹窗状态
+ }
this.showDialog = true
},
async getDataFn() {
@@ -233,12 +270,14 @@ export default {
// border: 1px solid red;
// margin-top: 20rpx;
padding: 20rpx;
+
.search-icon {
position: absolute;
right: 210rpx;
top: 50%;
transform: translateY(-50%);
}
+
.search-input {
background-color: white;
border-radius: 50rpx;