文件
yjyf/yjyf-app/App.vue
MiAn fafddceaf2 feat: 新增发票抬头、晒单、钱包日志等模型及后台管理功能
- 新增 invoice_title、showcase、wallet_log 模型及对应语言包
- 新增后台控制器、视图及搜索字段配置
- 修复服务类目删除保护逻辑
- 优化后台登录页面文案及样式
- 新增前端角色切换逻辑及页面拦截
- 新增 SVG 图标及样式变量
- 修复接口权限及下拉框默认值问题
2026-11-11 17:02:35 +08:00

112 行
2.6 KiB
Vue

<script>
let lastNavUrl = '';
let lastNavAt = 0;
export default {
onLaunch: function() {
if (typeof uni !== 'undefined' && typeof uni.addInterceptor === 'function') {
uni.addInterceptor('navigateTo', {
invoke(args) {
const url = (args && args.url) ? String(args.url) : '';
const now = Date.now();
if (url && url === lastNavUrl && now - lastNavAt < 450) {
return false;
}
lastNavUrl = url;
lastNavAt = now;
return true;
}
});
}
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
/* ============================================================
优匠优服 · 全局通用样式与基准工具类
============================================================ */
page {
background-color: $yjyf-bg-page;
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Hiragino Sans GB', Arial, sans-serif;
color: $yjyf-text-main;
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
}
view, text, image, input, textarea, scroll-view, button {
box-sizing: border-box;
}
/* 全局安全区底部内边距 */
.safe-area-bottom {
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
/* 全局规范卡片类 */
.yjyf-card {
margin: $yjyf-space-sm $yjyf-space-lg 0;
padding: $yjyf-space-md;
background: $yjyf-bg-card;
border-radius: $yjyf-radius-md;
box-shadow: $yjyf-shadow-card;
}
/* 即时按压微交互反馈 (消除生硬感) */
.clickable-hover {
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.clickable-hover:active {
opacity: 0.82;
transform: scale(0.985);
}
/* 全局胶囊主行动按钮 */
.yjyf-btn-primary {
height: 88rpx;
line-height: 88rpx;
padding: 0 $yjyf-space-xl;
border-radius: $yjyf-radius-pill;
background: $yjyf-gradient-primary;
color: #FFFFFF;
font-size: $yjyf-font-body;
font-weight: 600;
text-align: center;
box-shadow: 0 8rpx 20rpx rgba(240, 113, 13, 0.28);
border: none;
display: flex;
align-items: center;
justify-content: center;
&[disabled], &.disabled {
opacity: 0.65;
box-shadow: none;
}
}
/* 骨架屏微光呼吸动效 (解决白屏) */
@keyframes yjyf-shimmer {
0% {
background-position: -400rpx 0;
}
100% {
background-position: 400rpx 0;
}
}
.yjyf-shimmer {
background: linear-gradient(90deg, #F0F1F3 25%, #E6E8EA 37%, #F0F1F3 63%);
background-size: 800rpx 100%;
animation: yjyf-shimmer 1.4s ease infinite;
border-radius: 8rpx;
}
</style>