Commit 191c87a3 by liimin

chore(deps): 更新依赖包并修改应用启动逻辑

- 注释掉 onKeep 方法调用以禁用保活功能
- 更新 package-lock.json 文件中的依赖版本信息
- 保留 RecordSaveService 轮询服务的启用逻辑
- 维持 WebSocket 连接和屏幕方向锁定功能
1 parent c6f87722
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-07 17:09:53 * @Date: 2024-04-07 17:09:53
* @LastEditors: limin * @LastEditors: limin
* @LastEditTime: 2026-01-29 20:12:25 * @LastEditTime: 2026-04-22 13:47:11
* @FilePath: \simgle_app\App.vue * @FilePath: \simgle_app\App.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
userInfo: uni.getStorageSync('release_userInfo') userInfo: uni.getStorageSync('release_userInfo')
}, },
onLaunch: async function () { onLaunch: async function () {
this.onKeep() // this.onKeep()
this.setAPPVersion() this.setAPPVersion()
setTimeout(() => { setTimeout(() => {
plus.screen.unlockOrientation() //解除锁定屏幕方向 plus.screen.unlockOrientation() //解除锁定屏幕方向
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import ResultList from '@/components/ResultList.vue' import ResultList from '@/components/ResultList.vue'
import CustomerTypeRadio from '@/components/CustomerTypeRadio.vue' import CustomerTypeRadio from '@/components/CustomerTypeRadio.vue'
import RecordService from '@/utils/recordManager/RecordService.js'
const phoneRex = /^[1]([2-9])[0-9]{9}$/; const phoneRex = /^[1]([2-9])[0-9]{9}$/;
export default { export default {
name: 'FinishStep', name: 'FinishStep',
...@@ -262,6 +263,7 @@ export default { ...@@ -262,6 +263,7 @@ export default {
chooseResult (val) { chooseResult (val) {
this.receptionStatus = val this.receptionStatus = val
this.setReceptionStatus(val); this.setReceptionStatus(val);
RecordService.getInstance().updateReceptionStatus(val);
}, },
radioChange (e) { radioChange (e) {
this.formData.customerType = e.detail.value this.formData.customerType = e.detail.value
......
...@@ -9,7 +9,7 @@ class SQLite { ...@@ -9,7 +9,7 @@ class SQLite {
this.description = description || 'SQLite DB' this.description = description || 'SQLite DB'
this.size = size || 50 * 1024 * 1024 // 50MB this.size = size || 50 * 1024 * 1024 // 50MB
this.db = null this.db = null
this.dbPath = null // 存储数据库的完整路径 this.dbPath = `_doc/${name}.db` // 存储数据库的完整路径
// 初始化该数据库的队列(如果不存在) // 初始化该数据库的队列(如果不存在)
if (!SQLite._queues[name]) { if (!SQLite._queues[name]) {
SQLite._queues[name] = new TaskQueue(`SQLite:${name}`) SQLite._queues[name] = new TaskQueue(`SQLite:${name}`)
...@@ -24,15 +24,15 @@ class SQLite { ...@@ -24,15 +24,15 @@ class SQLite {
async init() { async init() {
// 如果已经有路径,直接使用 // 如果已经有路径,直接使用
if (this.dbPath) { // if (this.dbPath) {
uni.$logger?.local?.info(`[SQLite] 使用已有路径: ${this.dbPath}`) uni.$logger?.local?.info(`[SQLite] 使用已有路径: ${this.dbPath}`)
return this.openDatabase() return this.openDatabase()
} // }
// 获取当前文档目录路径 // 获取当前文档目录路径
const rootPath = await PathUtils.getFilePath() // const rootPath = await PathUtils.getFilePath()
this.dbPath = `${rootPath}${this.name}.db` // this.dbPath = `${rootPath}${this.name}.db`
uni.$logger?.local?.info(`[SQLite] 数据库路径已确定: ${this.dbPath}`) // uni.$logger?.local?.info(`[SQLite] 数据库路径已确定: ${this.dbPath}`)
return this.openDatabase() // return this.openDatabase()
} }
/** /**
......
...@@ -48,10 +48,10 @@ class PathUtils { ...@@ -48,10 +48,10 @@ class PathUtils {
*/ */
static getFilePath() { static getFilePath() {
// 1. 优先使用内存缓存,性能最高 // 1. 优先使用内存缓存,性能最高
if (this.CACHED_ROOT_PATH) { // if (this.CACHED_ROOT_PATH) {
uni.$logger?.local?.info(`[PathUtils] 命中内存缓存,根路径: ${this.CACHED_ROOT_PATH}`); // uni.$logger?.local?.info(`[PathUtils] 命中内存缓存,根路径: ${this.CACHED_ROOT_PATH}`);
return Promise.resolve(this.CACHED_ROOT_PATH); // return Promise.resolve(this.CACHED_ROOT_PATH);
} // }
// 2. 尝试读取持久化缓存 // 2. 尝试读取持久化缓存
// const storageCache = uni.getStorageSync(this.ROOT_PATH_CACHE_KEY); // const storageCache = uni.getStorageSync(this.ROOT_PATH_CACHE_KEY);
......
...@@ -124,9 +124,11 @@ class RecordService { ...@@ -124,9 +124,11 @@ class RecordService {
*/ */
attributesProvider() { attributesProvider() {
const typeItem = uni.$storage.get('typeItem') || {} const typeItem = uni.$storage.get('typeItem') || {}
const { storeCode } = uni.$storage.get('storeInfo') || {}
const dynamicAttrs = { const dynamicAttrs = {
typeCode: typeItem.typeCode || '', typeCode: typeItem.typeCode || '',
materialId: this.materialId || '' materialId: this.materialId || '',
merchantId: storeCode || '',
} }
uni.$logger.local.warn(`〖RecordService〗 == 创建新记录,注入动态属性: ${JSON.stringify(dynamicAttrs)}`) uni.$logger.local.warn(`〖RecordService〗 == 创建新记录,注入动态属性: ${JSON.stringify(dynamicAttrs)}`)
return dynamicAttrs return dynamicAttrs
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: limin * @Author: limin
* @Date: 2025-01-07 18:34:39 * @Date: 2025-01-07 18:34:39
* @LastEditors: limin * @LastEditors: limin
* @LastEditTime: 2026-01-20 12:38:03 * @LastEditTime: 2026-04-22 14:13:49
* @FilePath: \simgle_app\utils\recordManager\dbRecord.js * @FilePath: \simgle_app\utils\recordManager\dbRecord.js
*/ */
import DBManager from './DBManager.js' import DBManager from './DBManager.js'
...@@ -17,7 +17,7 @@ class DBRecord extends DBManager { ...@@ -17,7 +17,7 @@ class DBRecord extends DBManager {
'carType TEXT', 'carType TEXT',
'customerType TEXT', 'customerType TEXT',
'result TEXT', 'result TEXT',
'merchantId INTEGER', 'merchantId TEXT',
'machineCode TEXT', 'machineCode TEXT',
'customerName TEXT', 'customerName TEXT',
'customerPhone TEXT', 'customerPhone TEXT',
...@@ -25,7 +25,7 @@ class DBRecord extends DBManager { ...@@ -25,7 +25,7 @@ class DBRecord extends DBManager {
`userName TEXT`, `userName TEXT`,
'startTime TEXT', 'startTime TEXT',
'endTime TEXT', 'endTime TEXT',
'materialId INTEGER', 'materialId TEXT',
'urlList TEXT', 'urlList TEXT',
'tempFilePath TEXT', 'tempFilePath TEXT',
'recordStatus INTEGER DEFAULT 1' // 0: recording, 1: completed 'recordStatus INTEGER DEFAULT 1' // 0: recording, 1: completed
...@@ -40,7 +40,7 @@ class DBRecord extends DBManager { ...@@ -40,7 +40,7 @@ class DBRecord extends DBManager {
try { try {
await super.init() await super.init()
await this.ensureColumns() await this.ensureColumns()
await this.migrateTempRecords() // await this.migrateTempRecords()
return true return true
} catch (e) { } catch (e) {
uni.$logger.local.error('DBRecord: init failed ' + e.message) uni.$logger.local.error('DBRecord: init failed ' + e.message)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!