Browse Source

版本1.0.6 2023-12-22 ljd

1、修复了租客端凭证列表混乱问题,没有根据锁号来区分是否是这把锁的凭证
master
xiaohei 1 year ago
parent
commit
3c30c9b2d0
5 changed files with 28 additions and 23 deletions
  1. +4
    -2
      pages/addperson/addperson.js
  2. +4
    -4
      pages/roomDetail/roomDetail.js
  3. +7
    -6
      pages/userbluetoothUnlock/userbluetoothUnlock.js
  4. +9
    -7
      pagesA/passwordList/passwordList.js
  5. +4
    -4
      utils/request.js

+ 4
- 2
pages/addperson/addperson.js View File

@ -1619,7 +1619,7 @@ Page({
var pwdNo = res.data.index.toString(16)
// var pwdNo = res.data.index
var passwordIndex = res.data.index
if (pwdNo.length < 9) {
if (pwdNo.length < 2) {
pwdNo = '0' + pwdNo
} else {
pwdNo = pwdNo
@ -4297,7 +4297,7 @@ Page({
}
console.log(dataPasswod);
WXAPI.sendCommand(dataPasswod).then(res => {
console.log(res);
console.log("123123",res);
if (res.success) {
fingerprintIndex = res.data.index
serialNumber = res.data.serialNumber
@ -4335,6 +4335,7 @@ Page({
var startTime = new Date(Number(moment(that.data.starttime).format('x')))
var endTime = new Date(Number(moment(that.data.endtime).format('x')))
// fingerprintIndex = Math.floor(Math.random() * 100)
console.log(lockDevice.name, basecode, fingerprintIndex, startTime, endTime);
var bytes = plugin.addFingerprint(lockDevice.name, basecode, fingerprintIndex, startTime, endTime)
console.debug('bytes', bytes)
that.sendBytes(bytes)
@ -4415,6 +4416,7 @@ Page({
}
WXAPI.getCertificates(data).then(res => {
var dataOne = util.zlib_unzip(res.data)
console.log("123123",dataOne);
if (res.success) {
dataOne.map(li => {
li['pzname'] = JSON.parse(li.content).pzname


+ 4
- 4
pages/roomDetail/roomDetail.js View File

@ -1268,10 +1268,10 @@ Page({
searchDevicesMethods() {
var that = this;
// wx.showLoading({
// title: '正在搜索',
// // mask: true
// })
wx.showLoading({
title: '正在搜索',
// mask: true
})
this.setData({
searchClick: false
})


+ 7
- 6
pages/userbluetoothUnlock/userbluetoothUnlock.js View File

@ -165,7 +165,7 @@ Page({
}
this.getApartmentCardInfoMethods()
this.getPassWordMehods()
// this.getPassWordMehods()
app.globalData.deviceNum = deviceinfo.deviceNum
console.log("169",this.data.minDate, this.data.minDate1);
if(deviceinfo.manufactureId == 101){
@ -176,11 +176,11 @@ Page({
},
// 获取合同信息
getApartmentCardInfoMethods(){
let deviceinfoList = wx.getStorageSync('deviceinfoList')
if(deviceinfoList[0].cardId){
let deviceinfo = wx.getStorageSync('deviceinfo')
if(deviceinfo.cardId){
let data={
signature:wx.getStorageSync('signature'),
id:deviceinfoList[0].cardId,
id:deviceinfo.cardId,
}
WXAPI.getApartmentCardInfo(data).then(res=>{
console.log("184",res);
@ -2548,13 +2548,14 @@ Page({
signature:wx.getStorageSync('signature'),
};
WXAPI.tsGetCertificate(data).then(res=>{
console.log(res);
if(res.success){
var dataOne=[],dataTwo=[]
res.data.map(li=>{
if(li.type == 14){
if(li.type == 4 && (li.deviceNum == deviceinfoList.deviceNum)){
li.content=JSON.parse(li.content)
dataOne.push(li)
}else if(li.type == 13){
}else if(li.type == 3 && (li.deviceNum == deviceinfoList.deviceNum)){
li.content=JSON.parse(li.content)
dataTwo.push(li)
}


+ 9
- 7
pagesA/passwordList/passwordList.js View File

@ -64,10 +64,12 @@ Page({
},
// 获取凭证数据
getvoucher() {
var data = JSON.stringify({
id: this.data.personLi.cardId,
const deviceInfo = wx.getStorageSync('deviceinfo')
var data = {
id: deviceInfo.cardId,
deviceNum: deviceInfo.deviceNum,
signature: wx.getStorageSync('signature')
})
}
WXAPI.tsGetCertificate(data).then(res => {
console.log("72",res);
res.data.map(li => {
@ -76,13 +78,13 @@ Page({
li.content.passwordEndTime = moment(li.endTime*1000).format('YYYY-MM-DD HH:mm:ss')
})
const list = res.data.filter(li => {
return li.type == 3 && (li.status == 1 || li.status == 0);
return li.type == 3 && (li.status == 1 || li.status == 0) && li.deviceNum == deviceInfo.deviceNum;
})
const list1 = res.data.filter(li => {
return li.type == 4 && (li.status == 1 || li.status == 0);
return li.type == 4 && (li.status == 1 || li.status == 0) && li.deviceNum == deviceInfo.deviceNum;
})
const list2 = res.data.filter(li => {
return li.type == 1 && (li.status == 1 || li.status == 0);
return li.type == 1 && (li.status == 1 || li.status == 0) && li.deviceNum == deviceInfo.deviceNum;
})
this.setData({
cardlist: list,
@ -498,7 +500,7 @@ Page({
var pwdNo = res.data.index.toString(16)
var passwordIndex = res.data.index
console.log("500",pwdNo);
if (pwdNo.length < 9) {
if (pwdNo.length < 2) {
pwdNo = '0' + pwdNo
} else {
pwdNo = pwdNo


+ 4
- 4
utils/request.js View File

@ -1,7 +1,7 @@
const app = getApp()
let subDomain = '' // 子域名,没有就等于
// const API_BASE_URL = 'https://apartmentcloud.xiaozhisz.cn/' // 主域名
const API_BASE_URL = 'http://test.zhiweisz.cn/' // 主域名
const API_BASE_URL = 'https://apartmentcloud.xiaozhisz.cn/' // 主域名
// const API_BASE_URL = 'http://test.zhiweisz.cn/' // 主域名
// const API_BASE_URL = 'https://yktms-cs.utsz.edu.cn/' // 主域名
import JSEncrypt from '../js_sdk/jsencrypt-Rsa/jsencrypt/jsencrypt.min.js';
function setCode(str, text) {
@ -11,8 +11,8 @@ function setCode(str, text) {
let data = encryptStr.encrypt(text.toString()); // 进行加密
return data;
}
let tenantIdEnter='100'
// let tenantIdEnter='1200'
// let tenantIdEnter='100'
let tenantIdEnter='1200'
function setTenantId(tenantId){
tenantIdEnter=tenantId
wx.setStorageSync('tenantId',tenantId)


Loading…
Cancel
Save