|
@@ -2,7 +2,7 @@
|
|
|
<template>
|
|
|
<view id="fingerprint">
|
|
|
<view class="fingerprint_one" v-if="pageType==1">
|
|
|
- <view class="fingerprint_one_li" @click="goPage('add')" v-for="(item,index) in fingerprintList" :key="index">
|
|
|
+ <view class="fingerprint_one_li" @click="goPage(item)" v-for="(item,index) in fingerprintList" :key="index">
|
|
|
<view class="fingerprint_one_li_l">{{item.name}}</view>
|
|
|
<view :class="item.isConfig?'colorB':'colorA'">{{item.isConfig?'已配置':'无'}}</view>
|
|
|
<img class="fingerprint_one_li_r" src="@/images/icon_04.png">
|
|
@@ -80,12 +80,14 @@
|
|
|
},
|
|
|
],
|
|
|
yesUseList:[],
|
|
|
+ fingerNum:null,//第几个指纹
|
|
|
|
|
|
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
this.impowerUseList();
|
|
|
+ this.fingerprintClick();
|
|
|
},
|
|
|
onShow(){
|
|
|
|
|
@@ -127,11 +129,17 @@
|
|
|
async fingerprintClick(){
|
|
|
let _this=this;
|
|
|
const {data} = await fingerprintQueryList(uni.getStorageSync('userId'));
|
|
|
- if(data.code == 200){
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/fingerprint',//指纹信息
|
|
|
- });
|
|
|
- }
|
|
|
+ if(data.code == 200){
|
|
|
+ if(data.rows.length>0){
|
|
|
+ _this.fingerprintList.forEach(function(item){
|
|
|
+ data.rows.forEach(function(item2){
|
|
|
+ if(item.num==item2.fingerNum){
|
|
|
+ item.isConfig=true;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
//指纹采集
|
|
|
async fingerprintGtherFun(){
|
|
@@ -140,7 +148,7 @@
|
|
|
this.yesUseList.forEach(function(item){
|
|
|
if(item.isCheck){
|
|
|
obj.hardId=item.hardId
|
|
|
- obj.num=1
|
|
|
+ obj.num=_this.fingerNum
|
|
|
}
|
|
|
})
|
|
|
const {data} = await fingerprintGther(obj)
|
|
@@ -181,10 +189,9 @@
|
|
|
}
|
|
|
},
|
|
|
//页面跳转
|
|
|
- goPage(type){
|
|
|
- if(type == 'add'){//学生卡上传
|
|
|
- this.pageType=2;
|
|
|
- }
|
|
|
+ goPage(d){
|
|
|
+ this.pageType=2;
|
|
|
+ this.fingerNum=d.num;
|
|
|
},
|
|
|
|
|
|
},
|