WeChat Pay is used for vue mobile projects.

problem description

premise is to introduce Wechat sdk using npm I-S weixin-js-sdk. On the required page import wx from "weixin-js-sdk"
Code: mounted () {

  console.log(wx)
}

clipboard.png

var timestamp = new Date().getTime() //


clipboard.png
alertconsole
console.log

clipboard.png

successfail&cancel
debugger

clipboard.png
how about a big guy to save T... T, I hope my description is quite clear.

Apr.11,2022

did you test it in Wechat browser? And WeChat Pay can't test the domain name in the official account whitelist


const wx = window.jWeixin | | require ('weixin-js-sdk')


I also encountered this kind of problem. How did you solve it later?

Menu