|
@@ -59,7 +59,22 @@ class aloneUpdate extends React.Component<any, any> {
|
|
|
bmfs: 0,
|
|
|
zp_local_url: "",
|
|
|
};
|
|
|
- this.getArce();
|
|
|
+ this.#area = Taro.getStorageSync("area");
|
|
|
+ if (!this.#area) this.getArce();
|
|
|
+ else {
|
|
|
+ const l = this.#area[0].child || [];
|
|
|
+ const province = this.#area.map((v) => v.name);
|
|
|
+ const city = l.map((v) => v.name);
|
|
|
+ let area = l[0].child.map((v) => v.name);
|
|
|
+ let T: Array<String> = [];
|
|
|
+ province[0] && T.push(province[0] || "");
|
|
|
+ city[0] && T.push(city[0] || "");
|
|
|
+ area[0] && T.push(area[0] || "");
|
|
|
+ this.setState({
|
|
|
+ selector: [province, city, area],
|
|
|
+ selectorText: T,
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
getImageUploadSize = (e: any) => {
|
|
@@ -87,6 +102,7 @@ class aloneUpdate extends React.Component<any, any> {
|
|
|
icon: "none",
|
|
|
});
|
|
|
this.#area = data || [];
|
|
|
+ Taro.setStorageSync("area", data || []);
|
|
|
const l = this.#area[0].child || [];
|
|
|
const province = data.map((v) => v.name);
|
|
|
const city = l.map((v) => v.name);
|