1234567891011121314151617181920212223242526272829303132 |
- // #ifdef APP-ANDROID
- import {selectTableData, insertTableData} from '@/utils/sqlite'
- // #endif
- export function offlineData(data:UTSJSONObject):Promise<UTSJSONObject> {
- return new Promise((resolve, reject) => {
- let result = JSON.parseObject(JSON.stringify(data)) as UTSJSONObject
- resolve(result)
- });
- }
- export async function getList(tableName:string, condition?:string|null, initData?:UTSJSONObject|null):Promise<UTSJSONObject> {
-
- // #ifdef APP-ANDROID
- const result = await selectTableData(tableName, null, null, null, null);
- console.log(result);
- return result;
- // #endif
-
- // #ifdef H5
- return offlineData(initData)
- // #endif
- }
- /*
- export const onload=():Promise<UTSJSONObject>=> {
- return new Promise((resolve, reject) => {
- getInfo().then((res:UTSJSONObject) => {
- })
- })
- } */
|