留言板插件由友言改为畅言

This commit is contained in:
eshengsky
2017-06-05 15:39:13 +08:00
parent e97a3d2e1b
commit 7872135824
5 changed files with 51 additions and 23 deletions

View File

@@ -12,8 +12,7 @@
"EnableShare": "true",
"JiaThisId": "",
"ShowComments": "true",
"ChangyanId": "",
"ChangyanConf": "",
"ShowGuestbook": "true",
"YouyanId": ""
"ChangyanId": "",
"ChangyanConf": ""
}

View File

@@ -54,7 +54,7 @@ h5 {
.nav > li > a {
color: #a7b1c2;
font-weight: 600;
/*font-weight: 600;*/
padding: 14px 20px 14px 25px;
}

View File

@@ -531,10 +531,9 @@ router.post('/saveSettings', function (req, res, next) {
EnableShare: req.body.EnableShare,
JiaThisId: req.body.JiaThisId,
ShowComments: req.body.ShowComments,
ChangyanId: req.body.ChangyanId,
ChangyanConf: req.body.ChangyanConf,
ShowGuestbook: req.body.ShowGuestbook,
YouyanId: req.body.YouyanId
ChangyanId: req.body.ChangyanId,
ChangyanConf: req.body.ChangyanConf
});
res.end();
});

View File

@@ -153,6 +153,13 @@
<input type="checkbox" checked="@(config.ShowComments === 'true')" class="js-switch"/>
</div>
</li>
<li class="list-group-item clearfix">
<div class="pull-left">@(__("admin.settings.message"))<a href="http://changyan.kuaizhan.com" target="_blank">@__("admin.settings.comments_service")</a></div>
<div class="pull-right">
<input id="ShowGuestbook" type="hidden" name="ShowGuestbook" value="@config.ShowGuestbook"/>
<input type="checkbox" checked="@(config.ShowGuestbook === 'true')" class="js-switch"/>
</div>
</li>
<li class="list-group-item clearfix">
<div class="pull-left">@__("admin.settings.comments_id")</div>
<div class="pull-right">
@@ -165,19 +172,6 @@
<input id="ChangyanConf" type="text" name="ChangyanConf" placeholder='@__("admin.settings.comments_conf_placeholder")' value="@config.ChangyanConf" class="form-control"/>
</div>
</li>
<li class="list-group-item clearfix">
<div class="pull-left">@(__("admin.settings.message"))<a href="http://www.uyan.cc/" target="_blank">@__("admin.settings.message_service")</a></div>
<div class="pull-right">
<input id="ShowGuestbook" type="hidden" name="ShowGuestbook" value="@config.ShowGuestbook"/>
<input type="checkbox" checked="@(config.ShowGuestbook === 'true')" class="js-switch"/>
</div>
</li>
<li class="list-group-item clearfix">
<div class="pull-left">@__("admin.settings.message_id")</div>
<div class="pull-right">
<input id="YouyanId" type="text" name="YouyanId" placeholder='@__("admin.settings.message_id_placeholder")' value="@config.YouyanId" class="form-control"/>
</div>
</li>
</ul>
</div>
</div>

View File

@@ -1,8 +1,44 @@
<div class="container-fluid detail-container">
<div class="row">
<div style="min-height: 800px;" class="col-md-8 col-md-offset-2 detail-wrap">
<div id="uyan_frame"></div>
<script type="text/javascript" src="http://v2.uyan.cc/code/uyan.js?uid=@config.YouyanId"></script>
<div style="min-height: 800px;" class="col-sm-12 col-xs-12 col-md-8 col-md-offset-2 detail-wrap">
<div id="SOHUCS" sid="guestbook"></div>
<script>
(function () {
var appid = '@config.ChangyanId';
var conf = '@config.ChangyanConf';
var width = window.innerWidth || document.documentElement.clientWidth;
if (width < 960) {
window.document.write('<script id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="http://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>');
} else {
var loadJs = function (d, a) {
var c = document.getElementsByTagName("head")[0] || document.head || document.documentElement;
var b = document.createElement("script");
b.setAttribute("type", "text/javascript");
b.setAttribute("charset", "UTF-8");
b.setAttribute("src", d);
if (typeof a === "function") {
if (window.attachEvent) {
b.onreadystatechange = function () {
var e = b.readyState;
if (e === "loaded" || e === "complete") {
b.onreadystatechange = null;
a()
}
}
} else {
b.onload = a
}
}
c.appendChild(b)
};
loadJs("http://changyan.sohu.com/upload/changyan.js", function () {
window.changyan.api.config({
appid: appid, conf: conf
})
});
}
})();
</script>
</div>
</div>
@this.renderPartial('./footer')