公司接口流程

接口流程:

1 先判断参数是否存在 {

1 存在

2不存在  return {‘detail’:'参数不正确'}

}

2 存在参数要不要解码 {

1 解码成功

2 解码失败  return {'detail':"解码不成功"}

}

3 逻辑前加上try 提高代码健壮性 

4 最终返回响应

流程:拿到数据 ,处理数据 ,返回结果

原文地址:https://www.cnblogs.com/tangda/p/11760057.html