Authored by 周少峰

app location href

... ... @@ -755,7 +755,7 @@ function postCollect(info) {
if (data.code === 401) {
url = data.url;
$('body').append('<a href="' + url + '"><span class="jump-login"><span></a>');
$('body').append('<a href=\'' + url + '\'><span class="jump-login"><span></a>');
$('.jump-login').click();
}
... ...
... ... @@ -4,7 +4,9 @@
<div id="nav-top">
{{> layout/header}}
{{#if appVersion}}
<div class="search-area">
<input type="hidden" name="app_version" value="{{appVersion}}">
{{else}}
<div class="search-area">
<div id="search-input" class="search-input">
<form id="search-form" action={{url}} method="get">
<i class="search-icon iconfont">&#xe60f;</i>
... ... @@ -110,9 +112,9 @@
<div id="new-arrival" class="new-arrival main"></div>
<div id="popularity" class="popularity main"></div>
</div>
{{#if appVersion}}
{{#unless appVersion}}
{{> product/shop-footer}}
{{/if}}
{{/unless}}
<ul id="pos-nav" class="nav hide">
<li class="active color" tab="home-page">首页</li>
<li tab="new-arrival">上新</li>
... ...
... ... @@ -468,7 +468,7 @@ class IndexController extends AbstractAction
if (empty($appVersion)) {
$this->setNavHeader('', true, SITE_MAIN);
} else {
$data['app_version'] = $appVersion;
$data['appVersion'] = $appVersion;
}
$this->_view->display('shop', array(
'shopIndex' => $data,
... ... @@ -485,7 +485,7 @@ class IndexController extends AbstractAction
{
$data = array();
$shopId = $this->post('shop_id', 0);
$appVersion = $this->get('app_version', 0);
$appVersion = $this->post('app_version', 0);
$uid = $this->getUid();
do {
if (!$this->isAjax()) {
... ... @@ -497,11 +497,9 @@ class IndexController extends AbstractAction
$refer = urlencode($_SERVER['HTTP_REFERER']);
$toUrl = Helpers::url('/signin.html')."?refer=".$refer;
if (!empty($appVersion)){
echo 'eee';
$toUrl .= 'yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"'.$refer.'","param":{}},"requesturl":{"param":{},"url":""},"priority":"Y"}}';
$toUrl .= '&yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"'.$refer.'","param":{}},"requesturl":{"param":{},"url":""},"priority":"Y"}}';
}
$data['url'] = $toUrl;
// print_r($data); exit;
break;
}
if (!empty($shopId) && !empty($uid)) {
... ...