flat: 微调
This commit is contained in:
@@ -34,11 +34,12 @@ const useChatGroupDBStore = defineStore("messageGroup", () => {
|
||||
const chatSessionID = ref('')
|
||||
const lastDateRef = ref('')
|
||||
|
||||
async function init() {
|
||||
async function init() { // 初始化数据,有则用,无则更新
|
||||
// 获取所有数据
|
||||
setTimeout(async () => {
|
||||
if (!baseDB.isDBReady) await baseDB.initDB();
|
||||
const result = await baseDB.db.getAll(tableName.value);
|
||||
console.log('result', result)
|
||||
// 1、判断是否有数据,没数据请求服务器
|
||||
if (result.length) {
|
||||
console.warn('本地数据库存在数据')
|
||||
|
||||
Reference in New Issue
Block a user