Commit 275a954a authored by 俞嘉婷's avatar 俞嘉婷

年化率、净值处理

parent 2e903a73
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<link rel="dns-prefetch" href="//yun.duiba.com.cn" />
<link rel="preconnect" href="//embedlog.duiba.com.cn">
<title>模拟理财 月度争霸赛</title>
<script type="text/javascript">
if (localStorage && localStorage.isWebp) {
document
.getElementsByTagName('html')[0]
.setAttribute('duiba-webp', 'true');
}
</script>
<script src="//yun.duiba.com.cn/js-libs/rem/1.1.3/rem.min.js"></script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<script src="//res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<!-- 华夏银行app文件 -->
<script src="//yun.duiba.com.cn/polaris/hxbExtLib.min.f2e3022c5ce5dd92689bff0a5b6c5cb0e9193cd1.js"></script>
<script>
var CFG = CFG || {};
CFG.projectId = location.pathname.split('/')[2] || '1';
function getUrlParam(name) {
var search = window.location.search;
var matched = search
.slice(1)
.match(new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'));
return search.length ? matched && matched[2] : null;
}
CFG.appID = '${APPID}';
CFG.domain = location.origin
// 渠道
CFG.channel = getUrlParam("channel");
// 首页
CFG.index = '/projectx/' + CFG.projectId + '/index.html?appID=' + CFG.appID + '&channel=' + CFG.channel;
// 提示弹窗二维码短链链接(目的页是 首页xx/index.html?off=1) 线上正式 TODO 域名记得改为dexfu的
CFG.prizePageQrcodeUrl = CFG.domain + CFG.index + "&off=1";
if (!getUrlParam("appID")) {
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
}
</script>
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1752127973097/assets/index-Cl-EuRPq.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1752127973097/assets/vendor-pyrxJLW_.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1752127973097/assets/vendor-BQh5NVNk.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1752127973097/assets/index-BTmSwAZL.css">
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<link rel="dns-prefetch" href="//yun.duiba.com.cn" />
<link rel="preconnect" href="//embedlog.duiba.com.cn">
<title>模拟理财 月度争霸赛</title>
<script type="text/javascript">
if (localStorage && localStorage.isWebp) {
document
.getElementsByTagName('html')[0]
.setAttribute('duiba-webp', 'true');
}
</script>
<script src="//yun.duiba.com.cn/js-libs/rem/1.1.3/rem.min.js"></script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<script src="//res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<!-- 华夏银行app文件 -->
<script src="//yun.duiba.com.cn/polaris/hxbExtLib.min.f2e3022c5ce5dd92689bff0a5b6c5cb0e9193cd1.js"></script>
<script>
var CFG = CFG || {};
CFG.projectId = location.pathname.split('/')[2] || '1';
function getUrlParam(name) {
var search = window.location.search;
var matched = search
.slice(1)
.match(new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'));
return search.length ? matched && matched[2] : null;
}
CFG.appID = '${APPID}';
CFG.domain = location.origin
// 渠道
CFG.channel = getUrlParam("channel");
// 首页
CFG.index = '/projectx/' + CFG.projectId + '/index.html?appID=' + CFG.appID + '&channel=' + CFG.channel;
// 提示弹窗二维码短链链接(目的页是 首页xx/index.html?off=1) 线上正式 TODO 域名记得改为dexfu的
CFG.prizePageQrcodeUrl = CFG.domain + CFG.index + "&off=1";
if (!getUrlParam("appID")) {
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
}
</script>
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1752133227597/assets/index-LPwj3o85.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1752133227597/assets/vendor-pyrxJLW_.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1752133227597/assets/vendor-BQh5NVNk.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1752133227597/assets/index-BljVMm7t.css">
<script type="module">import.meta.url;import("_").catch(()=>1);(async function*(){})().next();if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script>
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
</head>
<body>
<div id="root"></div>
</head>
<body>
<div id="root"></div>
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
<script nomodule crossorigin id="vite-legacy-polyfill" src="https://yun.duiba.com.cn/db_games/spark/v3/1752127973097/assets/polyfills-legacy-D0AVcSo7.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1752127973097/assets/index-legacy-BFUp6Pwl.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>
</html>
<script nomodule crossorigin id="vite-legacy-polyfill" src="https://yun.duiba.com.cn/db_games/spark/v3/1752133227597/assets/polyfills-legacy-D0AVcSo7.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1752133227597/assets/index-legacy-BHbiafmR.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>
</html>
......@@ -192,7 +192,7 @@ class Store {
_temp.recommendProductConfig = _temp.recommendProductConfig?.map(item => {
const _adInfo = adInfos.find(adInfo => adInfo.fundcode == item.code)
if (_adInfo) {
item.rate = (_adInfo.incomeRate || 0) * 100
item.rate = (_adInfo.incomeRate.replace('%', '') || 0) * 10000 / 100
return item
}
return item
......@@ -202,8 +202,8 @@ class Store {
// 本地自测代码
// adInfos[0] = {
// fundcode: '23112008P',
// incomeRate: 1.78,
// pernetValue: 1.66,
// incomeRate: '1.78%',
// pernetValue: '1.0690',
// }
if (!adInfos?.length) return
......@@ -211,8 +211,8 @@ class Store {
const _codeList = adInfos.map(item => {
return {
code: item.fundcode, // 产品code
incomeRate: (item.incomeRate || 0) * 100, // 年化率(单位:分),例如:1.78%传递178
netValue: (item.pernetValue || 0) * 100, // 净值(单位:分),例如:1.66传递166
incomeRate: (item.incomeRate.replace('%', '') || 0) * 10000 / 100, // 年化率(单位:分),例如:1.78%传递178
netValue: (item.pernetValue || 0) * 10000 / 100, // 净值(单位:分),例如:1.66传递166
}
})
const params = {
......
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