商品评论
parent
4975d1e68f
commit
b6c0bcda5c
|
|
@ -56,13 +56,13 @@ class Goods extends Common
|
|||
$total = GoodsService::GoodsTotal($this->form_where);
|
||||
|
||||
// 分页
|
||||
$page_params = array(
|
||||
'number' => $this->page_size,
|
||||
'total' => $total,
|
||||
'where' => $this->data_request,
|
||||
'page' => $this->page,
|
||||
'url' => MyUrl('admin/goods/index'),
|
||||
);
|
||||
$page_params = [
|
||||
'number' => $this->page_size,
|
||||
'total' => $total,
|
||||
'where' => $this->data_request,
|
||||
'page' => $this->page,
|
||||
'url' => MyUrl('admin/goods/index'),
|
||||
];
|
||||
$page = new \base\Page($page_params);
|
||||
|
||||
// 获取数据列表
|
||||
|
|
|
|||
|
|
@ -49,47 +49,63 @@ class Goodscomments extends Common
|
|||
*/
|
||||
public function Index()
|
||||
{
|
||||
// 参数
|
||||
$params = input();
|
||||
// 总数
|
||||
$total = GoodsCommentsService::GoodsCommentsTotal($this->form_where);
|
||||
|
||||
// 分页
|
||||
$number = MyC('admin_page_number', 10, true);
|
||||
|
||||
// 条件
|
||||
$where = GoodsCommentsService::GoodsCommentsListWhere($params);
|
||||
|
||||
// 获取总数
|
||||
$total = GoodsCommentsService::GoodsCommentsTotal($where);
|
||||
|
||||
// 分页
|
||||
$page_params = array(
|
||||
'number' => $number,
|
||||
'total' => $total,
|
||||
'where' => $params,
|
||||
'page' => isset($params['page']) ? intval($params['page']) : 1,
|
||||
'url' => MyUrl('admin/goodscomments/index'),
|
||||
);
|
||||
$page_params = [
|
||||
'number' => $this->page_size,
|
||||
'total' => $total,
|
||||
'where' => $this->data_request,
|
||||
'page' => $this->page,
|
||||
'url' => MyUrl('admin/goodscomments/index'),
|
||||
];
|
||||
$page = new \base\Page($page_params);
|
||||
$this->assign('page_html', $page->GetPageHtml());
|
||||
|
||||
// 获取列表
|
||||
$data_params = array(
|
||||
'm' => $page->GetPageStarNumber(),
|
||||
'n' => $number,
|
||||
'where' => $where,
|
||||
'is_public' => 0,
|
||||
);
|
||||
$data = GoodsCommentsService::GoodsCommentsList($data_params);
|
||||
$this->assign('data_list', $data['data']);
|
||||
$data_params = [
|
||||
'where' => $this->form_where,
|
||||
'm' => $page->GetPageStarNumber(),
|
||||
'n' => $this->page_size,
|
||||
'is_public' => 0,
|
||||
];
|
||||
$ret = GoodsCommentsService::GoodsCommentsList($data_params);
|
||||
|
||||
// 静态数据
|
||||
$this->assign('common_is_show_list', lang('common_is_show_list'));
|
||||
$this->assign('common_is_text_list', lang('common_is_text_list'));
|
||||
$this->assign('common_goods_comments_rating_list', lang('common_goods_comments_rating_list'));
|
||||
$this->assign('common_goods_rating_business_type_list', lang('common_goods_rating_business_type_list'));
|
||||
$this->assign('params', $this->data_request);
|
||||
$this->assign('page_html', $page->GetPageHtml());
|
||||
$this->assign('data_list', $ret['data']);
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
// 参数
|
||||
$this->assign('params', $params);
|
||||
/**
|
||||
* 详情
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2019-08-05T08:21:54+0800
|
||||
*/
|
||||
public function Detail()
|
||||
{
|
||||
if(!empty($this->data_request['id']))
|
||||
{
|
||||
// 条件
|
||||
$where = [
|
||||
['id', '=', intval($this->data_request['id'])],
|
||||
];
|
||||
|
||||
// 获取列表
|
||||
$data_params = [
|
||||
'm' => 0,
|
||||
'n' => 1,
|
||||
'where' => $where,
|
||||
'is_category' => 1,
|
||||
];
|
||||
$ret = GoodsCommentsService::GoodsCommentsList($data_params);
|
||||
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
|
||||
$this->assign('data', $data);
|
||||
|
||||
$this->assign('common_goods_comments_rating_list', lang('common_goods_comments_rating_list'));
|
||||
}
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
|
|
@ -125,7 +141,7 @@ class Goodscomments extends Common
|
|||
$this->assign('common_is_show_list', lang('common_is_show_list'));
|
||||
$this->assign('common_is_text_list', lang('common_is_text_list'));
|
||||
$this->assign('common_goods_comments_rating_list', lang('common_goods_comments_rating_list'));
|
||||
$this->assign('common_goods_rating_business_type_list', lang('common_goods_rating_business_type_list'));
|
||||
$this->assign('common_goods_comments_business_type_list', lang('common_goods_comments_business_type_list'));
|
||||
|
||||
// 参数
|
||||
unset($params['id']);
|
||||
|
|
|
|||
|
|
@ -55,23 +55,23 @@ class Order extends Common
|
|||
$total = OrderService::OrderTotal($this->form_where);
|
||||
|
||||
// 分页
|
||||
$page_params = array(
|
||||
'number' => $this->page_size,
|
||||
'total' => $total,
|
||||
'where' => $this->data_request,
|
||||
'page' => $this->page,
|
||||
'url' => MyUrl('admin/order/index'),
|
||||
);
|
||||
$page_params = [
|
||||
'number' => $this->page_size,
|
||||
'total' => $total,
|
||||
'where' => $this->data_request,
|
||||
'page' => $this->page,
|
||||
'url' => MyUrl('admin/order/index'),
|
||||
];
|
||||
$page = new \base\Page($page_params);
|
||||
|
||||
// 获取列表
|
||||
$data_params = array(
|
||||
$data_params = [
|
||||
'm' => $page->GetPageStarNumber(),
|
||||
'n' => $this->page_size,
|
||||
'where' => $this->form_where,
|
||||
'is_public' => 0,
|
||||
'user_type' => 'admin',
|
||||
);
|
||||
];
|
||||
$ret = OrderService::OrderList($data_params);
|
||||
|
||||
// 发起支付 - 支付方式
|
||||
|
|
|
|||
|
|
@ -56,13 +56,13 @@ class Orderaftersale extends Common
|
|||
$total = OrderAftersaleService::OrderAftersaleTotal($this->form_where);
|
||||
|
||||
// 分页
|
||||
$page_params = array(
|
||||
'number' => $this->page_size,
|
||||
'total' => $total,
|
||||
'where' => $this->data_request,
|
||||
'page' => $this->page,
|
||||
'url' => MyUrl('admin/orderaftersale/index'),
|
||||
);
|
||||
$page_params = [
|
||||
'number' => $this->page_size,
|
||||
'total' => $total,
|
||||
'where' => $this->data_request,
|
||||
'page' => $this->page,
|
||||
'url' => MyUrl('admin/orderaftersale/index'),
|
||||
];
|
||||
$page = new \base\Page($page_params);
|
||||
|
||||
// 获取数据列表
|
||||
|
|
|
|||
|
|
@ -125,7 +125,6 @@ class Goods
|
|||
'align' => 'center',
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'form_name' => 'is_shelves',
|
||||
'where_type' => 'in',
|
||||
'data' => lang('common_is_shelves_list'),
|
||||
'data_key' => 'id',
|
||||
|
|
@ -141,7 +140,6 @@ class Goods
|
|||
'align' => 'center',
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'form_name' => 'is_home_recommended',
|
||||
'where_type' => 'in',
|
||||
'data' => lang('common_is_text_list'),
|
||||
'data_key' => 'id',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,276 @@
|
|||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: Devil
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\form;
|
||||
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 商品评论动态表格
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-06-08
|
||||
* @desc description
|
||||
*/
|
||||
class Goodscomments
|
||||
{
|
||||
// 基础条件
|
||||
public $condition_base = [];
|
||||
|
||||
/**
|
||||
* 入口
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-06-08
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function Run($params = [])
|
||||
{
|
||||
return [
|
||||
// 基础配置
|
||||
'base' => [
|
||||
'key_field' => 'id',
|
||||
'status_field' => 'is_show',
|
||||
'is_search' => 1,
|
||||
'search_url' => MyUrl('admin/goodscomments/index'),
|
||||
'is_delete' => 1,
|
||||
'delete_url' => MyUrl('admin/goodscomments/delete'),
|
||||
'delete_key' => 'ids',
|
||||
],
|
||||
// 表单配置
|
||||
'form' => [
|
||||
[
|
||||
'view_type' => 'checkbox',
|
||||
'is_checked' => 0,
|
||||
'checked_text' => '反选',
|
||||
'not_checked_text' => '全选',
|
||||
'align' => 'center',
|
||||
'width' => 80,
|
||||
],
|
||||
[
|
||||
'label' => '基础信息',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'goodscomments/module/info',
|
||||
'grid_size' => 'lg',
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_handle_custom' => 'WhereValueBaseInfo',
|
||||
'placeholder' => '请输入商品名称/型号',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '用户信息',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'goodscomments/module/user',
|
||||
'grid_size' => 'sm',
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'user_id',
|
||||
'where_type' => 'like',
|
||||
'where_type_custom' => 'in',
|
||||
'where_handle_custom' => 'WhereValueUserInfo',
|
||||
'placeholder' => '请输入用户名/昵称/手机/邮箱',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '业务类型',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'business_type_text',
|
||||
'width' => 120,
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'form_name' => 'business_type',
|
||||
'where_type' => 'in',
|
||||
'data' => lang('common_goods_comments_business_type_list'),
|
||||
'data_key' => 'value',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '评论内容',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'goodscomments/module/content',
|
||||
'grid_size' => 'lg',
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'content',
|
||||
'where_type' => 'like',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '评论图片',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'goodscomments/module/images',
|
||||
'width' => 140,
|
||||
],
|
||||
[
|
||||
'label' => '评分',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'goodscomments/module/rating',
|
||||
'width' => 100,
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'form_name' => 'rating',
|
||||
'where_type' => 'in',
|
||||
'data' => lang('common_goods_comments_rating_list'),
|
||||
'data_key' => 'value',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '回复内容',
|
||||
'view_type' => 'module',
|
||||
'view_key' => 'goodscomments/module/reply',
|
||||
'grid_size' => 'lg',
|
||||
'search_config' => [
|
||||
'form_type' => 'input',
|
||||
'form_name' => 'reply',
|
||||
'where_type' => 'like',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '是否显示',
|
||||
'view_type' => 'status',
|
||||
'view_key' => 'is_show',
|
||||
'post_url' => MyUrl('admin/goodscomments/statusupdate'),
|
||||
'is_form_su' => 1,
|
||||
'align' => 'center',
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'where_type' => 'in',
|
||||
'data' => lang('common_is_shelves_list'),
|
||||
'data_key' => 'id',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '是否匿名',
|
||||
'view_type' => 'status',
|
||||
'view_key' => 'is_anonymous',
|
||||
'post_url' => MyUrl('admin/goodscomments/statusupdate'),
|
||||
'align' => 'center',
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'where_type' => 'in',
|
||||
'data' => lang('common_is_text_list'),
|
||||
'data_key' => 'id',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '是否回复',
|
||||
'view_type' => 'status',
|
||||
'view_key' => 'is_reply',
|
||||
'post_url' => MyUrl('admin/goodscomments/statusupdate'),
|
||||
'align' => 'center',
|
||||
'search_config' => [
|
||||
'form_type' => 'select',
|
||||
'where_type' => 'in',
|
||||
'data' => lang('common_is_text_list'),
|
||||
'data_key' => 'id',
|
||||
'data_name' => 'name',
|
||||
'is_multiple' => 1,
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '回复时间',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'reply_time_time',
|
||||
'search_config' => [
|
||||
'form_type' => 'datetime',
|
||||
'form_name' => 'reply_time',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '创建时间',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'add_time_time',
|
||||
'search_config' => [
|
||||
'form_type' => 'datetime',
|
||||
'form_name' => 'add_time',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '更新时间',
|
||||
'view_type' => 'field',
|
||||
'view_key' => 'upd_time_time',
|
||||
'search_config' => [
|
||||
'form_type' => 'datetime',
|
||||
'form_name' => 'upd_time',
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => '操作',
|
||||
'view_type' => 'operate',
|
||||
'view_key' => 'goodscomments/module/operate',
|
||||
'align' => 'center',
|
||||
'fixed' => 'right',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户信息条件处理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-06-08
|
||||
* @desc description
|
||||
* @param [string] $value [条件值]
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function WhereValueUserInfo($value, $params = [])
|
||||
{
|
||||
if(!empty($value))
|
||||
{
|
||||
// 获取用户 id
|
||||
$ids = Db::name('User')->where('username|nickname|mobile|email', 'like', '%'.$value.'%')->column('id');
|
||||
|
||||
// 避免空条件造成无效的错觉
|
||||
return empty($ids) ? [0] : $ids;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 基础信息条件处理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2020-06-08
|
||||
* @desc description
|
||||
* @param [string] $value [条件值]
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function WhereValueBaseInfo($value, $params = [])
|
||||
{
|
||||
if(!empty($value))
|
||||
{
|
||||
// 获取商品评论关联的商品 id
|
||||
$ids = Db::name('GoodsComments')->alias('gc')->join(['__GOODS__'=>'g'], 'gc.goods_id=g.id')->where('title|model', 'like', '%'.$value.'%')->column('gc.id');
|
||||
|
||||
// 避免空条件造成无效的错觉
|
||||
return empty($ids) ? [0] : $ids;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -7,9 +7,9 @@
|
|||
<dl class="dl-content">
|
||||
<dt>标题名称</dt>
|
||||
<dd>
|
||||
<div class="goods">
|
||||
<div class="am-nbfc">
|
||||
<a href="{{$data.goods_url}}" target="_blank" title="{{$data.title}}">
|
||||
<img src="{{$data['images']}}" class="am-img-thumbnail am-radius goods-images" />
|
||||
<img src="{{$data['images']}}" class="am-img-thumbnail am-radius am-margin-right-xs am-fl" width="60" height="60" />
|
||||
</a>
|
||||
<a href="{{$data.goods_url}}" target="_blank" title="{{$data.title}}" {{if !empty($data['title_color'])}} style="color:{{$data.title_color}};" {{/if}} class="am-nowrap-initial">{{$data.title}}</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,91 @@
|
|||
<!-- 继承公共的 detail -->
|
||||
{{extend name="public/module/detail" /}}
|
||||
|
||||
<!-- 详情内容 -->
|
||||
{{if !empty($data)}}
|
||||
{{block name="detail_data"}}
|
||||
<dl class="dl-content">
|
||||
<dt>商品信息</dt>
|
||||
<div class="am-nbfc">
|
||||
{{if !empty($data['goods'])}}
|
||||
<div class="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" />
|
||||
</a>
|
||||
<a class="am-text-top am-nowrap-initial" href="{{$data.goods.goods_url}}" target="_blank">{{$data.goods.title}}</a>
|
||||
</div>
|
||||
<p>{{$price_symbol}}{{$data.goods.price}}</p>
|
||||
{{else /}}
|
||||
商品信息异常
|
||||
{{/if}}
|
||||
</div>
|
||||
</dd>
|
||||
|
||||
<dt>用户信息</dt>
|
||||
<dd class="user-info">
|
||||
{{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" />
|
||||
<ul class="user-base">
|
||||
<li>名称:{{if empty($data['user']['username'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$data.user.username}}{{/if}}</li>
|
||||
<li>昵称:{{if empty($data['user']['nickname'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$data.user.nickname}}{{/if}}</li>
|
||||
<li>手机:{{if empty($data['user']['mobile'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$data.user.mobile}}{{/if}}</li>
|
||||
<li>邮箱:{{if empty($data['user']['email'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$data.user.email}}{{/if}}</li>
|
||||
</ul>
|
||||
{{else /}}
|
||||
用户信息异常
|
||||
{{/if}}
|
||||
</dd>
|
||||
|
||||
<dt>业务类型</dt>
|
||||
<dd>{{$data.business_type_text}}</dd>
|
||||
|
||||
<dt>评论内容</dt>
|
||||
<dd>
|
||||
<div class="am-scrollable-vertical am-nowrap-initial">{{$data.content|raw}}</div>
|
||||
</dd>
|
||||
|
||||
<dt>评论图片</dt>
|
||||
<dd>
|
||||
{{if !empty($data['images'])}}
|
||||
{{foreach $data.images as $img}}
|
||||
<a href="{{$img}}" target="_blank">
|
||||
<img src="{{$img}}" class="am-img-thumbnail" width="80" height="80" />
|
||||
</a>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</dd>
|
||||
|
||||
<dt>评分</dt>
|
||||
<dd>
|
||||
<span class="am-badge am-radius {{$common_goods_comments_rating_list[$data['rating']]['badge']}}">{{$data.rating_text}}</span>
|
||||
</dd>
|
||||
|
||||
<dt>是否匿名</dt>
|
||||
<dd>{{$data.is_anonymous_text}}</dd>
|
||||
|
||||
<dt>是否显示</dt>
|
||||
<dd>{{if empty($data['is_show_text'])}}<span class="cr-ddd">未填写</span>{{else /}}{{$data.is_show_text}}{{/if}}</dd>
|
||||
|
||||
<dt>是否回复</dt>
|
||||
<dd>{{$data.is_reply_text}}</dd>
|
||||
|
||||
<dt>回复内容</dt>
|
||||
<dd>
|
||||
{{if $data['is_reply'] eq 1 and !empty($data['reply'])}}
|
||||
<div class="am-scrollable-vertical am-nowrap-initial">{{$data.reply|raw}}</div>
|
||||
{{else /}}
|
||||
<span class="cr-ddd">未回复</span>
|
||||
{{/if}}
|
||||
</dd>
|
||||
|
||||
<dt>回复时间</dt>
|
||||
<dd>{{$data.reply_time_time}}</dd>
|
||||
|
||||
<dt>更新时间</dt>
|
||||
<dd>{{$data.upd_time_time}}</dd>
|
||||
|
||||
<dt>创建时间</dt>
|
||||
<dd>{{$data.add_time_time}}</dd>
|
||||
</dl>
|
||||
{{/block}}
|
||||
{{/if}}
|
||||
|
|
@ -1,439 +1,54 @@
|
|||
{{include file="public/header" /}}
|
||||
<!-- 继承公共的 form -->
|
||||
{{extend name="public/module/form" /}}
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation form-search" method="post" action="{{:MyUrl('admin/goodscomments/index')}}" request-type="form">
|
||||
<div class="thin">
|
||||
<div class="am-input-group am-input-group-sm am-fl so">
|
||||
<input type="text" autocomplete="off" name="keywords" class="am-radius" placeholder="用户名/昵称/手机/邮箱/商品标题" value="{{if !empty($params.keywords)}}{{$params.keywords}}{{/if}}" />
|
||||
<span class="am-input-group-btn">
|
||||
<button class="am-btn am-btn-default am-radius" type="submit" data-am-loading="{spinner:'circle-o-notch', loadingText:'搜索中...'}">搜索</button>
|
||||
</span>
|
||||
</div>
|
||||
<label class="am-fl thin_sub more-submit">
|
||||
更多筛选条件
|
||||
{{if isset($params['is_more']) and $params['is_more'] eq 1}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" checked />
|
||||
<i class="am-icon-angle-up"></i>
|
||||
{{else /}}
|
||||
<input type="checkbox" name="is_more" value="1" id="is_more" />
|
||||
<i class="am-icon-angle-down"></i>
|
||||
{{/if}}
|
||||
</label>
|
||||
<!-- 扩展 -->
|
||||
{{block name="form_extend"}}
|
||||
<!-- 处理窗口 -->
|
||||
<div class="am-popup am-radius" id="my-popup-reply">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title">回复</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<table class="so-list more-where {{if !isset($params['is_more'])}}none{{/if}}">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span>显隐:</span>
|
||||
<select name="is_show" class="chosen-select" data-placeholder="是否显示...">
|
||||
<option value="-1">是否显示...</option>
|
||||
{{foreach $common_is_show_list as $v}}
|
||||
<option value="{{$v.id}}" {{if isset($params['is_show']) and $params['is_show'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
|
||||
{{/foreach}}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<span>回复:</span>
|
||||
<select name="is_reply" class="chosen-select" data-placeholder="是否回复...">
|
||||
<option value="-1">是否回复...</option>
|
||||
{{if !empty($common_is_text_list)}}
|
||||
{{foreach $common_is_text_list as $v}}
|
||||
<option value="{{$v.id}}" {{if isset($params['is_reply']) and $params['is_reply'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>匿名:</span>
|
||||
<select name="is_anonymous" class="chosen-select" data-placeholder="是否匿名...">
|
||||
<option value="-1">是否匿名...</option>
|
||||
{{foreach $common_is_text_list as $v}}
|
||||
<option value="{{$v.id}}" {{if isset($params['is_anonymous']) and $params['is_anonymous'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
|
||||
{{/foreach}}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<span>类型:</span>
|
||||
<select name="business_type" class="chosen-select" data-placeholder="业务类型...">
|
||||
<option value="">业务类型...</option>
|
||||
{{if !empty($common_goods_rating_business_type_list)}}
|
||||
{{foreach $common_goods_rating_business_type_list as $k=>$v}}
|
||||
<option value="{{$k}}" {{if isset($params['business_type']) and $params['business_type'] eq $k}}selected{{/if}}>{{$v}}</option>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="time">
|
||||
<span>时间:</span>
|
||||
<span>
|
||||
<input type="text" autocomplete="off" name="time_start" class="am-form-field am-input-sm am-radius Wdate" placeholder="起始时间" value="{{if !empty($params.time_start)}}{{$params.time_start}}{{/if}}" data-validation-message="日期格式有误" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})" autocomplete="off" /><i class="am-icon-calendar"></i>
|
||||
</span>
|
||||
<em class="text-grey">~</em>
|
||||
<span>
|
||||
<input type="text" autocomplete="off" name="time_end" class="am-form-field am-input-sm am-radius Wdate" placeholder="结束时间" value="{{if !empty($params.time_end)}}{{$params.time_end}}{{/if}}" pattern="^[0-9]{4}-[0-9]{2}-[0-9]{2}$" data-validation-message="日期格式有误" onclick="WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})" autocomplete="off" /><i class="am-icon-calendar"></i>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example" data-am-loading="{spinner:'circle-o-notch', loadingText:'搜索中...'}">搜索</button>
|
||||
<a href="{{:MyUrl('admin/goodscomments/index')}}" class="am-btn am-btn-warning am-radius am-btn-sm reset-submit">清除条件</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
|
||||
<!-- top operation start -->
|
||||
<div class="am-g am-margin-top-sm">
|
||||
<!-- 顶部操作钩子 -->
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
|
||||
<div class="plugins-tag">
|
||||
<span>plugins_view_admin_goods_comments_top_operate</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_admin_goods_comments_top_operate';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>true]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
</div>
|
||||
<!-- top operation end -->
|
||||
|
||||
<!-- list start -->
|
||||
<div class="am-scrollable-horizontal am-table-scrollable-horizontal am-margin-top-sm">
|
||||
<table class="am-table am-table-striped am-table-hover am-table-bordered am-text-nowrap am-table-td-fixed-last">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="am-grid-lg">商品信息</th>
|
||||
<th class="am-grid-sm">用户信息</th>
|
||||
<th>业务类型</th>
|
||||
<th class="am-grid-lg">评论内容</th>
|
||||
<th class="am-grid-sm">评论图片</th>
|
||||
<th>评分</th>
|
||||
<th class="am-grid-lg">回复内容</th>
|
||||
<th class="am-text-center">是否回复</th>
|
||||
<th class="am-text-center">是否匿名</th>
|
||||
<th class="am-text-center">是否显示</th>
|
||||
<th class="am-text-center">更多</th>
|
||||
<th class="am-text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{if !empty($data_list)}}
|
||||
{{foreach $data_list as $v}}
|
||||
<tr id="data-list-{{$v.id}}" {{if $v['is_show'] eq 0}}class="am-active"{{/if}}>
|
||||
<td class="am-text-middle goods-info">
|
||||
{{if !empty($v['goods'])}}
|
||||
<div class="base">
|
||||
<a href="{{$v.goods.goods_url}}" target="_blank">
|
||||
<img src="{{$v.goods.images}}" alt="{{$v.goods.title}}" class="am-img-thumbnail am-radius am-align-left" />
|
||||
</a>
|
||||
<a class="am-text-top am-nowrap-initial" href="{{$v.goods.goods_url}}" target="_blank" ckas>{{$v.goods.title}}</a>
|
||||
</div>
|
||||
<p class="am-margin-top-xs">{{$price_symbol}}{{$v.goods.price}}</p>
|
||||
{{else /}}
|
||||
商品信息异常
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="am-text-middle user-info">
|
||||
{{if !empty($v['user'])}}
|
||||
<img src="{{$v.user.avatar}}" alt="{{$v.user.user_name_view}}" class="am-img-thumbnail am-radius am-align-left am-margin-bottom-0" />
|
||||
<ul class="user-base">
|
||||
<li>名称:{{if empty($v['user']['username'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.username}}{{/if}}</li>
|
||||
<li>昵称:{{if empty($v['user']['nickname'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.nickname}}{{/if}}</li>
|
||||
<li>手机:{{if empty($v['user']['mobile'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.mobile}}{{/if}}</li>
|
||||
<li>邮箱:{{if empty($v['user']['email'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.email}}{{/if}}</li>
|
||||
</ul>
|
||||
{{else /}}
|
||||
用户信息异常
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="am-text-middle">{{$v.business_type_text}}</td>
|
||||
<td class="am-text-middle">
|
||||
<div class="am-scrollable-vertical am-nowrap-initial reply-content">
|
||||
{{$v.content}}
|
||||
</div>
|
||||
</td>
|
||||
<td class="am-text-middle">
|
||||
{{if !empty($v['images'])}}
|
||||
<div data-am-widget="slider" class="am-slider am-slider-a1" data-am-slider='{"directionNav":false, slideshow:false}' >
|
||||
<ul class="am-slides">
|
||||
{{foreach $v.images as $img}}
|
||||
<li>
|
||||
<a href="{{$img}}" target="_blank">
|
||||
<img src="{{$img}}" />
|
||||
</a>
|
||||
</li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
</div>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="am-text-middle">
|
||||
<span class="am-badge am-radius {{$common_goods_comments_rating_list[$v['rating']]['badge']}}">{{$v.rating_text}}</span>
|
||||
</td>
|
||||
<td class="am-text-middle">
|
||||
{{if $v['is_reply'] eq 1 and !empty($v['reply'])}}
|
||||
<div class="am-scrollable-vertical am-nowrap-initial reply-content">{{$v.reply|raw}}</div>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="am-text-middle am-text-center">
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state {{if $v['is_reply'] eq 1}}am-success{{else /}}am-default{{/if}}" data-url="{{:MyUrl('admin/goodscomments/statusupdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_reply']}}" data-field="is_reply"></a>
|
||||
</td>
|
||||
<td class="am-text-middle am-text-center">
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state {{if $v['is_anonymous'] eq 1}}am-success{{else /}}am-default{{/if}}" data-url="{{:MyUrl('admin/goodscomments/statusupdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_anonymous']}}" data-field="is_anonymous"></a>
|
||||
</td>
|
||||
<td class="am-text-middle am-text-center">
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state {{if $v['is_show'] eq 1}}am-success{{else /}}am-default{{/if}}" data-url="{{:MyUrl('admin/goodscomments/statusupdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_show']}}" data-field="is_show" data-is-update-status="1"></a>
|
||||
</td>
|
||||
<td class="am-text-middle">
|
||||
<p class="am-text-center xo-cursor-pr">
|
||||
<i class="am-icon-caret-down"></i>
|
||||
<span data-am-modal="{target: '#my-popup{{$v.id}}'}"> 查看更多</span>
|
||||
</p>
|
||||
<div class="am-popup am-radius" id="my-popup{{$v.id}}">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title">详情内容</h4>
|
||||
<span data-am-modal-close
|
||||
class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<dl class="dl-content">
|
||||
<dt>商品信息</dt>
|
||||
<dd class="goods-info">
|
||||
{{if !empty($v['goods'])}}
|
||||
<div class="base">
|
||||
<a href="{{$v.goods.goods_url}}" target="_blank">
|
||||
<img src="{{$v.goods.images}}" alt="{{$v.goods.title}}" class="am-img-thumbnail am-radius am-align-left" />
|
||||
</a>
|
||||
<a class="am-text-top am-nowrap-initial" href="{{$v.goods.goods_url}}" target="_blank">{{$v.goods.title}}</a>
|
||||
</div>
|
||||
<p class="am-margin-top-xs">{{$price_symbol}}{{$v.goods.price}}</p>
|
||||
{{else /}}
|
||||
商品信息异常
|
||||
{{/if}}
|
||||
</dd>
|
||||
|
||||
<dt>用户信息</dt>
|
||||
<dd class="user-info">
|
||||
{{if !empty($v['user'])}}
|
||||
<img src="{{$v.user.avatar}}" alt="{{$v.user.user_name_view}}" class="am-img-thumbnail am-radius am-align-left am-margin-bottom-0" />
|
||||
<ul class="user-base">
|
||||
<li>名称:{{if empty($v['user']['username'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.username}}{{/if}}</li>
|
||||
<li>昵称:{{if empty($v['user']['nickname'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.nickname}}{{/if}}</li>
|
||||
<li>手机:{{if empty($v['user']['mobile'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.mobile}}{{/if}}</li>
|
||||
<li>邮箱:{{if empty($v['user']['email'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$v.user.email}}{{/if}}</li>
|
||||
</ul>
|
||||
{{else /}}
|
||||
用户信息异常
|
||||
{{/if}}
|
||||
</dd>
|
||||
|
||||
<dt>业务类型</dt>
|
||||
<dd>{{$v.business_type_text}}</dd>
|
||||
|
||||
<dt>评论内容</dt>
|
||||
<dd>
|
||||
<div class="am-scrollable-vertical am-nowrap-initial">{{$v.content|raw}}</div>
|
||||
</dd>
|
||||
|
||||
<dt>评论图片</dt>
|
||||
<dd>
|
||||
{{if !empty($v['images'])}}
|
||||
{{foreach $v.images as $img}}
|
||||
<a href="{{$img}}" target="_blank">
|
||||
<img src="{{$img}}" class="am-img-thumbnail" width="80" height="80" />
|
||||
</a>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</dd>
|
||||
|
||||
<dt>评分</dt>
|
||||
<dd>
|
||||
<span class="am-badge am-radius {{$common_goods_comments_rating_list[$v['rating']]['badge']}}">{{$v.rating_text}}</span>
|
||||
</dd>
|
||||
|
||||
<dt>是否匿名</dt>
|
||||
<dd>{{$v.is_anonymous_text}}</dd>
|
||||
|
||||
<dt>是否显示</dt>
|
||||
<dd>{{if empty($v['is_show_text'])}}<span class="cr-ddd">未填写</span>{{else /}}{{$v.is_show_text}}{{/if}}</dd>
|
||||
|
||||
<dt>是否回复</dt>
|
||||
<dd>{{$v.is_reply_text}}</dd>
|
||||
|
||||
<dt>回复内容</dt>
|
||||
<dd>
|
||||
{{if $v['is_reply'] eq 1 and !empty($v['reply'])}}
|
||||
<div class="am-scrollable-vertical am-nowrap-initial">{{$v.reply|raw}}</div>
|
||||
{{else /}}
|
||||
<span class="cr-ddd">未回复</span>
|
||||
{{/if}}
|
||||
</dd>
|
||||
|
||||
<dt>回复时间</dt>
|
||||
<dd>{{$v.reply_time_time}}</dd>
|
||||
|
||||
<dt>更新时间</dt>
|
||||
<dd>{{$v.upd_time_time}}</dd>
|
||||
|
||||
<dt>创建时间</dt>
|
||||
<dd>{{$v.add_time_time}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="am-operate-grid">
|
||||
<div class="am-scrollable-vertical">
|
||||
<a class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block" href="{{:MyUrl('admin/goodscomments/saveinfo', array_merge($params, ['id'=>$v['id']]))}}">
|
||||
<i class="am-icon-edit"></i>
|
||||
<span>编辑</span>
|
||||
</a>
|
||||
{{if $v['is_reply'] eq 0}}
|
||||
<button class="am-btn am-btn-success am-btn-xs am-radius am-btn-block submit-reply" data-am-modal="{target: '#my-popup-reply'}" data-json='{{:json_encode($v)}}'>
|
||||
<i class="am-icon-gavel"></i>
|
||||
<span>回复</span>
|
||||
</button>
|
||||
{{/if}}
|
||||
<button class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:MyUrl('admin/goodscomments/delete')}}" data-id="{{$v.id}}">
|
||||
<i class="am-icon-trash-o"></i>
|
||||
<span>删除</span>
|
||||
</button>
|
||||
|
||||
<!-- 商品评论列表操作钩子 -->
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
|
||||
<div class="plugins-tag">
|
||||
<span>plugins_view_admin_goods_comments_list_operate</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_admin_goods_comments_list_operate';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>true, 'id'=>$v['id'], 'data'=>$v]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{if empty($data_list)}}
|
||||
<div class="table-no"><i class="am-icon-warning"></i> 没有相关数据</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<!-- list end -->
|
||||
|
||||
<!-- bottom operation start -->
|
||||
<div class="am-g am-margin-top-sm">
|
||||
<!-- 底部操作钩子 -->
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
|
||||
<div class="plugins-tag">
|
||||
<span>plugins_view_admin_goods_comments_bottom_operate</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{php}}
|
||||
$hook_name = 'plugins_view_admin_goods_comments_bottom_operate';
|
||||
$hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>true]);
|
||||
if(!empty($hook_data) && is_array($hook_data))
|
||||
{
|
||||
foreach($hook_data as $hook)
|
||||
{
|
||||
if(is_string($hook) || is_int($hook))
|
||||
{
|
||||
echo htmlspecialchars_decode($hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/php}}
|
||||
</div>
|
||||
<!-- bottom operation end -->
|
||||
|
||||
<!-- 处理窗口 -->
|
||||
<div class="am-popup am-radius" id="my-popup-reply">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title">回复</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<dl class="dl-content">
|
||||
<dt>商品信息</dt>
|
||||
<dd class="goods-info">
|
||||
<div class="base">
|
||||
<a href="javascript:;" target="_blank">
|
||||
<img src="{{$attachment_host}}/static/common/images/user-img-sm.gif" class="am-img-thumbnail am-radius am-align-left" />
|
||||
</a>
|
||||
<a class="am-text-top title" href="javascript:;" target="_blank">...</a>
|
||||
</div>
|
||||
<p class="price">...</p>
|
||||
</dd>
|
||||
|
||||
<dt>用户信息</dt>
|
||||
<dd class="user-info">
|
||||
<img src="{{$attachment_host}}/static/common/images/user-img-sm.gif" class="am-img-thumbnail am-radius am-align-left" />
|
||||
<ul class="user-base">
|
||||
<li class="username">名称:<span>...</span></li>
|
||||
<li class="nickname">昵称:<span>...</span></li>
|
||||
<li class="mobile">手机:<span>...</span></li>
|
||||
<li class="email">邮箱:<span>...</span></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>评论内容</dt>
|
||||
<dd class="content">...</dd>
|
||||
</dl>
|
||||
|
||||
<form class="am-form form-validation-reply" action="{{:MyUrl('admin/goodscomments/reply')}}" method="POST" request-type="ajax-reload">
|
||||
<div class="am-form-group">
|
||||
<label>回复内容</label>
|
||||
<textarea name="reply" rows="5" class="am-radius" placeholder="回复内容格式 1~230 个字符" data-validation-message="回复内容格式 1~230 个字符" minlength="1" maxlength="230" required></textarea>
|
||||
<div class="am-popup-bd">
|
||||
<dl class="dl-content">
|
||||
<dt>商品信息</dt>
|
||||
<dd class="goods-info">
|
||||
<div class="base am-nbfc">
|
||||
<a href="javascript:;" target="_blank">
|
||||
<img src="{{$attachment_host}}/static/common/images/user-img-sm.gif" class="am-img-thumbnail am-radius am-align-left am-margin-right-xs am-fl" width="60" height="60" />
|
||||
</a>
|
||||
<a class="am-text-top am-nowrap-initial title" href="javascript:;" target="_blank">...</a>
|
||||
</div>
|
||||
<p class="price">...</p>
|
||||
</dd>
|
||||
|
||||
<div class="am-form-group reply-submit am-form-group-refreshing t-c">
|
||||
<input type="hidden" name="id" value="" />
|
||||
<button type="submit" class="am-btn am-btn-success am-radius am-btn-sm" data-am-loading="{loadingText:'处理中...'}">回复</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<dt>用户信息</dt>
|
||||
<dd class="user-info">
|
||||
<img src="{{$attachment_host}}/static/common/images/user-img-sm.gif" class="am-img-thumbnail am-radius am-align-left am-margin-right-xs am-margin-bottom-0" width="35" height="35" />
|
||||
<ul class="user-base">
|
||||
<li class="username">名称:<span>...</span></li>
|
||||
<li class="nickname">昵称:<span>...</span></li>
|
||||
<li class="mobile">手机:<span>...</span></li>
|
||||
<li class="email">邮箱:<span>...</span></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>评论内容</dt>
|
||||
<dd class="content">...</dd>
|
||||
</dl>
|
||||
|
||||
<form class="am-form form-validation-reply" action="{{:MyUrl('admin/goodscomments/reply')}}" method="POST" request-type="ajax-reload">
|
||||
<div class="am-form-group">
|
||||
<label>回复内容</label>
|
||||
<textarea name="reply" rows="5" class="am-radius" placeholder="回复内容格式 1~230 个字符" data-validation-message="回复内容格式 1~230 个字符" minlength="1" maxlength="230" required></textarea>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group reply-submit am-form-group-refreshing t-c">
|
||||
<input type="hidden" name="id" value="" />
|
||||
<button type="submit" class="am-btn am-btn-success am-radius am-btn-sm" data-am-loading="{loadingText:'处理中...'}">回复</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- page start -->
|
||||
{{if !empty($data_list)}}
|
||||
{{$page_html|raw}}
|
||||
{{/if}}
|
||||
<!-- page end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
{{include file="public/footer" /}}
|
||||
<!-- footer end -->
|
||||
{{/block}}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<!-- 评论内容 -->
|
||||
{{if !empty($module_data) and !empty($module_data['content'])}}
|
||||
<div class="am-scrollable-vertical am-nowrap-initial reply-content">{{$module_data.content|raw}}</div>
|
||||
{{/if}}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<!-- 评论图片 -->
|
||||
{{if !empty($module_data) and !empty($module_data['images'])}}
|
||||
<div data-am-widget="slider" class="am-slider am-slider-a1" data-am-slider='{"directionNav":false, slideshow:false}' >
|
||||
<ul class="am-slides">
|
||||
{{foreach $module_data.images as $img}}
|
||||
<li>
|
||||
<a href="{{$img}}" target="_blank">
|
||||
<img src="{{$img}}" />
|
||||
</a>
|
||||
</li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<!-- 商品基础信息 -->
|
||||
{{if !empty($module_data)}}
|
||||
{{if !empty($module_data['goods'])}}
|
||||
<div class="am-nbfc">
|
||||
<a href="{{$module_data.goods.goods_url}}" target="_blank">
|
||||
<img src="{{$module_data.goods.images}}" alt="{{$module_data.goods.title}}" class="am-img-thumbnail am-radius am-align-left am-margin-right-xs am-fl" width="60" height="60" />
|
||||
</a>
|
||||
<a class="am-text-top am-nowrap-initial" href="{{$module_data.goods.goods_url}}" target="_blank">{{$module_data.goods.title}}</a>
|
||||
</div>
|
||||
<p>{{$price_symbol}}{{$module_data.goods.price}}</p>
|
||||
{{else /}}
|
||||
商品信息异常
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<!-- 操作栏 -->
|
||||
<button type="button" class="am-btn am-btn-default am-btn-xs am-radius am-btn-block submit-popup" data-url="{{:MyUrl('admin/goodscomments/detail', ['id'=>$module_data['id']])}}">
|
||||
<i class="am-icon-eye"></i>
|
||||
<span>详情</span>
|
||||
</button>
|
||||
<a class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block" href="{{:MyUrl('admin/goodscomments/saveinfo', array_merge($params, ['id'=>$module_data['id']]))}}">
|
||||
<i class="am-icon-edit"></i>
|
||||
<span>编辑</span>
|
||||
</a>
|
||||
{{if $module_data['is_reply'] eq 0}}
|
||||
<button type="button" class="am-btn am-btn-success am-btn-xs am-radius am-btn-block submit-reply" data-am-modal="{target: '#my-popup-reply'}" data-json='{{:json_encode($module_data)}}'>
|
||||
<i class="am-icon-gavel"></i>
|
||||
<span>回复</span>
|
||||
</button>
|
||||
{{/if}}
|
||||
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-delete" data-url="{{:MyUrl('admin/goodscomments/delete')}}" data-id="{{$module_data.id}}" data-key="ids">
|
||||
<i class="am-icon-trash-o"></i>
|
||||
<span>删除</span>
|
||||
</button>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<!-- 评分 -->
|
||||
{{if !empty($module_data) and isset($module_data['rating'])}}
|
||||
<span class="am-badge am-radius {{if !empty($module_data['rating_badge'])}}am-badge-{{$module_data.rating_badge}}{{/if}}">{{$module_data.rating_text}}</span>
|
||||
{{/if}}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<!-- 回复内容 -->
|
||||
{{if !empty($module_data)}}
|
||||
{{if isset($module_data['is_reply']) and $module_data['is_reply'] eq 1 and !empty($module_data['reply'])}}
|
||||
<div class="am-scrollable-vertical am-nowrap-initial reply-content">{{$module_data.reply|raw}}</div>
|
||||
{{else /}}
|
||||
<span class="cr-ddd">未回复</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<!-- 用户信息 -->
|
||||
{{if !empty($module_data)}}
|
||||
{{if !empty($module_data['user'])}}
|
||||
<img src="{{$module_data.user.avatar}}" alt="{{$module_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" />
|
||||
<ul class="user-base">
|
||||
<li>名称:{{if empty($module_data['user']['username'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$module_data.user.username}}{{/if}}</li>
|
||||
<li>昵称:{{if empty($module_data['user']['nickname'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$module_data.user.nickname}}{{/if}}</li>
|
||||
<li>手机:{{if empty($module_data['user']['mobile'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$module_data.user.mobile}}{{/if}}</li>
|
||||
<li>邮箱:{{if empty($module_data['user']['email'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$module_data.user.email}}{{/if}}</li>
|
||||
</ul>
|
||||
{{else /}}
|
||||
用户信息异常
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
@ -12,9 +12,9 @@
|
|||
<div class="am-alert am-alert-secondary goods-info" data-am-alert>
|
||||
<p class="title">商品信息</p>
|
||||
{{if !empty($data['goods'])}}
|
||||
<div class="base">
|
||||
<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" />
|
||||
<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" />
|
||||
</a>
|
||||
<a class="am-text-top" href="{{$data.goods.goods_url}}" target="_blank">{{$data.goods.title}}</a>
|
||||
</div>
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
<div class="am-alert am-alert-secondary user-info" data-am-alert>
|
||||
<p class="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" />
|
||||
<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" />
|
||||
<ul class="user-base">
|
||||
<li>名称:{{if empty($data['user']['username'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$data.user.username}}{{/if}}</li>
|
||||
<li>昵称:{{if empty($data['user']['nickname'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$data.user.nickname}}{{/if}}</li>
|
||||
|
|
@ -42,9 +42,9 @@
|
|||
<div class="am-form-group">
|
||||
<label>业务类型<span class="am-form-group-label-tips-must">必选</span></label>
|
||||
<select name="business_type" class="chosen-select" data-placeholder="业务类型..." data-validation-message="请选择业务类型" required>
|
||||
{{if !empty($common_goods_rating_business_type_list)}}
|
||||
{{foreach $common_goods_rating_business_type_list as $k=>$v}}
|
||||
<option value="{{$k}}" {{if isset($data['business_type']) and $data['business_type'] eq $k}}selected{{/if}}>{{$v}}</option>
|
||||
{{if !empty($common_goods_comments_business_type_list)}}
|
||||
{{foreach $common_goods_comments_business_type_list as $v}}
|
||||
<option value="{{$v.value}}" {{if isset($data['business_type']) and $data['business_type'] eq $v.value}}selected{{/if}}>{{$v.name}}</option>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@
|
|||
<dt>用户信息</dt>
|
||||
<dd class="user-info">
|
||||
{{if !empty($data['user'])}}
|
||||
<img src="{{$data.user.avatar}}" alt="{{$data.user.user_name_view}}" class="am-img-thumbnail am-radius am-align-left" />
|
||||
<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" />
|
||||
<ul class="user-base">
|
||||
<li>名称:{{if empty($data['user']['username'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$data.user.username}}{{/if}}</li>
|
||||
<li>昵称:{{if empty($data['user']['nickname'])}}<span class="cr-ccc">未填写</span>{{else /}}{{$data.user.nickname}}{{/if}}</li>
|
||||
|
|
|
|||
|
|
@ -283,6 +283,7 @@
|
|||
data-url="{{$t.post_url}}"
|
||||
data-id="{{if isset($data_list[$i][$t['key_field']])}}{{$data_list[$i][$t['key_field']]}}{{/if}}"
|
||||
data-state="{{$data_list[$i][$t['view_key']]}}"
|
||||
data-field="{{$t.view_key}}"
|
||||
data-is-update-status="{{if isset($t['is_form_su'])}}{{$t.is_form_su}}{{else /}}0{{/if}}"
|
||||
></a>
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -328,17 +328,17 @@ return array(
|
|||
|
||||
// 商品评分
|
||||
'common_goods_comments_rating_list' => array(
|
||||
0 => array('name'=>'未评分', 'badge'=>''),
|
||||
1 => array('name'=>'1分', 'badge'=>'am-badge-danger'),
|
||||
2 => array('name'=>'2分', 'badge'=>'am-badge-warning'),
|
||||
3 => array('name'=>'3分', 'badge'=>'am-badge-secondary'),
|
||||
4 => array('name'=>'4分', 'badge'=>'am-badge-primary'),
|
||||
5 => array('name'=>'5分', 'badge'=>'am-badge-success'),
|
||||
0 => array('value'=>0, 'name'=>'未评分', 'badge'=>''),
|
||||
1 => array('value'=>1, 'name'=>'1分', 'badge'=>'danger'),
|
||||
2 => array('value'=>2, 'name'=>'2分', 'badge'=>'warning'),
|
||||
3 => array('value'=>3, 'name'=>'3分', 'badge'=>'secondary'),
|
||||
4 => array('value'=>4, 'name'=>'4分', 'badge'=>'primary'),
|
||||
5 => array('value'=>5, 'name'=>'5分', 'badge'=>'success'),
|
||||
),
|
||||
|
||||
// 商品评分业务类型
|
||||
'common_goods_rating_business_type_list' => array(
|
||||
'order' => '订单',
|
||||
// 商品评论业务类型
|
||||
'common_goods_comments_business_type_list' => array(
|
||||
'order' => array('value' => 'order', 'name' => '订单'),
|
||||
),
|
||||
|
||||
// 站点类型
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ class GoodsCommentsService
|
|||
{
|
||||
$common_is_text_list = lang('common_is_text_list');
|
||||
$common_goods_comments_rating_list = lang('common_goods_comments_rating_list');
|
||||
$common_goods_rating_business_type_list = lang('common_goods_rating_business_type_list');
|
||||
$common_goods_comments_business_type_list = lang('common_goods_comments_business_type_list');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 用户信息
|
||||
|
|
@ -245,7 +245,7 @@ class GoodsCommentsService
|
|||
$v['goods'] = isset($ret['data'][0]) ? $ret['data'][0] : [];
|
||||
|
||||
// 业务类型
|
||||
$v['business_type_text'] = array_key_exists($v['business_type'], $common_goods_rating_business_type_list) ? $common_goods_rating_business_type_list[$v['business_type']] : null;
|
||||
$v['business_type_text'] = array_key_exists($v['business_type'], $common_goods_comments_business_type_list) ? $common_goods_comments_business_type_list[$v['business_type']]['name'] : null;
|
||||
$msg = null;
|
||||
switch($v['business_type'])
|
||||
{
|
||||
|
|
@ -257,6 +257,7 @@ class GoodsCommentsService
|
|||
|
||||
// 评分
|
||||
$v['rating_text'] = $common_goods_comments_rating_list[$v['rating']]['name'];
|
||||
$v['rating_badge'] = $common_goods_comments_rating_list[$v['rating']]['badge'];
|
||||
|
||||
// 是否
|
||||
$v['is_reply_text'] = isset($common_is_text_list[$v['is_reply']]) ? $common_is_text_list[$v['is_reply']]['name'] : '';
|
||||
|
|
@ -484,26 +485,23 @@ class GoodsCommentsService
|
|||
*/
|
||||
public static function GoodsCommentsDelete($params = [])
|
||||
{
|
||||
// 请求参数
|
||||
$p = [
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'id',
|
||||
'error_msg' => '操作id有误',
|
||||
],
|
||||
];
|
||||
$ret = ParamsChecked($params, $p);
|
||||
if($ret !== true)
|
||||
// 参数是否有误
|
||||
if(empty($params['ids']))
|
||||
{
|
||||
return DataReturn($ret, -1);
|
||||
return DataReturn('操作id有误', -1);
|
||||
}
|
||||
// 是否数组
|
||||
if(!is_array($params['ids']))
|
||||
{
|
||||
$params['ids'] = explode(',', $params['ids']);
|
||||
}
|
||||
|
||||
// 开始删除
|
||||
if(Db::name('GoodsComments')->where(['id'=>intval($params['id'])])->delete())
|
||||
if(Db::name('GoodsComments')->where(['id'=>$params['ids']])->delete())
|
||||
{
|
||||
return DataReturn('删除成功', 0);
|
||||
}
|
||||
return DataReturn('删除失败或数据不存在', -100);
|
||||
return DataReturn('删除失败', -100);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,32 +1,7 @@
|
|||
/**
|
||||
* 用户信息
|
||||
*/
|
||||
.content-right .user-info img {
|
||||
max-width: 35px;
|
||||
max-height: 35px;
|
||||
}
|
||||
.content-right .user-info p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品信息
|
||||
*/
|
||||
.content-right .goods-info .base {
|
||||
min-height: 57px;
|
||||
}
|
||||
.content-right .goods-info img {
|
||||
width: 55px;
|
||||
height: 55px;
|
||||
margin: 2px 5px 0px 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
.content-right table.am-table .am-slider {
|
||||
width: 100px;
|
||||
max-height: 108px;
|
||||
overflow: hidden;
|
||||
box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ ul { list-style: none; }
|
|||
.block { display:block !important; }
|
||||
|
||||
/* 没数据 */
|
||||
.table-no {text-align:center;padding:30px 0;background:#FFF !important; color: #888; }
|
||||
.table-no {text-align:center;padding:115px 0;background:#FFF !important; color: #888; }
|
||||
|
||||
/* 公共dl样式 */
|
||||
.dl-content dt { float: left; padding-left: 5px; overflow: hidden; clear: left;
|
||||
|
|
|
|||
Loading…
Reference in New Issue