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; shares[t.id]=t;
} }
}, function(e){ }, function(e){
alert("获取分享服务列表失败:"+e.message ); plus.nativeUI.alert("获取分享服务列表失败:"+e.message );
} ); } );
} }
/** /**
@@ -20,7 +20,7 @@ function updateSerivces(){
*/ */
function shareAction(sb,bh) { function shareAction(sb,bh) {
if(!sb||!sb.s){ if(!sb||!sb.s){
alert("无效的分享服务!"); plus.nativeUI.alert("无效的分享服务!");
return; return;
} }
var msg={content:sharehrefDes,extra:{scene:sb.x}}; var msg={content:sharehrefDes,extra:{scene:sb.x}};
@@ -47,11 +47,11 @@ function shareAction(sb,bh) {
if ( sb.s.authenticated ) { if ( sb.s.authenticated ) {
shareMessage(msg,sb.s); shareMessage(msg,sb.s);
} else { } else {
alert("---未授权---"); plus.nativeUI.alert("---未授权---");
sb.s.authorize( function(){ sb.s.authorize( function(){
shareMessage(msg,sb.s); shareMessage(msg,sb.s);
},function(e){ },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){ function shareMessage(msg,s){
s.send( msg, function(){ s.send( msg, function(){
alert("分享到\""+s.description+"\"成功! " ); plus.nativeUI.alert("分享到\""+s.description+"\"成功! " );
}, function(e){ }, function(e){
console.log(e.code+"========="+e.message) console.log(e.code+"========="+e.message)
alert( "分享到\""+s.description+"\"失败 !"); plus.nativeUI.alert( "分享到\""+s.description+"\"失败 !");
} ); } );
} }