|
- import re
- from common import util
- from common import curl_interface
- from django.conf import settings
-
-
- def get_prod_info(prod_id):
- # 参数校验
- if re.match('^[1-9][0-9]{0,10}', prod_id) is None:
- return util.re_err('参数错误')
- send_data = {
- 'pro_cate_id': prod_id
- }
- curl = curl_interface.CurlInterface(send_data, 4)
- get_info = curl.exec(settings.WX_HOST + '/zzcx/home/men-p/initialize', 'POST')
- return get_info
-
-
- def get_stock(prod_id, date):
- """
- 获取门票票种信息
- :param prod_id:
- :param date:
- :return:
- """
- # 参数校验
- if re.match('^[1-9][0-9]{0,10}', prod_id) is None:
- return util.re_err('参数错误')
- send_data = {
- 'prod_cate_id': prod_id,
- 'date': date
- }
- curl = curl_interface.CurlInterface(send_data, 4)
- result = curl.exec(settings.WX_HOST + '/zzcx/home/men-p/get-prod-arr', 'POST')
- return result
|