站点工具

Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04a "Jack Jackrum". upgrade now! [54.1] (what's this?)
New release available: 2023-04-04 "Jack Jackrum". upgrade now! [54] (what's this?)
Hotfix release available: 2022-07-31b "Igor". upgrade now! [53.1] (what's this?)
Hotfix release available: 2022-07-31a "Igor". upgrade now! [53] (what's this?)
New release available: 2022-07-31 "Igor". upgrade now! [52.2] (what's this?)
New release candidate 2 available: rc2022-06-26 "Igor". upgrade now! [52.1] (what's this?)
New release candidate available: 2022-06-26 "Igor". upgrade now! [52] (what's this?)
Hotfix release available: 2020-07-29a "Hogfather". upgrade now! [51.4] (what's this?)
New release available: 2020-07-29 "Hogfather". upgrade now! [51.3] (what's this?)
New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)
Hotfix release available: 2018-04-22b "Greebo". upgrade now! [50.2] (what's this?)
Hotfix release available: 2018-04-22a "Greebo". upgrade now! [50.1] (what's this?)
New release available: 2018-04-22 "Greebo". upgrade now! [50] (what's this?)
Hotfix release available: 2017-02-19g "Frusterick Manners". upgrade now! [49.7] (what's this?)
Hotfix release available: 2017-02-19f "Frusterick Manners". upgrade now! [49.6] (what's this?)
Hotfix release available: 2017-02-19e "Frusterick Manners". upgrade now! [49.5] (what's this?)
Hotfix release available fixing CVE-2017-12979 and CVE-2017-12980: 2017-02-19d "Frusterick Manners". upgrade now! [49.4] (what's this?)
Hotfix release available fixing CVE-2017-12583: 2017-02-19c "Frusterick Manners". upgrade now! [49.3] (what's this?)
Hotfix release available fixing security token and media manager: 2017-02-19b "Frusterick Manners". upgrade now! [49.2] (what's this?)
Hotfix release available fixing install and media manager issues: 2017-02-19a "Frusterick Manners". upgrade now! [49.1] (what's this?)
New release available: 2017-02-19 "Frusterick Manners". upgrade now! [49] (what's this?)
Hotfix release available: 2016-06-26e "Elenor of Tsort". upgrade now! [48.5] (what's this?)
Hotfix release available fixing CVE-2017-12979 and CVE-2017-12980: 2016-06-26d "Elenor of Tsort". upgrade now! [48.4] (what's this?)
Hotfix release available fixing CVE-2017-12583: 2016-06-26c "Elenor of Tsort". upgrade now! [48.3] (what's this?)
Hotfix release available fixing security token: 2016-06-26b "Elenor of Tsort". upgrade now! [48.2] (what's this?)
Hotfix release available fixing authad issues: 2016-06-26a "Elenor of Tsort". upgrade now! [48.1] (what's this?)
New release available: 2016-06-26 "Elenor of Tsort". upgrade now! [48] (what's this?)
Hotfix release available: 2015-08-10a "Detritus". upgrade now! [47.1] (what's this?)
New release available: 2015-08-10 "Detritus". upgrade now! [47] (what's this?)
Hotfix release available: 2014-09-29d "Hrun". upgrade now! [46.4] (what's this?)
Hotfix release available: 2014-09-29c "Hrun". upgrade now! [46.3] (what's this?)
Hotfix release available to prevent XSS attack via SWF uploads: 2014-09-29b "Hrun". upgrade now! [46.2] (what's this?)
Hotfix release available: 2014-09-29a "Hrun". upgrade now! [46.1] (what's this?)
New release available: 2014-09-29 "Hrun". upgrade now! [46] (what's this?)
Hotfix release available: 2014-05-05e "Ponder Stibbons". upgrade now! [44.5] (what's this?)
Hotfix release available: 2014-05-05d "Ponder Stibbons". upgrade now! [44.4] (what's this?)
Hotfix release available to prevent XSS attack via SWF uploads: 2014-05-05c "Ponder Stibbons". upgrade now! [44.3] (what's this?)
Security Hotfix 2014-05-05b to prevent zero byte attacks on external auth systems is available. upgrade now! [44.2] (what's this?)
Security Hotfix 2014-05-05a for Issue 765 available. upgrade now! [44.1] (what's this?)

app_bridge_item

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

Both sides previous revision 前一修订版
后一修订版
前一修订版
app_bridge_item [2014/08/12 16:07]
106.2.171.114
app_bridge_item [2022/04/19 10:57] (当前版本)
5.188.211.16 http://imrdsoacha.gov.co/silvitra-120mg-qrms
行 1: 行 1:
- +http://imrdsoacha.gov.co/silvitra-120mg-qrms
-===== 商品详情页通讯接口 ===== +
- +
-在iOS、Android应用中打开的webview,可以通过JS函数和协议进行通讯。 +
- +
-以iOS为例,可以在网页加载完成后,通过访问网页中的JS函数app_bridge_thumb()获取到函数return返回的缩略图url地址: +
- +
- \-(void)webViewDidFinishLoad:​(UIWebView *)webView { +
- NSString *pic_thumb_url = [_webView stringByEvaluatingJavaScriptFromString:​@"​app_bridge_thumb()"​];​ +
-+
- +
-注意:_webView 改成你自己的名称。 +
- +
----- +
- +
-==== 1、APP主动调用网页中JavaScript函数的接口列表: ==== +
- +
-  * 1.1、商品详情页:APP原生应用获取商品主图缩略图URL地址 +
- +
- app_bridge_thumb() +
- +
----- +
- +
-  * 1.2、商品详情页:获取点击APP原生“立即购买”按钮需要进入的购物车网址 +
- +
- app_bridge_submit_rp_shopping_cart() +
- +
- ​返回JSON数据示例: +
- +
- {"​opt":"​cart","​url":"​https://​m.repai.com/​item/​cart_islogin/?​rp_iid=1100041405765641&​rp_quantity=1&​rp_sku1=%E9%BB%91%E8%89%B2&​rp_sku2="​} +
- +
- ​说明:opt的值为cart时,表示此商品无型号选择或已经在详情页展开过型号选择,可以直接进入购物车。url表示购物车的网址。Webview打开购物车网址之前,APP需要先通过 [[user_info_api|APP客户端用户登陆状态判断及用户详情接口]] 查询当前的rp_access_token是否有效,如果失效请先登录,登录完成后,将 &​access_token=xxxxx 作为参数追加在原网址参数后,在webview打开拼接后的网址,例如: +
- +
- https://​m.repai.com/​item/​cart_islogin/?​rp_iid=1100041405765641&​rp_quantity=1&​rp_sku1=%E9%BB%91%E8%89%B2&​rp_sku2=&​access_token=xxxxxxxxxxxxxxxx +
- +
- 或 +
- +
- {"​opt":"​type","​url":"​http://m.repai.com/item/​sku/​id/​1100041405765641/"​} +
- +
- ​说明:opt的值为type时,表示从下方弹出一个半高度尺寸的webview,url表示在这个webview中打开的型号/​数量选择页面。此页面无需传递rp_access_token +
- +
----- +
- +
-  * 1.3、商品型号选择页:获取点击APP原生“确认购买”按钮需要进入的购物车网址 +
- +
- app_bridge_type_rp_shopping_cart() +
- +
- ​返回文本数据示例: +
- +
- https://​m.repai.com/​item/​cart_islogin/?​rp_iid=1100041405765641&​rp_quantity=1&​rp_sku1=%E9%BB%91%E8%89%B2&​rp_sku2= +
- +
- ​说明:直接返回需要进入的购物车网址。Webview打开购物车网址之前,APP需要先通过 [[user_info_api|APP客户端用户登陆状态判断及用户详情接口]] 查询当前的rp_access_token是否有效,如果失效请先登录,登录完成后,将 &​access_token=xxxxx 作为参数追加在原网址参数后,在webview打开拼接后的网址,例如: +
- +
- https://​m.repai.com/​item/​cart_islogin/?​rp_iid=1100041405765641&​rp_quantity=1&​rp_sku1=%E9%BB%91%E8%89%B2&​rp_sku2=&​access_token=xxxxxxxxxxxxxxxx +
- +
----- +
- +
-  * 1.4、商品详情页:获取分享信息,标题、图片地址、价格、库存、详情页网址 +
- +
- app_bridge_item_info() +
- +
- ​返回JSON数据示例: +
- +
-+
- "​rp_iid":​ "​1100949812302780",​ +
- "​rp_item_url":​ "​http://​m.repai.com/​item/​view/​id/​1100949812302780/",​ +
- "​rp_pic_url":​ "​http://​img04.taobaocdn.com/​imgextra/​i4/​2056453475/​TB2Mwl8aXXXXXavXpXXXXXXXXXX_!!2056453475.jpg_320x320q90.jpg",​ +
- "​rp_price":​ "​14.5",​ +
- "​rp_quantity":​ "​50",​ +
- "​rp_title":​ "​拍下14.5牛皮女款皮带细腰带镶水钻"​ +
-+
- +
----- +
- +
-  * 1.5、商品详情页:获取点击APP原生“添加购物车”按钮需要获取的添加商品到购物车接口网址 +
- +
- app_bridge_shopping_cart_add() +
- +
- ​返回JSON数据示例: +
- +
- {"​opt":"​cartapi","​url":"​https://​m.repai.com/​item/​cart_add_api/?​rp_iid=1100041405765641&​rp_quantity=1&​rp_sku1=%E9%BB%91%E8%89%B2&​rp_sku2="​} +
- +
- ​说明:opt的值为cartapi时,表示此商品无型号选择或已经在详情页展开过型号选择,可以直接添加到购物车。url表示添加商品到购物车的接口。调用接口之前,APP需要先通过 [[user_info_api|APP客户端用户登陆状态判断及用户详情接口]] 查询当前的rp_access_token是否有效,如果失效请先登录,登录完成后,将 &​access_token=xxxxx 作为参数追加在原网址参数后,作为接口调用地址,例如: +
- +
- https://​m.repai.com/​item/​cart_add_api/?​rp_iid=1100041405765641&​rp_quantity=1&​rp_sku1=%E9%BB%91%E8%89%B2&​rp_sku2=&​access_token=xxxxxxxxxxxxxxxx +
- +
- 或 +
- +
- {"​opt":"​type","​url":"​http://​m.repai.com/​item/​sku/​id/​1100041405765641/"​} +
- +
- ​说明:opt的值为type时,表示从下方弹出一个半高度尺寸的webview,url表示在这个webview中打开的型号/​数量选择页面。此页面无需传递rp_access_token +
- +
----- +
- +
-  * 1.6、商品型号选择页:获取点击APP原生“添加购物车”按钮后进入型号选择页面点“确认”,需要调用的接口网址(非Webview调用) +
- +
- app_bridge_add_rp_shopping_cart() +
- +
- ​返回文本数据示例: +
- +
- https://​m.repai.com/​item/​cart_add_api/?​rp_iid=1100041405765641&​rp_quantity=1&​rp_sku1=%E9%BB%91%E8%89%B2&​rp_sku2= +
- +
- ​说明:添加购物车调用的接口网址。调用接口之前,APP需要先通过 [[user_info_api|APP客户端用户登陆状态判断及用户详情接口]] 查询当前的rp_access_token是否有效,如果失效请先登录,登录完成后,将 &​access_token=xxxxx 作为参数追加在原网址参数后,后台请求拼接后的网址,例如: +
- +
- https://​m.repai.com/​item/​cart_add_api/?​rp_iid=1100041405765641&​rp_quantity=1&​rp_sku1=%E9%BB%91%E8%89%B2&​rp_sku2=&​access_token=xxxxxxxxxxxxxxxx +
- +
- ​调用接口后返回以下信息: +
- +
- ​成功时: +
- +
- {"​status":​true,"​reason":"​成功添加宝贝到购物车!"​} +
- +
- ​失败时: +
- +
- {"​status":​false,"​reason":"​请先登录!"​} +
- +
----- +
- +
-  * 1.7、商品详情页:获取点击APP原生“购物车”按钮需要进入的购物车网址 +
- +
- app_bridge_shopping_cart_open() +
- +
- ​返回文本数据示例: +
- +
- https://​m.repai.com/​item/​cart_islogin/​ +
- +
- ​说明:直接返回需要进入的购物车网址。Webview打开购物车网址之前,APP需要先通过 [[user_info_api|APP客户端用户登陆状态判断及用户详情接口]] 查询当前的rp_access_token是否有效,如果失效请先登录,登录完成后,将 ?​access_token=xxxxx 作为参数追加在原网址参数后,在webview打开拼接后的网址,例如: +
- +
- https://​m.repai.com/​item/​cart_islogin/?​access_token=xxxxxxxxxxxxxxxx +
- +
----- +
- +
-  * 1.8、所有页面:获取“返回”按钮访问的网址 +
- +
- app_bridge_back_button() +
- +
- ​返回文本数据示例: +
- +
- http://​m.repai.com/​item/​cart/​ +
- +
- ​如果内容为空,则默认后退到上一页。 +
- +
----- +
- +
-==== 2、网页调用APP接口: ==== +
- +
-  * 2.1、准备打开的网址判断 +
- +
-在 iOS 中,webview中的网页,如果准备访问另外的网址,可以通过协议与APP通讯,示例如下: +
- +
- \- (BOOL)webView:​(UIWebView*)webView shouldStartLoadWithRequest:​(NSURLRequest*)request navigationType:​ (UIWebViewNavigationType)navigationType { +
- if(navigationType == UIWebViewNavigationTypeLinkClicked || navigationType == UIWebViewNavigationTypeOther) +
-+
- NSURL *URL = [request URL]; +
- NSString* rurl=[[request URL] absoluteString];​ +
- //NSLog (@"url is :%@", URL); +
- if ([rurl rangeOfString:​@"​target=present"​].location != NSNotFound) { +
- +
-当网页视图被指示载入内容而得到通知。应当返回YES,这样会进行加载。通过导航类型参数可以得到请求发起的原因,可以是以下任意值: ​    +
-UIWebViewNavigationTypeLinkClicked ​    +
-UIWebViewNavigationTypeFormSubmitted ​    +
-UIWebViewNavigationTypeBackForward ​    +
-UIWebViewNavigationTypeReload ​    +
-UIWebViewNavigationTypeFormResubmitted ​    +
-UIWebViewNavigationTypeOther +
- +
-  * target=present ​ 【以present从下方向上弹出的窗口打开新网址】 +
-  * target=push ​  ​【以push方式打开新网址】 +
-  * target=safari ​  ​【以[UIApplication sharedApplication]方式外部打开网址】 +
-  * target=rpitem ​  ​【以热拍详情页的定制webview(带有立即购买、添加购物车按钮)打开网址】 +
- +
----- +
- +
-[[start|返回首页]]+
app_bridge_item.1407830855.txt.gz · 最后更改: 2014/08/12 16:07 (外部编辑)