From f3158f490011467c7ebee454f1b90d1914ba7850 Mon Sep 17 00:00:00 2001 From: tmq <mingqiao.tan@yoho.cn> Date: Thu, 28 Apr 2016 14:11:26 +0800 Subject: [PATCH] test --- res/js/yohood.js | 14 +++++++------- website/view/script/news/detailmobile.php | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/res/js/yohood.js b/res/js/yohood.js index f9adb27..3deac2f 100644 --- a/res/js/yohood.js +++ b/res/js/yohood.js @@ -617,23 +617,23 @@ define('yohood', function(require, exports) { shareUrl = $(".share").attr("data-link"); shareCover = $(".share").attr("cover-url"); - detailTitle = $('.detail-title').find('h2'); + detailTitle = $("input[name=title]").val(); detailSubtitle = $('.detail-title').find('h3'); //分享 share.init({ shareUrl: shareUrl, img: shareCover, - sinaText: '【YO’HOOD 2016】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '@YOHO潮流志', + sinaText: '【YO’HOOD 2016】' + detailTitle + '\r\n' + detailSubtitle.text() + '@YOHO潮流志', fbTextFunction: function() { return { - des: '【YO’HOOD 2016】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#YO’HOOD 2016', - name: '【YO’HOOD 2016】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#YO’HOOD 2016', - caption: '【YO’HOOD 2016】' + detailTitle.text() + '\r\n' + detailSubtitle.text() + '#YO’HOOD 2016', + des: '【YO’HOOD 2016】' + detailTitle + '\r\n' + detailSubtitle.text() + '#YO’HOOD 2016', + name: '【YO’HOOD 2016】' + detailTitle + '\r\n' + detailSubtitle.text() + '#YO’HOOD 2016', + caption: '【YO’HOOD 2016】' + detailTitle + '\r\n' + detailSubtitle.text() + '#YO’HOOD 2016', // url: location.href } }, - tweetText: '【YO’HOOD 2016】' + detailTitle.text() + '\r\n' + detailSubtitle.text(), - qqText: '【YO’HOOD 2016】' + detailTitle.text() + ' ' + detailSubtitle.text(), + tweetText: '【YO’HOOD 2016】' + detailTitle + '\r\n' + detailSubtitle.text(), + qqText: '【YO’HOOD 2016】' + detailTitle + ' ' + detailSubtitle.text(), }); } diff --git a/website/view/script/news/detailmobile.php b/website/view/script/news/detailmobile.php index 3182762..c25abc4 100644 --- a/website/view/script/news/detailmobile.php +++ b/website/view/script/news/detailmobile.php @@ -2,6 +2,7 @@ <?php $this->_block('main');?> <div class="detail-title"> <h2 class="title"><?php echo $this->view->info['title']?></h2> + <input type="hidden" name="title" value="<?php echo $this->view->info['title']?>"> <h3 class="subtitle"><?php echo date('m月d日 H:i', $this->view->info['create_time'])?></h3> </div> <?php if(!empty($this->view->info['pics'])):?> -- libgit2 0.24.0