测试其他场景的sql
This commit is contained in:
parent
0a15ae5463
commit
f19660c03c
@ -41,7 +41,11 @@ export const useDialogueListStore = createGlobalState(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const content = {
|
const content = {
|
||||||
content: "我试试传送文件和图片是不是一个接口"
|
content: "我试试传送文件和图片是不是一个接口",
|
||||||
|
name: "测试excel1.xlsx",
|
||||||
|
path: "https://cdn-test.szjixun.cn/fonchain-chat/chat/file/multipart/20250307/727a2371-ffc4-46da-b953-a7d449ff82ff-测试excel1.xlsx",
|
||||||
|
size: 9909,
|
||||||
|
drive: 3
|
||||||
};
|
};
|
||||||
const extra = JSON.stringify(content);
|
const extra = JSON.stringify(content);
|
||||||
|
|
||||||
@ -49,7 +53,7 @@ export const useDialogueListStore = createGlobalState(() => {
|
|||||||
eventType: 'executeSql',
|
eventType: 'executeSql',
|
||||||
eventParams: {
|
eventParams: {
|
||||||
name: 'chat',
|
name: 'chat',
|
||||||
sql: 'INSERT INTO talk_records (msg_id, sequence, talk_type, msg_type, user_id, receiver_id, is_revoke, is_mark, quote_id, extra, created_at, updated_at, biz_date) VALUES ("'+'77b715fb30f54f739a255a915ef72445'+'", 166, 2, 1, 1774, 888890, 0, 0, "'+''+'", "'+'extra'+'", "'+'2025-03-06T15:57:07.000Z'+'", "'+'2025-03-06T15:57:07.000Z'+'", "'+'20250306'+'")',
|
sql: 'INSERT INTO talk_records (msg_id, sequence, talk_type, msg_type, user_id, receiver_id, is_revoke, is_mark, quote_id, extra, created_at, updated_at, biz_date) VALUES ("'+'77b715fb30f54f739a255a915ef72445'+'", 166, 2, 1, 1774, 888890, 0, 0, "'+''+'", "'+extra+'", "'+'2025-03-06T15:57:07.000Z'+'", "'+'2025-03-06T15:57:07.000Z'+'", "'+'20250306'+'")',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
let chatDBSelectSql = {
|
let chatDBSelectSql = {
|
||||||
@ -59,11 +63,11 @@ export const useDialogueListStore = createGlobalState(() => {
|
|||||||
sql: `SELECT * FROM talk_records ORDER BY sequence DESC LIMIT 20`,
|
sql: `SELECT * FROM talk_records ORDER BY sequence DESC LIMIT 20`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
let chatDBSelectSql2 = {
|
let chatDBIsOpenDatabase = {
|
||||||
eventType: 'selectSql',
|
eventType: 'isOpenDatabase',
|
||||||
eventParams: {
|
eventParams: {
|
||||||
name: 'chat',
|
name: 'chat',
|
||||||
sql: 'SELECT name FROM sqlite_master WHERE type="'+'table'+'" AND name="'+'talk_records'+'"'
|
path: '_doc/chat.db',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
document.addEventListener('plusready', () => {
|
document.addEventListener('plusready', () => {
|
||||||
@ -80,11 +84,11 @@ export const useDialogueListStore = createGlobalState(() => {
|
|||||||
JSON.stringify(chatDBexecuteSql),
|
JSON.stringify(chatDBexecuteSql),
|
||||||
)}')`,
|
)}')`,
|
||||||
)
|
)
|
||||||
// webview.evalJS(
|
webview.evalJS(
|
||||||
// `operateSQLite('${encodeURIComponent(
|
`operateSQLite('${encodeURIComponent(
|
||||||
// JSON.stringify(chatDBexecuteSql2),
|
JSON.stringify(chatDBexecuteSql2),
|
||||||
// )}')`,
|
)}')`,
|
||||||
// )
|
)
|
||||||
webview.evalJS(
|
webview.evalJS(
|
||||||
`operateSQLite('${encodeURIComponent(
|
`operateSQLite('${encodeURIComponent(
|
||||||
JSON.stringify(chatDBSelectSql),
|
JSON.stringify(chatDBSelectSql),
|
||||||
@ -92,7 +96,7 @@ export const useDialogueListStore = createGlobalState(() => {
|
|||||||
)
|
)
|
||||||
webview.evalJS(
|
webview.evalJS(
|
||||||
`operateSQLite('${encodeURIComponent(
|
`operateSQLite('${encodeURIComponent(
|
||||||
JSON.stringify(chatDBSelectSql2),
|
JSON.stringify(chatDBIsOpenDatabase),
|
||||||
)}')`,
|
)}')`,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user