|

楼主 |
发表于 2016-1-7 16:22:00
|
显示全部楼层
已经在页中引用了,也在页中加入了分享的方法了。
<script type="text/javascript" src="/cordova.js"></script>
<script type="text/javascript">
define(function(require){
var $ = require("jquery");
var justep = require("$UI/system/lib/justep");
require("cordova!com.justep.cordova.plugin.weixin.v3");
var weixin = navigator.weixin;
var Model = function(){
this.name=justep.Bind.observable("");
this.callParent();
};
weixin.share({
message: {
title: "Message Title",
description: "Message Description(optional)",
mediaTagName: "Media Tag Name(optional)",
thumb: "http://YOUR_THUMBNAIL_IMAGE",
media: {
type: weixin.Type.WEBPAGE, // webpage
webpageUrl: "https://www.justep.com" // webpage
}
},
scene: weixin.Scene.TIMELINE // share to Timeline
}, function () {
alert("Success");
}, function (reason) {
alert("Failed: " + reason);
});
return Model;
});
</script>
</head> |
|