获取当前绑定账户的appid uniapp console.log('appid',uni.getAccountInfoSync().miniProgram.appId) 原生 console.log(111,my.getAccountIn
uniapp
console.log('appid',uni.getAccountInfoSync().miniProgram.appId)
原生
console.log(111,my.getAccountInfoSync().miniProgram.appId)
@FollowLifestyle="FollowLifestyle($event,item)"
//this.index是变量,this.index = 1`details${this.index}-title`//结果为:details1-title
获取对象:在绑定事件的标签添加data-item="{{item}}"
获取索引:在绑定事件的标签添加data-index="{{index}}"
html:
{{item.advertTitle}}
js:
onJumpClick(e) { let item = e.currentTarget.dataset.item; let index = e.currentTarget.dataset.index; },
const id = obj.extend1 //生活号idmy.ap.navigateToAlipayPage({path: encodeURIComponent(`https://render.alipay.com/p/s/i/?scheme=alipays%3A%2F%2FplatfORMapi%2Fstartapp%3FappId%3D20000042%26publicId%3D${id}`)});
Https://render.alipay.com/p/s/i/?scheme=alipays://platformapi/startapp?appId=2021003147673053&page=pages/conversionCopy/conversionCopy?advertTitle%3DUSD%E6%8D%A2%E7%AE%97%26hotNav%3Dtrue
let link = `https://render.alipay.com/p/s/i/?scheme=${encodeURIComponent(`alipays://platformapi/startapp?appId=20001003&actionSrc=hometab&keyWord=${str}`)}`
let str = '深圳我爱你' const link = `alipays://platformapi/startapp?appId=20001003&actionSrc=hometab&keyword=${str}` my.ap.navigateToAlipayPage({ path: encodeURIComponent( `https://render.alipay.com/p/s/i/?scheme=${encodeURIComponent(link)}` ) })
my.navigateToMiniProgram({appId: obj.jumpAppid, //appidpath: obj.jumpPath, //跳转路径extraData: JSON.parse(obj.jumpExtraData), //扩展字段success: (res) => {console.log(res)},fail: (res) => {console.log(res)}});
my.ap.navigateToAlipayPage({// 注意只支持特定前缀的 URL,且需要整体冗余编码path: encodeURIComponent('https://render.alipay.com/p/s/i/?scheme=alipays%3A%2F%2Fplatformapi%2Fstartapp%3FsaId%3D20000067%26url%3D' +encodeURIComponent(obj.jumpWebviewUrl)), //h5路径success: (res) => {console.log('navigateToAlipayPage success', JSON.stringify(res));},fail: (res) => {console.error('navigateToAlipayPage fail', JSON.stringify(res));}});
alipays://platformapi/startapp?appId=2021003147673053&page=pages/WEBview/webview?webViewUrl=http://h5.jiekuanzhushou.com/standby/#/
h5跳转支付宝小程序
https://render.alipay.com/p/s/i/?scheme=alipays://platformapi/startapp?appId=2021003147673053&page=pages/conversionCopy/conversionCopy?advertTitle%3DUSD%E6%8D%A2%E7%AE%97%26hotNav%3Dtrue
来源地址:https://blog.csdn.net/weixin_47586598/article/details/128015663
--结束END--
本文标题: 原生小程序知识
本文链接: https://lsjlt.com/news/412884.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-01-21
2023-10-28
2023-10-28
2023-10-27
2023-10-27
2023-10-27
2023-10-27
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0