Commit eee1e3ff by yuzhenWang

Merge branch 'dev' into 'wyz'

Dev

See merge request !130
parents 3f723f79 92378981
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<script> <!-- ===== vConsole 提前加载 ===== -->
// ============ 新增:解析 URL 参数并设置状态栏占位 ============ <!-- <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script> -->
//解决项目以h5的方式内嵌到app的webview中,手机状态栏和页面顶部内容重叠的问题 <!-- <script>
(function() { // 立即初始化,不依赖任何框架
function getQueryParam(name) { var vConsole = new window.VConsole();
// 从 hash 中提取查询参数 console.log('[vConsole] 已初始化');
const hash = window.location.hash; </script> -->
const queryIndex = hash.indexOf('?'); <!-- ===== vConsole 加载结束 ===== -->
console.log('queryIndex', queryIndex); <!-- ===== 1. 状态栏占位 ===== -->
if (queryIndex === -1) return null; <script>
const queryString = hash.substring(queryIndex + 1); (function() {
const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)'); function getQueryParam(name) {
const r = queryString.match(reg); var searchParams = new URLSearchParams(window.location.search);
console.log('匹配结果', r); if (searchParams.has(name)) return searchParams.get(name);
if (r != null) return decodeURIComponent(r[2]); var hash = window.location.hash;
return null; var queryIndex = hash.indexOf('?');
} if (queryIndex !== -1) {
const statusBarHeight = getQueryParam('statusBarHeight'); var params = new URLSearchParams(hash.substring(queryIndex + 1));
console.log('状态栏高度', statusBarHeight); if (params.has(name)) return params.get(name);
if (statusBarHeight) { }
const height = parseInt(statusBarHeight, 10); return null;
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' : '') + '" />')
// 判断是否在小程序Webview环境中 var statusBarHeight = getQueryParam('statusBarHeight');
function isInMiniProgram() { if (statusBarHeight) {
// 更安全的小程序环境判断 var height = parseInt(statusBarHeight, 10);
try { if (!isNaN(height) && height > 0) {
return typeof wx !== 'undefined' && wx.miniProgram && wx.miniProgram.getEnv; var style = document.createElement('style');
} catch (e) { style.textContent =
return false; '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>
// 页面加载完成后执行 <!-- ===== 2. Viewport ===== -->
document.addEventListener('DOMContentLoaded', function() { <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" />
// 非小程序环境才加载微信JS-SDK
if (!isInMiniProgram()) { <title>银盾家办</title>
var script = document.createElement('script'); <link rel="stylesheet" href="./static/font/iconfont.css">
script.src = 'https://res2.wx.qq.com/open/js/jweixin-1.6.0.js'; <link rel="shortcut icon" href="./static/suplogo.ico">
document.head.appendChild(script); </head>
console.log('加载微信JS-SDK'); <body>
} else { <div id="app"></div>
console.log('小程序Webview环境,不加载微信JS-SDK'); <script type="module" src="/main.js"></script>
} </body>
});
</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 type="module" src="/main.js"></script>
</body>
</html> </html>
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<view class="banner"> <view class="banner">
<!--头部技术支持组件--> <!--头部技术支持组件-->
<!-- <commonHead></commonHead> --> <!-- <commonHead></commonHead> -->
<image src="../../static/images/banner.png" mode="widthFix"></image> <image src="../../static/images/banner.webp" mode="widthFix"></image>
</view> </view>
<scroll-view scroll-y="true" class="formInfoContainer" id="formInfoContainer"> <scroll-view scroll-y="true" class="formInfoContainer" id="formInfoContainer">
<form> <form>
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
<view v-if="resultInfos.code == 'B001' || resultInfos.code =='B002'" style="display: flex;align-items: center;"> <view v-if="resultInfos.code == 'B001' || resultInfos.code =='B002'" style="display: flex;align-items: center;">
<!-- <view style="display: flex;align-items: center;"> --> <!-- <view style="display: flex;align-items: center;"> -->
<view style="margin-right: 16rpx;"> <view style="margin-right: 16rpx;">
<image src="../../static/images/happy.png" mode="widthFix"></image> <image src="../../static/images/happy.webp" mode="widthFix"></image>
</view> </view>
<view> <view>
<view>恭喜您!</view> <view>恭喜您!</view>
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
<view v-if="resultInfos.code == 'A001' || resultInfos.code =='A002'" style="display: flex;align-items: center;"> <view v-if="resultInfos.code == 'A001' || resultInfos.code =='A002'" style="display: flex;align-items: center;">
<!-- <view style="display: flex;align-items: center;"> --> <!-- <view style="display: flex;align-items: center;"> -->
<view style="margin-right: 16rpx;"> <view style="margin-right: 16rpx;">
<image src="../../static/images/sad.png" mode="widthFix"></image> <image src="../../static/images/sad.webp" mode="widthFix"></image>
</view> </view>
<view> <view>
<view>很遗憾!</view> <view>很遗憾!</view>
...@@ -216,8 +216,8 @@ ...@@ -216,8 +216,8 @@
</view> </view>
<view class="line" v-for="houseItem in housePurchasePrices"> <view class="line" v-for="houseItem in housePurchasePrices">
<view class="line_title">{{getResultTitle(houseItem.priceType)}} <view class="line_title">{{getResultTitle(houseItem.priceType)}}
<image src="../../static/images/can.png" v-show="houseItem.fvDifference <= 0" mode="widthFix"></image> <image src="../../static/images/can.webp" v-show="houseItem.fvDifference <= 0" mode="widthFix"></image>
<image src="../../static/images/cannot.png" v-show="houseItem.fvDifference > 0" mode="widthFix"></image> <image src="../../static/images/cannot.webp" v-show="houseItem.fvDifference > 0" mode="widthFix"></image>
</view> </view>
<view class="content"> <view class="content">
<view class="left"> <view class="left">
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
现值:{{numberConverter(houseItem.pvPriceRealization)}} 现值:{{numberConverter(houseItem.pvPriceRealization)}}
</view> --> </view> -->
</view> </view>
<image src="../../static/images/vs.png" mode="widthFix"></image> <image src="../../static/images/vs.webp" mode="widthFix"></image>
<view class="right"> <view class="right">
<view class="realizable">你想要的</view> <view class="realizable">你想要的</view>
<view>{{housePurchaseInfo.nyear}}年后:{{formatFloat(houseItem.fvPriceDesired/10000)}}万元</view> <view>{{housePurchaseInfo.nyear}}年后:{{formatFloat(houseItem.fvPriceDesired/10000)}}万元</view>
......
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