webview中如何判断是在何种小程序中?

小程序 文章 2020-08-05 12:01 794 0 全屏看文

AI助手支持GPT4.0

webview中如何判断是在何种小程序中?

目前同样的h5 会出现在不同的小程序中,但是对应的操作交互不同,请问有api 可以判断是在 何种小程序中吗?

At present, the same H5 will appear in different applets, but the corresponding operation interaction is different. Is there an API to determine which applet is in?

回答:

维百特:

url带参数

拾忆:

url传参吧

11月:

打开webview给个标记吧,目前应该是没有你说的这个api的

Admin²⁰²⁰:

谢邀:

你可以在web-view的src里面加个参数from=wp代表是从微信小程序过去的

雷火🔥:

没有,可以通过客户端判断是在微信,或者支付宝,京东,百度app等里

-EOF-

AI助手支持GPT4.0