order.py 935 Bytes
Newer Older
1 2
# -*- encoding: utf-8 -*-
# -----------------------------------------------------------------------------
3
# @File Name  : curriculum_order.py
4 5 6 7 8 9 10 11
# @Time       : 2020/11/18 下午3:19
# @Author     : X. Peng
# @Email      : acepengxiong@163.com
# @Software   : PyCharm
# -----------------------------------------------------------------------------
from flask_restful import Resource, reqparse
from flask import request

12

13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
class OrderHandlers(Resource):
    """."""

    def __init__(self):
        """."""
        self.parser = reqparse.RequestParser()

    def get(self):
        """."""
        self.parser.add_argument('product_id',type=str,required=True,help='商品ID不能为空')
        args = self.parser.parse_args()
        print(args)
        return {'data': 'world'}

    def post(self):
        """."""
        pass

    def put(self, id):
        """."""
        pass

    def delete(self, id):
        """."""
        pass