From 3875da845b8fae679bd784d1246101a5fb1b61b5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 15 三月 2023 16:33:20 +0800
Subject: [PATCH] 2023-03-15

---
 src/views/design/header/index.jsx |   60 ++++++++++++++++++++++++++++++------------------------------
 1 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/src/views/design/header/index.jsx b/src/views/design/header/index.jsx
index 39078cd..674453a 100644
--- a/src/views/design/header/index.jsx
+++ b/src/views/design/header/index.jsx
@@ -237,7 +237,7 @@
   }
 
   setSystemFuncs = () => {
-    if (!window.GLOB.WebSql && !window.GLOB.IndexDB) {
+    if (!window.GLOB.IndexDB) {
       return
     }
     this.getfuncTime().then(res => {
@@ -265,17 +265,17 @@
       timestamp = moment(sys_datetime, 'YYYY-MM-DD HH:mm:ss').add(seconds, 'seconds').format('YYYY-MM-DD HH:mm:ss')
     }
 
-    if (window.GLOB.WebSql) {
-      window.GLOB.WebSql.transaction(tx => {
-        tx.executeSql('DELETE FROM FUNCS')
+    // if (window.GLOB.WebSql) {
+    //   window.GLOB.WebSql.transaction(tx => {
+    //     tx.executeSql('DELETE FROM FUNCS')
 
-        funcs.forEach(item => {
-          if (!item.key_sql) return
-          tx.executeSql('INSERT INTO FUNCS (func_code, key_sql) VALUES (?, ?)', [item.func_code, item.key_sql])
-        })
-        tx.executeSql(`UPDATE VERSIONS SET createDate='${timestamp}' where CDefine1='funcs'`)
-      })
-    } else {
+    //     funcs.forEach(item => {
+    //       if (!item.key_sql) return
+    //       tx.executeSql('INSERT INTO FUNCS (func_code, key_sql) VALUES (?, ?)', [item.func_code, item.key_sql])
+    //     })
+    //     tx.executeSql(`UPDATE VERSIONS SET createDate='${timestamp}' where CDefine1='funcs'`)
+    //   })
+    // } else {
       let objectStore = window.GLOB.IndexDB.transaction(['funcs'], 'readwrite').objectStore('funcs')
 
       objectStore.clear()
@@ -288,28 +288,28 @@
 
       let funcStore = window.GLOB.IndexDB.transaction(['version'], 'readwrite').objectStore('version')
       funcStore.put({id: 'funcs', version: '1.0', createDate: timestamp})
-    }
+    // }
   }
 
   getfuncTime = () => {
     return new Promise((resolve, reject) => {
-      if (window.GLOB.WebSql) {
-        window.GLOB.WebSql.transaction(tx => {
-          tx.executeSql("SELECT * FROM VERSIONS where CDefine1='funcs'", [], (tx, results) => {
-            let rows = results.rows
-            if (rows.length === 0) {
-              tx.executeSql('DELETE FROM FUNCS')
-              tx.executeSql('INSERT INTO VERSIONS (version, createDate, CDefine1) VALUES (?, ?, ?)', ['1.0', '1970-01-01 14:59:09.000', 'funcs'])
-              resolve({createDate: '1970-01-01 14:59:09.000'})
-            } else {
-              resolve(rows[0])
-            }
-          }, (tx, results) => {
-            reject()
-            console.warn(results)
-          })
-        })
-      } else {
+      // if (window.GLOB.WebSql) {
+      //   window.GLOB.WebSql.transaction(tx => {
+      //     tx.executeSql("SELECT * FROM VERSIONS where CDefine1='funcs'", [], (tx, results) => {
+      //       let rows = results.rows
+      //       if (rows.length === 0) {
+      //         tx.executeSql('DELETE FROM FUNCS')
+      //         tx.executeSql('INSERT INTO VERSIONS (version, createDate, CDefine1) VALUES (?, ?, ?)', ['1.0', '1970-01-01 14:59:09.000', 'funcs'])
+      //         resolve({createDate: '1970-01-01 14:59:09.000'})
+      //       } else {
+      //         resolve(rows[0])
+      //       }
+      //     }, (tx, results) => {
+      //       reject()
+      //       console.warn(results)
+      //     })
+      //   })
+      // } else {
         let objectStore = window.GLOB.IndexDB.transaction(['version'], 'readwrite').objectStore('version')
         let request = objectStore.get('funcs')
 
@@ -332,7 +332,7 @@
             }
           }
         }
-      }
+      // }
     })
   }
 

--
Gitblit v1.8.0