Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
app
/
sales-assist-mobile
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit caadebd6
authored
Jul 29, 2026
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
d9faa747
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
78 deletions
components/LayoutRoot/index.uvue
pages/person/styles/common.scss
pages/person/styles/index.vars.uts
services/db/DBBase.uts
services/recorder/RecordService.uts
components/LayoutRoot/index.uvue
View file @
caadebd
...
@@ -6,85 +6,14 @@
...
@@ -6,85 +6,14 @@
<script setup lang="uts">
<script setup lang="uts">
import { computed, onMounted, onUnmounted, type Ref, ref, provide } from 'vue'
import { computed, onMounted, onUnmounted, type Ref, ref, provide } from 'vue'
// import { useLayout } from '@/composables/useLayout'
// import { cssClassRef, updateResolutionConfig, useResolutionConfig } from '@/services/adapter'
import { updateOrientation, useScreenVars } from '@/services/adapter/hooks/index.uts'
import { updateOrientation, useScreenVars } from '@/services/adapter/hooks/index.uts'
// import { layoutService } from '@/services/LayoutService.uts'
// import { layoutService } from '@/services/LayoutService.uts'
const props = defineProps<{
const props = defineProps<{
pageVars?: UTSJSONObject | null
pageVars?: UTSJSONObject | null
}>()
}>()
// 通过 provide 注入 pageVars,供子组件使用
// 通过 provide 注入 pageVars,供子组件使用
provide('PAGE_VARS', props.pageVars ?? null)
provide('PAGE_VARS', props.pageVars ?? null)
// const layout = useLayout()
// const rawCssVars = (layout as UTSJSONObject)['cssVars'] as Ref<UTSJSONObject> | null
// onResize(() => {
// console.log('layout-------onResize',1112321321321321)
// updateOrientation()
// })
// const styleObj = computed((): UTSJSONObject => {
// const r = rawCssVars
// if (r == null) return {}
// const v = r.value
// return v != null ? v : {}
// })
// // useResolutionConfig()
// const LAYOUT_ROOT_POLL_MS = 350
// let layoutRootPollId: number | null = null
// let lastLayoutW = 0
// let lastLayoutH = 0
// function syncLayoutRootResolution(): void {
// const info = uni.getWindowInfo()
// let w = info.windowWidth
// let h = info.windowHeight
// if (w == 0 && info.screenWidth > 0) {
// w = info.screenWidth
// if (info.screenHeight > 0) {
// h = info.screenHeight
// }
// }
// if (w == 0 || h == 0) {
// return
// }
// if (w == lastLayoutW && h == lastLayoutH) {
// return
// }
// lastLayoutW = w
// lastLayoutH = h
// layoutService.refreshScreenInfo()
// updateResolutionConfig()
// }
const styleObject = useScreenVars(props.pageVars ?? null)
const styleObject = useScreenVars(props.pageVars ?? null)
// screenVarsHook 已经是 ComputedRef<UTSJSONObject>,直接使用,无需再包 computed
// const adapterClass = computed((): string => {
// const cls = cssClassRef.value
// return cls != null ? (cls as string) : ''
// })
// const modeClass = computed((): string => {
// const modeRef = layoutService.getCurrentMode()
// const m = modeRef.value
// return m == 'portrait' ? 'mode-portrait' : 'mode-landscape'
// })
// const resolutionClass = computed((): string => {
// const bucket = layoutService.getResolutionBucket()
// return `res-${bucket}`
// })
onMounted(() => {
// 无需在此调用 updateOrientation,useScreenVars 已处理
});
onUnmounted(() => {
// const tid = layoutRootPollId
// if (tid != null) {
// clearInterval(tid)
// layoutRootPollId = null
// }
})
</script>
</script>
<style>
<style>
...
...
pages/person/styles/common.scss
View file @
caadebd
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
/* ✅ 主面板(用户资料 + 账号信息) */
/* ✅ 主面板(用户资料 + 账号信息) */
.person-primary-panel
{
.person-primary-panel
{
flex
:
var
(
--
person-primary-flex
,
0
);
/* ✅ 通过 CSS 变量控制 */
flex
:
var
(
--
person-primary-flex
,
none
);
/* ✅ 通过 CSS 变量控制 */
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
}
}
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
/* ✅ 次面板(常用功能) */
/* ✅ 次面板(常用功能) */
.person-secondary-panel
{
.person-secondary-panel
{
flex
:
var
(
--
person-secondary-flex
,
0
);
/* ✅ 通过 CSS 变量控制 */
flex
:
var
(
--
person-secondary-flex
,
none
);
/* ✅ 通过 CSS 变量控制 */
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
margin-top
:
var
(
--
person-secondary-margin-top
,
16px
);
/* ✅ 通过 CSS 变量控制 */
margin-top
:
var
(
--
person-secondary-margin-top
,
16px
);
/* ✅ 通过 CSS 变量控制 */
...
...
pages/person/styles/index.vars.uts
View file @
caadebd
...
@@ -45,8 +45,8 @@ export default {
...
@@ -45,8 +45,8 @@ export default {
// ✅ 统一布局控制:竖屏单列(column)
// ✅ 统一布局控制:竖屏单列(column)
'--person-layout-direction': 'column',
'--person-layout-direction': 'column',
'--person-primary-flex': '
0', /* ✅ 竖屏不占据剩余空间,自然高度
*/
'--person-primary-flex': '
none', /* ✅ 竖屏不占据剩余空间,自然高度(flex: none = 0 0 auto)
*/
'--person-secondary-flex': '
0', /* ✅ 竖屏不占据剩余空间,自然高度
*/
'--person-secondary-flex': '
none', /* ✅ 竖屏不占据剩余空间,自然高度(flex: none = 0 0 auto)
*/
// ✅ 页面边距控制
// ✅ 页面边距控制
'--person-page-padding': '0px', /* ✅ 竖屏无内边距 */
'--person-page-padding': '0px', /* ✅ 竖屏无内边距 */
...
...
services/db/DBBase.uts
View file @
caadebd
...
@@ -169,10 +169,9 @@ export default class DBBase implements IDBBase {
...
@@ -169,10 +169,9 @@ export default class DBBase implements IDBBase {
const existingColumns = await this.db.getTableColumns(this.table_name);
const existingColumns = await this.db.getTableColumns(this.table_name);
logger.info(`[${this.table_name}] 现有列数: ${existingColumns.length}, 期望列数: ${this.table_columns.length}`, "DBBase");
logger.info(`[${this.table_name}] 现有列数: ${existingColumns.length}, 期望列数: ${this.table_columns.length}`, "DBBase");
//
如果现有列少于期望列数,增量添加缺失的
列
//
⚠️ 不依赖长度比较:旧表可能有更多列(旧版本遗留字段),但缺少新
列
if (existingColumns.length < this.table_columns.length) {
// 必须按列名逐一比对增量添加
await this.addMissingColumns(existingColumns);
await this.addMissingColumns(existingColumns);
}
this.tableCreated = true;
this.tableCreated = true;
logger.warn(`[${this.table_name}] 表结构更新完成`, "DBBase");
logger.warn(`[${this.table_name}] 表结构更新完成`, "DBBase");
...
...
services/recorder/RecordService.uts
View file @
caadebd
...
@@ -105,6 +105,7 @@ export class RecordService {
...
@@ -105,6 +105,7 @@ export class RecordService {
}
}
async onAudioStart(res: any) {
async onAudioStart(res: any) {
console.log("🚀 ~ RecordService ~ onAudioStart ~ res:", res)
try {
try {
// 安全检查:防止 Service 已重置导致空指针
// 安全检查:防止 Service 已重置导致空指针
if (this.audioManager === null) {
if (this.audioManager === null) {
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment