From 6f2b84570ff550703dda9a5a0df22e440434233d Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 2 Aug 2016 17:48:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E8=B0=83=E8=AF=95=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wechats/user_activities.html.erb | 2 +- public/javascripts/wechat/controllers/invite_code.js | 4 ++-- public/javascripts/wechat/controllers/login.js | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/views/wechats/user_activities.html.erb b/app/views/wechats/user_activities.html.erb index e7b89f224..ac3b845ff 100644 --- a/app/views/wechats/user_activities.html.erb +++ b/app/views/wechats/user_activities.html.erb @@ -26,7 +26,7 @@ //参考文档 //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端时才会打印。 + debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 appId: '<%= @appid %>', // 必填,公众号的唯一标识 timestamp: <%= @sign_params[:timestamp] %>, // 必填,生成签名的时间戳 nonceStr: '<%= @sign_params[:noncestr] %>', // 必填,生成签名的随机串 diff --git a/public/javascripts/wechat/controllers/invite_code.js b/public/javascripts/wechat/controllers/invite_code.js index ec0a3ee65..0467dee5d 100644 --- a/public/javascripts/wechat/controllers/invite_code.js +++ b/public/javascripts/wechat/controllers/invite_code.js @@ -9,8 +9,8 @@ app.controller('InviteCodeController', ['$scope','$http', '$routeParams','config wx.ready(function(){ wx.onMenuShareTimeline({ title: '定制的标题', // 分享标题 - link: 'http://www.baidu.com', // 分享链接 - imgUrl: 'https://rescdn.qqmail.com/zh_CN/htmledition/images/webp/spacer1e9c5d.gif', // 分享图标 + link: 'http://wechat.trustie.net/', // 分享链接 + imgUrl: 'http://wechat.trustie.net/images/logo2.png', // 分享图标 success: function () { console.log("share successed."); }, diff --git a/public/javascripts/wechat/controllers/login.js b/public/javascripts/wechat/controllers/login.js index 863af07ee..f8e87a93f 100644 --- a/public/javascripts/wechat/controllers/login.js +++ b/public/javascripts/wechat/controllers/login.js @@ -39,8 +39,7 @@ app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams vm.loginFailed = (response.data.status != 0); if (!$scope.loginFailed) { //绑定成功 vm.alertService.showMessage('提示', response.data.message, function(){ -// $location.path("/activities"); - window.WeixinJSBridge.call('closeWindow'); + wx.closeWindow(); }); } else { vm.alertService.showMessage('出错了', response.data.message);