- 注意并不是h5而是vue打包的app
- h5+api(调用手机的一些功能) http://www.html5plus.org/doc/zh_cn/android.html
- 分享海报(image)
shareWx(scene) {
let pic = this.pic_img
let msg = {
type: "image",
pictures: [pic],
href: pic,
extra: {
scene:scene
}
}
let t = this
plus.share.getServices(function(e) {
for (var i in e) {
if ('weixin' == e[i].id) {
t.sharewx = e[i]
t.getsend(msg)
}
}
})
},
shareWx(scene) {
let purl = "/static/imgs/thumb.png"
var surl = this.logs.invite_url;
let msg = {
title:'xxxx',
content:'xxxxxxxxx',
thumbs:[purl],
href:surl,
extra: {
scene:scene
}
}
let t = this
plus.share.getServices((e)=>{
for (var i in e) {
if ('weixin' == e[i].id) {
t.sharewx = e[i]
t.getsend(msg)
}
}
})
},
getsend(msg){
this.sharewx.send(msg,()=>{
this.$toast({
message:'分享成功',
duration:1000
});
},(error)=>{
this.$toast({
message:'分享失败,请重新分享',
duration:1000
});
})
},
getpic() {
plus.gallery.save(picurl, ()=>{
Toast("保存图片到相册成功");
}, ()=>{
Toast("保存失败,请重新保存");
});
},