fix:调整已注册的卡片没有回调的问题
This commit is contained in:
parent
d2071f2e88
commit
81bc00e03e
@ -35,7 +35,7 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
observers: {
|
observers: {
|
||||||
'weekDayInput': function(val) {
|
'weekDayInput': function (val) {
|
||||||
if (!val) {
|
if (!val) {
|
||||||
this.setData({
|
this.setData({
|
||||||
weekDay: [],
|
weekDay: [],
|
||||||
@ -70,6 +70,8 @@ Page({
|
|||||||
console.log('收到卡片确认事件', data, this.data.cardId, this.data.cardNumber);
|
console.log('收到卡片确认事件', data, this.data.cardId, this.data.cardNumber);
|
||||||
// 添加成功后自动刷新列表
|
// 添加成功后自动刷新列表
|
||||||
await this.findAllCard();
|
await this.findAllCard();
|
||||||
|
} else {
|
||||||
|
console.log('收到卡片确认事件', data, this.data.cardId, this.data.cardNumber);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -131,27 +133,27 @@ Page({
|
|||||||
const minutes = [];
|
const minutes = [];
|
||||||
|
|
||||||
// 生成年份选项(当前年份往后5年)
|
// 生成年份选项(当前年份往后5年)
|
||||||
for(let i = date.getFullYear(); i <= date.getFullYear() + 5; i++) {
|
for (let i = date.getFullYear(); i <= date.getFullYear() + 5; i++) {
|
||||||
years.push(i + '年');
|
years.push(i + '年');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 生成月份选项 - 显示1-12月
|
// 生成月份选项 - 显示1-12月
|
||||||
for(let i = 1; i <= 12; i++) {
|
for (let i = 1; i <= 12; i++) {
|
||||||
months.push(i.toString().padStart(2, '0') + '月');
|
months.push(i.toString().padStart(2, '0') + '月');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 生成天数选项(默认31天)
|
// 生成天数选项(默认31天)
|
||||||
for(let i = 1; i <= 31; i++) {
|
for (let i = 1; i <= 31; i++) {
|
||||||
days.push(i.toString().padStart(2, '0') + '日');
|
days.push(i.toString().padStart(2, '0') + '日');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 生成小时选项
|
// 生成小时选项
|
||||||
for(let i = 0; i < 24; i++) {
|
for (let i = 0; i < 24; i++) {
|
||||||
hours.push(i.toString().padStart(2, '0') + '时');
|
hours.push(i.toString().padStart(2, '0') + '时');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 生成分钟选项
|
// 生成分钟选项
|
||||||
for(let i = 0; i < 60; i++) {
|
for (let i = 0; i < 60; i++) {
|
||||||
minutes.push(i.toString().padStart(2, '0') + '分');
|
minutes.push(i.toString().padStart(2, '0') + '分');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,7 +241,7 @@ Page({
|
|||||||
const days = new Date(parseInt(year), month, 0).getDate();
|
const days = new Date(parseInt(year), month, 0).getDate();
|
||||||
|
|
||||||
const newDays = [];
|
const newDays = [];
|
||||||
for(let i = 1; i <= days; i++) {
|
for (let i = 1; i <= days; i++) {
|
||||||
newDays.push(i.toString().padStart(2, '0') + '日');
|
newDays.push(i.toString().padStart(2, '0') + '日');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,8 +309,8 @@ Page({
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
const { accountInfo } = app.globalData;
|
const {accountInfo} = app.globalData;
|
||||||
const { lock } = app.globalData;
|
const {lock} = app.globalData;
|
||||||
|
|
||||||
await selectLock({
|
await selectLock({
|
||||||
accountInfo: accountInfo,
|
accountInfo: accountInfo,
|
||||||
@ -427,7 +429,7 @@ Page({
|
|||||||
|
|
||||||
async findAllCard() {
|
async findAllCard() {
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
const { lock } = app.globalData;
|
const {lock} = app.globalData;
|
||||||
const result = await getIcCardList({lockId: lock.lockId})
|
const result = await getIcCardList({lockId: lock.lockId})
|
||||||
console.log('findAllCard', result)
|
console.log('findAllCard', result)
|
||||||
|
|
||||||
@ -601,7 +603,7 @@ Page({
|
|||||||
selectedCard: cardData
|
selectedCard: cardData
|
||||||
}, () => {
|
}, () => {
|
||||||
// 强制触发一次视图更新
|
// 强制触发一次视图更新
|
||||||
this.setData({ _forceUpdate: Date.now() });
|
this.setData({_forceUpdate: Date.now()});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
8
package-lock.json
generated
8
package-lock.json
generated
@ -24,7 +24,7 @@
|
|||||||
"@dcloudio/uni-mp-xhs": "3.0.0-4030620241128001",
|
"@dcloudio/uni-mp-xhs": "3.0.0-4030620241128001",
|
||||||
"@dcloudio/uni-quickapp-webview": "3.0.0-4030620241128001",
|
"@dcloudio/uni-quickapp-webview": "3.0.0-4030620241128001",
|
||||||
"pinia": "^2.2.8",
|
"pinia": "^2.2.8",
|
||||||
"star-cloud-uni": "^1.0.16",
|
"star-cloud-uni": "^1.0.17",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
"vue-i18n": "^9.1.9"
|
"vue-i18n": "^9.1.9"
|
||||||
},
|
},
|
||||||
@ -10046,9 +10046,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/star-cloud-uni": {
|
"node_modules/star-cloud-uni": {
|
||||||
"version": "1.0.16",
|
"version": "1.0.17",
|
||||||
"resolved": "https://registry.npmjs.org/star-cloud-uni/-/star-cloud-uni-1.0.16.tgz",
|
"resolved": "https://registry.npmjs.org/star-cloud-uni/-/star-cloud-uni-1.0.17.tgz",
|
||||||
"integrity": "sha512-Q9KF7C41WD5KH3EePgkFTIxaLnbc/uL4N0iu6qzmZ+6N8bJIHQaJAcnJPho+TQVsnyv9fkTOR4bF0oOqqg/dGg==",
|
"integrity": "sha512-xo34TDSasHRVIiPvE+a1Tuk3uB0CSJsGAsu/jpsAmT2lqfbQhJlwwZwA0WrZjxckLgYEwjzQKTj7AcPcbwOwqA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
"crc": "^4.3.2",
|
"crc": "^4.3.2",
|
||||||
|
|||||||
@ -52,7 +52,7 @@
|
|||||||
"@dcloudio/uni-mp-xhs": "3.0.0-4030620241128001",
|
"@dcloudio/uni-mp-xhs": "3.0.0-4030620241128001",
|
||||||
"@dcloudio/uni-quickapp-webview": "3.0.0-4030620241128001",
|
"@dcloudio/uni-quickapp-webview": "3.0.0-4030620241128001",
|
||||||
"pinia": "^2.2.8",
|
"pinia": "^2.2.8",
|
||||||
"star-cloud-uni": "^1.0.16",
|
"star-cloud-uni": "^1.0.17",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
"vue-i18n": "^9.1.9"
|
"vue-i18n": "^9.1.9"
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user