Commit 8ddcb662 authored by 俞嘉婷's avatar 俞嘉婷

json请求+微信端登录

parent 5b202847
......@@ -46,10 +46,10 @@
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
}
</script>
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1752030684912/assets/index-BpGeQuW4.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1752030684912/assets/vendor-2l0R3ad-.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1752030684912/assets/vendor-BQh5NVNk.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1752030684912/assets/index-D79sGaGE.css">
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1752040869145/assets/index-DwDysz78.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1752040869145/assets/vendor-Cw84r4Fx.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1752040869145/assets/vendor-BQh5NVNk.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1752040869145/assets/index-BWUMLUdD.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/1752030684912/assets/polyfills-legacy-D0AVcSo7.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1752030684912/assets/index-legacy-B49LpiFx.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/1752040869145/assets/polyfills-legacy-D0AVcSo7.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1752040869145/assets/index-legacy-CvOoXdrW.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>
</html>
{"proSetting":{"projectxIDs":{"testId":[{"label":"test","value":"p476a83d1"}],"prodId":[{"label":"线上测试","value":"pf909ff04"},{"label":"正式","value":"p16480c32"}]},"skinVariables":[],"mockSetting":{"projectId":"","pageId":""}},"envSetting":{},"psdSetting":{"psdFSSetting":true,"psdCenterSetting":true}}
{"proSetting":{"projectxIDs":{"testId":[{"label":"主链路","value":"p476a83d1"},{"label":"签到","value":"p1225e7d8"}],"prodId":[{"label":"线上测试","value":"pf909ff04"},{"label":"正式","value":"p16480c32"}]},"skinVariables":[],"mockSetting":{"projectId":"","pageId":""}},"envSetting":{},"psdSetting":{"psdFSSetting":true,"psdCenterSetting":true}}
......@@ -167,7 +167,11 @@ export function generateAPI<T>(apiList: T): { [key in keyof T]: (params?, header
}
if (isPost) {
config.data = qs.stringify(params);
if (config.headers?.['Content-Type'] === 'application/json') {
config.data = JSON.stringify(params);
} else {
config.data = qs.stringify(params);
}
} else {
config.params = params;
}
......
......@@ -195,7 +195,13 @@ class Store {
})
this.indexData = _temp;
console.info('基金产品收益率信息(客户端更新后的), ', toJS(this.indexData))
// 本地自测代码
// adInfos[0] = {
// fundcode: '23112008P',
// incomeRate: 1.78,
// pernetValue: 1.66,
// }
if (!adInfos?.length) return
// 将客户端查到的收益率 更新我们后端
const _codeList = adInfos.map(item => {
......
import { CHANNEL } from "@/AppTools";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import Loginpop from "@/panels/loginpop/loginpop";
import { Toast } from "@grace/ui";
// 需要过滤的错误码
......@@ -21,6 +24,8 @@ export const errMessageMap = {
*/
export function errorHandler(error) {
if ((error.code == 0 && error.message == "请稍后再试") || filterCode.indexOf(`${error.code}`) >= 0) return;
// 三方合作APP/华夏理财app 未登录时 除首页接口外 其他接口都走登录弹窗
if (CFG.channel != CHANNEL.HXBANK && (error.code == 100001 || error.code == 100007 || error.code == 100009)) return ModalCtrl.showModal(Loginpop);
switch (error.code) {
default: {
const msg = errMessageMap[error.code] || error.message || '网络异常,请稍后再试';
......
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