From: guangchao.xu Date: Thu, 16 Jul 2020 06:27:12 +0000 (+0800) Subject: ‘分享按钮测试 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=22a040b7ee1a53eecea172ac74f29c4f2adc8470;p=dali_platform%2Fmobile.git ‘分享按钮测试 --- diff --git a/platforms/android/app/src/main/assets/www/main.html b/platforms/android/app/src/main/assets/www/main.html index d9dcb90..da00a53 100644 --- a/platforms/android/app/src/main/assets/www/main.html +++ b/platforms/android/app/src/main/assets/www/main.html @@ -204,36 +204,38 @@ var shareqq = document.getElementById("shareqq"); var sharewx = document.getElementById("sharewx"); shareqq.onclick = function() { + alert("qq分享") var args = {}; args.client = QQSDK.ClientType.QQ; //QQSDK.ClientType.QQ,QQSDK.ClientType.TIM; args.scene = QQSDK.Scene.QQ; //QQSDK.Scene.QQZone,QQSDK.Scene.Favorite args.url = 'https://cordova.apache.org/'; - args.title = '这个是 Cordova QQ 新闻分享的标题'; - args.description = '这个是 Cordova QQ 新闻分享的描述'; + args.title = '大理App分享'; + args.description = '访客二维码'; args.image = 'https://cordova.apache.org/static/img/cordova_bot.png'; QQSDK.shareNews(function() { - alert('shareNews success'); + alert('分享成功'); }, function(failReason) { alert(failReason); }, args); } sharewx.onclick = function() { + alert("wx分享") Wechat.share({ message: { - title: "Hi, there", - description: "This is description.", + title: "大理App分享", + description: "访客二维码", thumb: "www/img/thumbnail.png", mediaTagName: "TEST-TAG-001", messageExt: "这是第三方带的测试字段", messageAction: "dotalist", media: { - type: Wechat.Type.WEBPAGE, + type: Wechat.Type.LINK, webpageUrl: "http://www.jason-z.com" } }, - scene: Wechat.Scene.TIMELINE // share to Timeline + scene: Wechat.Scene.SESSION // share to Timeline }, function () { - alert("Success"); + alert("分享成功"); }, function (reason) { alert("Failed: " + reason); }); diff --git a/www/main.html b/www/main.html index d9dcb90..da00a53 100644 --- a/www/main.html +++ b/www/main.html @@ -204,36 +204,38 @@ var shareqq = document.getElementById("shareqq"); var sharewx = document.getElementById("sharewx"); shareqq.onclick = function() { + alert("qq分享") var args = {}; args.client = QQSDK.ClientType.QQ; //QQSDK.ClientType.QQ,QQSDK.ClientType.TIM; args.scene = QQSDK.Scene.QQ; //QQSDK.Scene.QQZone,QQSDK.Scene.Favorite args.url = 'https://cordova.apache.org/'; - args.title = '这个是 Cordova QQ 新闻分享的标题'; - args.description = '这个是 Cordova QQ 新闻分享的描述'; + args.title = '大理App分享'; + args.description = '访客二维码'; args.image = 'https://cordova.apache.org/static/img/cordova_bot.png'; QQSDK.shareNews(function() { - alert('shareNews success'); + alert('分享成功'); }, function(failReason) { alert(failReason); }, args); } sharewx.onclick = function() { + alert("wx分享") Wechat.share({ message: { - title: "Hi, there", - description: "This is description.", + title: "大理App分享", + description: "访客二维码", thumb: "www/img/thumbnail.png", mediaTagName: "TEST-TAG-001", messageExt: "这是第三方带的测试字段", messageAction: "dotalist", media: { - type: Wechat.Type.WEBPAGE, + type: Wechat.Type.LINK, webpageUrl: "http://www.jason-z.com" } }, - scene: Wechat.Scene.TIMELINE // share to Timeline + scene: Wechat.Scene.SESSION // share to Timeline }, function () { - alert("Success"); + alert("分享成功"); }, function (reason) { alert("Failed: " + reason); });