2025-09-18
商城接口
This commit is contained in:
@@ -2,15 +2,36 @@ const express = require('express')
|
||||
const router = express.Router()
|
||||
const {getDB} = require('../database')
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* tags:
|
||||
* name: Common
|
||||
* description: 公共接口
|
||||
*/
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/common/provinces:
|
||||
* get:
|
||||
* summary: 获取省份列表
|
||||
* description: 获取省份列表
|
||||
* get:
|
||||
* summary: 获取省市区列表
|
||||
* tags: [Common]
|
||||
* responses:
|
||||
* '200':
|
||||
* 200:
|
||||
* description: 成功获取分类列表
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* type: array
|
||||
* items:
|
||||
* properties:
|
||||
* code:
|
||||
* type: string
|
||||
* description: 区域编码
|
||||
* example: 110000
|
||||
* label:
|
||||
* type: string
|
||||
* description: 区域名称
|
||||
* example: 北京市
|
||||
*/
|
||||
router.get('/provinces', async (req, res) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user