You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trustieforge/public/javascripts/wechat/controllers/invite_code.js

33 lines
952 B

/**
* Created by guange on 16/6/22.
*/
app.controller('InviteCodeController', ['$scope','$http', '$routeParams','config','auth','wx', function($scope, $http, $routeParams, config, auth, wx){
var vm = $scope;
wx.ready(function(){
wx.onMenuShareTimeline({
title: '定制的标题', // 分享标题
link: 'http://wechat.trustie.net/', // 分享链接
imgUrl: 'http://wechat.trustie.net/images/logo2.png', // 分享图标
success: function () {
console.log("share successed.");
},
cancel: function () {
console.log("share canceled.");
}
});
});
vm.course = {};
var courseid = $routeParams.id;
$http.get(config.apiUrl+ 'courses/'+courseid+"?token="+auth.token()).then(
function(response){
console.log(response.data);
vm.course = response.data.data;
}
);
}]);