在小程序开发中,用到了跳转小程序,记录一下
京东小程序
e = encodeURIComponent(shortURL);//必须转码
wx.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74',
path: 'pages/union/proxy/proxy?spreadUrl=' + e +&appid=XXXXXX,//XXXXXX为自己小程序的apppid,应该是官方小程序统计跳转来源的,选填
success(res) {
}
})
测试链接 pages/union/proxy/proxy?spreadUrl=https%3A%2F%2Fu.jd.com%2F7mId7p&EA_PTAG=17078.27.188
拼多多小程序
//path 为优惠券链接 pdd.ddk.goods.promotion.url.generate(多多进宝推广链接生成)这个接口入参增加字段:generate_we_app ,值为true。
let path = 'package_a/welfare_coupon/welfare_coupon?goods_id=173040386567&pid=10782879_149933645&customParameters=%7B%22uid%22%3A%2211111%22%2C%22sid%22%3A%2222222%22%7D+&cpsSign=CC_200923_10782879_149933645_ed7e15ae66598836da070e64d49a48d0&duoduo_type=2&_oc_cps_sign=CC_200923_10782879_149933645_ed7e15ae66598836da070e64d49a48d0&_oc_pid=10782879_149933645'
wx.navigateToMiniProgram({
appId: 'wx32540bd863b27570',
path: path,
success(res) {
}
})
测试链接 package_a/welfare_coupon/welfare_coupon?goods_id=172121106962&pid=13466281_157956055&cpsSign=CC_200923_13466281_157956055_0c5b58ae46d999265fb97177cfdc78b2&duoduo_type=2
版权声明:本文为anxlxf原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。