Commit f64974fd by yuzhenWang

修改薪资单,发布测试

parent eb7b9350
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<!-- ===== vConsole 提前加载 ===== --> <script>
<!-- <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script> --> // ============ 新增:解析 URL 参数并设置状态栏占位 ============
<!-- <script> //解决项目以h5的方式内嵌到app的webview中,手机状态栏和页面顶部内容重叠的问题
// 立即初始化,不依赖任何框架 (function() {
var vConsole = new window.VConsole(); function getQueryParam(name) {
console.log('[vConsole] 已初始化'); // 从 hash 中提取查询参数
</script> --> const hash = window.location.hash;
<!-- ===== vConsole 加载结束 ===== --> const queryIndex = hash.indexOf('?');
<!-- ===== 1. 状态栏占位 ===== --> console.log('queryIndex', queryIndex);
<script> if (queryIndex === -1) return null;
(function() { const queryString = hash.substring(queryIndex + 1);
function getQueryParam(name) { const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)');
var searchParams = new URLSearchParams(window.location.search); const r = queryString.match(reg);
if (searchParams.has(name)) return searchParams.get(name); console.log('匹配结果', r);
var hash = window.location.hash; if (r != null) return decodeURIComponent(r[2]);
var queryIndex = hash.indexOf('?'); return null;
if (queryIndex !== -1) { }
var params = new URLSearchParams(hash.substring(queryIndex + 1)); const statusBarHeight = getQueryParam('statusBarHeight');
if (params.has(name)) return params.get(name); console.log('状态栏高度', statusBarHeight);
} if (statusBarHeight) {
return null; const height = parseInt(statusBarHeight, 10);
} if (!isNaN(height) && height > 0) {
document.write('<style>' +
'html, body { margin:0; padding:0; height:100%; overflow:hidden; }' +
'body { padding-top: ' + height + 'px; box-sizing: border-box; }' +
'#app { height: 100%; overflow-y: auto; }' +
'</style>');
}
}
})();
// ============ 新增结束 ============
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
var statusBarHeight = getQueryParam('statusBarHeight'); // 判断是否在小程序Webview环境中
if (statusBarHeight) { function isInMiniProgram() {
var height = parseInt(statusBarHeight, 10); // 更安全的小程序环境判断
if (!isNaN(height) && height > 0) { try {
var style = document.createElement('style'); return typeof wx !== 'undefined' && wx.miniProgram && wx.miniProgram.getEnv;
style.textContent = } catch (e) {
'html, body { margin:0; padding:0; height:100%; overflow:hidden; }' + return false;
'body { padding-top: ' + height + 'px; box-sizing: border-box; }' + }
'#app { height: 100%; overflow-y: auto; }'; }
document.head.appendChild(style);
}
}
})();
</script>
<!-- ===== 2. Viewport ===== --> // 页面加载完成后执行
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" /> document.addEventListener('DOMContentLoaded', function() {
// 非小程序环境才加载微信JS-SDK
<title>银盾家办</title> if (!isInMiniProgram()) {
<link rel="stylesheet" href="./static/font/iconfont.css"> var script = document.createElement('script');
<link rel="shortcut icon" href="./static/suplogo.ico"> script.src = 'https://res2.wx.qq.com/open/js/jweixin-1.6.0.js';
</head> document.head.appendChild(script);
<body> console.log('加载微信JS-SDK');
<div id="app"></div> } else {
<script type="module" src="/main.js"></script> console.log('小程序Webview环境,不加载微信JS-SDK');
</body> }
</html> });
\ No newline at end of file </script>
<title>银盾家办</title>
<link rel="stylesheet" href="./static/font/iconfont.css">
<link rel="shortcut icon" href="./static/suplogo.ico">
</head>
<body>
<div id="app">
<!--app-html-->
</div>
<script>
(function() {
// 1. 判断是否在 App WebView 中
function isAppWebView() {
// 检测 5+ App(plus 对象)
if (typeof window.plus !== 'undefined') {
return true;
}
// 检测 UserAgent
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('html5plus') !== -1 || ua.indexOf('uni-app') !== -1) {
return true;
}
// 检测 uni-app 注入的全局对象(部分版本)
if (typeof window.__uni__ !== 'undefined') {
return true;
}
return false;
}
if (isAppWebView()) {
console.log('[环境] 检测到 App WebView,开始加载 uni.webview.js');
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = '/appYdhomeoffice/static/uni.webview.1.5.4.js';
script.onload = function() {
// 脚本加载成功后,执行原有逻辑(挂载 webViewJs)
var webViewJs = window.uni?.webView;
if (!webViewJs) {
console.error('uni.webview.js 加载成功但 webViewJs 不存在');
} else {
console.log('uni.webview.js 加载成功', webViewJs);
window.webViewJs = webViewJs;
console.log('window.webViewJs 已挂载', window);
}
};
script.onerror = function() {
console.error('uni.webview.js 加载失败,请检查路径');
};
document.head.appendChild(script);
} else {
console.log('[环境] 非 App WebView,跳过加载 uni.webview.js');
}
})();
</script>
<script type="module" src="/main.js"></script>
</body>
</html>
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
<text class="value negative">-¥{{ Math.abs(sub.amount).toFixed(2) }}</text> <text class="value negative">-¥{{ Math.abs(sub.amount).toFixed(2) }}</text>
</view> --> </view> -->
</view> </view>
<view class="detail-header"> <view class="detail-header" style="margin-top: 30rpx;">
<text class="total-label"> 打款明细</text> <text class="total-label"> 打款明细</text>
<!-- <text class="total-amount">¥{{ item.detail.grossAmount }} <text class="unit">元</text></text> --> <!-- <text class="total-amount">¥{{ item.detail.grossAmount }} <text class="unit">元</text></text> -->
</view> </view>
...@@ -108,10 +108,10 @@ ...@@ -108,10 +108,10 @@
<text class="label">发放金额</text> <text class="label">发放金额</text>
<text class="value">{{ bank.amount.toFixed(2) }} <text v-if="bank.currency">({{bank.currency}}) </text></text> <text class="value">{{ bank.amount.toFixed(2) }} <text v-if="bank.currency">({{bank.currency}}) </text></text>
</view> </view>
<view class="grid-row"> <!-- <view class="grid-row">
<text class="label">币种</text> <text class="label">币种</text>
<text class="value">{{ bank.currency}}</text> <text class="value">{{ bank.currency}}</text>
</view> </view> -->
<view class="grid-row"> <view class="grid-row">
<text class="label">汇率</text> <text class="label">汇率</text>
<text class="value">{{ bank.exchangeRate.toFixed(4)}}</text> <text class="value">{{ bank.exchangeRate.toFixed(4)}}</text>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment