xu-li / cordova-plugin-wechat-example Goto Github PK
View Code? Open in Web Editor NEWAn example project for cordova-plugin-wechat
An example project for cordova-plugin-wechat
您好,插件中有调用电子发票的接口么,还是说只要自己实现下这个类就行了?
您好,感谢你的wechat plugin,但是我有个问题,我看到share 里边将share定义为一个全局的函数。为什们不把它写成一个angular service进行使用?我试了一下,似乎这样是不能工作的,不知道您有没有考虑过?或者这样有什么问题?多谢
When I run this demo,I get the following errors:
D/CordovaLog(23450): file:///android_asset/www/cordova.js: Line 914 : Uncaught T
ypeError: Cannot read property 'length' of undefined
What's wrong with that? Please help me, thanks!
我这出现了分享时每次都提示登录的问题,刚开始加入插件测试时是好用的(第一次分享提示登录,以后只提示近期已经登录,不再需要登录)。后来不知道为什么就不好用了。没做过任何改变。
请帮忙分析下什么可能的原因?
另外,IOS在这种情况有发现需要多次才成功的情况。
按说明安装运行后,点击任何一个“发送消息给微信”,都alert错误信息“未知错误”;
在build的过程中transformClassesWithDexForDebug报一个warning,从官方下载最新的libammsdk.jar覆盖也运行不了。
除了检查是否安装点击有反应,其他的一律没有任何反应
能给个详细点的demo么?
prepay_id为空
文字消息,发送成功,但返回时显示‘很抱歉,app已停止运行’;
图片发送,刚点击就显示停止运行。
使用的最新ionic框架,在安卓4.4下多个手机测试的结果一样
怎么分享小程序
微信开放平台配置的分享图标 在安卓端正常显示 在ios端 小图标能正常显示 大图标显示微信默认link
Ionic3 分享成功点返回APP后没有回到分享界面而是被重启,查了资料把plugin.xml加了微信 android:launchMode="singleTask"还是不行,但是QQ分享却可以正常返回app
我测试了,
在iOS环境下,能够正常使用,
但是在android环境下,除了能够检测微信是否安装以外,不能使用其他的 功能,有没有人遇到和我一样的问题,谁能告诉我解决方法?(这个问题解决了,android 包签名后,就能正常使用了)
客户端得到code 异步发一个请求到后台 出现errcode":40029,"errmsg":"invalid code ,
把客户端得到的code直接赋值给后台code,在浏览器访问后台地址却获得用户信息
alert(JSON.stringify(response)); //可显示code
$.post(url,{code:code},function(data){ //发异步给后台 ,后台代码语言为php
....
})
My app and the demo(example) both built failed in cordova.
The result kept the same when I cordova platform update ios
主要登录代码 :
Wechat.auth("snsapi_userinfo", function (response) {
// you may use response.code to get the access token.
alert(JSON.stringify(response));
}, function (reason) {
alert("Failed: " + reason);
});
首次点击,出现下面的授权页面 :
相关环境:
Installed platforms:
android 6.1.2
cordova-plugin-wechat 2.1.0
Gradle 3.3
Groovy: 2.4.7
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_91 (Oracle Corporation 25.91-b14)
OS: Mac OS X 10.13.2 x86_64
cordova version : 6.5.0
然而,第二次登录直接弹出 字符串格式的 response ,微信登录的上述确认登录页面不再出现。
求教:如何解决这种问题让每次登录,都要用户手动点击 "确认登录" 然后才弹出 response
Hi,
我把你的ionic 放在本地测试时,通过ios simulator 可以正常运行,但貌似点击任何功能都没效果出现的?请问是否我哪个步骤做错了,谢谢。
var params = {
mch_id: '1280971401', // merchant id
prepay_id: 'wx20151106110724aa7a36a51c0292643654', // prepay id
nonce: 'nLYur40d6aQZaRIy', // nonce
timestamp: "1446778330", // timestamp
sign: '2508E9C7977473C45807DCF688E407A2', // signed string
};
我看例子中是传这几个字段,签名是重新对这些值签名对吧?时间戳有什么要求吗,为什么一直返回failed:普通错误类型。。求大神帮帮忙
这个demo里面没有看到支付demo呢
这个是不是不支持build.phonegap.com平台进行构建?我构建后,在iphone5上能出分享界面,但是点击分享按钮完全没有反应。
我在项目中引入插件发现无法使用后按照您的readMe上所说步骤部署安装了example发现结果相同,
点击各种分享都是返回未知错误,而点击微信授权登录无响应。请问可能是什么原因造成的呢?
Hi, I've tried this example on my android device and when I click to auth button nothing is heppen...
In the logcat http://prntscr.com/8uh7xz I see that wrong activity is started (I think so) : com.tencent.mm.plugin.base.stub.WXEntryActivity instead of xu.li.test.cordova.plugin.wechat.wxapi.WXEntryActivity. Can you help me with this issue? I want to use xu.li.cordova.plugin.wechat in my project for users authorization, but it doesn't work at all. Thanks for the help
P.S. there is no any error in the log
Hi,
What does that mean, I installed the example as APK in my Android phone which having Wechat on it.
Is this project complete or still in development?
Thanks
我首先git clone https://github.com/xu-li/cordova-plugin-wechat-example.git
然后cd ionic执行:
build的时候出现红色的告警:
:preDexDebugwarning: Ignoring InnerClasses attribute for an anonymous inner class
(com.tencent.mm.sdk.openapi.WXApiImplV10$ActivityLifecycleCb$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is not an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.tencent.mm.sdk.openapi.WXApiImplV10$ActivityLifecycleCb$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is not an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.tencent.mm.sdk.b.b) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is not an inner class.
执行“发送Text消息给微信”等操作报“Failed:未知错误”
在我的平板上测试 ionic run android,执行“发送Text消息给微信”等操作报“Failed:授权失败”
logcat:
"发送Text消息给微信"报“Failed:未知错误”
D/Cordova.Plugin.Wechat( 7152): share is called.
D/Cordova.Plugin.Wechat( 7152): Start building message.
D/Cordova.Plugin.Wechat( 7152): Message sent.
D/Cordova.Plugin.Wechat( 7152): com.tencent.mm.sdk.modelmsg.SendMessageToWX$Resp@2f4321ac
"发送Photo消息给微信(本地图片)"报“Failed:未知错误”
D/Cordova.Plugin.Wechat( 7152): share is called.
D/Cordova.Plugin.Wechat( 7152): Start building message.
E/Cordova.Plugin.Wechat( 7152): Failed to decode image at null
E/Cordova.Plugin.Wechat( 7152): org.json.JSONException: No value for thumb
E/Cordova.Plugin.Wechat( 7152): at org.json.JSONObject.get(JSONObject.java:389)
E/Cordova.Plugin.Wechat( 7152): at org.json.JSONObject.getString(JSONObject.java:550)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat.getBitmap(Wechat.java:335)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat.buildSharingMessage(Wechat.java:263)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat$1.run(Wechat.java:151)
E/Cordova.Plugin.Wechat( 7152): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/Cordova.Plugin.Wechat( 7152): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/Cordova.Plugin.Wechat( 7152): at java.lang.Thread.run(Thread.java:818)
D/Cordova.Plugin.Wechat( 7152): Message sent.
D/Cordova.Plugin.Wechat( 7152): com.tencent.mm.sdk.modelmsg.SendMessageToWX$Resp@b83cf57
"发送Photo消息给微信(远程图片)"报“Failed:未知错误”
D/Cordova.Plugin.Wechat( 7152): share is called.
D/Cordova.Plugin.Wechat( 7152): Start building message.
E/Cordova.Plugin.Wechat( 7152): Failed to decode image at null
E/Cordova.Plugin.Wechat( 7152): org.json.JSONException: No value for thumb
E/Cordova.Plugin.Wechat( 7152): at org.json.JSONObject.get(JSONObject.java:389)
E/Cordova.Plugin.Wechat( 7152): at org.json.JSONObject.getString(JSONObject.java:550)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat.getBitmap(Wechat.java:335)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat.buildSharingMessage(Wechat.java:263)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat$1.run(Wechat.java:151)
E/Cordova.Plugin.Wechat( 7152): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/Cordova.Plugin.Wechat( 7152): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/Cordova.Plugin.Wechat( 7152): at java.lang.Thread.run(Thread.java:818)
D/Cordova.Plugin.Wechat( 7152): Message sent.
D/Cordova.Plugin.Wechat( 7152): com.tencent.mm.sdk.modelmsg.SendMessageToWX$Resp@22870461
“微信授权登录”没有反应:
D/Cordova.Plugin.Wechat( 7152): sendAuthRequest is called.
我按照readme的步骤操作,再做分享的时候弹出微信一闪又消失了,是否需要appid的签名等参数呢?
能否打开公众号页面?
让喜欢的人自己关注
添加IOS平台,通过ionic emulate ios或者用XCode打开,均build失败:
duplicate symbol _llvm.cmdline in:
/Users/libin/Projects/try-ionic/wechat-example/cordova-plugin-wechat-example/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/cordova-plugin-wechat/libWeChatSDK.a(MTAEvent.o)
/Users/libin/Projects/try-ionic/wechat-example/cordova-plugin-wechat-example/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/cordova-plugin-wechat/libWeChatSDK.a(MTAPasteboard.o)
ld: 24 duplicate symbols for architcture x86_64
clang: error: Linker command failed with exit code 1
iOS上完全没有问题。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.