一叶程序设计小站

JS 打开淘宝:
window.location.href = “”
原始代码:
tbopen://m.taobao.com/tbopen/index.html?action=ali.open.nav&module=h5&bootImage=0&source=sb&appkey=24585446&smbSid=lGQxFnSl2Q4CAd7T3yFOuAs5_1571452629089&rbbt=bc.mainDetail.6.0.0&params=%7B%22fid%22%3A%221NGS2lqeclT%22%2C%22mtopCostTime%22%3A%22109%22%2C%22_t%22%3A%221571452629324%22%7D&h5Url=https%3A%2F%2Fh5.m.taobao.com%2Fawp%2Fcore%2Fdetail.htm%3Fid%3D601615995345%26point%3D%25257B%252522from%252522%25253A%252522h5%252522%25252C%252522h5_uid%252522%25253A%252522lGQxFnSl2Q4CAd7T3yFOuAs5%252522%25252C%252522ap_uri%252522%25253A%252522sb_redirect_auto%252522%25252C%252522page%252522%25253A%252522mainDetail%252522%25252C%252522callType%252522%25253A%252522scheme%252522%25257D

params参数和smbSid参数貌似没有什么用

h5Url:你要跳转的地址,使用urlencode加密

修改后代码:
tmall://page.tm/appLink?action=ali.open.nav&module=h5&bootImage=0&source=sb&appkey=24585446&params=%7B%22mtopCostTime%22%3A%221500%22%2C%22_t%22%3A%221571451981369%22%7D&_ns=1&ut_sk=3.1571451981369.other_iOS9.auto-mallDetail-0&h5Url= urlencode($url)

优化后代码:

前端唤起淘宝app链接  :  taobao://m.taobao.com/tbopen/index.html?action=ali.open.nav&module=h5&bootImage=0&source=sb&appkey=24585446&rbbt=bc.mallDetail.6.0.0&h5Url=urlencode(商品详情链接)

打开的姿势:

window.location.href =‘taobao://m.taobao.com/tbopen/index.html?action=ali.open.nav&module=h5&bootImage=0&source=sb&appkey=24585446&rbbt=bc.mallDetail.6.0.0&h5Url=urlencode(商品详情链接)‘
评论
评论
BILL ZHANG

BILL ZHANG

管理员

热门文章

友情链接

一叶程序设计小站

有事扫我↓↓

一叶程序设计小站