Authored by 周少峰

app location href

@@ -755,7 +755,7 @@ function postCollect(info) { @@ -755,7 +755,7 @@ function postCollect(info) {
755 755
756 if (data.code === 401) { 756 if (data.code === 401) {
757 url = data.url; 757 url = data.url;
758 - $('body').append('<a href="' + url + '"><span class="jump-login"><span></a>'); 758 + $('body').append('<a href=\'' + url + '\'><span class="jump-login"><span></a>');
759 759
760 $('.jump-login').click(); 760 $('.jump-login').click();
761 } 761 }
@@ -4,7 +4,9 @@ @@ -4,7 +4,9 @@
4 <div id="nav-top"> 4 <div id="nav-top">
5 {{> layout/header}} 5 {{> layout/header}}
6 {{#if appVersion}} 6 {{#if appVersion}}
7 - <div class="search-area"> 7 + <input type="hidden" name="app_version" value="{{appVersion}}">
  8 + {{else}}
  9 + <div class="search-area">
8 <div id="search-input" class="search-input"> 10 <div id="search-input" class="search-input">
9 <form id="search-form" action={{url}} method="get"> 11 <form id="search-form" action={{url}} method="get">
10 <i class="search-icon iconfont">&#xe60f;</i> 12 <i class="search-icon iconfont">&#xe60f;</i>
@@ -110,9 +112,9 @@ @@ -110,9 +112,9 @@
110 <div id="new-arrival" class="new-arrival main"></div> 112 <div id="new-arrival" class="new-arrival main"></div>
111 <div id="popularity" class="popularity main"></div> 113 <div id="popularity" class="popularity main"></div>
112 </div> 114 </div>
113 - {{#if appVersion}} 115 + {{#unless appVersion}}
114 {{> product/shop-footer}} 116 {{> product/shop-footer}}
115 - {{/if}} 117 + {{/unless}}
116 <ul id="pos-nav" class="nav hide"> 118 <ul id="pos-nav" class="nav hide">
117 <li class="active color" tab="home-page">首页</li> 119 <li class="active color" tab="home-page">首页</li>
118 <li tab="new-arrival">上新</li> 120 <li tab="new-arrival">上新</li>
@@ -468,7 +468,7 @@ class IndexController extends AbstractAction @@ -468,7 +468,7 @@ class IndexController extends AbstractAction
468 if (empty($appVersion)) { 468 if (empty($appVersion)) {
469 $this->setNavHeader('', true, SITE_MAIN); 469 $this->setNavHeader('', true, SITE_MAIN);
470 } else { 470 } else {
471 - $data['app_version'] = $appVersion; 471 + $data['appVersion'] = $appVersion;
472 } 472 }
473 $this->_view->display('shop', array( 473 $this->_view->display('shop', array(
474 'shopIndex' => $data, 474 'shopIndex' => $data,
@@ -485,7 +485,7 @@ class IndexController extends AbstractAction @@ -485,7 +485,7 @@ class IndexController extends AbstractAction
485 { 485 {
486 $data = array(); 486 $data = array();
487 $shopId = $this->post('shop_id', 0); 487 $shopId = $this->post('shop_id', 0);
488 - $appVersion = $this->get('app_version', 0); 488 + $appVersion = $this->post('app_version', 0);
489 $uid = $this->getUid(); 489 $uid = $this->getUid();
490 do { 490 do {
491 if (!$this->isAjax()) { 491 if (!$this->isAjax()) {
@@ -497,11 +497,9 @@ class IndexController extends AbstractAction @@ -497,11 +497,9 @@ class IndexController extends AbstractAction
497 $refer = urlencode($_SERVER['HTTP_REFERER']); 497 $refer = urlencode($_SERVER['HTTP_REFERER']);
498 $toUrl = Helpers::url('/signin.html')."?refer=".$refer; 498 $toUrl = Helpers::url('/signin.html')."?refer=".$refer;
499 if (!empty($appVersion)){ 499 if (!empty($appVersion)){
500 - echo 'eee';  
501 - $toUrl .= 'yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"'.$refer.'","param":{}},"requesturl":{"param":{},"url":""},"priority":"Y"}}'; 500 + $toUrl .= '&yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"'.$refer.'","param":{}},"requesturl":{"param":{},"url":""},"priority":"Y"}}';
502 } 501 }
503 $data['url'] = $toUrl; 502 $data['url'] = $toUrl;
504 -// print_r($data); exit;  
505 break; 503 break;
506 } 504 }
507 if (!empty($shopId) && !empty($uid)) { 505 if (!empty($shopId) && !empty($uid)) {