Browse Source

版本1.0.6 2023-12-22 ljd

1、修复了删除数字密码失败问题
master
xiaohei 1 year ago
parent
commit
266bc4fefb
9 changed files with 66 additions and 32 deletions
  1. +15
    -15
      app.js
  2. +1
    -1
      pages/addperson/addperson.js
  3. +1
    -1
      pages/login/login.js
  4. +8
    -4
      pages/roomDetail/roomDetail.js
  5. +2
    -2
      pages/roomDetail/roomDetail.wxml
  6. +36
    -7
      pages/userbluetoothUnlock/userbluetoothUnlock.js
  7. +1
    -1
      pagesA/passwordList/passwordList.js
  8. +1
    -1
      utils/ICINPakage/ICINLocker.js
  9. +1
    -0
      utils/request.js

+ 15
- 15
app.js View File

@ -20,21 +20,21 @@ App({
})
}
})
wx.login({
success (res) {
if (res.code) {
let data={
code:res.code
}
WXAPI.getOpenId(data).then(res=>{
console.log(res)
wx.setStorageSync('openid', res.openid)
})
} else {
console.log('登录失败!' + res.errMsg)
}
}
})
// wx.login({
// success (res) {
// if (res.code) {
// let data={
// code:res.code
// }
// WXAPI.getOpenId(data).then(res=>{
// console.log(res)
// wx.setStorageSync('openid', res.openid)
// })
// } else {
// console.log('登录失败!' + res.errMsg)
// }
// }
// })
// 展示本地存储能力
var logs = wx.getStorageSync('token') || ''
var userRole = wx.getStorageSync('userRole') || ''


+ 1
- 1
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 < 9) {
if (pwdNo.length < 9) {
pwdNo = '0' + pwdNo
} else {
pwdNo = pwdNo


+ 1
- 1
pages/login/login.js View File

@ -36,7 +36,7 @@ Page({
username,password,usernameOne,passwordOne,checked,
corid:options.corid
})
this.noCodeLogin()
// this.noCodeLogin()
},
refresh:WXAPI.throttle(function(e){
this.noCodeLogin()


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

@ -1087,6 +1087,7 @@ Page({
openTheDoor() {
// if(this.data.deviceinfo.info){
// JSON.parse(this.data.deviceinfo.info)
var that = this
wx.showLoading({
title: '连接中',
mask: true,
@ -1127,6 +1128,9 @@ Page({
duration: 2000,
icon: 'none'
})
if(that.data.deviceinfo.manufactureId == 201 || that.data.deviceinfo.manufactureId == 221){
that.synchroPlatformTask()
}
WXAPI.sendCommand(data).then(res => {
console.log(res)
})
@ -1264,10 +1268,10 @@ Page({
searchDevicesMethods() {
var that = this;
wx.showLoading({
title: '正在搜索',
// mask: true
})
// wx.showLoading({
// title: '正在搜索',
// // mask: true
// })
this.setData({
searchClick: false
})


+ 2
- 2
pages/roomDetail/roomDetail.wxml View File

@ -82,10 +82,10 @@
<view class="iconfont icon-shezhi text-red"></view>
<view class="text-grey text-sm">添加蓝牙扣</view>
</view>-->
<view class="actionli" bindtap="btntest1" data-i="11" wx:if="{{(deviceinfo.manufactureId ==201||deviceinfo.manufactureId ==221) && authority}}">
<!-- <view class="actionli" bindtap="btntest1" data-i="11" wx:if="{{(deviceinfo.manufactureId ==201||deviceinfo.manufactureId ==221) && authority}}">
<view class="iconfont icon-shezhi text-red"></view>
<view class="text-grey text-sm">平台任务同步</view>
</view>
</view> -->
</view>
<van-action-sheet show="{{ show }}" actions="{{ actionsLwj }}" bind:close="onClose" bind:select="onSelect" wx:if="{{deviceinfo.manufactureId ==1201}}" />
<van-action-sheet show="{{ show }}" actions="{{ actions }}" bind:close="onClose" bind:select="onSelect" wx:else />


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

@ -6,6 +6,7 @@ var util = require('../../utils/util');
const config = require('../../config')
const plugin = requirePlugin('myPlugin')
const util1 = require('../../utils/util1.js')
import IotTask from '../../utils/IotTask'
import {
BLE
} from "../../utils/btls/ble";
@ -216,13 +217,39 @@ Page({
})
}
},
// 添加远程密码
addRemotePassword(){
this.setData({
showTwo:true,
remotePasswordStatus:true
})
},
// // 同步平台任务
// synchroPlatformTask() {
// wx.showLoading({
// title: '同步平台任务中',
// icon: 'none',
// mask: true
// })
// const iotInstance = new IotTask(this.data.cgInfo.lockerId, this.iotCallBack)
// iotInstance.run()
// },
// iotCallBack(sendData) {
// let _this = this
// if (!sendData) return
// return new Promise((resolve, reject) => {
// console.log(_this.data.cgInfo.commonKey)
// ICINLocker.nbIotTransmit(sendData, _this.data.cgInfo.commonKey, (callback) => {
// console.log('发送数据' + new Date(), sendData)
// console.log('同步任务回调结果' + new Date(), callback)
// if (callback) {
// resolve(callback.nbIotResp)
// } else {
// reject('同步任务fail')
// }
// })
// })
// },
// // 添加远程密码
// addRemotePassword(){
// this.setData({
// showTwo:true,
// remotePasswordStatus:true
// })
// },
// 配网
changeshow2() {
this.setData({
@ -987,6 +1014,7 @@ Page({
// if(this.data.deviceinfo.info){
// JSON.parse(this.data.deviceinfo.info)
// var deviceinfo = this.data.deviceinfo
var that = this
var userInfo = wx.getStorageSync('deviceinfo')
ICINLocker.getSignKey(this.data.cgInfo.lockerId, this.data.cgInfo.superId, this.data.cgInfo.superId, (callback) => {
console.log(callback)
@ -996,6 +1024,7 @@ Page({
console.log(callback)
var commonKey = callback.commonKey
ICINLocker.openTheDoor(this.data.cgInfo.lockerId, this.data.cgInfo.superId, userSignKey, this.data.cgInfo.superId, '', '01', commonKey, (callback) => {
// that.synchroPlatformTask()
var data = {
code: "zg/bleUnlockRecord",
signature:wx.getStorageSync('signature'),


+ 1
- 1
pagesA/passwordList/passwordList.js View File

@ -498,7 +498,7 @@ Page({
var pwdNo = res.data.index.toString(16)
var passwordIndex = res.data.index
console.log("500",pwdNo);
if (pwdNo < 9) {
if (pwdNo.length < 9) {
pwdNo = '0' + pwdNo
} else {
pwdNo = pwdNo


+ 1
- 1
utils/ICINPakage/ICINLocker.js View File

@ -3856,7 +3856,7 @@ function getIIData() {
function datasubpck(datahex) {
var arrayObj = new Array();
let dataPackageLength = packageSize
console.log('分包大小', dataPackageLength)
console.log('分包大小', dataPackageLength, datahex)
for (var i = 0; i < datahex.length; i += dataPackageLength) {
// 预加 最大包长度,如果依然小于总数据长度,可以取最大包数据大小
if (i + dataPackageLength < datahex.length) {


+ 1
- 0
utils/request.js View File

@ -12,6 +12,7 @@ function setCode(str, text) {
return data;
}
let tenantIdEnter='100'
// let tenantIdEnter='1200'
function setTenantId(tenantId){
tenantIdEnter=tenantId
wx.setStorageSync('tenantId',tenantId)


Loading…
Cancel
Save