Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into xh-youfangApp1.1
This commit is contained in:
@@ -78,6 +78,7 @@ $("#login_btn").on("click", function () {
|
||||
var token = resData.data;
|
||||
localStorage.setItem("user_token", token);
|
||||
$.toast(resData.message);
|
||||
back();
|
||||
} else {
|
||||
$.toast(resData.message);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
<style>
|
||||
.list-block .item-text{-webkit-line-clamp:unset;}
|
||||
.content-padded img {width: auto;}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
@@ -123,7 +124,7 @@ $.config = {router: false}
|
||||
<script type="text/javascript" src="../../js/shara/sharaMine.js" ></script>
|
||||
<script>
|
||||
document.addEventListener('plusready', onPlusReady, false);
|
||||
var id//= "183627425584775168";
|
||||
var id;//= "186182250936643584";
|
||||
var shareUrl = BASE_PATH+"/news/newDetail?newsId=";
|
||||
var sharehrefTitle = "停车坐爱枫林晚,霜叶红于二月花";
|
||||
var sharehrefDes = "客观里面请!";
|
||||
@@ -479,10 +480,21 @@ $(".praise").on("click", function () {
|
||||
|
||||
//收藏
|
||||
$(".collection").on("click", function () {
|
||||
//doCollect();
|
||||
collect();
|
||||
});
|
||||
|
||||
function doCollect() {
|
||||
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
|
||||
clicked('../user/codeSms.html',true,false,{},{},function(){
|
||||
doCollect();
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
collect();
|
||||
}
|
||||
}
|
||||
function collect(){
|
||||
|
||||
axios.post("/rest/news/collect",{newsId : id}).then(function (response) {
|
||||
|
||||
var msg = response.data.message
|
||||
@@ -532,6 +544,7 @@ $(".commentReleaseBox a").on("click", function () {
|
||||
|
||||
function addComment(){
|
||||
var content = $(".commentReleaseBox input").val();
|
||||
content = utf16toEntities(content);
|
||||
axios.post("/rest/comment/add",{commentObjId : id, content:content, commentUserProvince:province, commentUserCity:city}).then(function (response) {
|
||||
var msg = response.data.message
|
||||
if(msg){
|
||||
@@ -546,6 +559,25 @@ function addComment(){
|
||||
});
|
||||
}
|
||||
|
||||
function utf16toEntities(str) {
|
||||
var patt = /[\ud800-\udbff][\udc00-\udfff]/g; // 检测utf16字符正则
|
||||
str = str.replace(patt, function(char) {
|
||||
var H, L, code;
|
||||
if (char.length === 2) {
|
||||
H = char.charCodeAt(0);
|
||||
// 取出高位
|
||||
L = char.charCodeAt(1);
|
||||
// 取出低位
|
||||
code = (H - 0xD800) * 0x400 + 0x10000 + L - 0xDC00;
|
||||
//转换算法
|
||||
return "&#" + code + ";";
|
||||
} else {
|
||||
return char;
|
||||
}
|
||||
});
|
||||
return str;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#commentInput').on('click', function () {
|
||||
var target = this;
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
</p>
|
||||
<div class="content-block loginBox">
|
||||
<p><a class="button button-big button-fill theme" id="login_btn">登录</a></p>
|
||||
<p><a onclick="clicked('passLogin.html', true)">账号密码登录</a></p>
|
||||
<p><a href="passLogin.html">账号密码登录</a></p>
|
||||
</div>
|
||||
<div class="content-block loginMode">
|
||||
<p class="line">
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</div>
|
||||
<div class="content-block loginBox">
|
||||
<p><a class="button button-big button-fill theme" id="login_btn" @click="passLogin">登录</a></p>
|
||||
<p><a @click="openSmsLoginPage">快捷登录</a></p>
|
||||
<p><a href="codeSms.html">快捷登录</a></p>
|
||||
</div>
|
||||
<div class="content-block loginMode">
|
||||
<p class="line">
|
||||
@@ -151,10 +151,6 @@ new Vue({
|
||||
$(".list-block .item-after .icon-eye-orange").hide();
|
||||
$(".list-block .item-after .icon-eye-grey").show();
|
||||
$("#input_password").attr("type","password");
|
||||
},
|
||||
// 打开验证码登录页面
|
||||
openSmsLoginPage: function() {
|
||||
back(),plus.nativeUI.closeWaiting();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user