Commit 213a55ef authored by cc's avatar cc

update

parent ef8b75d3
...@@ -103,10 +103,10 @@ ...@@ -103,10 +103,10 @@
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。") // alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
} }
</script> </script>
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1748338645349/assets/index-CcVUTWcR.js"></script> <script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1748338970476/assets/index-Cvj2TeSC.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748338645349/assets/vendor-BeddEGQt.js"> <link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748338970476/assets/vendor-NFp3NSgR.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748338645349/assets/vendor-NZxPxbcK.css"> <link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748338970476/assets/vendor-NZxPxbcK.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748338645349/assets/index-CJkJ7IUI.css"> <link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1748338970476/assets/index-D63QrRKp.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">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> <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> </head>
...@@ -114,8 +114,8 @@ ...@@ -114,8 +114,8 @@
<body> <body>
<div id="root"></div> <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>!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/1748338645349/assets/polyfills-legacy-C2MhNPfJ.js"></script> <script nomodule crossorigin id="vite-legacy-polyfill" src="https://yun.duiba.com.cn/db_games/spark/v3/1748338970476/assets/polyfills-legacy-C2MhNPfJ.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1748338645349/assets/index-legacy-DNdZDHpk.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script> <script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1748338970476/assets/index-legacy-F2t0-xKo.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -5,7 +5,7 @@ import { Swiper, SwiperSlide } from "swiper/react"; ...@@ -5,7 +5,7 @@ import { Swiper, SwiperSlide } from "swiper/react";
// import 'style-loader!css-loader!swiper/swiper-bundle.css'; // import 'style-loader!css-loader!swiper/swiper-bundle.css';
import "../../../src/swiper-bundle.css"; import "../../../src/swiper-bundle.css";
import API from "../../api"; import API from "../../api";
import { _throttle } from "../../utils/utils"; import { _throttle, waitTime } from "../../utils/utils";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl"; import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
// 地址选择器 什么都别改直接复制 // 地址选择器 什么都别改直接复制
@observer @observer
...@@ -33,15 +33,18 @@ class Selectmodal extends React.Component { ...@@ -33,15 +33,18 @@ class Selectmodal extends React.Component {
//获取省 //获取省
await this.getCodeList(null, "provinceList"); await this.getCodeList(null, "provinceList");
//获取市 //获取市
await waitTime(10)
const { provinceList, provinceCode } = this.state; const { provinceList, provinceCode } = this.state;
console.info('parentCode-provinceList', provinceList, provinceCode) console.info('parentCode-provinceList', provinceList, provinceCode)
await this.getCodeList(provinceList[provinceCode]?.adCode, "cityList"); await this.getCodeList(provinceList[provinceCode]?.adCode, "cityList");
//获取区 //获取区
await waitTime(10)
const { cityList, cityCode } = this.state; const { cityList, cityCode } = this.state;
console.info('parentCode-cityList', cityList, cityCode) console.info('parentCode-cityList', cityList, cityCode)
await this.getCodeList(cityList[cityCode]?.adCode, "areaList"); await this.getCodeList(cityList[cityCode]?.adCode, "areaList");
//获取街道 //获取街道
await waitTime(10)
const { areaList, areaCode } = this.state; const { areaList, areaCode } = this.state;
console.info('parentCode-areaList', areaList, areaCode) console.info('parentCode-areaList', areaList, areaCode)
await this.getCodeList(areaList[areaCode]?.adCode, "streetList"); await this.getCodeList(areaList[areaCode]?.adCode, "streetList");
...@@ -56,6 +59,12 @@ class Selectmodal extends React.Component { ...@@ -56,6 +59,12 @@ class Selectmodal extends React.Component {
} }
const { success, data } = await API.getParentCode(params); const { success, data } = await API.getParentCode(params);
if (success) { if (success) {
if(type == 'provinceList'){
this.setState({
provinceList: data,
});
return;
}
this.setState({ this.setState({
[type]: data, [type]: data,
}); });
...@@ -80,9 +89,11 @@ class Selectmodal extends React.Component { ...@@ -80,9 +89,11 @@ class Selectmodal extends React.Component {
const { provinceList } = this.state; const { provinceList } = this.state;
await this.getCodeList(provinceList[swiper.activeIndex]?.adCode, "cityList"); await this.getCodeList(provinceList[swiper.activeIndex]?.adCode, "cityList");
//获取区 //获取区
await waitTime(10)
const { cityList, cityCode } = this.state; const { cityList, cityCode } = this.state;
await this.getCodeList(cityList[cityCode]?.adCode, "areaList"); await this.getCodeList(cityList[cityCode]?.adCode, "areaList");
//获取街道 //获取街道
await waitTime(10)
const { areaList, areaCode } = this.state; const { areaList, areaCode } = this.state;
await this.getCodeList(areaList[areaCode]?.adCode, "streetList"); await this.getCodeList(areaList[areaCode]?.adCode, "streetList");
} }
...@@ -108,6 +119,7 @@ class Selectmodal extends React.Component { ...@@ -108,6 +119,7 @@ class Selectmodal extends React.Component {
const { cityList } = this.state; const { cityList } = this.state;
await this.getCodeList(cityList[swiper.activeIndex]?.adCode, "areaList"); await this.getCodeList(cityList[swiper.activeIndex]?.adCode, "areaList");
//获取街道 //获取街道
await waitTime(10)
const { areaList, areaCode } = this.state; const { areaList, areaCode } = this.state;
await this.getCodeList(areaList[areaCode]?.adCode, "streetList"); await this.getCodeList(areaList[areaCode]?.adCode, "streetList");
} }
......
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