Commit 00a52f54 by wangshuo

zhifu

parent 9a5268f4
...@@ -109,7 +109,7 @@ export default class PayOrder extends Component { ...@@ -109,7 +109,7 @@ export default class PayOrder extends Component {
weixinPay = (orderId) => { weixinPay = (orderId) => {
// 微信内部-支付 // 微信内部-支付
if (is_weixin()) { if (is_weixin()) {
window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=" + encodeURIComponent(window.location.href + "&aa=bb&oid=" + orderId).toLowerCase() + "&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"; window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=" + encodeURIComponent(window.location.href + "&aa=bb").toLowerCase() + "&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
} else { } else {
// 微信外部-支付 // 微信外部-支付
http.get(`${API['base-api']}/pay/wxpay/wap_charge/oid/${orderId}`).then((res) => { http.get(`${API['base-api']}/pay/wxpay/wap_charge/oid/${orderId}`).then((res) => {
...@@ -131,8 +131,8 @@ export default class PayOrder extends Component { ...@@ -131,8 +131,8 @@ export default class PayOrder extends Component {
} else { } else {
http.get(`${API['base-api']}/pay/wxpay/pub_charge/oid/${getParam('oid')}/code/${weixin_code}`).then((res) => { http.get(`${API['base-api']}/pay/wxpay/pub_charge/oid/${getParam('oid')}/code/${weixin_code}`).then((res) => {
if (res.data.errno === 0) { if (res.data.errno === 0) {
this.bridgeData = res.data.data; let data = res.data.data;
this.onBridgeReady(); this.onBridgeReady(data);
if (typeof WeixinJSBridge == "undefined") { if (typeof WeixinJSBridge == "undefined") {
if (document.addEventListener) { if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady, false) document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady, false)
...@@ -175,9 +175,7 @@ export default class PayOrder extends Component { ...@@ -175,9 +175,7 @@ export default class PayOrder extends Component {
}, 1000) }, 1000)
} }
onBridgeReady = () => { onBridgeReady = (data) => {
const data = this.bridgeData;
console.log(this.bridgeData);
WeixinJSBridge.invoke( WeixinJSBridge.invoke(
'getBrandWCPayRequest', { 'getBrandWCPayRequest', {
"appId": data.appId, //公众号名称,由商户传入 "appId": data.appId, //公众号名称,由商户传入
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment