From 3b42861a54c9f2361b37382a4442f7fe240c1108 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Fri, 12 Aug 2016 13:33:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E4=BA=AB=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/wechat/others/factory.js | 24 +++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/public/javascripts/wechat/others/factory.js b/public/javascripts/wechat/others/factory.js index 5b20643a9..14efda6e7 100644 --- a/public/javascripts/wechat/others/factory.js +++ b/public/javascripts/wechat/others/factory.js @@ -264,16 +264,28 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx','$loc var link = ""; +// if(args.urlName == "discussion"){ +// var urlName = response.data.type_name + "_discussion"; +// link = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+window.g_appid + +// "&redirect_uri="+window.g_localhost+"/wechat/user_activities?id="+response.data.data.act_id+ +// "&response_type=code&scope=snsapi_userinfo&state="+urlName+"&connect_redirect=1#wechat_redirect"; +// } +// else{ +// link = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+window.g_appid + +// "&redirect_uri="+window.g_localhost+"/wechat/user_activities?id="+response.data.data.act_id+ +// "&response_type=code&scope=snsapi_userinfo&state="+args.urlName+"&connect_redirect=1#wechat_redirect"; +// } + if(args.urlName == "discussion"){ var urlName = response.data.type_name + "_discussion"; - link = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+window.g_appid + - "&redirect_uri="+window.g_localhost+"/wechat/user_activities?id="+response.data.data.act_id+ - "&response_type=code&scope=snsapi_info&state="+urlName+"&connect_redirect=1#wechat_redirect"; + link = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d" + + "&redirect_uri=https://test.forge.trustie.net/wechat/user_activities?id="+response.data.data.act_id+ + "&response_type=code&scope=snsapi_base&state="+urlName+"&connect_redirect=1#wechat_redirect"; } else{ - link = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+window.g_appid + - "&redirect_uri="+window.g_localhost+"/wechat/user_activities?id="+response.data.data.act_id+ - "&response_type=code&scope=snsapi_info&state="+args.urlName+"&connect_redirect=1#wechat_redirect"; + link = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d" + + "&redirect_uri=https://test.forge.trustie.net/wechat/user_activities?id="+response.data.data.act_id+ + "&response_type=code&scope=snsapi_base&state="+args.urlName+"&connect_redirect=1#wechat_redirect"; } console.log("link= "+link);