|
|
@ -238,7 +238,23 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx','$loc
|
|
|
|
console.log("desc = "+desc);
|
|
|
|
console.log("desc = "+desc);
|
|
|
|
console.log("imgUrl= "+imgUrl);
|
|
|
|
console.log("imgUrl= "+imgUrl);
|
|
|
|
|
|
|
|
|
|
|
|
wxConfig(title,desc,imgUrl);
|
|
|
|
var link = "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(args.urlName == "discussion"){
|
|
|
|
|
|
|
|
var urlName = response.data.type_name + "_discussion";
|
|
|
|
|
|
|
|
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=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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wxConfig(title,desc,imgUrl,link);
|
|
|
|
|
|
|
|
|
|
|
|
//--------------分享内容定制-------------
|
|
|
|
//--------------分享内容定制-------------
|
|
|
|
args.loadCallback(response.data);
|
|
|
|
args.loadCallback(response.data);
|
|
|
@ -345,7 +361,7 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx','$loc
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var wxConfig = function(title,desc,imgUrl){
|
|
|
|
var wxConfig = function(title,desc,imgUrl,link){
|
|
|
|
|
|
|
|
|
|
|
|
if(title == null || title == ""){
|
|
|
|
if(title == null || title == ""){
|
|
|
|
title = 'Trustie创新实践平台';
|
|
|
|
title = 'Trustie创新实践平台';
|
|
|
@ -362,7 +378,7 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx','$loc
|
|
|
|
wx.ready(function(){
|
|
|
|
wx.ready(function(){
|
|
|
|
wx.onMenuShareTimeline({
|
|
|
|
wx.onMenuShareTimeline({
|
|
|
|
title: title, // 分享标题
|
|
|
|
title: title, // 分享标题
|
|
|
|
// link: 'http://www.trustie.net/', // 分享链接
|
|
|
|
link: link, // 分享链接
|
|
|
|
imgUrl: imgUrl, // 分享图标
|
|
|
|
imgUrl: imgUrl, // 分享图标
|
|
|
|
success: function () {
|
|
|
|
success: function () {
|
|
|
|
console.log("share successed.");
|
|
|
|
console.log("share successed.");
|
|
|
@ -375,7 +391,7 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx','$loc
|
|
|
|
wx.onMenuShareAppMessage({
|
|
|
|
wx.onMenuShareAppMessage({
|
|
|
|
title: title, // 分享标题
|
|
|
|
title: title, // 分享标题
|
|
|
|
desc: desc, // 分享描述
|
|
|
|
desc: desc, // 分享描述
|
|
|
|
// link: '', // 分享链接
|
|
|
|
link: link, // 分享链接
|
|
|
|
// imgUrl: '', // 分享图标
|
|
|
|
// imgUrl: '', // 分享图标
|
|
|
|
imgUrl: imgUrl, // 分享图标
|
|
|
|
imgUrl: imgUrl, // 分享图标
|
|
|
|
// type: '', // 分享类型,music、video或link,不填默认为link
|
|
|
|
// type: '', // 分享类型,music、video或link,不填默认为link
|
|
|
|