Showing
4 changed files
with
4 additions
and
11 deletions
@@ -152,20 +152,13 @@ exports.collocationList = (req, res, next) => { | @@ -152,20 +152,13 @@ exports.collocationList = (req, res, next) => { | ||
152 | exports.setFavorite = (req, res, next) => { | 152 | exports.setFavorite = (req, res, next) => { |
153 | let params = req.body; | 153 | let params = req.body; |
154 | let uid = req.body.uid || 0; // 客户端访问,不能使用 cookie | 154 | let uid = req.body.uid || 0; // 客户端访问,不能使用 cookie |
155 | - let isApp = req.query.app_version || req.query.appVersion || false; | ||
156 | let url = '/guang/star/collocation'; | 155 | let url = '/guang/star/collocation'; |
157 | let urlEncode = ''; | 156 | let urlEncode = ''; |
158 | 157 | ||
159 | starModel.setFavorite(params, uid).then((result) => { | 158 | starModel.setFavorite(params, uid).then((result) => { |
160 | if (result.code === 400) { | 159 | if (result.code === 400) { |
161 | - if (!isApp) { | ||
162 | - result.data = helpers.urlFormat('/signin.html', { | ||
163 | - refer: req.get('Referer') || url | ||
164 | - }); | ||
165 | - } else { | ||
166 | - urlEncode = '\/guang\/star\/collocation'; | ||
167 | - result.data = `${url}?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:\/\/m.yohobuy.com${urlEncode}","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}`; // eslint-disable-line | ||
168 | - } | 160 | + urlEncode = '\/guang\/star\/collocation'; |
161 | + result.data = `${url}?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http:\/\/m.yohobuy.com${urlEncode}","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}`; // eslint-disable-line | ||
169 | } | 162 | } |
170 | res.json(result); | 163 | res.json(result); |
171 | }).catch(next); | 164 | }).catch(next); |
1 | -webpackJsonp([13],{0:function(o,n,e){function t(o){var n,e,t;c.showLoadingMask(),a.ajax({type:"GET",url:"/guang/star/collocation/list",data:{page:o,appVersion:window.queryString.app_version},dataType:"html",success:function(o){l=!1,""===o&&(l=!0,s.show("没有更多内容了")),a(".collocation-list").append(o),a(".cont-area").each(function(){n=a(this),e=n.find(".title"),t=n.find(".cont-txt"),e[0].mlellipsis(2),t[0].mlellipsis(2)}),c.hideLoadingMask(),r(a("img.lazy"))},error:function(){s.show("网络断开连接了~")}})}function i(){!l&&a(window).scrollTop()+a(window).height()>a("body").height()-100&&(l=!0,h++,t(h))}var a=e(1),s=e(2),c=e(5),r=e(6),d=e(10),l=!1,h=1;e(17),d.init(),a(window).scroll(function(){i()}),0===a(".collocation-list").find("li").length&&t(1)},2:function(o,n,e){function t(o,n){var e,t;"undefined"!=typeof o&&(e=o.toString(),t=n&&n>0?n:2e3,i.text(e).show(),a=setTimeout(function(){"block"===i.css("display")&&i.hide()},t))}var i,a,s=e(1);!function(){var o='<div id="yoho-tip" class="yoho-tip"></div>';s(".yoho-page").append(o),i=s("#yoho-tip"),i.on("touchend",function(){i.hide(),clearTimeout(a)})}(),n.show=t},3:function(o,n,e){function t(o){var n,e,t=document.cookie;return document.cookie&&""!==document.cookie&&(e=t.indexOf(o+"="),e>-1&&(e+=o.length+1,n=decodeURIComponent(p.trim(t.substring(e,t.indexOf(";",e)))))),n}function i(o,n,e){var t,i,a,s,c="";"undefined"!=typeof n&&(e=e||{},null===n&&(n="",e.expires=-1),e.expires&&("number"==typeof e.expires||e.expires.toUTCString)&&("number"==typeof e.expires?(s=new Date,s.setTime(s.getTime()+24*e.expires*60*60*1e3)):s=e.expires,c="; expires="+s.toUTCString()),t=e.path?"; path="+e.path:"",i=e.domain?"; domain="+e.domain:"",a=e.secure?"; secure":"",document.cookie=[o,"=",encodeURIComponent(n),c,t,i,a].join(""))}function a(){var o=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||o||(document.cookie="testcookie",o=-1!==document.cookie.indexOf("testcookie")),o}function s(){var o,n=t("_UID");return"undefined"==typeof n?0:(o=n.split("::"),"undefined"==typeof o||o.length<4?0:o)}function c(){var o=s();return 0===o?0:o[1]}function r(){var o=t("_g");return"undefined"==typeof o?"":JSON.parse(o).k}function d(){var o;0!==m.length&&(o=Math.min(p(window).height(),window.screen.availHeight),p("body").height()<=o-parseInt(m.css("height"),0)?m.addClass("bottom"):m.removeClass("bottom"))}function l(o){var n=p(o).outerHeight();o&&m.css("margin-bottom",n+"px")}function h(){var o,n,e=[],t=window.location.search.slice(1).split("&");for(n=0;n<t.length;n++)o=t[n].split("="),e.push(o[0]),e[o[0]]=o[1];return e}function u(o){return o.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var p=e(1),f=e(4),m=p("#yoho-footer"),w=p(".yoho-page"),g=p(".yoho-header");!function(){var o,n=m.children(".op-row"),e=p(".back-to-top"),t=s();d(),0===t?n.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):n.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),e.length>0&&(o=new f(e[0]),o.on("tap",function(o){return p(window).scrollTop(0),o.srcEvent.preventDefault(),!1})),m.removeClass("hide")}(),function(o,n,e,t,i){var a=n.createElement(e),s=n.getElementsByTagName(e)[0];o.YohoAcquisitionObject=i,o[i]=function(){o[i].p=arguments},a.async=1,a.src=t,s.parentNode.insertBefore(a,s)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var o=c();o=0===o?"":o,window._ozuid=o,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",o,"","")}(),g.on("touchstart","a",function(){g.find("a").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel","a",function(){p(this).removeClass("highlight")}),w.on("touchstart",".tap-hightlight",function(){p(this).siblings(".tap-hightlight").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){p(this).removeClass("highlight")}),p(".nav-home").on("touchstart",function(){p(".homebuttom").toggleClass("hide")}),function(){var o,n,e=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,a=window.cancelAnimationFrame;for(n=0;n<t.length&&(!i||!a);n++)o=t[n],i=i||window[o+"RequestAnimationFrame"],a=a||window[o+"CancelAnimationFrame"]||window[o+"CancelRequestAnimationFrame"];i&&a||(i=function(o){var n=(new Date).getTime(),t=Math.max(0,16-(n-e)),i=window.setTimeout(function(){o(n+t)},t);return e=n+t,i},a=function(o){window.clearTimeout(o)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=a}(),p.extend({queryString:h}),11===m.find(".user-name").text().length&&m.find(".user-name").html(u(m.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=a,window.getUser=s,window.getUid=c,window.getShoppingKey=r,window.rePosFooter=d,window.reMarginFooter=l,window.queryString=h()},5:function(o,n,e){function t(o){var n='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';d=!0,o||(o=r),o.append(n),s=o.children(".loading-mask"),c("body").on("touchstart touchmove touchend",".loading-mask",function(){return!1})}function i(){d||(t(),d=!0),s.removeClass("hide")}function a(){s.addClass("hide")}var s,c=e(1),r=c(".yoho-page"),d=!1;n.init=t,n.showLoadingMask=i,n.hideLoadingMask=a,n.show=i,n.hide=a},17:function(o,n,e){var t=e(1),i=e(2);e(3),t(document).on("click",".collection",function(){var o,n=t(this),e=n.find(".collected-ico");o=e.hasClass("collected")?"del":"fav",t.ajax({type:"POST",url:"/guang/star/setFavorite",data:{articleId:n.parents("li").attr("articleId"),type:o,uid:window.queryString.uid},success:function(o){var n=o.code;200===n&&(e.hasClass("collected")?e.removeClass("collected"):e.addClass("collected")),400===n&&(t("#collocation-link").length<=0&&t("body").append("<a href='"+o.data+'\' style="display:none;" id="collocation-link"><span class="collocation-link"></span></a>'),t(".collocation-link").click())},error:function(){i.show("网络断开连接了~")}})}),window.successShare=function(){t.ajax({type:"POST",url:"/guang/starclass/forward",success:function(o){var n=o.code;200===n&&o.data>0&&i.show("分享成功,亲密度+10")},error:function(){i.show("网络断开连接了~")}})}}}); | ||
1 | +webpackJsonp([13],{0:function(o,n,e){function t(o){var n,e,t;c.showLoadingMask(),a.ajax({type:"GET",url:"/guang/star/collocation/list",data:{page:o,appVersion:window.queryString.app_version},dataType:"html",success:function(o){l=!1,""===o&&(l=!0,s.show("没有更多内容了")),a(".collocation-list").append(o),a(".cont-area").each(function(){n=a(this),e=n.find(".title"),t=n.find(".cont-txt"),e[0].mlellipsis(2),t[0].mlellipsis(2)}),c.hideLoadingMask(),r(a("img.lazy"))},error:function(){s.show("网络断开连接了~")}})}function i(){!l&&a(window).scrollTop()+a(window).height()>a("body").height()-100&&(l=!0,h++,t(h))}var a=e(1),s=e(2),c=e(5),r=e(6),d=e(10),l=!1,h=1;e(17),d.init(),a(window).scroll(function(){i()}),0===a(".collocation-list").find("li").length&&t(1)},2:function(o,n,e){function t(o,n){var e,t;"undefined"!=typeof o&&(e=o.toString(),t=n&&n>0?n:2e3,i.text(e).show(),a=setTimeout(function(){"block"===i.css("display")&&i.hide()},t))}var i,a,s=e(1);!function(){var o='<div id="yoho-tip" class="yoho-tip"></div>';s(".yoho-page").append(o),i=s("#yoho-tip"),i.on("touchend",function(){i.hide(),clearTimeout(a)})}(),n.show=t},3:function(o,n,e){function t(o){var n,e,t=document.cookie;return document.cookie&&""!==document.cookie&&(e=t.indexOf(o+"="),e>-1&&(e+=o.length+1,n=decodeURIComponent(p.trim(t.substring(e,t.indexOf(";",e)))))),n}function i(o,n,e){var t,i,a,s,c="";"undefined"!=typeof n&&(e=e||{},null===n&&(n="",e.expires=-1),e.expires&&("number"==typeof e.expires||e.expires.toUTCString)&&("number"==typeof e.expires?(s=new Date,s.setTime(s.getTime()+24*e.expires*60*60*1e3)):s=e.expires,c="; expires="+s.toUTCString()),t=e.path?"; path="+e.path:"",i=e.domain?"; domain="+e.domain:"",a=e.secure?"; secure":"",document.cookie=[o,"=",encodeURIComponent(n),c,t,i,a].join(""))}function a(){var o=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||o||(document.cookie="testcookie",o=-1!==document.cookie.indexOf("testcookie")),o}function s(){var o,n=t("_UID");return"undefined"==typeof n?0:(o=n.split("::"),"undefined"==typeof o||o.length<4?0:o)}function c(){var o=s();return 0===o?0:o[1]}function r(){var o=t("_g");return"undefined"==typeof o?"":JSON.parse(o).k}function d(){var o;0!==m.length&&(o=Math.min(p(window).height(),window.screen.availHeight),p("body").height()<=o-parseInt(m.css("height"),0)?m.addClass("bottom"):m.removeClass("bottom"))}function l(o){var n=p(o).outerHeight();o&&m.css("margin-bottom",n+"px")}function h(){var o,n,e=[],t=window.location.search.slice(1).split("&");for(n=0;n<t.length;n++)o=t[n].split("="),e.push(o[0]),e[o[0]]=o[1];return e}function u(o){return o.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var p=e(1),f=e(4),m=p("#yoho-footer"),w=p(".yoho-page"),g=p(".yoho-header");!function(){var o,n=m.children(".op-row"),e=p(".back-to-top"),t=s();d(),0===t?n.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):n.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),e.length>0&&(o=new f(e[0]),o.on("tap",function(o){return p(window).scrollTop(0),o.srcEvent.preventDefault(),!1})),m.removeClass("hide")}(),function(o,n,e,t,i){var a=n.createElement(e),s=n.getElementsByTagName(e)[0];o.YohoAcquisitionObject=i,o[i]=function(){o[i].p=arguments},a.async=1,a.src=t,s.parentNode.insertBefore(a,s)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var o=c();o=0===o?"":o,window._ozuid=o,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",o,"","")}(),g.on("touchstart","a",function(){g.find("a").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel","a",function(){p(this).removeClass("highlight")}),w.on("touchstart",".tap-hightlight",function(){p(this).siblings(".tap-hightlight").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){p(this).removeClass("highlight")}),p(".nav-home").on("touchstart",function(){p(".homebuttom").toggleClass("hide")}),function(){var o,n,e=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,a=window.cancelAnimationFrame;for(n=0;n<t.length&&(!i||!a);n++)o=t[n],i=i||window[o+"RequestAnimationFrame"],a=a||window[o+"CancelAnimationFrame"]||window[o+"CancelRequestAnimationFrame"];i&&a||(i=function(o){var n=(new Date).getTime(),t=Math.max(0,16-(n-e)),i=window.setTimeout(function(){o(n+t)},t);return e=n+t,i},a=function(o){window.clearTimeout(o)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=a}(),p.extend({queryString:h}),11===m.find(".user-name").text().length&&m.find(".user-name").html(u(m.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=a,window.getUser=s,window.getUid=c,window.getShoppingKey=r,window.rePosFooter=d,window.reMarginFooter=l,window.queryString=h()},5:function(o,n,e){function t(o){var n='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';d=!0,o||(o=r),o.append(n),s=o.children(".loading-mask"),c("body").on("touchstart touchmove touchend",".loading-mask",function(){return!1})}function i(){d||(t(),d=!0),s.removeClass("hide")}function a(){s.addClass("hide")}var s,c=e(1),r=c(".yoho-page"),d=!1;n.init=t,n.showLoadingMask=i,n.hideLoadingMask=a,n.show=i,n.hide=a},17:function(o,n,e){var t=e(1),i=e(2);e(3),t(".collocation-list").on("click",".collection",function(){var o,n=t(this),e=n.find(".collected-ico");o=e.hasClass("collected")?"del":"fav",t.ajax({type:"POST",url:"/guang/star/setFavorite",data:{articleId:n.parents("li").attr("articleId"),type:o,uid:window.queryString.uid},success:function(o){var n=o.code;200===n&&(e.hasClass("collected")?e.removeClass("collected"):e.addClass("collected")),400===n&&(t("#collocation-link").length<=0&&t("body").append("<a href='"+o.data+'\' style="display:none;" id="collocation-link"><span class="collocation-link"></span></a>'),t(".collocation-link").click())},error:function(){i.show("网络断开连接了~")}})}),window.successShare=function(){t.ajax({type:"POST",url:"/guang/starclass/forward",success:function(o){var n=o.code;200===n&&o.data>0&&i.show("分享成功,亲密度+10")},error:function(){i.show("网络断开连接了~")}})}}}); |
1 | -webpackJsonp([12],{0:function(n,o,e){function t(n){var o,e,t;c.showLoadingMask(),a.ajax({type:"GET",url:"/guang/star/detailList",data:{page:n,tag:a(".detail-list").data("name")},dataType:"html",success:function(n){h=!1,""===n&&(h=!0,s.show("没有更多内容了")),a(".detail-list").append(n),a(".cont-area").each(function(){o=a(this),e=o.find(".title"),t=o.find(".cont-txt"),e[0].mlellipsis(2),t[0].mlellipsis(2)}),d(a("img.lazy")),c.hideLoadingMask()},error:function(){s.show("网络断开连接了~")}})}function i(){!h&&a(window).scrollTop()+a(window).height()>a("body").height()-100&&(h=!0,u++,t(u))}var a=e(1),s=e(2),c=e(5),d=e(6),r=e(10),l=a(".detail-list"),h=!1,u=1;e(17),r.init(),a(window).scroll(function(){i()}),0===l.find("li").length&&t(1)},2:function(n,o,e){function t(n,o){var e,t;"undefined"!=typeof n&&(e=n.toString(),t=o&&o>0?o:2e3,i.text(e).show(),a=setTimeout(function(){"block"===i.css("display")&&i.hide()},t))}var i,a,s=e(1);!function(){var n='<div id="yoho-tip" class="yoho-tip"></div>';s(".yoho-page").append(n),i=s("#yoho-tip"),i.on("touchend",function(){i.hide(),clearTimeout(a)})}(),o.show=t},3:function(n,o,e){function t(n){var o,e,t=document.cookie;return document.cookie&&""!==document.cookie&&(e=t.indexOf(n+"="),e>-1&&(e+=n.length+1,o=decodeURIComponent(p.trim(t.substring(e,t.indexOf(";",e)))))),o}function i(n,o,e){var t,i,a,s,c="";"undefined"!=typeof o&&(e=e||{},null===o&&(o="",e.expires=-1),e.expires&&("number"==typeof e.expires||e.expires.toUTCString)&&("number"==typeof e.expires?(s=new Date,s.setTime(s.getTime()+24*e.expires*60*60*1e3)):s=e.expires,c="; expires="+s.toUTCString()),t=e.path?"; path="+e.path:"",i=e.domain?"; domain="+e.domain:"",a=e.secure?"; secure":"",document.cookie=[n,"=",encodeURIComponent(o),c,t,i,a].join(""))}function a(){var n=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||n||(document.cookie="testcookie",n=-1!==document.cookie.indexOf("testcookie")),n}function s(){var n,o=t("_UID");return"undefined"==typeof o?0:(n=o.split("::"),"undefined"==typeof n||n.length<4?0:n)}function c(){var n=s();return 0===n?0:n[1]}function d(){var n=t("_g");return"undefined"==typeof n?"":JSON.parse(n).k}function r(){var n;0!==m.length&&(n=Math.min(p(window).height(),window.screen.availHeight),p("body").height()<=n-parseInt(m.css("height"),0)?m.addClass("bottom"):m.removeClass("bottom"))}function l(n){var o=p(n).outerHeight();n&&m.css("margin-bottom",o+"px")}function h(){var n,o,e=[],t=window.location.search.slice(1).split("&");for(o=0;o<t.length;o++)n=t[o].split("="),e.push(n[0]),e[n[0]]=n[1];return e}function u(n){return n.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var p=e(1),f=e(4),m=p("#yoho-footer"),g=p(".yoho-page"),w=p(".yoho-header");!function(){var n,o=m.children(".op-row"),e=p(".back-to-top"),t=s();r(),0===t?o.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):o.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),e.length>0&&(n=new f(e[0]),n.on("tap",function(n){return p(window).scrollTop(0),n.srcEvent.preventDefault(),!1})),m.removeClass("hide")}(),function(n,o,e,t,i){var a=o.createElement(e),s=o.getElementsByTagName(e)[0];n.YohoAcquisitionObject=i,n[i]=function(){n[i].p=arguments},a.async=1,a.src=t,s.parentNode.insertBefore(a,s)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var n=c();n=0===n?"":n,window._ozuid=n,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",n,"","")}(),w.on("touchstart","a",function(){w.find("a").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel","a",function(){p(this).removeClass("highlight")}),g.on("touchstart",".tap-hightlight",function(){p(this).siblings(".tap-hightlight").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){p(this).removeClass("highlight")}),p(".nav-home").on("touchstart",function(){p(".homebuttom").toggleClass("hide")}),function(){var n,o,e=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,a=window.cancelAnimationFrame;for(o=0;o<t.length&&(!i||!a);o++)n=t[o],i=i||window[n+"RequestAnimationFrame"],a=a||window[n+"CancelAnimationFrame"]||window[n+"CancelRequestAnimationFrame"];i&&a||(i=function(n){var o=(new Date).getTime(),t=Math.max(0,16-(o-e)),i=window.setTimeout(function(){n(o+t)},t);return e=o+t,i},a=function(n){window.clearTimeout(n)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=a}(),p.extend({queryString:h}),11===m.find(".user-name").text().length&&m.find(".user-name").html(u(m.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=a,window.getUser=s,window.getUid=c,window.getShoppingKey=d,window.rePosFooter=r,window.reMarginFooter=l,window.queryString=h()},5:function(n,o,e){function t(n){var o='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';r=!0,n||(n=d),n.append(o),s=n.children(".loading-mask"),c("body").on("touchstart touchmove touchend",".loading-mask",function(){return!1})}function i(){r||(t(),r=!0),s.removeClass("hide")}function a(){s.addClass("hide")}var s,c=e(1),d=c(".yoho-page"),r=!1;o.init=t,o.showLoadingMask=i,o.hideLoadingMask=a,o.show=i,o.hide=a},17:function(n,o,e){var t=e(1),i=e(2);e(3),t(document).on("click",".collection",function(){var n,o=t(this),e=o.find(".collected-ico");n=e.hasClass("collected")?"del":"fav",t.ajax({type:"POST",url:"/guang/star/setFavorite",data:{articleId:o.parents("li").attr("articleId"),type:n,uid:window.queryString.uid},success:function(n){var o=n.code;200===o&&(e.hasClass("collected")?e.removeClass("collected"):e.addClass("collected")),400===o&&(t("#collocation-link").length<=0&&t("body").append("<a href='"+n.data+'\' style="display:none;" id="collocation-link"><span class="collocation-link"></span></a>'),t(".collocation-link").click())},error:function(){i.show("网络断开连接了~")}})}),window.successShare=function(){t.ajax({type:"POST",url:"/guang/starclass/forward",success:function(n){var o=n.code;200===o&&n.data>0&&i.show("分享成功,亲密度+10")},error:function(){i.show("网络断开连接了~")}})}}}); | ||
1 | +webpackJsonp([12],{0:function(o,n,e){function t(o){var n,e,t;c.showLoadingMask(),a.ajax({type:"GET",url:"/guang/star/detailList",data:{page:o,tag:a(".detail-list").data("name")},dataType:"html",success:function(o){h=!1,""===o&&(h=!0,s.show("没有更多内容了")),a(".detail-list").append(o),a(".cont-area").each(function(){n=a(this),e=n.find(".title"),t=n.find(".cont-txt"),e[0].mlellipsis(2),t[0].mlellipsis(2)}),r(a("img.lazy")),c.hideLoadingMask()},error:function(){s.show("网络断开连接了~")}})}function i(){!h&&a(window).scrollTop()+a(window).height()>a("body").height()-100&&(h=!0,u++,t(u))}var a=e(1),s=e(2),c=e(5),r=e(6),d=e(10),l=a(".detail-list"),h=!1,u=1;e(17),d.init(),a(window).scroll(function(){i()}),0===l.find("li").length&&t(1)},2:function(o,n,e){function t(o,n){var e,t;"undefined"!=typeof o&&(e=o.toString(),t=n&&n>0?n:2e3,i.text(e).show(),a=setTimeout(function(){"block"===i.css("display")&&i.hide()},t))}var i,a,s=e(1);!function(){var o='<div id="yoho-tip" class="yoho-tip"></div>';s(".yoho-page").append(o),i=s("#yoho-tip"),i.on("touchend",function(){i.hide(),clearTimeout(a)})}(),n.show=t},3:function(o,n,e){function t(o){var n,e,t=document.cookie;return document.cookie&&""!==document.cookie&&(e=t.indexOf(o+"="),e>-1&&(e+=o.length+1,n=decodeURIComponent(p.trim(t.substring(e,t.indexOf(";",e)))))),n}function i(o,n,e){var t,i,a,s,c="";"undefined"!=typeof n&&(e=e||{},null===n&&(n="",e.expires=-1),e.expires&&("number"==typeof e.expires||e.expires.toUTCString)&&("number"==typeof e.expires?(s=new Date,s.setTime(s.getTime()+24*e.expires*60*60*1e3)):s=e.expires,c="; expires="+s.toUTCString()),t=e.path?"; path="+e.path:"",i=e.domain?"; domain="+e.domain:"",a=e.secure?"; secure":"",document.cookie=[o,"=",encodeURIComponent(n),c,t,i,a].join(""))}function a(){var o=!!navigator.cookieEnabled;return"undefined"!=typeof navigator.cookieEnabled||o||(document.cookie="testcookie",o=-1!==document.cookie.indexOf("testcookie")),o}function s(){var o,n=t("_UID");return"undefined"==typeof n?0:(o=n.split("::"),"undefined"==typeof o||o.length<4?0:o)}function c(){var o=s();return 0===o?0:o[1]}function r(){var o=t("_g");return"undefined"==typeof o?"":JSON.parse(o).k}function d(){var o;0!==m.length&&(o=Math.min(p(window).height(),window.screen.availHeight),p("body").height()<=o-parseInt(m.css("height"),0)?m.addClass("bottom"):m.removeClass("bottom"))}function l(o){var n=p(o).outerHeight();o&&m.css("margin-bottom",n+"px")}function h(){var o,n,e=[],t=window.location.search.slice(1).split("&");for(n=0;n<t.length;n++)o=t[n].split("="),e.push(o[0]),e[o[0]]=o[1];return e}function u(o){return o.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}var p=e(1),f=e(4),m=p("#yoho-footer"),g=p(".yoho-page"),w=p(".yoho-header");!function(){var o,n=m.children(".op-row"),e=p(".back-to-top"),t=s();d(),0===t?n.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):n.prepend('<span>Hi,</span><a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index">退出</a>'),e.length>0&&(o=new f(e[0]),o.on("tap",function(o){return p(window).scrollTop(0),o.srcEvent.preventDefault(),!1})),m.removeClass("hide")}(),function(o,n,e,t,i){var a=n.createElement(e),s=n.getElementsByTagName(e)[0];o.YohoAcquisitionObject=i,o[i]=function(){o[i].p=arguments},a.async=1,a.src=t,s.parentNode.insertBefore(a,s)}(window,document,"script",("https:"===document.location.protocol?"https":"http")+"://cdn.yoho.cn/yas-jssdk/1.0.17/yas.js","_yas"),function(){var o=c();o=0===o?"":o,window._ozuid=o,window._yas&&window._yas(1*new Date,"1.0.17","yohobuy_m",o,"","")}(),w.on("touchstart","a",function(){w.find("a").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel","a",function(){p(this).removeClass("highlight")}),g.on("touchstart",".tap-hightlight",function(){p(this).siblings(".tap-hightlight").removeClass("highlight"),p(this).addClass("highlight")}).on("touchend touchcancel",".tap-hightlight",function(){p(this).removeClass("highlight")}),p(".nav-home").on("touchstart",function(){p(".homebuttom").toggleClass("hide")}),function(){var o,n,e=0,t="webkit moz ms o".split(" "),i=window.requestAnimationFrame,a=window.cancelAnimationFrame;for(n=0;n<t.length&&(!i||!a);n++)o=t[n],i=i||window[o+"RequestAnimationFrame"],a=a||window[o+"CancelAnimationFrame"]||window[o+"CancelRequestAnimationFrame"];i&&a||(i=function(o){var n=(new Date).getTime(),t=Math.max(0,16-(n-e)),i=window.setTimeout(function(){o(n+t)},t);return e=n+t,i},a=function(o){window.clearTimeout(o)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=a}(),p.extend({queryString:h}),11===m.find(".user-name").text().length&&m.find(".user-name").html(u(m.find(".user-name").text())),window.cookie=t,window.setCookie=i,window.isCookiesEnabled=a,window.getUser=s,window.getUid=c,window.getShoppingKey=r,window.rePosFooter=d,window.reMarginFooter=l,window.queryString=h()},5:function(o,n,e){function t(o){var n='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';d=!0,o||(o=r),o.append(n),s=o.children(".loading-mask"),c("body").on("touchstart touchmove touchend",".loading-mask",function(){return!1})}function i(){d||(t(),d=!0),s.removeClass("hide")}function a(){s.addClass("hide")}var s,c=e(1),r=c(".yoho-page"),d=!1;n.init=t,n.showLoadingMask=i,n.hideLoadingMask=a,n.show=i,n.hide=a},17:function(o,n,e){var t=e(1),i=e(2);e(3),t(".collocation-list").on("click",".collection",function(){var o,n=t(this),e=n.find(".collected-ico");o=e.hasClass("collected")?"del":"fav",t.ajax({type:"POST",url:"/guang/star/setFavorite",data:{articleId:n.parents("li").attr("articleId"),type:o,uid:window.queryString.uid},success:function(o){var n=o.code;200===n&&(e.hasClass("collected")?e.removeClass("collected"):e.addClass("collected")),400===n&&(t("#collocation-link").length<=0&&t("body").append("<a href='"+o.data+'\' style="display:none;" id="collocation-link"><span class="collocation-link"></span></a>'),t(".collocation-link").click())},error:function(){i.show("网络断开连接了~")}})}),window.successShare=function(){t.ajax({type:"POST",url:"/guang/starclass/forward",success:function(o){var n=o.code;200===n&&o.data>0&&i.show("分享成功,亲密度+10")},error:function(){i.show("网络断开连接了~")}})}}}); |
This diff could not be displayed because it is too large.
-
Please register or login to post a comment