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

年化率、净值处理

parent 2e903a73
......@@ -46,10 +46,10 @@
// 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">
<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>
......@@ -57,8 +57,8 @@
<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>
<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