|
|
|
@ -3,9 +3,23 @@
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.controller('InviteCodeController', ['$scope','$http', '$routeParams','config','auth', function($scope, $http, $routeParams, config, auth){
|
|
|
|
|
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://www.baidu.com', // 分享链接
|
|
|
|
|
imgUrl: 'https://rescdn.qqmail.com/zh_CN/htmledition/images/webp/spacer1e9c5d.gif', // 分享图标
|
|
|
|
|
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(
|
|
|
|
|