def _get_seckill_order_data(self):
     """生成提交抢购订单所需的请求体参数
     :return: 请求体参数组成的dict
     """
     logger.info('生成提交抢购订单所需参数...')
     # 获取用户秒杀初始化信息
     self.seckill_init_info[self.sku_id] = self._get_seckill_init_info()
     init_info = self.seckill_init_info.get(self.sku_id)
     if init_info is None:
         return False
     logger.info(f"输出init_info:{init_info}")
     # addr = {'addressDetail': '谭家岭东路2号 (审批服务中心)', 'addressName': '单位', 'areaCode': '86', 'cityId': 1158, 'cityName': '宁波市', 'countyId': 46345, 'countyName': '余姚市', 'defaultAddress': True, 'email': '', 'id': 843945282, 'mobile': '134****9880', 'mobileKey': '93b9f23b73966c2ac40fc3f9035b95b6', 'name': '陈云', 'overseas': 0, 'phone': '', 'postCode': '', 'provinceId': 15, 'provinceName': '浙江', 'townId': 52176, 'townName': '城区', 'yuyueAddress': False}
     default_address = init_info['addressList'][0]  # 默认地址dict
     # default_address = addr  # 默认地址dict
     invoice_info = init_info.get('invoiceInfo', {})  # 默认发票信息dict, 有可能不返回
     token = init_info['token']
     data = {
         'skuId': self.sku_id,
         'num': self.seckill_num,
         'addressId': default_address['id'],
         # 'addressId': 843945282,
         'yuShou': 'true',
         'isModifyAddress': 'false',
         'name': default_address['name'],
         'provinceId': default_address['provinceId'],
         'cityId': default_address['cityId'],
         'countyId': default_address['countyId'],
         'townId': default_address['townId'],
         'addressDetail': default_address['addressDetail'],
         'mobile': default_address['mobile'],
         'mobileKey': default_address['mobileKey'],
         'email': default_address.get('email', ''),
         'postCode': '',
         'invoiceTitle': invoice_info.get('invoiceTitle', -1),
         'invoiceCompanyName': '',
         'invoiceContent': invoice_info.get('invoiceContentType', 1),
         'invoiceTaxpayerNO': '',
         'invoiceEmail': '',
         'invoicePhone': invoice_info.get('invoicePhone', ''),
         'invoicePhoneKey': invoice_info.get('invoicePhoneKey', ''),
         'invoice': 'true' if invoice_info else 'false',
         'password': global_config.get('account', 'payment_pwd'),
         'codTimeType': 3,
         'paymentType': 4,
         'areaCode': '',
         'overseas': 0,
         'phone': '',
         'eid': global_config.getRaw('config', 'eid'),
         'fp': global_config.getRaw('config', 'fp'),
         'token': token,
         'pru': ''
     }
     return data
    def _get_seckill_order_data(self):
        """生成提交抢购订单所需的请求体参数
        :return: 请求体参数组成的dict
        """
        logger.info('生成提交抢购订单所需参数...')
        # 获取用户秒杀初始化信息
        self.seckill_init_info[self.sku_id] = self._get_seckill_init_info()
        init_info = self.seckill_init_info.get(self.sku_id)
        default_address = init_info['addressList'][0]  # 默认地址dict
        invoice_info = init_info.get('invoiceInfo', {})  # 默认发票信息dict, 有可能不返回
        token = init_info['token']
        data = {
            'skuId': self.sku_id,
            'num': self.seckill_num,
            'addressId': default_address['id'],
            'yuShou': 'true',
            'isModifyAddress': 'false',
            'name': default_address['name'],
            'provinceId': default_address['provinceId'],
            'cityId': default_address['cityId'],
            'countyId': default_address['countyId'],
            'townId': default_address['townId'],
            'addressDetail': default_address['addressDetail'],
            'mobile': default_address['mobile'],
            'mobileKey': default_address['mobileKey'],
            'email': default_address.get('email', ''),
            'postCode': '',
            'invoiceTitle': invoice_info.get('invoiceTitle', -1),
            'invoiceCompanyName': '',
            'invoiceContent': invoice_info.get('invoiceContentType', 1),
            'invoiceTaxpayerNO': '',
            'invoiceEmail': '',
            'invoicePhone': invoice_info.get('invoicePhone', ''),
            'invoicePhoneKey': invoice_info.get('invoicePhoneKey', ''),
            'invoice': 'true' if invoice_info else 'false',
            'password': global_config.get('account', 'payment_pwd'),
            'codTimeType': 3,
            'paymentType': 4,
            'areaCode': '',
            'overseas': 0,
            'phone': '',
            'eid': global_config.getRaw('config', 'eid'),
            'fp': global_config.getRaw('config', 'fp'),
            'token': token,
            'pru': ''
        }

        return data