| | |
| | | }
|
| | | },
|
| | | async init_area() {
|
| | | const res = await this.$http.request('get', '/api/pub/china/area/json')
|
| | | // console.log('area', JSON.parse(res.data))
|
| | | this.regionDataPlus = res.data && JSON.parse(res.data.replaceAll('code', 'value').replaceAll('name',
|
| | | 'text')) || []
|
| | |
|
| | | // console.log('area', this.regionDataPlus)
|
| | |
|
| | | var a = this.$storage.getItem('cache_area') |
| | | if (a) { |
| | | this.regionDataPlus = JSON.parse(a) || [] |
| | | } else { |
| | | const res = await this.$http.request('get', '/api/pub/china/area/json') |
| | | // console.log('area', JSON.parse(res.data)) |
| | | this.regionDataPlus = res.data && JSON.parse(res.data.replaceAll('code', 'value').replaceAll( |
| | | 'name', |
| | | 'text')) || [] |
| | | this.$storage.setItem('cache_area', JSON.stringify(this.regionDataPlus)) |
| | | }
|
| | |
|
| | | },
|
| | |
|