2016-07-28 14:49:45 +08:00
|
|
|
|
/**
|
|
|
|
|
* Created by guange on 16/6/22.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2016-08-04 10:47:35 +08:00
|
|
|
|
app.controller('ProjectInviteCodeController', ['$scope','$http', '$routeParams','config','auth','wx','common', function($scope, $http, $routeParams, config, auth,wx,common){
|
2016-07-28 14:49:45 +08:00
|
|
|
|
var vm = $scope;
|
|
|
|
|
|
|
|
|
|
vm.project = {};
|
|
|
|
|
var projectid = $routeParams.id;
|
|
|
|
|
$http.get(config.apiUrl+ 'projects/'+projectid+"?token="+auth.token()).then(
|
|
|
|
|
function(response){
|
|
|
|
|
console.log(response.data);
|
|
|
|
|
vm.project = response.data.data;
|
2016-08-04 09:08:18 +08:00
|
|
|
|
|
|
|
|
|
var desc = "项目邀请:"+vm.project.name+" 项目";
|
|
|
|
|
|
2016-08-04 11:17:50 +08:00
|
|
|
|
common.wxConfig("",desc,"");
|
2016-08-04 10:47:35 +08:00
|
|
|
|
|
|
|
|
|
// 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: '', // 分享图标
|
|
|
|
|
// imgUrl: 'http://www.trustie.net/images/logo2.png', // 分享图标
|
|
|
|
|
//// type: '', // 分享类型,music、video或link,不填默认为link
|
|
|
|
|
//// dataUrl: '', // 如果type是music或video,则要提供数据链接,默认为空
|
|
|
|
|
// success: function () {
|
|
|
|
|
// // 用户确认分享后执行的回调函数
|
|
|
|
|
// },
|
|
|
|
|
// cancel: function () {
|
|
|
|
|
// // 用户取消分享后执行的回调函数
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// });
|
2016-07-28 14:49:45 +08:00
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
2016-08-04 09:08:18 +08:00
|
|
|
|
|
2016-07-28 14:49:45 +08:00
|
|
|
|
|
|
|
|
|
}]);
|