-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
omi-mp小程序转H5微信支付的问题 #211
Comments
另外就是如果要分别维护的话,对于转换后的src目录里的代码,脱离src-mp中的小程序,单独开发并运行要怎么处理? |
确实需要分别开发维护,目前来看,开发维护的目录都应该放在 src-mp 里,所以就不用担心覆盖的问题。 |
src-mp里放的是小程序的代码,怎么在小程序的代码里写h5页面的微信支付呢?小程序用的是内置api,h5的话只能用web的api,编译之前没有web的环境啊。 |
src-mp里也可以放兼容性代码啊,比如: if(typeof window !== 'undefined'){
//浏览器
}else{
//小程序
} |
我想的是通过配置把不同环境的功能代码进行隔离的办法。 |
if(typeof window !== 'undefined'){
//浏览器
loadScript('./xxx.js')
}else{
//小程序
} |
请问小程序里集成了微信支付,转h5的话是否只能把h5项目里的支付模块重新实现,然后分别维护小程序和h5的代码?
The text was updated successfully, but these errors were encountered: