美团外卖券小程序路径过长导致插入文本消息失败的问题解决办法
2021/4/26 12:55:10
本文主要是介绍美团外卖券小程序路径过长导致插入文本消息失败的问题解决办法,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
美团的推广路径是这个
/index/pages/h5/h5?weburl=https%3A%2F%2Fclick.meituan.com%2Ft%3Ft%3D1%26c%3D1%26p%3DOWMpZ-uzIFOVe6JyOONs3dXuqV0qcAf-r-KCvHdXiNej4xCqMxp88d40kBpNgztIAPe8eitdEs1sN_OL2yM2E_lkwBIdcDGWXOKzXh1Q_Fow-lzpLfJCB_fBrI47Ty-Gq_59tX6tC14cXpD_QOvWw9Wnx5hGN6ZCTydEwEGX-Zg-F2FJRNWq08EBqKSJFn6H1WH5dB1yzHzks_x1BSUNUtHX8uC05Cllbg3ve4nmi0Te58mKiK1Qivn2bjL-yr3HBHXJ0IbslV_J5rh9UwXgC2LESIDlAf_Ys19LcAA_y5svmbp7f4KCCLhcjVdSq_DDJoh0UsDKQZc4wfsYlvrkBepw6kQcbkLY0KbQxP2pxABQ8tEuXwEU7DqTjfUUQR7_Bkj9rq-pKuM33577SwObeTChdEL5K079ZspIbKGdqBVVYyhfiuwmKnpbprd44m_2Bmb5mpXjT7kvE2Eg5I4NG5d-Rg1QBKx91INMu0dfJ7JWudurRRYIHa_Gusx21tdBdjxM3PGEzUdZ-7s0WFj5NY-6hfOZ3Fj36OqIWavtftDLqvGB4AzLPAI-BLfyHTf3BGywMm2aJ5ZQbGZIgJUEanZss09xDlAMbqteSdAc8mFo6Mu3iWgCxORHrnST_LNzX8yPIb3Y6w9rwsGWhsLcjj5w4fnAD2U87Mm5x27Gvsg&lch=cps:waimai:5:669dc60208f861e36c7355a243a7fdf3:qq&f_token=1&f_userId=1
/index/pages/h5/h5?weburl=https%3A%2F%2Fclick.meituan.com%2Ft%3Ft%3D1%26c%3D1%26p%3DOWMpZ-uzIFOVe6JyOONs3dXuqV0qcAf-r-KCvHdXiNej4xCqMxp88d40kBpNgztIAPe8eitdEs1sN_OL2yM2E_lkwBIdcDGWXOKzXh1Q_Fow-lzpLfJCB_fBrI47Ty-Gq_59tX6tC14cXpD_QOvWw9Wnx5hGN6ZCTydEwEGX-Zg-F2FJRNWq08EBqKSJFn6H1WH5dB1yzHzks_x1BSUNUtHX8uC05Cllbg3ve4nmi0Te58mKiK1Qivn2bjL-yr3HBHXJ0IbslV_J5rh9UwXgC2LESIDlAf_Ys19LcAA_y5svmbp7f4KCCLhcjVdSq_DDJoh0UsDKQZc4wfsYlvrkBepw6kQcbkLY0KbQxP2pxABQ8tEuXwEU7DqTjfUUQR7_Bkj9rq-pKuM33577SwObeTChdEL5K079ZspIbKGdqBVVYyhfiuwmKnpbprd44m_2Bmb5mpXjT7kvE2Eg5I4NG5d-Rg1QBKx91INMu0dfJ7JWudurRRYIHa_Gusx21tdBdjxM3PGEzUdZ-7s0WFj5NY-6hfOZ3Fj36OqIWavtftDLqvGB4AzLPAI-BLfyHTf3BGywMm2aJ5ZQbGZIgJUEanZss09xDlAMbqteSdAc8mFo6Mu3iWgCxORHrnST_LNzX8yPIb3Y6w9rwsGWhsLcjj5w4fnAD2U87Mm5x27Gvsg&lch=cps:waimai:5:669dc60208f861e36c7355a243a7fdf3:qq&f_token=1&f_userId=1
插入小程序路径,通过文本消息回复,就会失败,那如何缩短呢?
后面的weburl 是一个完整的路径是通过url encode的,需要通过解码,把完成路径解码出来
http://tool.chinaz.com/tools/urlencode.aspx
解码出来的网址是这样的
/index/pages/h5/h5?weburl=https://click.meituan.com/t?t=1&c=1&p=OWMpZ-uzIFOVe6JyOONs3dXuqV0qcAf-r-KCvHdXiNej4xCqMxp88d40kBpNgztIAPe8eitdEs1sN_OL2yM2E_lkwBIdcDGWXOKzXh1Q_Fow-lzpLfJCB_fBrI47Ty-Gq_59tX6tC14cXpD_QOvWw9Wnx5hGN6ZCTydEwEGX-Zg-F2FJRNWq08EBqKSJFn6H1WH5dB1yzHzks_x1BSUNUtHX8uC05Cllbg3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7s0WFj5NY-6hfOZ3Fj36OqIWavtftDLqvGB4AzLPAI-BLfyHTf3BGywMm2aJ5ZQbGZIgJUEanZss09xDlAMbqteSdAc8mFo6Mu3iWgCxORHrnST_LNzX8yPIb3Y6w9rwsGWhsLcjj5w4fnAD2U87Mm5x27Gvsg&lch=cps:waimai:5:669dc60208f861e36c7355a243a7fdf3:qq&f_token=1&f_userId=1
通过浏览器打开
https://market.waimai.meituan.com/gd/single.html?utm_term=74060.cps.24412203&el_biz=waimai&gundam_id=2KAWnD&utm_campaign=AffProg&utm_medium=wandie&el_page=gundam.loader&urpid=74060.161941038093.24412203.0&appkey=669dc60208f861e36c7355a243a7fdf3%3Aqq&source=wandie&_rdt=1&utm_source=&utm_content=&noguide=1&utm_term=&utm_campaign=other&utm_medium=MU&channel=union&utm_source=60413&utm_content=1380426742014976088 链接就变成这样了
替换原来路径的weburl参数,就可以了
/index/pages/h5/h5?weburl=https%3A%2F%2Fmarket.waimai.meituan.com%2Fgd%2Fsingle.html%3Futm_term%3D74060.cps.24412203%26el_biz%3Dwaimai%26gundam_id%3D2KAWnD%26utm_campaign%3DAffProg%26utm_medium%3Dwandie%26el_page%3Dgundam.loader%26urpid%3D74060.161941038093.24412203.0%26appkey%3D669dc60208f861e36c7355a243a7fdf3%253Aqq%26source%3Dwandie%26_rdt%3D1%26utm_source%3D%26utm_content%3D%26noguide%3D1%26utm_term%3D%26utm_campaign%3Dother%26utm_medium%3DMU%26channel%3Dunion%26utm_source%3D60413%26utm_content%3D1380426742014976088
将这个路径生成小程序链接
<a href='#' data-miniprogram-appid='wxde8ac0a21135c07d' data-miniprogram-path='/index/pages/h5/h5?weburl=/index/pages/h5/h5?weburl=https%3A%2F%2Fmarket.waimai.meituan.com%2Fgd%2Fsingle.html%3Futm_term%3D74060.cps.24412203%26el_biz%3Dwaimai%26gundam_id%3D2KAWnD%26utm_campaign%3DAffProg%26utm_medium%3Dwandie%26el_page%3Dgundam.loader%26urpid%3D74060.161941038093.24412203.0%26appkey%3D669dc60208f861e36c7355a243a7fdf3%253Aqq%26source%3Dwandie%26_rdt%3D1%26utm_source%3D%26utm_content%3D%26noguide%3D1%26utm_term%3D%26utm_campaign%3Dother%26utm_medium%3DMU%26channel%3Dunion%26utm_source%3D60413%26utm_content%3D1380426742014976088'>美团外卖券</a>
这样就可以通过芝麻小客服的,公众号客服消息群发,发给用户了。
这篇关于美团外卖券小程序路径过长导致插入文本消息失败的问题解决办法的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-22微信小程序的接口信息py可以抓到吗?-icode9专业技术文章分享
- 2024-11-22怎样解析出微信小程序二维码带的参数?-icode9专业技术文章分享
- 2024-11-22微信小程序二维码怎样解析成链接?-icode9专业技术文章分享
- 2024-11-22微信小程序接口地址的域名需要怎么设置?-icode9专业技术文章分享
- 2024-11-22微信小程序的业务域名有什么作用-icode9专业技术文章分享
- 2024-11-22微信小程序 image有类似html5的onload吗?-icode9专业技术文章分享
- 2024-11-22微信小程序中怎么实现文本内容超出行数后显示省略号?-icode9专业技术文章分享
- 2024-11-22微信小程序怎么实现分享样式定制和图片定制功能?-icode9专业技术文章分享
- 2024-11-20微信小程序全栈教程:从零开始的全攻略
- 2024-11-19微信小程序全栈学习:从零开始的完整指南