area_controller.go 573 字节
package controllers

import (
	"github.com/linmadan/egglib-go/web/beego"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-user/pkg/infrastructure/area"
)

type AreaController struct {
	beego.BaseController
}

func (controller *AreaController) ProvinceList() {
	data := area.Provinces()
	controller.Response(map[string]interface{}{
		"provinces": data,
	}, nil)
}

func (controller *AreaController) ProvinceCities() {
	code := controller.GetString(":code")
	data := area.ProvinceCities(code)
	controller.Response(map[string]interface{}{
		"cities": data,
	}, nil)
}