Commit 5c5e6169 authored by haiyoucuv's avatar haiyoucuv

Merge remote-tracking branch 'origin/master'

parents 9c34a72a 42a49e85
<!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 = "https://hxlc90548.activity-29.m.duiba.com.cn/outActivity/12hy";
if (location.origin.indexOf("duibatest") > -1) {
// 测试环境
CFG.prizePageQrcodeUrl = CFG.index + "&off=1"
} else if (CFG.projectId == 'p5185b9f0') {
// 线上测试
CFG.prizePageQrcodeUrl = "https://hxlc90548.activity-29.m.duiba.com.cn/outActivity/12hw"
}
if (!getUrlParam("appID")) {
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
}
</script>
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1751954284666/assets/index-DzMYPHXC.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1751954284666/assets/vendor-D7FE14_V.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1751954284666/assets/vendor-BQh5NVNk.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1751954284666/assets/index-qvX1dxIS.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 = "https://hxlc90548.activity-29.m.duiba.com.cn/outActivity/12hy";
if (location.origin.indexOf("duibatest") > -1) {
// 测试环境
CFG.prizePageQrcodeUrl = CFG.index + "&off=1"
} else if (CFG.projectId == 'p5185b9f0') {
// 线上测试
CFG.prizePageQrcodeUrl = "https://hxlc90548.activity-29.m.duiba.com.cn/outActivity/12hw"
}
if (!getUrlParam("appID")) {
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
}
</script>
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1751959515476/assets/index-CUZw5tm1.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1751959515476/assets/vendor-D7FE14_V.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1751959515476/assets/vendor-BQh5NVNk.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1751959515476/assets/index-x7k6Se54.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/1751954284666/assets/polyfills-legacy-D0AVcSo7.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1751954284666/assets/index-legacy-DfqrxMU7.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/1751959515476/assets/polyfills-legacy-D0AVcSo7.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1751959515476/assets/index-legacy-B0MF5ekG.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>
</html>
......@@ -52,6 +52,7 @@ export default [
actEndTime: Date.now() + 3 * 24 * 60 * 60 * 1000,
myEndTime: Date.now() - 1 * 24 * 60 * 60 * 1000,
endPop: false,
productEnd: true,
uid: '234234',
ruleText: 'rulerulerulerulerulerulerule',
"bigStartConfig": new Array(5).fill(1).map((_, index) => {
......@@ -106,7 +107,7 @@ export default [
return {
"name": `固收纯债最短持有7天A款Z${index + 1}`,
"shenShuGuiZei": "交易日申赎",
"touZiQiXianText": "近1个月年化收益率(截至2023/03/26)",
"touZiQiXianText": "2023/03/26",
"qigouText": "1元起购",
"baiFenBiText": "90%活动用户选购本产品t",
"fengXian": "中低风险",
......
......@@ -19,12 +19,12 @@ export const PRODUCT_TYPE = {
CASH: 1,
}
/** 产品类型 */
/** 产品收益率名称 */
export const RATE_NAME = {
/** 非现金 */
[PRODUCT_TYPE.NON_CASH]: '年化收益率1TODO',
[PRODUCT_TYPE.NON_CASH]: '成立以来年化',
/** 现金 */
[PRODUCT_TYPE.CASH]: '年化收益率2TODO',
[PRODUCT_TYPE.CASH]: '七日年化',
}
/** 渠道 */
......@@ -57,7 +57,7 @@ export const IS_OTHER_APP = ![CHANNEL.HXBANK, CHANNEL.HXLC].includes(CFG.channel
* @returns
*/
export function queryAppFundDetail(fund) {
const fundcode = fund?.fundCode || ''
const fundcode = fund?.code || ''
console.info('获取基金产品详情 ', fundcode);
return new Promise(resolve => {
// app获取
......@@ -71,8 +71,8 @@ export function queryAppFundDetail(fund) {
newDate: result.newDate, // 当前日期
totalnetValue: result.totalnetvalue, // 累计净值
pernetValue: result.pernetvalue, // 单位净值
incomeRate: fund?.productType == 1 ? result.incomeRate : result.incomeRateO, // 收益率
incomeRateName: fund?.productType == 1 ? result.incomeRateName : result.incomeRateNameO, // 收益率名称
incomeRate: fund?.type == PRODUCT_TYPE.CASH ? result.incomeRate : result.incomeRateO, // 收益率
incomeRateName: fund?.type == PRODUCT_TYPE.CASH ? result.incomeRateName : result.incomeRateNameO, // 收益率名称
path: result.path, // 产品详情地址
})
} else {
......
......@@ -113,10 +113,9 @@ class HomePage extends React.Component<any, any> {
}
render() {
const { curTab } = this.state;
const { bigStartConfig, virtualAssets, checkIn, recommendProductConfig, myEndTime, currentTime, actEndTime } = store.indexData
const isReachEndT = Math.min(myEndTime, actEndTime) <= currentTime
const { bigStartConfig, virtualAssets, checkIn, recommendProductConfig, productEnd } = store.indexData
// 推荐产品
const rProductList = recommendProductConfig?.filter((item) => +item.status === 1)
const rProductList = recommendProductConfig?.filter((item) => +item.status === 0)
// 我的持仓
const mProductList = recommendProductConfig?.filter((item) => item.mineProduct)
// 当前tab的产品列表
......@@ -128,7 +127,7 @@ class HomePage extends React.Component<any, any> {
<span className="bg"></span>
<span className="title"></span>
{/* 理财大明星 */}
{isReachEndT ? null : <div className="lc_bigstar">
{productEnd ? null : <div className="lc_bigstar">
<span className="lc_bigstar_bg"></span>
<div className="hongBao">
{bigStartConfig?.map((item, index) => (
......@@ -140,7 +139,7 @@ class HomePage extends React.Component<any, any> {
</div>
</div>}
{/* 领奖banner */}
{isReachEndT && <div className="prize_banner">
{productEnd && <div className="prize_banner">
<span className="prize_btn" onClick={this.prizeHandle}></span>
</div>}
{/* 模拟资产 */}
......@@ -172,7 +171,7 @@ class HomePage extends React.Component<any, any> {
{!!virtualAssets?.realBuyJumpUrl && <Button className="realbuy_btn" onClick={this.realBuyHandle}>真实买入</Button>}
</div>
{/* 签到区 */}
{isReachEndT ? null : <div className="sign_section">
{productEnd ? null : <div className="sign_section">
<span className="sign_section_bg"></span>
<span className="sign_tips">累计签到,最高可得{((checkIn?.totalExperienceNum || 0) / 10000).toFixed(0)}万资金</span>
{checkIn?.todayCheckIn
......@@ -207,8 +206,8 @@ class HomePage extends React.Component<any, any> {
<div className="r_products_item" key={`r_prdct_${index}`}>
<span className="r_product_bg"></span>
<span className="r_product_name">{item.name}</span>
<span className="r_product_risk">{item.fengXian}</span>
<span className="r_product_rate">{item.touZiQiXianText}</span>
<span className="r_product_risk">{(item.rate / 100).toFixed(2)}%</span>
<span className="r_product_rate">{RATE_NAME[item.type] || '年化收益率'}</span>
<Button className="detail_btn" onClick={() => this.jumpVirtualDetailHandle(item)}></Button>
<div className="r_product_like">
<span className="r_product_like_text">{item.baiFenBiText}</span>
......
......@@ -101,7 +101,7 @@ class Store {
baiFenBiText?: string,
fengXian?: string,
code?: string,
status?: string,
status?: string, // 0推荐,1不推荐
realBuyJumpUrl?: string,
mineProduct?: boolean, // 我的产品(true是)
rate?: number, // 利率(需要除100展示)
......@@ -113,6 +113,7 @@ class Store {
type?: number, // 产品类型(0-非现金,1-现金)
}>,
endPop?: boolean,
productEnd?: boolean, // 理财到达终点,true-是
} = {};
percent = 0;
......
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