geographic.js 284 Bytes
Newer Older
陈帅's avatar
陈帅 committed
1 2
import city from './geographic/city.json';
import province from './geographic/province.json';
陈帅's avatar
陈帅 committed
3 4

export function getProvince(req, res) {
陈帅's avatar
陈帅 committed
5
  res.json(province);
陈帅's avatar
陈帅 committed
6 7 8
}

export function getCity(req, res) {
陈帅's avatar
陈帅 committed
9
  res.json(city[req.params.province]);
陈帅's avatar
陈帅 committed
10 11 12 13 14 15
}

export default {
  getProvince,
  getCity,
};