|
|
@ -16,6 +16,7 @@ class api extends publicBase { |
|
|
|
if (empty($order_sn)) $this->ajax_json(false, '订单号不能为空'); |
|
|
|
|
|
|
|
$obj->pati = $this->post('pati') ? $this->post('pati') : ""; |
|
|
|
$obj->pagecode = $this->post('pagecode') ? $this->post('pagecode') : ""; |
|
|
|
|
|
|
|
$res = $obj->getOrderInformation($order_sn); |
|
|
|
// {"order_info_get_response":{"request_id":"16547568855546893","order_info":{"support_nationwide_warranty":0,"country":"中国","group_status":1,"free_sf":0,"discount_amount":0.0,"platform_discount":0.0,"return_freight_payer":0,"order_status":1,"id_card_num":"","risk_control_status":0,"province":"","town_id":0,"item_list":[{"goods_name":"checkpass论文查重无限次数低价免注册查重","outer_goods_id":"","goods_price":1.0,"goods_id":329073007863,"sku_id":1115504481445,"goods_count":1,"goods_spec":"千字符","outer_id":"","goods_img":"https://img.pddpic.com/mms-material-img/2022-03-28/0c075d33-b036-46f7-a0bf-d40774f68190.png.a.jpeg"}],"pay_no":"","last_ship_time":"2022-06-11 14:37:23","delivery_one_day":0,"created_time":"2022-06-09 14:37:14","card_info_list":[],"refund_status":1,"town":"","is_stock_out":0,"receiver_address_mask":"","receive_time":"","pay_time":"2022-06-09 14:37:23","gift_list":[],"capital_free_discount":0.0,"receiver_phone_mask":"13*******67","country_id":0,"city_id":0,"invoice_status":0,"service_fee_detail":[],"city":"","order_tag_list":[{"name":"delivery_one_day","value":0},{"name":"no_trace_delivery","value":0},{"name":"self_contained","value":0},{"name":"return_freight_payer","value":0},{"name":"free_sf","value":0},{"name":"duoduo_wholesale","value":0},{"name":"support_nationwide_warranty","value":0},{"name":"only_support_replace","value":0},{"name":"oversea_tracing","value":0},{"name":"distributional_sale","value":0},{"name":"open_in_festival","value":0},{"name":"same_city_distribution","value":0},{"name":"region_black_delay_shipping","value":0},{"name":"has_subsidy_postage","value":0},{"name":"has_sf_express_service","value":0},{"name":"community_group","value":0},{"name":"has_ship_additional","value":0},{"name":"ship_additional_order","value":0}],"is_lucky_flag":1,"yyps_time":"","mkt_biz_type":0,"shipping_type":0,"remark":"","pre_sale_time":"","inner_transaction_id":"","order_change_amount":0.0,"only_support_replace":0,"logistics_id":0,"updated_at":"2022-06-09 14:37:33","street":"","receiver_name_mask":"","receiver_name":"","tracking_number":"","pay_type":"","duoduo_wholesale":0,"buyer_memo":"","is_pre_sale":0,"shipping_time":"","home_delivery_type":0,"after_sales_status":0,"address":"","id_card_name":"","self_contained":0,"goods_amount":1.0,"pay_amount":1.0,"seller_discount":0.0,"address_mask":"","yyps_date":"","confirm_status":1,"confirm_time":"2022-06-09 14:37:23","stock_out_handle_status":-1,"postage":0.0,"province_id":0,"cat_id_3":9056,"cat_id_4":0,"cat_id_1":8726,"receiver_address":"","cat_id_2":8786,"trade_type":0,"urge_shipping_time":"","receiver_phone":"$3MpaxbKBnse9$AgAAAAF2+qYGan7+ggANYOk6e6B2tcD3m4NUAgu6bY4=$0$$","order_sn":"220609-635730697112661"}}} |
|
|
@ -45,10 +46,11 @@ class api extends publicBase { |
|
|
|
$goods_name = trim($this->post('goods_name')).''; |
|
|
|
$outer_goods_ids = $this->post('outer_goods_ids'); |
|
|
|
if (empty($outer_goods_ids) || empty($goods_name)) $this->ajax_json(false, '商品名称或商品编码不能为空'); |
|
|
|
|
|
|
|
|
|
|
|
$outer_goods_ids = is_array($outer_goods_ids) && count($outer_goods_ids)>0 ? implode(',', $outer_goods_ids) : array(); |
|
|
|
|
|
|
|
$obj->pati = $this->post('pati') ? $this->post('pati') : ""; |
|
|
|
$obj->pagecode = $this->post('pagecode') ? $this->post('pagecode') : ""; |
|
|
|
$res = $obj->getGoodsList($goods_name, $outer_goods_ids); |
|
|
|
|
|
|
|
// {"goods_list_get_response":{"goods_list":[{"is_more_sku":1,"goods_name":"checkpass论文查重无限次数低价免注册查重","thumb_url":"https://img.pddpic.com/gaudit-image/2022-03-28/edac0af376a509b227714488bd5dfa37.jpeg","goods_reserve_quantity":0,"image_url":"","sku_list":[{"outer_goods_id":"","is_sku_onsale":1,"reserve_quantity":0,"sku_id":1115504481445,"outer_id":"","spec":"千字符","sku_quantity":1277},{"outer_goods_id":"","is_sku_onsale":1,"reserve_quantity":0,"sku_id":1115476736663,"outer_id":"","spec":"无限次数","sku_quantity":1495}],"goods_quantity":2772,"goods_id":329073007863,"is_onsale":1}],"total_count":1,"request_id":"16551061312578732"}} |
|
|
@ -68,6 +70,7 @@ class api extends publicBase { |
|
|
|
if (empty($goods_id)) $this->ajax_json(false, '商品编码不能为空'); |
|
|
|
|
|
|
|
$obj->pati = $this->post('pati') ? $this->post('pati') : ""; |
|
|
|
$obj->pagecode = $this->post('pagecode') ? $this->post('pagecode') : ""; |
|
|
|
$res = $obj->getGoodsInformation($goods_id); |
|
|
|
|
|
|
|
// {"goods_info_get_response":{"goods_info":{"goods_name":"checkpass论文查重无限次数低价免注册查重","last_category":"论文检测与查询","image_url":"","shipment_limit_second":"172800","goods_quantity":2772,"goods_id":"329073007863","goods_sn":"329073007863","goods_category":"教育培训","is_onsale":"1","is_refundable":"0","second_hand":0,"sku_list":[{"single_price":"12.00","sku_img":"https://img.pddpic.com/mms-material-img/2022-03-28/3cd06438-b959-42ac-936a-93c273367355.png.a.jpeg","outer_goods_id":"","is_sku_onsale":"1","sku_id":"1115476736663","group_price":"10.00","outer_id":"","spec":"无限次数","sku_quantity":"1495"},{"single_price":"2.00","sku_img":"https://img.pddpic.com/mms-material-img/2022-03-28/0c075d33-b036-46f7-a0bf-d40774f68190.png.a.jpeg","outer_goods_id":"","is_sku_onsale":"1","sku_id":"1115504481445","group_price":"1.00","outer_id":"","spec":"千字符","sku_quantity":"1277"}],"goods_type":"1","group_required_customer_num":"2"},"request_id":"16551080285427607"}} |
|
|
@ -85,6 +88,7 @@ class api extends publicBase { |
|
|
|
if (empty($tids)) $this->ajax_json(false, '订单编号不能为空'); |
|
|
|
|
|
|
|
$obj->pati = $this->post('pati') ? $this->post('pati') : ""; |
|
|
|
$obj->pagecode = $this->post('pagecode') ? $this->post('pagecode') : ""; |
|
|
|
$res = $obj->getOrderStatus($tids); |
|
|
|
|
|
|
|
$res = json_decode($res, true); |
|
|
@ -99,4 +103,19 @@ class api extends publicBase { |
|
|
|
|
|
|
|
$this->ajax_json(true, 'succ', $shopinfo); |
|
|
|
} |
|
|
|
|
|
|
|
public function _api_get_pagecode() { |
|
|
|
$shopinfo = $this->get_shopinfo(); |
|
|
|
|
|
|
|
$obj = new PDD(PDD_CLIENT_ID, PDD_CLIENT_SECRET); |
|
|
|
|
|
|
|
$referer = $this->post('referer'); |
|
|
|
if (empty($referer)) $this->ajax_json(false, 'Referer不能为空'); |
|
|
|
|
|
|
|
$res = $obj->getPageCode($referer, $shopinfo['owner_id']); |
|
|
|
$res = json_decode($res, true); |
|
|
|
if (isset($res['error_response'])) $this->ajax_json(false, $res['error_response']['error_msg'].' '.$res['error_response']['sub_msg']); |
|
|
|
|
|
|
|
$this->ajax_json(true, 'succ', $res['response']['pageCode']); |
|
|
|
} |
|
|
|
} |
|
|
|