## 接口情況
作者:ncgis
時間:20150422
作用:獲取產品圖文詳情介紹
提交方法:GET
提交參數
~~~
good_id:商品id
~~~
所在文件:product
接口地址:http://test.lingsq.com/index.php/api?method=lingsqapi.api.product.getProductNewsDetail&good_id=[good\_id]
返回數據樣式:
~~~
{"description":"<div class=\"para\">\u5728\u6e38\u620f\u8fd0\u884c\u65f6\uff0c\u5185\u5b58\u548c\u5904\u7406\u5668\u90fd\u4f1a\u5bf9\u4e8e\u6e38\u620f\u8fdb\u884c\u975e\u5e38\u590d\u6742\u7684\u6570\u636e\u4ea4\u6362\u548c\u53d8\u66f4\uff0c\u8fd9\u662f\u56e0\u4e3a\u6e38\u620f\u6709\u5f88\u591a\u7684\u6570\u636e\uff0c\u4f8b\u5982\u91d1\u94b1\u3001<a target=\"_blank\" href=\"http:\/\/baike.baidu.com\/view\/18228.htm\">HP<\/a>\u503c\u3001\n\u7b49\u7ea7\u3001\u653b\u51fb\u529b\u3001\u9632\u5fa1\u529b\u7b49\u6570\u636e\uff0c\u800c\u8fd9\u4e9b\u6570\u636e\uff0c\u5c31\u5728\u5185\u5b58\u548c\u5904\u7406\u5668\u7684\u5404\u4e2a\u5730\u5740\u5f53\u4e2d\uff0c\u73a9\u5bb6\u53ea\u9700\u8981\u5728\u516b\u95e8\u795e\u5668\u4e2d\u641c\u7d22\u76f8\u5173\u7684\u6570\u636e\u503c\uff0c\u516b\u95e8\u795e\u5668\u5c31\u4f1a\u5c06\u641c\u7d22\u51fa\u8bb0\u5f55\u6b64\u6570\u636e\u7684\n\u5404\u4e2a\u5730\u5740\u663e\u793a\uff0c\u73a9\u5bb6\u8fdb\u884c\u591a\u6b21\u7684\u6570\u636e\u53d8\u66f4\u540e\u518d\u6b21\u641c\u7d22\uff0c\u5230\u6700\u540e\u5c31\u4f1a\u786e\u5b9a\u6b64\u5730\u5740\u5230\u5e95\u662f\u54ea\u4e00\u4e2a\uff0c\u7136\u540e\u5c06\u6b64\u5730\u5740\u7684\u6570\u503c\u8fdb\u884c\u4fee\u6539\uff0c\u56de\u5230\u6e38\u620f\u4e2d\uff0c\u76f8\u5173\u7684\u6570\u636e\u4e5f\u4f1a\u53d8\u5316\uff0c\u516b\n\u95e8\u795e\u5668\u7684\u539f\u7406\u5c31\u5982\u91d1\u5c71\u6e38\u4fa0\u3001\u6574\u4eba\u4e13\u5bb6\u3001\u6e38\u620f\u4fee\u6539\u5927\u5e08\u7b49\u7c7b\u578b\u7684\u4fee\u6539\u8f6f\u4ef6\uff0c\u53ea\u4e0d\u8fc7\u516b\u95e8\u795e\u5668\u53ea\u53ef\u4ee5\u5728\u667a\u80fd\u624b\u673a\u4e2d\u4f7f\u7528\u800c\u5df2\uff0c\u516b\u95e8\u795e\u5668\u652f\u6301\u7b80\u4f53\u4e2d\u6587\u3001<a target=\"_blank\" href=\"http:\/\/baike.baidu.com\/view\/143053.htm\">\u7e41\u4f53<\/a>\u4e2d\u6587\uff08\u9999\u6e2f\uff09\u3001\u7e41\u4f53\u4e2d\u6587\uff08\u53f0\u6e7e\uff09\u3001\u82f1\u6587\u3002\u8f6f\u4ef6\u81ea\u5e26\u8be6\u7ec6\u7684\u5e2e\u52a9\u6587\u6863\uff0c\u4f7f\u7528\u524d\u8bf7\u4ed4\u7ec6\u770b\u5e2e\u52a9\u8bf4\u660e\uff0c\u4e0d\u7136\u73a9\u5bb6\u53ef\u80fd\u4f1a\u65e0\u6cd5\u4fee\u6539\u6210\u529f\u7684\uff01<\/div>\n\u5bf9\u4e8e\u516b\u95e8\u795e\u5668\u5728\u4fee\u6539\u6e38\u620f\u65f6\u53d1\u751f\u65e0\u6cd5\u4fee\u6539\u6216\u65e0\u6cd5\u4fdd\u5b58\u4fee\u6539\u540e\u7684\u6570\u636e\u7b49\u60c5\u51b5\uff0c\u662f\u56e0\u4e3a\u6e38\u620f\u672c\u8eab\u7ecf\u8fc7\u7279\u6b8a\u5904\u7406\u6240\u9020\u6210\u7684"}
~~~
## 實現代碼
~~~
function getProductNewsDetail()
{
error_reporting(0);
if(empty($_GET["good_id"]))
{
$back["errNo"]=20005;
$back["errMsg"]=$this->errMsg($back["errNo"]);
return $back;
}
$goods_id =$_GET["good_id"];
$org_aGoods = kernel::single('b2c_goods_model')->getGoods($goods_id);
$this->pagedata['description'] =$org_aGoods['description'];
return $this->pagedata;
}
~~~
- 手機是否使用驗證接口
- 返回碼所代表的含義
- 發送手機驗證碼接口
- 用戶注冊接口
- 獲取商品所有分類
- 獲取商品列表
- 用戶登陸接口
- 獲取商品詳細信息
- 獲取產品圖文詳情
- 獲取商品評論列表
- 獲取推薦商品
- 獲取找回密碼短信
- 重置密碼
- 獲取每日特惠商品
- 獲取輪播圖
- 用戶中心首頁
- 獲取用戶收藏商品
- 刪除用戶收藏商品
- 獲取所有訂單(所有訂單、代付款訂單、待收貨訂單、退換貨訂單)
- 加入購物車
- 獲取購物車商品
- 刪除購物車商品
- 購物車商品移入收藏夾
- 添加收貨地址
- 獲取用戶收貨地址
- 添加用戶收藏
- 提交訂單
- 填寫訂單
- 退出登錄
- 確認支付成功(正在驗證支付狀態)
- 驗證自動登陸
- 獲取訂單詳情
- 設置默認收貨地址
- 刪除收貨地址
- 修改收貨地址