Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1

This commit is contained in:
gongjin
2018-04-16 18:03:54 +08:00
+6 -6
View File
@@ -10,7 +10,7 @@ function updateSerivces(){
shares[t.id]=t;
}
}, function(e){
alert("获取分享服务列表失败:"+e.message );
plus.nativeUI.alert("获取分享服务列表失败:"+e.message );
} );
}
/**
@@ -20,7 +20,7 @@ function updateSerivces(){
*/
function shareAction(sb,bh) {
if(!sb||!sb.s){
alert("无效的分享服务!");
plus.nativeUI.alert("无效的分享服务!");
return;
}
var msg={content:sharehrefDes,extra:{scene:sb.x}};
@@ -47,11 +47,11 @@ function shareAction(sb,bh) {
if ( sb.s.authenticated ) {
shareMessage(msg,sb.s);
} else {
alert("---未授权---");
plus.nativeUI.alert("---未授权---");
sb.s.authorize( function(){
shareMessage(msg,sb.s);
},function(e){
alert("认证授权失败:"+e.code+" - "+e.message );
plus.nativeUI.alert("认证授权失败:"+e.code+" - "+e.message );
});
}
@@ -63,11 +63,11 @@ function shareAction(sb,bh) {
*/
function shareMessage(msg,s){
s.send( msg, function(){
alert("分享到\""+s.description+"\"成功! " );
plus.nativeUI.alert("分享到\""+s.description+"\"成功! " );
}, function(e){
console.log(e.code+"========="+e.message)
alert( "分享到\""+s.description+"\"失败 !");
plus.nativeUI.alert( "分享到\""+s.description+"\"失败 !");
} );
}