diff --git a/public/javascripts/wechat/controllers/invite_code.js b/public/javascripts/wechat/controllers/invite_code.js index ca69e308c..ec0a3ee65 100644 --- a/public/javascripts/wechat/controllers/invite_code.js +++ b/public/javascripts/wechat/controllers/invite_code.js @@ -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( diff --git a/public/javascripts/wechat/controllers/login.js b/public/javascripts/wechat/controllers/login.js index b70398955..863af07ee 100644 --- a/public/javascripts/wechat/controllers/login.js +++ b/public/javascripts/wechat/controllers/login.js @@ -1,7 +1,10 @@ app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams', 'alertService', 'config','auth','session','wx', function ($scope, $http, $location, $routeParams, alertService, config, auth,session, wx) { + // 登录页不用显示菜音 - wx.hideOptionMenu(); + wx.ready(function(){ + wx.hideOptionMenu(); + }) if(auth.get_bind().then(function(){ $location.path("/activities");