This commit is contained in:
gongfuxiang 2018-10-06 17:40:12 +08:00
parent 04727b429c
commit c4da7c5bc2
3 changed files with 14 additions and 8 deletions

View File

@ -84,7 +84,12 @@ class CommonController extends Controller
{
if(empty($_SESSION['user']))
{
$this->error(L('common_login_invalid'), U('Home/User/LoginInfo'));
if(IS_AJAX)
{
$this->ajaxReturn(L('common_login_invalid'), -400);
} else {
redirect(U('Home/User/LoginInfo'));
}
}
}

View File

@ -59,7 +59,7 @@
<!--规格属性-->
<!--名称-->
<div class="tb-detail-hd">
<h1 class="detail-title">{{$goods.title}}</h1>
<h1 class="detail-title" <notempty name="goods.title_color">style="color:{{$goods.title_color}};"</notempty>>{{$goods.title}}</h1>
</div>
<div class="tb-detail-list">
<!--价格-->
@ -217,7 +217,7 @@
</a>
</div>
<div class="p-name">
<a href="{{:$v['goods_url']}}">{{$v.title}}</a>
<a href="{{:$v['goods_url']}}" <notempty name="v.title_color">style="color:{{$v.title_color}};"</notempty>>{{$v.title}}</a>
</div>
<div class="p-price"><strong>¥{{$v.price}}</strong></div>
</li>
@ -273,6 +273,7 @@
</div>
</div>
<!-- 猜你喜欢 -->
<div class="am-tab-panel am-fade">
<div class="like">
<ul class="am-avg-sm-2 am-avg-md-3 am-avg-lg-4 boxes">
@ -283,7 +284,7 @@
<a href="{{:$v['goods_url']}}">
<img alt="{{$v.title}}" src="{{$v.home_recommended_images}}" />
</a>
<p class="ellipsis">{{$v.title}}</p>
<p class="ellipsis" <notempty name="v.title_color">style="color:{{$v.title_color}};"</notempty>>{{$v.title}}</p>
<p class="price fl">
<strong>¥{{$v.price}}</strong>
</p>

View File

@ -75,10 +75,10 @@
<if condition="empty($user) and (MyC('home_user_login_state') eq 1 or in_array('sms', MyC('home_user_reg_state')) or in_array('email', MyC('home_user_reg_state')))">
<div class="member-login">
<if condition="MyC('home_user_login_state') eq 1">
<a class="am-btn-danger btn" href="{{:U('Home/User/LoginInfo')}}">登录</a>
<a class="am-btn-primary btn" href="{{:U('Home/User/LoginInfo')}}">登录</a>
</if>
<if condition="in_array('sms', MyC('home_user_reg_state')) or in_array('email', MyC('home_user_reg_state'))">
<a class="am-btn-danger btn" href="{{:U('Home/User/RegInfo')}}">注册</a>
<a class="am-btn-primary btn" href="{{:U('Home/User/RegInfo')}}">注册</a>
</if>
</div>
</if>
@ -99,7 +99,7 @@
<li>
<a target="_blank" href="#">
<span>[{{$article.category_name}}]</span>
<span <if condition="!empty($article.title_color)">style="color:{{$article.title_color}};"</if> >{{$article.title}}</span>
<span <notempty name="article.title_color">style="color:{{$article.title_color}};"</notempty> >{{$article.title}}</span>
</a>
</li>
</foreach>
@ -171,7 +171,7 @@
<div class="goods-items <if condition="in_array($key, [0,1])">am-u-sm-7 am-u-md-4 text-two<else />am-u-sm-6 am-u-md-2 text-three</if> <if condition="in_array($key, [0,3])">sug</if> <if condition="in_array($key, [2,5])">big</if> <if condition="$key eq 5">last</if>">
<div class="outer-con">
<div class="goods-title ellipsis">
<a href="{{$goods['goods_url']}}">{{$goods.title}}</a>
<a href="{{$goods['goods_url']}}" <notempty name="goods.title_color">style="color:{{$goods.title_color}};"</notempty>>{{$goods.title}}</a>
</div>
<div class="price">¥{{$goods.price}}</div>
</div>