Browse Source

版本1.0.6 2023-12-21 ljd

1、修复添加人员时时间太短以及添加凭证时间异常问题
2、修复了租客端、移动端增加删除蓝牙密码异常问题
master
xiaohei 1 year ago
parent
commit
ff3c5c9f9b
7 changed files with 41 additions and 12 deletions
  1. +1
    -1
      app.json
  2. +5
    -2
      pages/addperson/addperson.js
  3. +3
    -2
      pages/personManger/personManger.js
  4. +9
    -1
      pages/userbluetoothUnlock/userbluetoothUnlock.js
  5. +4
    -4
      pages/userbluetoothUnlock/userbluetoothUnlock.wxml
  6. +4
    -2
      pagesA/passwordList/passwordList.js
  7. +15
    -0
      utils/ICINPakage/ICINLocker.js

+ 1
- 1
app.json View File

@ -48,7 +48,7 @@
},
"plugins": {
"myPlugin": {
"version": "1.7.0",
"version": "1.7.1",
"provider": "wx8c85a8eeaad80bbf"
}
},


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

@ -1617,24 +1617,27 @@ Page({
console.log(res, '获取索引')
if (res.success) {
var pwdNo = res.data.index.toString(16)
// var pwdNo = res.data.index
var passwordIndex = res.data.index
if (pwdNo < 9) {
pwdNo = '0' + pwdNo
} else {
pwdNo = pwdNo
}
console.log("1626", pwdNo);
ICINLocker.getUserSignKey(cgInfo.lockerId, cgInfo.superId, personInfo.userId, cgInfo.superId, cgInfo.authKey, '01', (callback) => {
console.log(callback)
console.log("1628",callback)
if (callback.status == '00') {
var userSignKey = callback.userSignKey
ICINLocker.getCommonKey(cgInfo.lockerId, personInfo.userId, personInfo.userId, userSignKey, (callback) => {
console.log("1632", callback);
if (callback.status == '00') {
console.log(callback, 'commonKey')
var commonKey = callback.commonKey
var startTime = passwordLi.startTime.toString(16).toUpperCase()
var endTime = passwordLi.endTime.toString(16).toUpperCase()
ICINLocker.handlePwd(deviceinfo.deviceNum, cgInfo.superId, personInfo.userId, info.password, pwdNo, cgInfo.superId, cgInfo.authKey, '', startTime, endTime, 0, commonKey, (callback) => {
console.log(callback)
console.log("1639",callback)
if (callback.status == '00') {
var datacom = {
code: "zg/bleSendVoucherReply",


+ 3
- 2
pages/personManger/personManger.js View File

@ -111,7 +111,7 @@ Page({
var deviceinfo = wx.getStorageSync('deviceinfo')
var cgInfo = wx.getStorageSync('cgInfo')
let starttime = moment().format('YYYY-MM-DD HH:mm:ss')
let endtime = moment().add(30,'days').format('YYYY-MM-DD HH:mm:ss')
let endtime = moment().add(365,'days').format('YYYY-MM-DD HH:mm:ss')
if(deviceinfo.roomId){
this.getSiteTenant(deviceinfo.roomId)
}
@ -370,6 +370,7 @@ Page({
endTime:endTime
}
methods.bluetoothOperation_ZH(this.data.cgInfo,info,1).then(result=>{
console.log("373",result);
if (result.status == '00') {
var dataPasswod = {
lockerId: this.data.deviceinfo.deviceNum,
@ -698,7 +699,7 @@ Page({
// url: '/pages/addperson/addperson?current=' + current,
// })
// return
if (deviceinfo.manufactureId == 201||deviceinfo.manufactureId == 201) {
if (deviceinfo.manufactureId == 201||deviceinfo.manufactureId == 221) {
if (app.globalData.zgBlueStatus) {
if (current == 1) {
wx.hideLoading()


+ 9
- 1
pages/userbluetoothUnlock/userbluetoothUnlock.js View File

@ -111,6 +111,12 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var personinfo = wx.getStorageSync('info')
console.log(personinfo);
this.setData({
minDate: moment(personinfo.startTime).format('YYYY-MM-DD HH:mm:ss'),
minDate1: moment(personinfo.endTime).format('YYYY-MM-DD HH:mm:ss')
})
var userRole = wx.getStorageSync('userRole') || ''
this.setData({
userRole
@ -160,6 +166,7 @@ Page({
this.getApartmentCardInfoMethods()
this.getPassWordMehods()
app.globalData.deviceNum = deviceinfo.deviceNum
console.log("169",this.data.minDate, this.data.minDate1);
if(deviceinfo.manufactureId == 101){
app.watch(this.getcartcount, 'backdata')
app.watch(this.fingerprintFun, 'fingerprintId')
@ -175,6 +182,7 @@ Page({
id:deviceinfoList[0].cardId,
}
WXAPI.getApartmentCardInfo(data).then(res=>{
console.log("184",res);
if(res.success){
let leases = res.data.leases
if(leases.length>0){
@ -296,7 +304,7 @@ Page({
})
},
bindDateChangeAddTwo(e){
var str = e.detail.value + " 00:00:00"
var str = e.detail.value + " 23:59:59"
this.setData({
endtime: str
})


+ 4
- 4
pages/userbluetoothUnlock/userbluetoothUnlock.wxml View File

@ -47,18 +47,18 @@
<view class="iconfont icon-suoding text-green"></view>
<view class="text-grey text-sm">蓝牙开锁</view>
</view>
<!-- <view class="actionli" bindtap="btntest1" data-i="1" wx:if="userRole == 1" wx:if="{{deviceinfo.manufactureId ==201 || deviceinfo.manufactureId ==221}}">
<view class="actionli" bindtap="btntest1" data-i="1" wx:if="userRole == 1" wx:if="{{deviceinfo.manufactureId ==201 || deviceinfo.manufactureId ==221}}">
<view class="iconfont icon-xiaoxi text-green"></view>
<view class="text-grey text-sm">添加蓝牙密码</view>
</view> -->
</view>
<!-- <view class="actionli" bindtap="addRemotePassword" wx:if="userRole == 1" wx:if="{{deviceinfo.manufactureId ==201 || deviceinfo.manufactureId ==221}}">
<view class="iconfont icon-xiaoxi text-green"></view>
<view class="text-grey text-sm">添加远程密码</view>
</view> -->
<!-- <view class="actionli" bindtap="btntest1" data-i="12" wx:if="userRole == 1">
<view class="actionli" bindtap="btntest1" data-i="12" wx:if="userRole == 1">
<view class="iconfont icon-liebiao text-green"></view>
<view class="text-grey text-sm">密码列表</view>
</view> -->
</view>
<!-- <view class="actionli" bindtap="btntest1" data-i="11" wx:if="{{deviceinfo.manufactureId == 201 || deviceinfo.manufactureId == 221 }}">
<view class="iconfont icon-xiaoxi text-green"></view>
<view class="text-grey text-sm">添加卡</view>


+ 4
- 2
pagesA/passwordList/passwordList.js View File

@ -69,6 +69,7 @@ Page({
signature: wx.getStorageSync('signature')
})
WXAPI.tsGetCertificate(data).then(res => {
console.log("72",res);
res.data.map(li => {
li.content = JSON.parse(li.content)
li.content.passwordStartTime = moment(li.startTime*1000).format('YYYY-MM-DD HH:mm:ss')
@ -104,7 +105,7 @@ Page({
duration: 2000
})
} else {
if (this.data.deviceInfo.manufactureId == 201) {
if (this.data.deviceInfo.manufactureId == 201 || this.data.deviceInfo.manufactureId == 221) {
ICINLocker.scanDevices(this.data.deviceInfo.deviceNum).then(res => {
if (res.status == 0) {
app.globalData.blueDeviceId = res.blueDeviceId
@ -463,7 +464,7 @@ Page({
},
// 删除密码
delPwd(index) {
if (this.data.deviceInfo.manufactureId == 201) {
if (this.data.deviceInfo.manufactureId == 201 || this.data.deviceinfo.manufactureId == 221) {
var _this = this
var deviceinfo = this.data.deviceInfo
var passwordLi = this.data.passwordlist[index]
@ -496,6 +497,7 @@ Page({
if (res.success) {
var pwdNo = res.data.index.toString(16)
var passwordIndex = res.data.index
console.log("500",pwdNo);
if (pwdNo < 9) {
pwdNo = '0' + pwdNo
} else {


+ 15
- 0
utils/ICINPakage/ICINLocker.js View File

@ -2634,6 +2634,7 @@ export default class ICINLocker {
let userID4AuthCode = str2Hex(_userID);
let userId = userID4AuthCode.PadRight(40, "0");
let pwd = str2Hex(_pwd).PadRight(40, "0");
console.log("2637", _useCountLimit, _useCountLimit.toString(16), typeof (_useCountLimit.toString(16)));
let useCountLimit = _useCountLimit.toString(16).PadLeft(2, "0");
let token = "00000000".PadRight(8, "0");
let startTime = _startTime.PadRight(8, "0");
@ -2653,6 +2654,7 @@ export default class ICINLocker {
)
)
);
console.log("2656", authCode);
authCodeLen = (authCode.length / 2).toString(16).PadLeft(2, "0");
}
let reqData =
@ -2667,6 +2669,18 @@ export default class ICINLocker {
endTime +
authCodeLen +
authCode;
console.log("2672", authUserId+"---",
keyId+"---",
userId+"---",
_pwdNo+"---",
pwd+"---",
useCountLimit+"---",
token+"---",
startTime+"---",
endTime+"---",
authCodeLen+"---",
authCode);
console.log("2673", reqData, reqData.length, reqData.length / 2, (reqData.length / 2).toString(16), typeof ((reqData.length / 2).toString(16)));
let reqDataLength = (reqData.length / 2).toString(16).PadLeft(2, "0");
let dataModular = cmdId + subCmdId + reqDataLength + reqData;
let dataModularLength = (dataModular.length / 2)
@ -3787,6 +3801,7 @@ export default class ICINLocker {
String.prototype.PadLeft = function (len, charStr) {
var s = this + "";
console.log("3794", s);
return new Array(len - s.length + 1).join(charStr, "") + s;
};


Loading…
Cancel
Save