|
@@ -77,7 +77,7 @@
|
|
|
<ul class="ul-list">
|
|
|
<li
|
|
|
class="message clone-template-list"
|
|
|
- id="xunhuan"
|
|
|
+ id="clone-template"
|
|
|
style="display: none"
|
|
|
>
|
|
|
<div class="list-left">
|
|
@@ -174,9 +174,9 @@
|
|
|
// $('.header-right').html('<span class="j-icon icon-share"></span>').on('click', function () { console.log(123) })
|
|
|
// // 点击弹出遮盖层
|
|
|
$(document).ready(function () {
|
|
|
- function showDialog () {
|
|
|
- $(".fadeOutDown").removeClass('fadeOutDown').addClass('fadeInUp')
|
|
|
- $(".tc").fadeIn("slow")
|
|
|
+ function showDialog() {
|
|
|
+ $(".fadeOutDown").removeClass('fadeOutDown').addClass('fadeInUp')
|
|
|
+ $(".tc").fadeIn("slow")
|
|
|
}
|
|
|
$(".share").click(showDialog)
|
|
|
$(".show-share").click(showDialog)
|
|
@@ -200,7 +200,8 @@
|
|
|
success: function (res) {
|
|
|
if (res && res.data) {
|
|
|
res.data.res.forEach(function (v) {
|
|
|
- var cloneNode = $('.clone-template-list').clone()
|
|
|
+ var cloneNode = $('#clone-template').clone()
|
|
|
+ cloneNode.removeAttr("id")
|
|
|
cloneNode.find('.list-left img').attr('src', v.headimg)
|
|
|
cloneNode.find('.mg p').text(v.name)
|
|
|
cloneNode.find('.list-right').text(dateFormat(v.createtime * 1000, 'yyyy-mm-dd hh:mm:ss'))
|
|
@@ -222,7 +223,7 @@
|
|
|
if (res && res.data) {
|
|
|
// $('#share-link').text(res.data.shareLink)
|
|
|
$("img[name='qCode']").attr('src', 'data:image/png;base64,' + res.data.erUrl)
|
|
|
- shareLink=res.data.shareLink;
|
|
|
+ shareLink = res.data.shareLink;
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -232,8 +233,8 @@
|
|
|
success: function (res) {
|
|
|
if (res) {
|
|
|
$("#userName").text(res.nickName)
|
|
|
- if(res.headImage==""){
|
|
|
- res.headImage="/jyapp/images/persional/my_head.png"
|
|
|
+ if (res.headImage == "") {
|
|
|
+ res.headImage = "/jyapp/images/persional/my_head.png"
|
|
|
}
|
|
|
$("img[name='userHead']").attr('src', res.headImage)
|
|
|
}
|
|
@@ -242,11 +243,11 @@
|
|
|
|
|
|
|
|
|
$(function () {
|
|
|
- $('.list-left img').each(function () {
|
|
|
- if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
|
|
|
- this.src = '/images/auto.png';
|
|
|
- }
|
|
|
- });
|
|
|
+ $('.list-left img').each(function () {
|
|
|
+ if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
|
|
|
+ this.src = '/images/auto.png';
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
// 点击遮盖层消失
|
|
|
$(".tc").on('click', function () {
|
|
@@ -255,43 +256,45 @@
|
|
|
$(".tc").fadeOut()
|
|
|
}
|
|
|
})
|
|
|
- var forceShareFlag =false;
|
|
|
- function toShare(index){
|
|
|
- execShare(index);
|
|
|
+ var forceShareFlag = false;
|
|
|
+ function toShare(index) {
|
|
|
+ execShare(index);
|
|
|
}
|
|
|
- function execShare(thisIndex){
|
|
|
- var shareType = thisIndex + 1;
|
|
|
- var content = "您的好友";
|
|
|
- if(shareType !=2 && {{session "i_type"}} == 2){
|
|
|
- content += {{session "s_nickname"}};
|
|
|
+ function execShare(thisIndex) {
|
|
|
+ var shareType = thisIndex + 1;
|
|
|
+ var content = "您的好友";
|
|
|
+ if (shareType != 2 && {{session "i_type" }
|
|
|
+ } == 2) {
|
|
|
+ content += {{session "s_nickname" }
|
|
|
+ };
|
|
|
}
|
|
|
- content += "向您推荐了剑鱼标讯";
|
|
|
- var link = shareLink + '?source=app_infocontentshare';
|
|
|
- var shareTitle = "邀好友,免费获得超级订阅";
|
|
|
- shareTitle=shareTitle.replace(/<\/?.+?>/g,"");
|
|
|
- shareTitle=shareTitle.replace(/ /g,"");
|
|
|
- if(shareType == 3){
|
|
|
- if(forceShareFlag){
|
|
|
- link += "&qrcodeType=app_infocontent_timeline_b";
|
|
|
- }else{
|
|
|
- link += "&qrcodeType=app_infocontent_timeline_z";
|
|
|
- }
|
|
|
- shareTitle = getShareText();
|
|
|
- updateShareStatus();
|
|
|
- }
|
|
|
- JyObj.share(shareType,shareTitle,content,link);
|
|
|
+ content += "向您推荐了剑鱼标讯";
|
|
|
+ var link = shareLink + '?source=app_infocontentshare';
|
|
|
+ var shareTitle = "邀好友,免费获得超级订阅";
|
|
|
+ shareTitle = shareTitle.replace(/<\/?.+?>/g, "");
|
|
|
+ shareTitle = shareTitle.replace(/ /g, "");
|
|
|
+ if (shareType == 3) {
|
|
|
+ if (forceShareFlag) {
|
|
|
+ link += "&qrcodeType=app_infocontent_timeline_b";
|
|
|
+ } else {
|
|
|
+ link += "&qrcodeType=app_infocontent_timeline_z";
|
|
|
+ }
|
|
|
+ shareTitle = getShareText();
|
|
|
+ updateShareStatus();
|
|
|
+ }
|
|
|
+ JyObj.share(shareType, shareTitle, content, link);
|
|
|
}
|
|
|
function updateShareStatus() {
|
|
|
- var shareProperty = forceShareFlag ? 1 : 2;//1-被动分享 2-主动分享
|
|
|
- var query = {shareType:1,shareProperty:shareProperty};
|
|
|
- $.post("/jyapp/share/updateShareStatus",query,function(fd){
|
|
|
- sessionStorage.setItem("forceShareFlag","1");//1-已分享
|
|
|
- });
|
|
|
- setTimeout(function () {
|
|
|
- removeMask();
|
|
|
- },3000);
|
|
|
+ var shareProperty = forceShareFlag ? 1 : 2;//1-被动分享 2-主动分享
|
|
|
+ var query = { shareType: 1, shareProperty: shareProperty };
|
|
|
+ $.post("/jyapp/share/updateShareStatus", query, function (fd) {
|
|
|
+ sessionStorage.setItem("forceShareFlag", "1");//1-已分享
|
|
|
+ });
|
|
|
+ setTimeout(function () {
|
|
|
+ removeMask();
|
|
|
+ }, 3000);
|
|
|
}
|
|
|
</script>
|
|
|
</body>
|
|
|
|
|
|
-</html>
|
|
|
+</html>
|