|
|
|
@ -93,7 +93,7 @@ app.factory('rms', function(){
|
|
|
|
|
return {save: save, get: get};
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
app.factory('common', ['$http', 'auth', '$routeParams','rms','config', function($http, auth, $routeParams,rms,config){
|
|
|
|
|
app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx', function($http, auth, $routeParams,rms,config,wx){
|
|
|
|
|
var addCommonReply = function(id, type, data, cb){
|
|
|
|
|
|
|
|
|
|
if(!data.comment || data.comment.length<=0){
|
|
|
|
@ -200,6 +200,36 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms','config', function(
|
|
|
|
|
args.scope.formData = {comment: ''};
|
|
|
|
|
var loadData = function(id,replytype,page){
|
|
|
|
|
loadCommonData(id, args.type,replytype,page).then(function successCallback(response) {
|
|
|
|
|
var desc = response.data.user.realname+":"+response.data.title;
|
|
|
|
|
wx.ready(function(){
|
|
|
|
|
wx.onMenuShareTimeline({
|
|
|
|
|
title: 'Trustie创新实践平台', // 分享标题
|
|
|
|
|
// link: 'http://www.trustie.net/', // 分享链接
|
|
|
|
|
imgUrl: 'http://www.trustie.net/images/logo2.png', // 分享图标
|
|
|
|
|
success: function () {
|
|
|
|
|
console.log("share successed.");
|
|
|
|
|
},
|
|
|
|
|
cancel: function () {
|
|
|
|
|
console.log("share canceled.");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
wx.onMenuShareAppMessage({
|
|
|
|
|
title: 'Trustie创新实践平台', // 分享标题
|
|
|
|
|
desc: desc, // 分享描述
|
|
|
|
|
// link: '', // 分享链接
|
|
|
|
|
// imgUrl: '', // 分享图标
|
|
|
|
|
// type: '', // 分享类型,music、video或link,不填默认为link
|
|
|
|
|
// dataUrl: '', // 如果type是music或video,则要提供数据链接,默认为空
|
|
|
|
|
success: function () {
|
|
|
|
|
// 用户确认分享后执行的回调函数
|
|
|
|
|
},
|
|
|
|
|
cancel: function () {
|
|
|
|
|
// 用户取消分享后执行的回调函数
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
args.loadCallback(response.data);
|
|
|
|
|
}, function errorCallback(response) {
|
|
|
|
|
});
|
|
|
|
|