定制分享内容

This commit is contained in:
guange 2016-08-02 17:36:59 +08:00
parent 2a67ec5407
commit 56d6f4b9bc
2 changed files with 19 additions and 2 deletions

View File

@ -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; 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 = {}; vm.course = {};
var courseid = $routeParams.id; var courseid = $routeParams.id;
$http.get(config.apiUrl+ 'courses/'+courseid+"?token="+auth.token()).then( $http.get(config.apiUrl+ 'courses/'+courseid+"?token="+auth.token()).then(

View File

@ -1,7 +1,10 @@
app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams', 'alertService', 'config','auth','session','wx', app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams', 'alertService', 'config','auth','session','wx',
function ($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(){ if(auth.get_bind().then(function(){
$location.path("/activities"); $location.path("/activities");