import path_setting
from in_common.base_request import BaseRequest



class services_request(BaseRequest):
    def __init__(self):
        self.data = self.api_load(path_setting.SERVICES_CONFIG)

    #商祥页-分享
    def share_data(self, p_id, u_id):
        self.params["p_id"] = p_id
        self.params["u_id"] = u_id
        return self.api_send(self.data["share_data"])

    # 普通美券点击立即使用
    def v1(self, coupon_info_id, order_by):
        self.params["coupon_info_id"] = coupon_info_id
        self.params["order_by"] = order_by
        return self.api_send(self.data["v1"])

if __name__ == '__main__':
    #打印商祥页-分享接口返回
    print(services_request().share_data("5857263", "618788"))
    # print(services_request().v1(32366785, 0))