Commit 871b2fd9 authored by 邓军's avatar 邓军

修正标题描述顺序

parent f00993cc
...@@ -31,7 +31,22 @@ function getWX(res, title, desc, link, imgUrl) { ...@@ -31,7 +31,22 @@ function getWX(res, title, desc, link, imgUrl) {
// imgUrl = 'http://dev.fs.wxpai.cn/upload/100001_2015410_1428671539587_40.jpg', // imgUrl = 'http://dev.fs.wxpai.cn/upload/100001_2015410_1428671539587_40.jpg',
// desc = '测试描述'; // desc = '测试描述';
// var string = ''; // var string = '';
var string = 'wx.onMenuShareTimeline({' + '\"title\": \"' + title + '\",' + '\"link\":\"' + link + '\",' + '\"imgUrl\": \"' + imgUrl + '\", ' + 'success: function(){},' + 'cancel: function () {}' + ' });' + ' wx.onMenuShareAppMessage({' + '\"title\": \"' + title + '\", ' + '\"desc\": \"' + desc + '\", ' + '\"link\":\"' + link + '\", ' + '\"imgUrl\": \"' + imgUrl + '\", ' + '\"type\":\'\' ,' + '\"dataUrl\": \'\', ' + 'success: function(){},' + 'cancel: function () { ' + '}' + ' });' var string = 'wx.onMenuShareTimeline({' + '\"title\": \"' + title + '\",'
+ '\"link\":\"' + link + '\",'
+ '\"imgUrl\": \"' + imgUrl + '\", '
+ 'success: function(){},'
+ 'cancel: function () {}'
+ ' });'
+ ' wx.onMenuShareAppMessage({'
+ '\"title\": \"' + title + '\", '
+ '\"desc\": \"' + desc + '\", '
+ '\"link\":\"' + link + '\", '
+ '\"imgUrl\": \"' + imgUrl + '\", '
+ '\"type\":\'\' ,'
+ '\"dataUrl\": \'\', '
+ 'success: function(){},'
+ 'cancel: function () { '
+ '}' + ' });'
res.write('wx.ready(function(){' + string + '});'); res.write('wx.ready(function(){' + string + '});');
res.write('wx.error(function(res){console.log(res);});'); res.write('wx.error(function(res){console.log(res);});');
...@@ -66,7 +81,7 @@ router.get('/:ent_code/share.js', function(req, res, next) { ...@@ -66,7 +81,7 @@ router.get('/:ent_code/share.js', function(req, res, next) {
} }
} }
link = link + 'index.html?infoId=' + id; link = link + 'index.html?infoId=' + id;
getWX(res, desc, title, link, imgUrl); getWX(res, title,desc, link, imgUrl);
} else { } else {
cont(err); cont(err);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment