关于anguar2微信支付问题

前端一直都是用angular2做的

但是在做支付时,很头痛 ,支付总是失败,但后没有办法只能是跳转到一个其它的页面进行支付,这也算实现了,但是觉得不好,支付完了以要重新跳回系统,怎么解决???????

这个是前辈写的一篇文章 但是一直不得要领 就是路由上如何加上“?”

我的支付目录配置

http://example.abc.cn/app/wxpay/

angular2 index.html配置(注意后面的问号

<base href="/?" rel="external nofollow">

如果你在package.json build 有配置(注意后面的问号)

"build": "ng build --base-href /app/wxpay/?  --prod",

通过对andior, iphone 都可以发起支付了

对于wx.config({....}) 所要签名的url直接取window.location.href就可以

原文地址:https://www.cnblogs.com/ymh2013/p/8558456.html