细节优化
parent
c1248eed66
commit
1a0c9a597d
|
|
@ -117,7 +117,6 @@ class GoodsComments
|
|||
'label' => $lang['images'],
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'goodscomments/module/images',
|
||||
'is_list' => 0,
|
||||
],
|
||||
[
|
||||
'label' => $lang['rating'],
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!-- 评论图片 -->
|
||||
{{if !empty($module_data) and !empty($module_data['images'])}}
|
||||
<div data-am-widget="slider" class="am-slider am-slider-default images-slider" data-am-slider='{"controlNav":false}'>
|
||||
<div data-am-widget="slider" class="am-slider am-slider-default images-slider am-margin-bottom-0" data-am-slider='{"controlNav":false}'>
|
||||
<ul class="am-slides">
|
||||
{{foreach $module_data.images as $ik=>$iv}}
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@
|
|||
</legend>
|
||||
<div class="am-cf">
|
||||
<div class="am-u-md-6 am-padding-horizontal-0">
|
||||
<div class="am-alert am-alert-secondary goods-info" data-am-alert>
|
||||
<div class="am-alert am-alert-secondary goods-info">
|
||||
<p class="am-text-sm">{{:MyLang('common_service.goodscomments.form_item_goods_info_title')}}</p>
|
||||
{{if !empty($data['goods'])}}
|
||||
<div class="base am-nbfc">
|
||||
<a href="{{$data.goods.goods_url}}" target="_blank">
|
||||
<img src="{{$data.goods.images}}" alt="{{$data.goods.title}}" class="am-img-thumbnail am-radius am-align-left am-margin-right-xs am-fl" width="60" height="60" />
|
||||
<img src="{{$data.goods.images}}" alt="{{$data.goods.title}}" class="am-img-thumbnail am-radius am-align-left am-margin-right-xs am-margin-bottom-0 am-fl" width="57" height="57" />
|
||||
</a>
|
||||
<a class="am-text-top" href="{{$data.goods.goods_url}}" target="_blank">{{$data.goods.title}}</a>
|
||||
</div>
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="am-u-md-6 am-padding-horizontal-0">
|
||||
<div class="am-alert am-alert-secondary user-info" data-am-alert>
|
||||
<div class="am-alert am-alert-secondary user-info">
|
||||
<p class="am-text-sm">{{:MyLang('common_service.goodscomments.form_item_user_info_title')}}</p>
|
||||
{{if !empty($data['user'])}}
|
||||
<img src="{{$data.user.avatar}}" alt="{{$data.user.user_name_view}}" class="am-img-thumbnail am-radius am-align-left am-margin-right-xs am-margin-bottom-0" width="35" height="35" />
|
||||
|
|
|
|||
|
|
@ -456,7 +456,7 @@ class User extends Common
|
|||
// 调用服务层
|
||||
$ret = UserService::Logout();
|
||||
|
||||
// 登录返回
|
||||
// 退出返回
|
||||
$body_html = (!empty($ret['data']['body_html']) && is_array($ret['data']['body_html'])) ? implode(' ', $ret['data']['body_html']) : $ret['data']['body_html'];
|
||||
MyViewAssign([
|
||||
'body_html' => $body_html,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<div class="am-comment-meta">
|
||||
<span class="am-comment-author">{{$v.user.user_name_view}}</span>
|
||||
<span>{{:MyLang('goods.comments_first_name')}}</span>
|
||||
<time>{{$v.add_time_hour}}</time>
|
||||
<time>{{$v.add_time_date}}</time>
|
||||
</div>
|
||||
</header>
|
||||
<div class="am-comment-bd">
|
||||
|
|
|
|||
|
|
@ -472,7 +472,14 @@ class AdminService
|
|||
*/
|
||||
public static function LoginInfo()
|
||||
{
|
||||
return MyCookie(self::$admin_login_key);
|
||||
// 获取管理员信息
|
||||
$admin = MySession(self::$admin_login_key);
|
||||
// 非退出则重新设置管理员信息
|
||||
if(RequestAction() != 'logout')
|
||||
{
|
||||
self::LoginSession($admin);
|
||||
}
|
||||
return $admin;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -487,7 +494,7 @@ class AdminService
|
|||
public static function LoginSession($admin)
|
||||
{
|
||||
unset($admin['login_pwd'], $admin['login_salt']);
|
||||
MyCookie(self::$admin_login_key, $admin);
|
||||
MySession(self::$admin_login_key, $admin);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -501,7 +508,7 @@ class AdminService
|
|||
*/
|
||||
public static function LoginLogout()
|
||||
{
|
||||
return MyCookie(self::$admin_login_key, null);
|
||||
return MySession(self::$admin_login_key, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ class GoodsCommentsService
|
|||
if(!isset($params['is_public']) || $params['is_public'] == 1)
|
||||
{
|
||||
$v['user'] = [
|
||||
'avatar' => empty($user['avatar']) ? $default_avatar : $user['avatar'],
|
||||
'avatar' => ((isset($v['is_anonymous']) && $v['is_anonymous'] == 1) || empty($user['avatar'])) ? $default_avatar : $user['avatar'],
|
||||
'user_name_view' => (!isset($v['is_anonymous']) || $v['is_anonymous'] == 1 || empty($user['user_name_view'])) ? $username_default : mb_substr($user['user_name_view'], 0, 1, 'utf-8').'***'.mb_substr($user['user_name_view'], -1, null, 'utf-8'),
|
||||
];
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class OrderService
|
|||
}
|
||||
|
||||
// 订单支付前校验订单商品
|
||||
$ret = BuyService::MoreOrderPayBeginCheck(['order_data'=>$order_data]);
|
||||
$ret = BuyService::MoreOrderPayBeginCheck(array_merge($params, ['order_data'=>$order_data]));
|
||||
if($ret['code'] != 0)
|
||||
{
|
||||
return $ret;
|
||||
|
|
|
|||
|
|
@ -239,7 +239,8 @@ class UserService
|
|||
{
|
||||
$user_login_info = self::CacheLoginUserInfo();
|
||||
}
|
||||
if(!empty($user_login_info))
|
||||
// 非退出操作则重新设置用户信息
|
||||
if(!empty($user_login_info) && RequestAction() != 'logout')
|
||||
{
|
||||
// 是否缓存读取
|
||||
if($is_cache)
|
||||
|
|
@ -306,7 +307,7 @@ class UserService
|
|||
if(APPLICATION == 'web')
|
||||
{
|
||||
// web用户session
|
||||
$user_cache_login_info = MyCookie(self::$user_login_key);
|
||||
$user_cache_login_info = MySession(self::$user_login_key);
|
||||
|
||||
// 用户信息为空,指定了token则设置登录信息
|
||||
if(empty($user_cache_login_info))
|
||||
|
|
@ -826,7 +827,7 @@ class UserService
|
|||
if(APPLICATION == 'web')
|
||||
{
|
||||
// 存储session
|
||||
MyCookie(self::$user_login_key, $user);
|
||||
MySession(self::$user_login_key, $user);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -3013,10 +3014,10 @@ class UserService
|
|||
public static function Logout($params = [])
|
||||
{
|
||||
// 用户信息
|
||||
$user = self::LoginUserInfo();
|
||||
$user = self::CacheLoginUserInfo();
|
||||
|
||||
// 清除session
|
||||
MyCookie(self::$user_login_key, null);
|
||||
MySession(self::$user_login_key, null);
|
||||
|
||||
// html代码
|
||||
$body_html = [];
|
||||
|
|
|
|||
|
|
@ -1,13 +1,17 @@
|
|||
/**
|
||||
* 列表
|
||||
*/
|
||||
.content-right table.am-table .reply-content {
|
||||
.content-right table.am-table .reply-content,
|
||||
.content-right table.am-table .images-slider img {
|
||||
max-height: 58px;
|
||||
}
|
||||
.content-right table.am-table .images-slider .am-direction-nav .am-prev,
|
||||
.content-right table.am-table .images-slider .am-direction-nav .am-next {
|
||||
z-index: 1;
|
||||
}
|
||||
.content-right table.am-table .images-slider .am-slider-desc {
|
||||
padding: 1px 5px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
|
|
|
|||
Loading…
Reference in New Issue