12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import { Request, Response } from 'express';
- /**
- * @author bianlanzhou
- * @since 2024-10-25
- * @desc 商户响应数据mock
- */
- /** 等待时间 */
- const waitTime = (time: number = 100) => {
- return new Promise((resolve) => {
- setTimeout(() => {
- resolve(true);
- }, time);
- });
- };
- /** 查询商户响应数据 */
- const queryMerchantRespData = {
- "success": true,
- "errCode": null,
- "errMessage": null,
- "data": [
- {
- "id": '1848565642249170945',
- "merchantName": "优逸客",
- }, {
- "id": '1848565642249170946',
- "merchantName": "信业帮",
- }
- ]
- }
- /** 查询商户 */
- const queryMerchant = async (req: Request, res: Response) => {
- await waitTime(2000);
- res.json(queryMerchantRespData);
- }
- export default {
- //查询商户
- 'GET /merchant/list': queryMerchant,
- };
|