Authored by 毕凯

Merge branch 'hotfix/wechat'

... ... @@ -51,7 +51,9 @@ class AbstractAction extends Controller_Abstract
*/
public function init()
{
$this->_request = $this->getRequest();
$this->_request = $this->getRequest();
$this->_view->assign('isWechat', stripos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false);
// 设置环境变量
switch (APPLICATION_ENV) {
... ... @@ -72,7 +74,7 @@ class AbstractAction extends Controller_Abstract
$this->_view->assign('devEnv', true);
$this->_useSession = false;
break;
}
}
}
/**
... ...
... ... @@ -23,19 +23,16 @@ class Yohobuy
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
//java API
const API_URL = 'http://api.yoho.yohoops.org/';
const API_URL2 = 'http://api.yoho.yohoops.org/';
const SERVICE_URL = 'http://service.yoho.yohoops.org/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
const API_OLD = 'http://api2.open.yohobuy.com/';
// 测试环境
/*
// const API_URL = 'http://testapi.yoho.cn:28078/'; // 'http://192.168.102.205:8080/gateway/'
// const API_URL = 'http://api.yoho.yohoops.org/';
// const API_URL2 = 'http://api.yoho.yohoops.org/';
// const SERVICE_URL = 'http://service.yoho.yohoops.org/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_OLD = 'http://api2.open.yohobuy.com/';
// 测试环境 */
const API_URL = 'http://testapi.yoho.cn:28078/'; // 'http://192.168.102.205:8080/gateway/'
// const API_URL = 'http://192.168.102.218:8080/gateway/';
const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';*/
const YOHOBUY_URL = 'http://www.yohobuy.com/';
/* 预览环境 */
// const API_URL = 'http://preapi.yoho.cn/';
... ... @@ -184,7 +181,11 @@ class Yohobuy
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
<<<<<<< HEAD
if ($useGzip) {
=======
if ($useGzip) {
>>>>>>> master
curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
}
if (!empty($userAgent)) {
... ... @@ -501,7 +502,11 @@ class Yohobuy
}
return $_SERVER['HTTP_USER_AGENT'];
}
<<<<<<< HEAD
=======
>>>>>>> master
/**
* 判断是否手机
* @return bool
... ...
!function(){var yas_jssdk_10132_src_config,yas_jssdk_10132_src_cross,yas_jssdk_10132_src_event,yohosizzle_222_pre_sizzle,yohojson2_100_json2,yas_jssdk_10132_src_util,yas_jssdk_10132_src_cookie,yas_jssdk_10132_src_ya,yas_jssdk_10132_yas;yas_jssdk_10132_src_config=function(e){function t(){var e=document.domain.split("."),t=e.length;return t>1&&isNaN(e[t-1])?"."+e[t-2]+"."+e[t-1]:document.domain}return e={version:"1.0",yasPath:"/web/",yasDomain:t(),yasImgDomain:"http://analytics.yhurl.com/yas.gif"}}(),yas_jssdk_10132_src_cross=function(e){var t=yas_jssdk_10132_src_config,n=t.yasPath,r=t.yasImgDomain;return e.imgSend=function(e,t){var o=new Image(1,1);o.src=r+n+"?"+e,o.onload=function(){o.onload=null,t&&t()}},e}({}),yas_jssdk_10132_src_event=function(e){return e.addEventHandler=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},e.removeEventHandler=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):delete e["on"+t]},e}({}),yohosizzle_222_pre_sizzle=function(e){return function(t){function n(e,t,n,r){var o,i,a,u,s,c,l,d,g=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:M)!==I&&L(t),t=t||I,q)){if(11!==h&&(c=yt.exec(e)))if(o=c[1]){if(9===h){if(!(a=t.getElementById(o)))return n;if(a.id===o)return n.push(a),n}else if(g&&(a=g.getElementById(o))&&H(t,a)&&a.id===o)return n.push(a),n}else{if(c[2])return K.apply(n,t.getElementsByTagName(e)),n;if((o=c[3])&&b.getElementsByClassName&&t.getElementsByClassName)return K.apply(n,t.getElementsByClassName(o)),n}if(!(!b.qsa||Y[e+" "]||B&&B.test(e))){if(1!==h)g=t,d=e;else if("object"!==t.nodeName.toLowerCase()){for((u=t.getAttribute("id"))?u=u.replace(wt,"\\$&"):t.setAttribute("id",u=$),l=C(e),i=l.length,s=dt.test(u)?"#"+u:"[id='"+u+"']";i--;)l[i]=s+" "+p(l[i]);d=l.join(","),g=vt.test(e)&&f(t.parentNode)||t}if(d)try{return K.apply(n,g.querySelectorAll(d)),n}catch(m){}finally{u===$&&t.removeAttribute("id")}}}return T(e.replace(ut,"$1"),t,n,r)}function r(){function e(n,r){return t.push(n+" ")>N.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function o(e){return e[$]=!0,e}function i(e){var t=I.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),r=n.length;r--;)N.attrHandle[n[r]]=t}function u(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function c(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return o(function(t){return t=+t,o(function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))})})}function f(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function p(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function g(e,t,n){var r=t.dir,o=n&&"parentNode"===r,i=J++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,a){var u,s,c,l=[z,i];if(a){for(;t=t[r];)if((1===t.nodeType||o)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||o){if(c=t[$]||(t[$]={}),s=c[t.uniqueID]||(c[t.uniqueID]={}),(u=s[r])&&u[0]===z&&u[1]===i)return l[2]=u[2];if(s[r]=l,l[2]=e(t,n,a))return!0}}}function h(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function m(e,t,r){for(var o=0,i=t.length;i>o;o++)n(e,t[o],r);return r}function y(e,t,n,r,o){for(var i,a=[],u=0,s=e.length,c=null!=t;s>u;u++)(i=e[u])&&(!n||n(i,r,o))&&(a.push(i),c&&t.push(u));return a}function v(e,t,n,r,i,a){return r&&!r[$]&&(r=v(r)),i&&!i[$]&&(i=v(i,a)),o(function(o,a,u,s){var c,l,f,d=[],p=[],g=a.length,h=o||m(t||"*",u.nodeType?[u]:u,[]),v=!e||!o&&t?h:y(h,d,e,u,s),w=n?i||(o?e:g||r)?[]:a:v;if(n&&n(v,w,u,s),r)for(c=y(w,p),r(c,[],u,s),l=c.length;l--;)(f=c[l])&&(w[p[l]]=!(v[p[l]]=f));if(o){if(i||e){if(i){for(c=[],l=w.length;l--;)(f=w[l])&&c.push(v[l]=f);i(null,w=[],c,s)}for(l=w.length;l--;)(f=w[l])&&(c=i?et(o,f):d[l])>-1&&(o[c]=!(a[c]=f))}}else w=y(w===a?w.splice(g,w.length):w),i?i(null,a,w,s):K.apply(a,w)})}function w(e){for(var t,n,r,o=e.length,i=N.relative[e[0].type],a=i||N.relative[" "],u=i?1:0,s=g(function(e){return e===t},a,!0),c=g(function(e){return et(t,e)>-1},a,!0),l=[function(e,n,r){var o=!i&&(r||n!==j)||((t=n).nodeType?s(e,n,r):c(e,n,r));return t=null,o}];o>u;u++)if(n=N.relative[e[u].type])l=[g(h(l),n)];else{if(n=N.filter[e[u].type].apply(null,e[u].matches),n[$]){for(r=++u;o>r&&!N.relative[e[r].type];r++);return v(u>1&&h(l),u>1&&p(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(ut,"$1"),n,r>u&&w(e.slice(u,r)),o>r&&w(e=e.slice(r)),o>r&&p(e))}l.push(n)}return h(l)}function _(e,t){var r=t.length>0,i=e.length>0,a=function(o,a,u,s,c){var l,f,d,p=0,g="0",h=o&&[],m=[],v=j,w=o||i&&N.find.TAG("*",c),_=z+=null==v?1:Math.random()||.1,x=w.length;for(c&&(j=a===I||a||c);g!==x&&null!=(l=w[g]);g++){if(i&&l){for(f=0,a||l.ownerDocument===I||(L(l),u=!q);d=e[f++];)if(d(l,a||I,u)){s.push(l);break}c&&(z=_)}r&&((l=!d&&l)&&p--,o&&h.push(l))}if(p+=g,r&&g!==p){for(f=0;d=t[f++];)d(h,m,a,u);if(o){if(p>0)for(;g--;)h[g]||m[g]||(m[g]=W.call(s));m=y(m)}K.apply(s,m),c&&!o&&m.length>0&&p+t.length>1&&n.uniqueSort(s)}return c&&(z=_,j=v),h};return r?o(a):a}var x,b,N,S,E,C,D,T,j,k,A,L,I,O,q,B,R,P,H,$="sizzle"+1*new Date,M=t.document,z=0,J=0,F=r(),U=r(),Y=r(),G=function(e,t){return e===t&&(A=!0),0},X={}.hasOwnProperty,V=[],W=V.pop,Z=V.push,K=V.push,Q=V.slice,et=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},tt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",nt="[\\x20\\t\\r\\n\\f]",rt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ot="\\["+nt+"*("+rt+")(?:"+nt+"*([*^$|!~]?=)"+nt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+rt+"))|)"+nt+"*\\]",it=":("+rt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ot+")*)|.*)\\)|)",at=new RegExp(nt+"+","g"),ut=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),st=new RegExp("^"+nt+"*,"+nt+"*"),ct=new RegExp("^"+nt+"*([>+~]|"+nt+")"+nt+"*"),lt=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),ft=new RegExp(it),dt=new RegExp("^"+rt+"$"),pt={ID:new RegExp("^#("+rt+")"),CLASS:new RegExp("^\\.("+rt+")"),TAG:new RegExp("^("+rt+"|[*])"),ATTR:new RegExp("^"+ot),PSEUDO:new RegExp("^"+it),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+tt+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},gt=/^(?:input|select|textarea|button)$/i,ht=/^h\d$/i,mt=/^[^{]+\{\s*\[native \w/,yt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,vt=/[+~]/,wt=/'|\\/g,_t=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),xt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},bt=function(){L()};try{K.apply(V=Q.call(M.childNodes),M.childNodes),V[M.childNodes.length].nodeType}catch(Nt){K={apply:V.length?function(e,t){Z.apply(e,Q.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}b=n.support={},E=n.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},L=n.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:M;return r!==I&&9===r.nodeType&&r.documentElement?(I=r,O=I.documentElement,q=!E(I),M!==I&&(n=I.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",bt,!1):n.attachEvent&&n.attachEvent("onunload",bt)),b.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=i(function(e){return e.appendChild(I.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=mt.test(I.getElementsByClassName),b.getById=i(function(e){return O.appendChild(e).id=$,!I.getElementsByName||!I.getElementsByName($).length}),b.getById?(N.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&q){var n=t.getElementById(e);return n?[n]:[]}},N.filter.ID=function(e){var t=e.replace(_t,xt);return function(e){return e.getAttribute("id")===t}}):(delete N.find.ID,N.filter.ID=function(e){var t=e.replace(_t,xt);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),N.find.TAG=b.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},N.find.CLASS=b.getElementsByClassName&&function(e,t){return"undefined"!=typeof t.getElementsByClassName&&q?t.getElementsByClassName(e):void 0},R=[],B=[],(b.qsa=mt.test(I.querySelectorAll))&&(i(function(e){O.appendChild(e).innerHTML="<a id='"+$+"'></a><select id='"+$+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&B.push("[*^$]="+nt+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||B.push("\\["+nt+"*(?:value|"+tt+")"),e.querySelectorAll("[id~="+$+"-]").length||B.push("~="),e.querySelectorAll(":checked").length||B.push(":checked"),e.querySelectorAll("a#"+$+"+*").length||B.push(".#.+[+~]")}),i(function(e){var t=I.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&B.push("name"+nt+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||B.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),B.push(",.*:")})),(b.matchesSelector=mt.test(P=O.matches||O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&i(function(e){b.disconnectedMatch=P.call(e,"div"),P.call(e,"[s!='']:x"),R.push("!=",it)}),B=B.length&&new RegExp(B.join("|")),R=R.length&&new RegExp(R.join("|")),t=mt.test(O.compareDocumentPosition),H=t||mt.test(O.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},G=t?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===I||e.ownerDocument===M&&H(M,e)?-1:t===I||t.ownerDocument===M&&H(M,t)?1:k?et(k,e)-et(k,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],s=[t];if(!o||!i)return e===I?-1:t===I?1:o?-1:i?1:k?et(k,e)-et(k,t):0;if(o===i)return u(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?u(a[r],s[r]):a[r]===M?-1:s[r]===M?1:0},I):I},n.matches=function(e,t){return n(e,null,null,t)},n.matchesSelector=function(e,t){if((e.ownerDocument||e)!==I&&L(e),t=t.replace(lt,"='$1']"),!(!b.matchesSelector||!q||Y[t+" "]||R&&R.test(t)||B&&B.test(t)))try{var r=P.call(e,t);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(o){}return n(t,I,null,[e]).length>0},n.contains=function(e,t){return(e.ownerDocument||e)!==I&&L(e),H(e,t)},n.attr=function(e,t){(e.ownerDocument||e)!==I&&L(e);var n=N.attrHandle[t.toLowerCase()],r=n&&X.call(N.attrHandle,t.toLowerCase())?n(e,t,!q):void 0;return void 0!==r?r:b.attributes||!q?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},n.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},n.uniqueSort=function(e){var t,n=[],r=0,o=0;if(A=!b.detectDuplicates,k=!b.sortStable&&e.slice(0),e.sort(G),A){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return k=null,e},S=n.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=S(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=S(t);return n},N=n.selectors={cacheLength:50,createPseudo:o,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(_t,xt),e[3]=(e[3]||e[4]||e[5]||"").replace(_t,xt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||n.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&n.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pt.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ft.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(_t,xt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=F[e+" "];return t||(t=new RegExp("(^|"+nt+")"+e+"("+nt+"|$)"))&&F(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,r){return function(o){var i=n.attr(o,e);return null==i?"!="===t:t?(i+="","="===t?i===r:"!="===t?i!==r:"^="===t?r&&0===i.indexOf(r):"*="===t?r&&i.indexOf(r)>-1:"$="===t?r&&i.slice(-r.length)===r:"~="===t?(" "+i.replace(at," ")+" ").indexOf(r)>-1:"|="===t?i===r||i.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,s){var c,l,f,d,p,g,h=i!==a?"nextSibling":"previousSibling",m=t.parentNode,y=u&&t.nodeName.toLowerCase(),v=!s&&!u,w=!1;if(m){if(i){for(;h;){for(d=t;d=d[h];)if(u?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;g=h="only"===e&&!g&&"nextSibling"}return!0}if(g=[a?m.firstChild:m.lastChild],a&&v){for(d=m,f=d[$]||(d[$]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),c=l[e]||[],p=c[0]===z&&c[1],w=p&&c[2],d=p&&m.childNodes[p];d=++p&&d&&d[h]||(w=p=0)||g.pop();)if(1===d.nodeType&&++w&&d===t){l[e]=[z,p,w];break}}else if(v&&(d=t,f=d[$]||(d[$]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),c=l[e]||[],p=c[0]===z&&c[1],w=p),w===!1)for(;(d=++p&&d&&d[h]||(w=p=0)||g.pop())&&((u?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++w||(v&&(f=d[$]||(d[$]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),l[e]=[z,w]),d!==t)););return w-=o,w===r||w%r===0&&w/r>=0}}},PSEUDO:function(e,t){var r,i=N.pseudos[e]||N.setFilters[e.toLowerCase()]||n.error("unsupported pseudo: "+e);return i[$]?i(t):i.length>1?(r=[e,e,"",t],N.setFilters.hasOwnProperty(e.toLowerCase())?o(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)r=et(e,o[a]),e[r]=!(n[r]=o[a])}):function(e){return i(e,0,r)}):i}},pseudos:{not:o(function(e){var t=[],n=[],r=D(e.replace(ut,"$1"));return r[$]?o(function(e,t,n,o){for(var i,a=r(e,null,o,[]),u=e.length;u--;)(i=a[u])&&(e[u]=!(t[u]=i))}):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}}),has:o(function(e){return function(t){return n(e,t).length>0}}),contains:o(function(e){return e=e.replace(_t,xt),function(t){return(t.textContent||t.innerText||S(t)).indexOf(e)>-1}}),lang:o(function(e){return dt.test(e||"")||n.error("unsupported lang: "+e),e=e.replace(_t,xt).toLowerCase(),function(t){var n;do if(n=q?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(e){return e===O},focus:function(e){return e===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!N.pseudos.empty(e)},header:function(e){return ht.test(e.nodeName)},input:function(e){return gt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[0>n?n+t:n]}),even:l(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},N.pseudos.nth=N.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})N.pseudos[x]=s(x);for(x in{submit:!0,reset:!0})N.pseudos[x]=c(x);d.prototype=N.filters=N.pseudos,N.setFilters=new d,C=n.tokenize=function(e,t){var r,o,i,a,u,s,c,l=U[e+" "];if(l)return t?0:l.slice(0);for(u=e,s=[],c=N.preFilter;u;){(!r||(o=st.exec(u)))&&(o&&(u=u.slice(o[0].length)||u),s.push(i=[])),r=!1,(o=ct.exec(u))&&(r=o.shift(),i.push({value:r,type:o[0].replace(ut," ")}),u=u.slice(r.length));for(a in N.filter)!(o=pt[a].exec(u))||c[a]&&!(o=c[a](o))||(r=o.shift(),i.push({value:r,type:a,matches:o}),u=u.slice(r.length));if(!r)break}return t?u.length:u?n.error(e):U(e,s).slice(0)},D=n.compile=function(e,t){var n,r=[],o=[],i=Y[e+" "];if(!i){for(t||(t=C(e)),n=t.length;n--;)i=w(t[n]),i[$]?r.push(i):o.push(i);i=Y(e,_(o,r)),i.selector=e}return i},T=n.select=function(e,t,n,r){var o,i,a,u,s,c="function"==typeof e&&e,l=!r&&C(e=c.selector||e);if(n=n||[],1===l.length){if(i=l[0]=l[0].slice(0),i.length>2&&"ID"===(a=i[0]).type&&b.getById&&9===t.nodeType&&q&&N.relative[i[1].type]){if(t=(N.find.ID(a.matches[0].replace(_t,xt),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=pt.needsContext.test(e)?0:i.length;o--&&(a=i[o],!N.relative[u=a.type]);)if((s=N.find[u])&&(r=s(a.matches[0].replace(_t,xt),vt.test(i[0].type)&&f(t.parentNode)||t))){if(i.splice(o,1),e=r.length&&p(i),!e)return K.apply(n,r),n;break}}return(c||D(e,l))(r,t,!q,n,!t||vt.test(e)&&f(t.parentNode)||t),n},b.sortStable=$.split("").sort(G).join("")===$,b.detectDuplicates=!!A,L(),b.sortDetached=i(function(e){return 1&e.compareDocumentPosition(I.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||a(tt,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),"function"==typeof define&&define.amd?define(function(){return n}):e=n}(window),e}(),yohojson2_100_json2=function(){"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(e){return 10>e?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,o,i,a,u=gap,s=t[e];switch(s&&"object"==typeof s&&"function"==typeof s.toJSON&&(s=s.toJSON(e)),"function"==typeof rep&&(s=rep.call(t,e,s)),typeof s){case"string":return quote(s);case"number":return isFinite(s)?String(s):"null";case"boolean":case"null":return String(s);case"object":if(!s)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(s)){for(i=s.length,n=0;i>n;n+=1)a[n]=str(n,s)||"null";return o=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+u+"]":"["+a.join(",")+"]",gap=u,o}if(rep&&"object"==typeof rep)for(i=rep.length,n=0;i>n;n+=1)"string"==typeof rep[n]&&(r=rep[n],o=str(r,s),o&&a.push(quote(r)+(gap?": ":":")+o));else for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(o=str(r,s),o&&a.push(quote(r)+(gap?": ":":")+o));return o=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+u+"}":"{"+a.join(",")+"}",gap=u,o}}var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;"function"!=typeof JSON.stringify&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;n>r;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var n,r,o=e[t];if(o&&"object"==typeof o)for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r=walk(o,n),void 0!==r?o[n]=r:delete o[n]);return reviver.call(e,t,o)}var j;if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()}(),yas_jssdk_10132_src_util=function(e){{var t=yas_jssdk_10132_src_config;t.yaPath,t.yasDomain}return e.flashChecker=function(){var e=0,t=0,n=0,r=null;return n?(r=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),r&&(e=1,t=r.GetVariable("$version"))):navigator.plugins&&navigator.plugins.length>0&&(r=navigator.plugins["Shockwave Flash"],r&&(e=1,t=r.description.replace("Shockwave Flash",""))),{f:e,v:t}},e.Hash=function(e){var t,n=1,r=0;if(e)for(n=0,t=e.length-1;t>=0;t--)r=e.charCodeAt(t),n=(n<<6&268435455)+r+(r<<14),r=266338304&n,0!==r&&(n^=r>>21);return n},e.Random=function(){return Math.round(2147483647*Math.random())},e.hashClientInfo=function(){var t=window.navigator,n=window.history.length,r=[t.appName,t.version,t.language,t.platform,t.userAgent,t.javaEnabled(),window.screen,window.screen.colorDepth,window.document.cookie?window.document.cookie:"",window.document.referrer?window.document.referrer:""];t=r.join("");for(var o=t.length;n>0;)t+=n--^o++;return e.Hash(t)},e.merge=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var o in t)n[o]=t[o];return n},e.genParam=function(e){var t=[];for(var n in e)t.push(n+"="+e[n]);return t.join("&")},e.trim=function(e){if(String.prototype.trim)return null===e?"":String.prototype.trim.call(e);var t=/^\s+/,n=/\s+$/,r="";return e?(r=e.toString().replace(t,""),r=r.replace(n,"")):void 0},e.getGeo=function(e){function t(t){var n=t.coords.longitude,r=t.coords.latitude;e(r,n)}function n(){e(!1)}if(window.navigator.geolocation){var r={enableHighAccuracy:!0};window.navigator.geolocation.getCurrentPosition(t,n,r)}else e(!1)},e}({}),yas_jssdk_10132_src_cookie=function(e){var t=yas_jssdk_10132_src_util;return e=function(e,n,r){if("undefined"==typeof n){var o=null;if(document.cookie)for(var i=document.cookie.split(";"),a=0;a<i.length;a++){var u=t.trim(i[a]);if(u.substring(0,e.length+1)==e+"="){o=decodeURIComponent(u.substring(e.length+1));break}}return o}r=r||{},null===n&&(n="",r.expires=-1);var s="";if(r.expires&&("number"==typeof r.expires||r.expires.toUTCString)){var c;"number"==typeof r.expires?(c=new Date,c.setTime(c.getTime()+24*r.expires*60*60*1e3)):c=r.expires,s="; expires="+c.toUTCString()}var l=r.path?"; path="+r.path:"",f=r.domain?"; domain="+r.domain:"",d=r.secure?"; secure":"";document.cookie=[e,"=",encodeURIComponent(n),s,l,f,d].join("")}}(),yas_jssdk_10132_src_ya=function(e){function t(e){var t=a.merge(p,h);t=a.merge(t,y);var n=r();n&&(t=a.merge(t,n),u("_yasmp",null,{path:"/",domain:l.yasDomain,expires:73e3}));var o=u("_yascustjson");if(o){var i=JSON.parse(o);t=a.merge(t,i),u("_yascustjson",null,{path:"/",domain:l.yasDomain,expires:73e3})}var c=a.genParam(t);e=e?e:function(){},s.imgSend(c,e);var f=u("_yasev");f&&s.imgSend(f,function(){u("_yasev",null,{path:"/",domain:l.yasDomain,expires:73e3})})}function n(){var e=u("_yasvd");return e?{cid:e,isNew:"N"}:(e=a.Random()^2147483647&a.hashClientInfo(),u("_yasvd",e,{path:"/",domain:d,expires:73e3}),{cid:e,isNew:"Y"})}function r(){var e=u("_yasmp");if(e){var t=e.split(",");if(3===t.length)return{x:t[0],y:t[1],et:t[2]};if(4===t.length)return{x:t[0],y:t[1],et:t[2],ix:t[3]}}return null}function o(e){var t=0,n=0;return e.pageX||e.pageY?(t=e.pageX,n=e.pageY):(e.clientX||e.clientY)&&(t=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,n=e.clientY+document.body.scrollTop+document.documentElement.scrollTop),t-=window.screen.width/2,n=window.screen.height/2-n,{x:t,y:n}}function i(e,t,n,r,o){var i=u("_yasev");i?i+="&":i="",u("_yasev",i+"vd="+h.vd+"&t="+e+"&i="+t+"&l="+r+"&v="+o,{path:"/",domain:d,expires:73e3}),w++}var a=yas_jssdk_10132_src_util,u=yas_jssdk_10132_src_cookie,s=yas_jssdk_10132_src_cross,c=yas_jssdk_10132_src_event,l=yas_jssdk_10132_src_config,f=yohosizzle_222_pre_sizzle,d=(l.version,l.yaPath,l.yasDomain),p={h:document.domain,p:window.location.port,u:window.location.pathname,ft:0,fst:0,sv:"",ab:u("ab_1")||""},g=n(),h={ak:"",cd:g.cid,vd:(new Date).getTime()+g.cid,ud:"",rf:document.referrer,ckf:g.isNew},m=a.flashChecker(),y={sr:window.screen.width+"x"+window.screen.height,wr:window.screen.availWidth+"x"+window.screen.availHeight,sd:window.screen.colorDepth,ln:window.navigator.language?window.navigator.language:window.navigator.browserLanguage,sy:window.navigator.platform,ce:window.navigator.cookieEnabled,fv:m.f?m.v:0},v=function(e,n,r,i,s,g){if(h.ak=r,p.sv=n,h.ud=i?i:"",u("_yasgeo")){var m=u("_yasgeo").split(",");h.la=m[0],h.lo=m[1],u("_yasgeo",null,{path:"/",domain:l.yasDomain,expires:73e3})}var y=(new Date).getTime(),v=null,w=!1;p.ft=y-e,c.addEventHandler(window,"load",function(){var n=(new Date).getTime();p.fst=n-e,c.removeEventHandler(window,"load",arguments.callee),window.clearTimeout(v),w||t()}),v=window.setTimeout(function(){p.fst=0,p.fse=">3s",w=!0,t()},3e3),s&&a.getGeo(function(e,t){e&&u("_yasgeo",e+","+t,{path:"/",domain:d,expires:73e3})});var _=0;if(g&&f)for(var x=f(g),b=0,N=x.length;N>b;b++)!function(e){c.addEventHandler(x[e],"click",function(t){console.log("index: "+e),_=e+1;var n=t.pageX-window.screen.width/2,r=window.screen.height/2-t.pageY;u("_yasmp",n+","+r+","+t.type+","+_,{path:"/",domain:d,expires:73e3})})}(b);c.addEventHandler(document,"click",function(e){e=e||window.event;var t=e.target||e.srcElement;if(!_&&t&&"IMG"===t.nodeName&&"A"===t.parentNode.nodeName){var n=o(e);u("_yasmp",n.x+","+n.y+","+e.type,{path:"/",domain:d,expires:73e3})}_=0})},w=0;return v.add=function(e,t,n,r,o){w>3?s.imgSend(u("_yasev"),function(){u("_yasev",null,{path:"/",domain:l.yasDomain,expires:73e3}),w=0,i(e,t,n,r,o)}):i(e,t,n,r,o)},v.sendMouseEvent=function(e,t){e=e||window.event;var n=o(e);if(t)u("_yasmp",n.x+","+n.y+","+e.type,{path:"/",domain:d,expires:73e3});else{var r={x:n.x,y:n.y,et:e.type},i=a.merge(p,h);i=a.merge(i,y),i=a.merge(i,r);var c=a.genParam(i);s.imgSend(c,function(){})}},v.sendCustomInfo=function(e,t){if(t){var n=JSON.stringify(jsonobj);u("_yascustjson",n,{path:"/",domain:d,expires:73e3})}else{var r=a.merge(p,h);r=a.merge(r,y),r=a.merge(r,e);var o=a.genParam(r);s.imgSend(o,function(){})}},e=v}(),yas_jssdk_10132_yas=function(e){var t=yas_jssdk_10132_src_ya;if(window.YohoAcquisitionObject){var n=window.YohoAcquisitionObject;window[n].p&&(t.apply(this,window[n].p),window[n]=t)}return e=t}()}();
\ No newline at end of file
... ... @@ -190,6 +190,10 @@ if ($('.freebie').length > 0) {
});
}
if (/MicroMessenger/i.test(navigator.userAgent)) {
$('.btn-login').attr('href', '/passport/login/wechat?refer=' + location.href);
}
$('.btn-balance').on('touchend', function() {
var info = window.cookie('order-info');
... ... @@ -237,4 +241,4 @@ $cartNav.on('touchstart', 'li', function(e) {
});
//提前触发lazyload
$(window).scrollTop(1).scrollTop(0);
\ No newline at end of file
$(window).scrollTop(1).scrollTop(0);
... ...
... ... @@ -146,13 +146,22 @@ function reMarginFooter(fixedElement) {
var backToTopHammer;
var loginUrl;
rePosFooter(); //计算底部位置
if (user === 0) {
if (/MicroMessenger/i.test(navigator.userAgent)) {
loginUrl = '//m.yohobuy.com/passport/login/wechat?refer=' + location.href;
$('.login-btn').attr('href', loginUrl);
} else {
loginUrl = '//m.yohobuy.com/signin.html?refer=' + location.href;
}
//未登录
$op.prepend(
'<a href="//m.yohobuy.com/signin.html?refer=' + location.href + '">登录</a>' +
'<a href="' + loginUrl + '">登录</a>' +
'<span class="sep-line">|</span>' +
'<a href="//m.yohobuy.com/reg.html">注册</a>'
);
... ... @@ -376,6 +385,3 @@ window.getShoppingKey = getShoppingKey;
window.rePosFooter = rePosFooter;
window.reMarginFooter = reMarginFooter;
... ...
... ... @@ -22,6 +22,8 @@ var showErrTip = tip.show;
var requested = false;
require('../../common');
function nextStep(url, mobileNo, areaCode) {
if (requested) {
return false;
... ... @@ -41,6 +43,14 @@ function nextStep(url, mobileNo, areaCode) {
// console.log(res.data);
if (res.code === 200) {
// 统计代码:用于统计从哪个渠道登录
if (window._yas && window._yas.sendCustomInfo) {
window._yas.sendCustomInfo({
'loginRefer' : $sourceType
}, false);
}
location.href = url;
} else {
tip.show(res.message);
... ... @@ -139,3 +149,7 @@ $btnNext.on('touchstart', function() {
showErrTip('手机号格式不正确,请重新输入');
}
});
if (/MicroMessenger/i.test(navigator.userAgent) && $.queryString().refer) {
$('.go-back').attr('href', decodeURIComponent($.queryString().refer));
}
... ...
... ... @@ -83,10 +83,10 @@ module.exports = function(useInRegister, useForBind, useForRelate) {
itime = setInterval(function() {
if (count === 0) {
$captchaTip.text('重发验证码').removeClass('disable');
$captchaTip.text('重新发送').removeClass('disable');
clearInterval(itime);
} else {
$captchaTip.text('重发验证码 (' + count-- + '秒)');
$captchaTip.text('重新发送 (' + count-- + '秒)');
}
}, 1000);
}
... ...
.bind-page
.bind-tip {
color: #fff;
font-size: 15PX;
}
.bind-page {
#yohood {
background-image: resolve('yohood.png');
... ... @@ -15,3 +11,16 @@
border-bottom: 4PX solid #fff;
}
.other-login {
margin-top: 20PX;
margin-bottom: 20PX;
font-size: 16PX;
text-decoration: underline;
text-align: right;
a {
color: #fff;
}
}
}
... ...
... ... @@ -35,15 +35,4 @@
.clear-input {
right: 170PX;
}
.tip {
margin-top: 30PX;
color: #fff;
font-size: 14PX;
line-height: 2;
a {
color: #fff;
}
}
}
... ...
... ... @@ -11,6 +11,29 @@ body.passport-body {
text-align: center;
padding: 0 6%;
.bind-tip {
margin-top: 10PX;
margin-bottom: 10PX;
color: #fff;
font-size: 13PX;
.title {
font-size: 28PX;
line-height: 1.5;
}
}
.tip {
margin-top: 30PX;
color: #fff;
font-size: 16PX;
line-height: 2;
a {
color: #3FB274;
}
}
.header {
position: relative;
height: 40PX;
... ...
... ... @@ -64,13 +64,14 @@
background-image: resolve('passport/weibo.png');
}
.weixin {
background-image: resolve('passport/weixin.png');
}
.qq {
background-image: resolve('passport/qq.png');
}
.wechat {
display: none;
background-image: resolve('passport/wechat.png');
}
}
}
... ... @@ -143,5 +144,10 @@
}
}
}
}
.wechat-body {
.wechat {
display: inline-block !important;
}
}
... ...
... ... @@ -5,13 +5,28 @@
<input type="hidden" id="nickname" value="{{nickname}}">
{{> passport/header}}
<div class="content">
<p class="bind-tip">您正在使{{platform}}快捷登录,请绑定手机号</p>
{{> passport/country_list}}
<div class="input-container phone-container row has-clear">
<span id="area-code" class="area-code">{{areaCode}}</span>
<input id="phone-num" class="input phone-num" type="text" placeholder="手机号">
</div>
<span id="btn-next" class="btn btn-next disable row">下一步</span>
<p class="bind-tip">绑定手机号码后,可选择{{platform}}和手机号登录此帐号</p>
<span id="btn-next" class="btn btn-next disable row">发送验证码</span>
<div class="other-login">
<a href="/passport/login/index">
用其他方式登录
</a>
</div>
<div class="tip">
<p>
登录注册中遇到问题?请联系客服
</p>
<a href="{{serviceUrl}}">
<span class="iconfont icon">&#xe63c;</span>
在线客服
</a>
</div>
</div>
</div>
{{> layout/footer}}
... ...
... ... @@ -5,6 +5,12 @@
<input type="hidden" id="nickname" value="{{nickname}}">
{{> passport/header}}
<div class="content">
{{#if bindPwd}}
<div class="bind-tip">
<p class="title">绑定成功!</p>
您以后还可以使手机号+密码的形式登录有货哦!
</div>
{{/if}}
<div class="input-container row has-eye">
<input id="pwd" class="input pwd" type="text" placeholder="请输入密码" autocomplete="off" maxlength="20">
</div>
... ...
... ... @@ -15,11 +15,11 @@
<span id="forget-pwd" class="forget-pwd">忘记密码</span>
</p>
<div class="third-party-login">
<span>其他登录方式</span>
<div class="tp-link">
<a class="alipay" href={{aliLoginUrl}}></a>
<a class="weibo" href={{weiboLoginUrl}}></a>
<a class="qq" href={{qqLoginUrl}}></a>
<a class="wechat" href={{wechatLoginUrl}}></a>
<a class="weibo" href={{weiboLoginUrl}}></a>
<a class="alipay" href={{aliLoginUrl}}></a>
</div>
</div>
<a class="international" href={{internationalUrl}}>International Customer</a>
... ... @@ -41,4 +41,4 @@
</ul>
</div>
</div>
{{> layout/footer}}
\ No newline at end of file
{{> layout/footer}}
... ...
... ... @@ -3,23 +3,23 @@
{{#if hasWxShare}}
<script type="text/javascript" charset="utf-8" src="//res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
{{/if}}
{{#if rlsEnv}}
{{#if rlsEnv}}
<script src="//cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script>
<script src="//cdn.yoho.cn/myohobuy/{{version}}/index.js"></script>
{{/if}}
{{#if preEnv}}
<script src="//cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script>
<script src="//cdn.yoho.cn/myohobuy/{{version}}/index.js"></script>
<script src="//cdn.yoho.cn/myohobuy/{{version}}/lib.js?v={{version}}"></script>
<script src="//cdn.yoho.cn/myohobuy/{{version}}/index.js?v={{version}}"></script>
{{/if}}
{{#if testEnv}}
<script src="//cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script>
<script src="//cdn.yoho.cn/myohobuy/{{version}}/index-debug.js"></script>
<script src="//cdn.yoho.cn/myohobuy/{{version}}/lib.js?v={{version}}"></script>
<script src="//cdn.yoho.cn/myohobuy/{{version}}/index-debug.js?v={{version}}"></script>
{{/if}}
{{#if devEnv}}
<script src="//localhost:8000/static/js/sea.js?nowrap"></script>
<script>seajs.config({base: '//localhost:8000/'});</script>
{{/if}}
{{> layout/use}}
{{> layout/analysis}}
<script src="//127.0.0.1:8000/static/js/sea.js?nowrap"></script>
<script>seajs.config({base: '//127.0.0.1:8000/'});</script>
{{/if}}
{{> layout/use}}
{{> layout/analysis}}
</body>
</html>
\ No newline at end of file
</html>
... ...
... ... @@ -42,10 +42,10 @@
<link rel="apple-touch-startup-image" sizes="640x920" href="//static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)">
<link rel="apple-touch-startup-image" sizes="320x460" href="//static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)">
</head>
<body {{#if isPassportPage}}class=passport-body{{/if}}>
<body class="{{#if isPassportPage}}passport-body{{/if}} {{#if isWechat}}wechat-body{{/if}}">
{{#if systemUpdate}}
<div class="systemUpdate">
<a href="index/systemUpdate" class="systemHeader">Yoho!Buy有货关于系统升级的公告</a>
<span>X</span>
</div>
{{/if}}
\ No newline at end of file
{{/if}}
... ...
... ... @@ -8,19 +8,10 @@
</div>
<div class="input-container row has-clear">
<input id="captcha" class="input captcha" type="text" placeholder="验证码" maxlength="6" autocomplete="off">
<div id="captcha-tip" class="captcha-tip disable">重发验证码 (60秒)</div>
<div id="captcha-tip" class="captcha-tip disable">重新发送 (60秒)</div>
</div>
<span id="btn-next" class="btn btn-next disable row">下一步</span>
<span id="btn-next" class="btn btn-next disable row">确定</span>
<div class="tip">
{{#if regCode}}
<p>
登录注册中遇到问题?请联系客服
</p>
<a href="{{serviceUrl}}">
<span class="iconfont icon">&#xe63c;</span>
在线客服
</a>
{{/if}}
{{#if relateCode}}
注:关联的手机号不能用来登录此帐号
{{/if}}
... ...
... ... @@ -31,7 +31,14 @@ class IndexController extends AbstractAction
{
$uid = $this->getUid($useSession);
if (!$uid) {
$this->go(Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', SITE_MAIN))));
$isWeixin = stripos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false;
if ($isWeixin) {
$this->go(Helpers::url('/passport/login/wechat', array('refer' => $this->server('HTTP_REFERER', SITE_MAIN))));
}
else {
$this->go(Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', SITE_MAIN))));
}
}
}
... ...
... ... @@ -32,10 +32,11 @@ class BindController extends AbstractAction
'showHeaderImg' => true, // 控制显示头部图片
'isPassportPage' => true, // 模板中模块标识
'sourceType' => $sourceType, // 第三方登录来源
'platform' => $sourceType,
'platform' => self::getSourceName($sourceType),
'openId' => $openId, // openId
'areaCode' => '+86', //默认区号
'countrys' => RegData::getAreasData(), //国别码
'serviceUrl'=>'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info=', //在线客服
// 'nickname' => $nickname, //昵称
);
... ... @@ -400,7 +401,7 @@ class BindController extends AbstractAction
$name = '';
switch ($sourceType) {
case 'qq':
$name = 'qq';
$name = 'QQ';
break;
case 'sina':
$name = '微博';
... ... @@ -408,6 +409,9 @@ class BindController extends AbstractAction
case 'alipay':
$name = '支付宝';
break;
case 'wechat':
$name = '微信';
break;
default:
break;
}
... ...
... ... @@ -41,6 +41,7 @@ class LoginController extends AbstractAction
'aliLoginUrl' => '/passport/login/alipay', // 支付宝快捷登录的URL链接
'weiboLoginUrl' => '/passport/login/sina', // 微博登录的URL链接
'qqLoginUrl' => '/passport/login/qq', // 腾讯QQ登录的URL链接
'wechatLoginUrl' => '/passport/login/wechat', // 腾讯QQ登录的URL链接
'internationalUrl' => '/login.html', // 国际号登录的URL链接
'phoneRetriveUrl' => '/passport/back/mobile', // 通过手机号找回密码的URL链接
'emailRetriveUrl' => '/passport/back/email', // 通过邮箱找回密码的URL链接
... ... @@ -87,17 +88,24 @@ class LoginController extends AbstractAction
$this->setSession('_LOGIN_UID', '');
// 清除客户端
$this->setCookie('_UID', '');
$this->setCookie('_TOKEN', '');
$this->setCookie('_SPK', '');
$refer = $this->server('HTTP_REFERER', SITE_MAIN);
$this->go($refer);
$this->setCookie('_UID', null);
$this->setCookie('_TOKEN', null);
$this->setCookie('_SPK', null);
$this->setCookie('PHPSESSID', null);
$isWeixin = stripos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false;
if ($isWeixin) {
$this->go(Helpers::url('/signin.html'));
} else {
$refer = $this->server('HTTP_REFERER', SITE_MAIN);
$this->go($refer);
}
}
/**
* 登录操作
*
*
* @param string areaCode 地区编号, 不需要+号
* @param string account 账号(邮箱或手机号)
* @param string password 密码
... ...