From 56d6f4b9bc308d200716e6a1f42983d71b469729 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 2 Aug 2016 17:36:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E5=88=B6=E5=88=86=E4=BA=AB=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wechat/controllers/invite_code.js | 16 +++++++++++++++- public/javascripts/wechat/controllers/login.js | 5 ++++- 2 files changed, 19 insertions(+), 2 deletions(-) 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");