Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
f64974fd
Commit
f64974fd
authored
Oct 23, 2026
by
yuzhenWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改薪资单,发布测试
parent
eb7b9350
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
122 additions
and
54 deletions
+122
-54
index.html
+119
-51
myPackageA/salary/salaryList.vue
+3
-3
No files found.
index.html
View file @
f64974fd
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
/>
<!-- ===== vConsole 提前加载 ===== -->
<!-- <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script> -->
<!-- <script>
// 立即初始化,不依赖任何框架
var vConsole = new window.VConsole();
console.log('[vConsole] 已初始化');
</script> -->
<!-- ===== vConsole 加载结束 ===== -->
<!-- ===== 1. 状态栏占位 ===== -->
<script>
(
function
()
{
function
getQueryParam
(
name
)
{
var
searchParams
=
new
URLSearchParams
(
window
.
location
.
search
);
if
(
searchParams
.
has
(
name
))
return
searchParams
.
get
(
name
);
var
hash
=
window
.
location
.
hash
;
var
queryIndex
=
hash
.
indexOf
(
'?'
);
if
(
queryIndex
!==
-
1
)
{
var
params
=
new
URLSearchParams
(
hash
.
substring
(
queryIndex
+
1
));
if
(
params
.
has
(
name
))
return
params
.
get
(
name
);
}
return
null
;
}
<head>
<meta
charset=
"UTF-8"
/>
<script>
// ============ 新增:解析 URL 参数并设置状态栏占位 ============
//解决项目以h5的方式内嵌到app的webview中,手机状态栏和页面顶部内容重叠的问题
(
function
()
{
function
getQueryParam
(
name
)
{
// 从 hash 中提取查询参数
const
hash
=
window
.
location
.
hash
;
const
queryIndex
=
hash
.
indexOf
(
'?'
);
console
.
log
(
'queryIndex'
,
queryIndex
);
if
(
queryIndex
===
-
1
)
return
null
;
const
queryString
=
hash
.
substring
(
queryIndex
+
1
);
const
reg
=
new
RegExp
(
'(^|&)'
+
name
+
'=([^&]*)(&|$)'
);
const
r
=
queryString
.
match
(
reg
);
console
.
log
(
'匹配结果'
,
r
);
if
(
r
!=
null
)
return
decodeURIComponent
(
r
[
2
]);
return
null
;
}
const
statusBarHeight
=
getQueryParam
(
'statusBarHeight'
);
console
.
log
(
'状态栏高度'
,
statusBarHeight
);
if
(
statusBarHeight
)
{
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'
);
if
(
statusBarHeight
)
{
var
height
=
parseInt
(
statusBarHeight
,
10
);
if
(
!
isNaN
(
height
)
&&
height
>
0
)
{
var
style
=
document
.
createElement
(
'style'
);
style
.
textContent
=
'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; }'
;
document
.
head
.
appendChild
(
style
);
}
}
})();
</script>
// 判断是否在小程序Webview环境中
function
isInMiniProgram
()
{
// 更安全的小程序环境判断
try
{
return
typeof
wx
!==
'undefined'
&&
wx
.
miniProgram
&&
wx
.
miniProgram
.
getEnv
;
}
catch
(
e
)
{
return
false
;
}
}
<!-- ===== 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"
/>
<title>
银盾家办
</title>
<link
rel=
"stylesheet"
href=
"./static/font/iconfont.css"
>
<link
rel=
"shortcut icon"
href=
"./static/suplogo.ico"
>
</head>
<body>
<div
id=
"app"
></div>
<script
type=
"module"
src=
"/main.js"
></script>
</body>
</html>
\ No newline at end of file
// 页面加载完成后执行
document
.
addEventListener
(
'DOMContentLoaded'
,
function
()
{
// 非小程序环境才加载微信JS-SDK
if
(
!
isInMiniProgram
())
{
var
script
=
document
.
createElement
(
'script'
);
script
.
src
=
'https://res2.wx.qq.com/open/js/jweixin-1.6.0.js'
;
document
.
head
.
appendChild
(
script
);
console
.
log
(
'加载微信JS-SDK'
);
}
else
{
console
.
log
(
'小程序Webview环境,不加载微信JS-SDK'
);
}
});
</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>
myPackageA/salary/salaryList.vue
View file @
f64974fd
...
...
@@ -84,7 +84,7 @@
<text
class=
"value negative"
>
-¥
{{
Math
.
abs
(
sub
.
amount
).
toFixed
(
2
)
}}
</text>
</view>
-->
</view>
<view
class=
"detail-header"
>
<view
class=
"detail-header"
style=
"margin-top: 30rpx;"
>
<text
class=
"total-label"
>
打款明细
</text>
<!--
<text
class=
"total-amount"
>
¥
{{
item
.
detail
.
grossAmount
}}
<text
class=
"unit"
>
元
</text></text>
-->
</view>
...
...
@@ -108,10 +108,10 @@
<text
class=
"label"
>
发放金额
</text>
<text
class=
"value"
>
{{
bank
.
amount
.
toFixed
(
2
)
}}
<text
v-if=
"bank.currency"
>
(
{{
bank
.
currency
}}
)
</text></text>
</view>
<view
class=
"grid-row"
>
<
!--
<
view
class=
"grid-row"
>
<text
class=
"label"
>
币种
</text>
<text
class=
"value"
>
{{
bank
.
currency
}}
</text>
</view>
</view>
-->
<view
class=
"grid-row"
>
<text
class=
"label"
>
汇率
</text>
<text
class=
"value"
>
{{
bank
.
exchangeRate
.
toFixed
(
4
)
}}
</text>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment