修改登录、订单复核页面
This commit is contained in:
parent
f615f90c27
commit
a304fe645d
@ -40,7 +40,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="showSwitchMask" class="switch-mask"></view>
|
||||
<view v-show="switchMaskVisible" :class="['switch-mask', switchMaskActive ? 'switch-mask--active' : '']"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -75,8 +75,10 @@ export default {
|
||||
lastMenuClickAt: 0,
|
||||
routeSyncTimer: null,
|
||||
lastRoutePath: '',
|
||||
showSwitchMask: false,
|
||||
switchMaskVisible: false,
|
||||
switchMaskActive: false,
|
||||
switchMaskTimer: null,
|
||||
switchMaskFadeTimer: null,
|
||||
switchMaskStartedAt: 0,
|
||||
currentUser: null,
|
||||
defaultMenus: [
|
||||
@ -148,6 +150,10 @@ export default {
|
||||
clearTimeout(this.switchMaskTimer)
|
||||
this.switchMaskTimer = null
|
||||
}
|
||||
if (this.switchMaskFadeTimer) {
|
||||
clearTimeout(this.switchMaskFadeTimer)
|
||||
this.switchMaskFadeTimer = null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
normalizePath(path) {
|
||||
@ -183,22 +189,42 @@ export default {
|
||||
return currentPage?.route ? `/${currentPage.route}` : ''
|
||||
},
|
||||
showNavigationMask() {
|
||||
this.showSwitchMask = true
|
||||
this.switchMaskStartedAt = Date.now()
|
||||
if (this.switchMaskTimer) {
|
||||
clearTimeout(this.switchMaskTimer)
|
||||
this.switchMaskTimer = null
|
||||
}
|
||||
if (this.switchMaskFadeTimer) {
|
||||
clearTimeout(this.switchMaskFadeTimer)
|
||||
this.switchMaskFadeTimer = null
|
||||
}
|
||||
// 先把遮罩放回 DOM(透明状态),下一帧再激活透明度触发淡入
|
||||
this.switchMaskActive = false
|
||||
this.switchMaskVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.switchMaskActive = true
|
||||
})
|
||||
},
|
||||
hideNavigationMask() {
|
||||
const elapsed = Date.now() - this.switchMaskStartedAt
|
||||
const delay = elapsed >= 100 ? 0 : 100 - elapsed
|
||||
// 至少保持可见一段时间,给新页面留出首帧渲染时间,避免刚出现就消失造成闪烁
|
||||
const minVisible = 180
|
||||
const delay = elapsed >= minVisible ? 0 : minVisible - elapsed
|
||||
if (this.switchMaskTimer) {
|
||||
clearTimeout(this.switchMaskTimer)
|
||||
}
|
||||
this.switchMaskTimer = setTimeout(() => {
|
||||
this.showSwitchMask = false
|
||||
this.switchMaskTimer = null
|
||||
// 触发淡出过渡
|
||||
this.switchMaskActive = false
|
||||
if (this.switchMaskFadeTimer) {
|
||||
clearTimeout(this.switchMaskFadeTimer)
|
||||
}
|
||||
// 淡出动画结束后再移除 DOM,保证过渡完整执行
|
||||
this.switchMaskFadeTimer = setTimeout(() => {
|
||||
this.switchMaskFadeTimer = null
|
||||
this.switchMaskVisible = false
|
||||
}, 200)
|
||||
}, delay)
|
||||
},
|
||||
navigateToMenu(targetPath) {
|
||||
@ -322,6 +348,7 @@ export default {
|
||||
}
|
||||
|
||||
this.loadCurrentUserInfo()
|
||||
this.closeMinePopup()
|
||||
uni.showToast({
|
||||
title: '角色切换成功',
|
||||
icon: 'success',
|
||||
@ -402,7 +429,7 @@ export default {
|
||||
}
|
||||
|
||||
.top-nav-menu-text {
|
||||
font-size: 28rpx;
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
}
|
||||
@ -478,7 +505,7 @@ export default {
|
||||
}
|
||||
|
||||
.popup-user-text {
|
||||
font-size: 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
@ -490,14 +517,14 @@ export default {
|
||||
margin-top: 16rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
font-size: 24rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.close-btn {
|
||||
margin-top: 10rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
font-size: 24rpx;
|
||||
font-size: 28rpx;
|
||||
background-color: #f5f7fb;
|
||||
color: #333;
|
||||
}
|
||||
@ -508,8 +535,16 @@ export default {
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(248, 248, 248, 0.96);
|
||||
background-color: #f8f8f8;
|
||||
z-index: 9999;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.2s ease, visibility 0.2s ease;
|
||||
}
|
||||
|
||||
.switch-mask--active {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -8,12 +8,9 @@
|
||||
/>
|
||||
|
||||
<view class="layout-main">
|
||||
<component
|
||||
v-if="activeViewComponent"
|
||||
:is="activeViewComponent"
|
||||
:key="activeMenuPath"
|
||||
compact-top
|
||||
/>
|
||||
<keep-alive v-if="activeViewComponent">
|
||||
<component :is="activeViewComponent" :embedded="true" compact-top />
|
||||
</keep-alive>
|
||||
<view v-else class="module-placeholder">
|
||||
<text class="module-placeholder-title">{{ getActiveMenuTitle() || '请选择功能菜单' }}</text>
|
||||
<text v-if="activeMenuPath" class="module-placeholder-desc">该菜单页面尚未配置({{ activeMenuPath }})</text>
|
||||
|
||||
@ -917,7 +917,7 @@ export default {
|
||||
return
|
||||
}
|
||||
uni.reLaunch({
|
||||
url: '/pages/order/index',
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}, 300)
|
||||
return
|
||||
@ -986,7 +986,7 @@ export default {
|
||||
return
|
||||
}
|
||||
uni.reLaunch({
|
||||
url: '/pages/order/index',
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}, 300)
|
||||
return
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<top-nav />
|
||||
<top-nav v-if="!embedded" />
|
||||
<view class="page-main order-review-one">
|
||||
<view class="container container--compact-top">
|
||||
<view class="search-bar">
|
||||
@ -215,6 +215,13 @@ export default {
|
||||
components: {
|
||||
TopNav,
|
||||
},
|
||||
props: {
|
||||
// 在布局壳内渲染时为 true,隐藏内嵌顶栏;独立访问时不传,显示顶栏
|
||||
embedded: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pendingCount: 134,
|
||||
@ -280,24 +287,18 @@ export default {
|
||||
this.requestCameraPreview()
|
||||
this.bindFullscreenEvents()
|
||||
},
|
||||
onReady() {
|
||||
activated() {
|
||||
// keep-alive 从缓存恢复时重新初始化摄像头
|
||||
this.requestCameraPreview()
|
||||
},
|
||||
onShow() {
|
||||
this.requestCameraPreview()
|
||||
deactivated() {
|
||||
// 切走时释放摄像头,避免设备被持续占用
|
||||
this.stopCameraPreview()
|
||||
},
|
||||
beforeUnmount() {
|
||||
this.unbindFullscreenEvents()
|
||||
this.stopCameraPreview()
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.unbindFullscreenEvents()
|
||||
this.stopCameraPreview()
|
||||
},
|
||||
onUnload() {
|
||||
this.unbindFullscreenEvents()
|
||||
this.stopCameraPreview()
|
||||
},
|
||||
methods: {
|
||||
requestCameraPreview() {
|
||||
if (this.cameraInitializing || this.cameraLoading || this.cameraReady) {
|
||||
@ -898,8 +899,8 @@ export default {
|
||||
|
||||
<style>
|
||||
.page {
|
||||
height: 100vh;
|
||||
min-height: 100vh;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
@ -907,10 +908,6 @@ export default {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
.page > .top-nav {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.page-main {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
@ -1034,7 +1031,7 @@ export default {
|
||||
}
|
||||
|
||||
.camera-control-icon {
|
||||
font-size: 30rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 1;
|
||||
color: #ffffff;
|
||||
}
|
||||
@ -1059,7 +1056,7 @@ export default {
|
||||
.camera-zoom-text {
|
||||
width: 88rpx;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
@ -1075,7 +1072,7 @@ export default {
|
||||
}
|
||||
|
||||
.camera-preview-text {
|
||||
font-size: 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #9098a4;
|
||||
line-height: 1.5;
|
||||
text-align: center;
|
||||
@ -1086,7 +1083,7 @@ export default {
|
||||
}
|
||||
|
||||
.left-summary-text {
|
||||
font-size: 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
}
|
||||
@ -1143,7 +1140,7 @@ export default {
|
||||
|
||||
.settings-label {
|
||||
width: 200rpx;
|
||||
font-size: 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
@ -1153,7 +1150,7 @@ export default {
|
||||
border: 1rpx solid #e5e5e5;
|
||||
border-radius: 8rpx;
|
||||
padding: 0 16rpx;
|
||||
font-size: 24rpx;
|
||||
font-size: 28rpx;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@ -1168,7 +1165,7 @@ export default {
|
||||
width: 100%;
|
||||
height: 68rpx;
|
||||
line-height: 68rpx;
|
||||
font-size: 26rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.header-action-btn {
|
||||
@ -1194,7 +1191,7 @@ export default {
|
||||
.header-action-text {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 22rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 1;
|
||||
color: #333;
|
||||
}
|
||||
@ -1251,7 +1248,7 @@ export default {
|
||||
}
|
||||
|
||||
.pagination-info {
|
||||
font-size: 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
@ -1265,7 +1262,7 @@ export default {
|
||||
width: 140rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
font-size: 24rpx;
|
||||
font-size: 28rpx;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@ -1318,7 +1315,7 @@ export default {
|
||||
border: 1rpx solid #e6ebf5;
|
||||
background-color: #fff;
|
||||
color: #999;
|
||||
font-size: 26rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.empty-panel--left {
|
||||
@ -1409,7 +1406,7 @@ export default {
|
||||
|
||||
.table-cell {
|
||||
padding: 0 12rpx;
|
||||
font-size: 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
white-space: nowrap;
|
||||
@ -1467,7 +1464,7 @@ export default {
|
||||
.empty {
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 26rpx;
|
||||
font-size: 28rpx;
|
||||
padding: 24rpx 0;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<top-nav />
|
||||
<top-nav v-if="!embedded" />
|
||||
<view class="page-main">
|
||||
<view class="dynamic-view dynamic-view--returns">
|
||||
<view class="module-card">
|
||||
@ -20,13 +20,20 @@ export default {
|
||||
components: {
|
||||
TopNav,
|
||||
},
|
||||
props: {
|
||||
// 在布局壳内渲染时为 true,隐藏内嵌顶栏;独立访问时不传,显示顶栏
|
||||
embedded: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.page {
|
||||
height: 100vh;
|
||||
min-height: 100vh;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
@ -34,10 +41,6 @@ export default {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
.page > .top-nav {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.page-main {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<top-nav />
|
||||
<top-nav v-if="!embedded" />
|
||||
<view class="page-main">
|
||||
<view class="dynamic-view dynamic-view--catch-weight">
|
||||
<view class="module-card">
|
||||
@ -20,13 +20,20 @@ export default {
|
||||
components: {
|
||||
TopNav,
|
||||
},
|
||||
props: {
|
||||
// 在布局壳内渲染时为 true,隐藏内嵌顶栏;独立访问时不传,显示顶栏
|
||||
embedded: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.page {
|
||||
height: 100vh;
|
||||
min-height: 100vh;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
@ -34,10 +41,6 @@ export default {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
.page > .top-nav {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.page-main {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user