配置登录页菜单
This commit is contained in:
parent
2632f7aa59
commit
2a67ec5407
|
@ -23,6 +23,8 @@
|
|||
window.g_projectid = <%= @project_id %>;
|
||||
<% end %>
|
||||
|
||||
//参考文档
|
||||
//https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115&token=&lang=zh_CN
|
||||
wx.config({
|
||||
debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
||||
appId: '<%= @appid %>', // 必填,公众号的唯一标识
|
||||
|
@ -30,7 +32,8 @@
|
|||
nonceStr: '<%= @sign_params[:noncestr] %>', // 必填,生成签名的随机串
|
||||
signature: '<%= @sign_params[:signature] %>',// 必填,签名,见附录1
|
||||
jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone',
|
||||
'hideMenuItems','closeWindow', 'scanQRCode'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
|
||||
'hideOptionMenu','showOptionMenu','showMenuItems', 'hideMenuItems',
|
||||
'hideAllNonBaseMenuItem','showAllNonBaseMenuItem','closeWindow', 'scanQRCode'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
|
||||
});
|
||||
|
||||
wx.ready(function(){
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams', 'alertService', 'config','auth','session',
|
||||
function ($scope, $http, $location, $routeParams, alertService, config, auth,session) {
|
||||
app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams', 'alertService', 'config','auth','session','wx',
|
||||
function ($scope, $http, $location, $routeParams, alertService, config, auth,session, wx) {
|
||||
// 登录页不用显示菜音
|
||||
wx.hideOptionMenu();
|
||||
|
||||
if(auth.get_bind().then(function(){
|
||||
$location.path("/activities");
|
||||
}));
|
||||
|
|
|
@ -30,6 +30,10 @@ app.factory('alertService', function(){
|
|||
}
|
||||
});
|
||||
|
||||
app.factory('wx', ['$window', function($window){
|
||||
var wechat = $window.wx;
|
||||
return wechat;
|
||||
}]);
|
||||
|
||||
app.factory('auth', ['$http','$routeParams', '$q', 'session', 'config',function($http,$routeParams, $q, session,config){
|
||||
//是否已经绑定
|
||||
|
|
Loading…
Reference in New Issue