hejianhao
2026-01-09 be5d0750301ebad72f9f7f94e3b878bce43d4ec8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const axios = require("axios");
 
export function getCityList(num, callback) {
    axios.get(`https://gateway.yiruibim.com/scyjt/system/v1.0/area/find/subs/${num}`, {
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        }
    }).then(res => {
        if (res && res.data.Data) {
            let temp = []
            res.data.Data.forEach(item => {
                const ele = {
                    value: item.Id,
                    label: item.Name
                }
                temp.push(ele)
            })
            callback(temp)
        }
    })
}
 
export function getDistrictList(num, callback) {
    axios.get(`https://gateway.yiruibim.com/scyjt/system/v1.0/area/find/subs/${num}`, {
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        }
    }).then(res => {
        if (res && res.data.Data) {
            let temp = []
            res.data.Data.forEach(item => {
                const ele = {
                    value: item.Name,
                    label: item.Name
                }
                temp.push(ele)
            })
            callback(temp)
        }
    })
}