{{$v.title}}
diff --git a/application/lang/zh-cn.php b/application/lang/zh-cn.php
index 0741587ec..ac13a29be 100755
--- a/application/lang/zh-cn.php
+++ b/application/lang/zh-cn.php
@@ -317,6 +317,21 @@ return array(
2 => array('value' => 2, 'name' => '手动处理'),
),
+ // 商品评分
+ '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'),
+ ),
+
+ // 商品评分业务类型
+ 'common_goods_rating_business_type_list' => array(
+ 'order' => '订单',
+ ),
+
// 色彩值
'common_color_list' => array(
diff --git a/application/service/GoodsCommentsService.php b/application/service/GoodsCommentsService.php
index 87e20f715..bfd800351 100644
--- a/application/service/GoodsCommentsService.php
+++ b/application/service/GoodsCommentsService.php
@@ -23,21 +23,6 @@ use app\service\GoodsService;
*/
class GoodsCommentsService
{
- // 业务类型
- public static $business_type_list = [
- 'order' => '订单',
- ];
-
- // 评分
- public static $rating_list = [
- 0 => ['name'=>'未评分', 'badge'=>''],
- 1 => ['name'=>'1分', 'badge'=>'am-badge-danger'],
- 2 => ['name'=>'2分', 'badge'=>'am-badge-warning'],
- 3 => ['name'=>'3分', 'badge'=>'am-badge-secondary'],
- 4 => ['name'=>'4分', 'badge'=>'am-badge-primary'],
- 5 => ['name'=>'5分', 'badge'=>'am-badge-success'],
- ];
-
/**
* 订单评论
* @author Devil
@@ -175,6 +160,8 @@ class GoodsCommentsService
if(!empty($data))
{
$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');
foreach($data as &$v)
{
// 用户信息
@@ -201,7 +188,7 @@ class GoodsCommentsService
$v['goods'] = isset($ret['data'][0]) ? $ret['data'][0] : [];
// 业务类型
- $v['business_type_text'] = array_key_exists($v['business_type'], self::$business_type_list) ? self::$business_type_list[$v['business_type']] : null;
+ $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;
$msg = null;
switch($v['business_type'])
{
@@ -212,7 +199,7 @@ class GoodsCommentsService
$v['msg'] = empty($msg) ? null : $msg;
// 评分
- $v['rating_text'] = self::$rating_list[$v['rating']]['name'];
+ $v['rating_text'] = $common_goods_comments_rating_list[$v['rating']]['name'];
// 是否
$v['is_reply_text'] = isset($common_is_text_list[$v['is_reply']]) ? $common_is_text_list[$v['is_reply']]['name'] : '';
@@ -381,7 +368,7 @@ class GoodsCommentsService
[
'checked_type' => 'in',
'key_name' => 'business_type',
- 'checked_data' => array_keys(self::$business_type_list),
+ 'checked_data' => array_keys(lang('common_order_aftersale_refundment_list')),
'error_msg' => '请选择业务类型',
],
[
@@ -399,7 +386,7 @@ class GoodsCommentsService
[
'checked_type' => 'in',
'key_name' => 'rating',
- 'checked_data' => array_keys(self::$rating_list),
+ 'checked_data' => array_keys(lang('common_goods_comments_rating_list')),
'error_msg' => '请选择评分',
],
];
diff --git a/public/static/admin/default/css/orderaftersale.css b/public/static/admin/default/css/orderaftersale.css
index b3169802b..751b701f1 100644
--- a/public/static/admin/default/css/orderaftersale.css
+++ b/public/static/admin/default/css/orderaftersale.css
@@ -1,7 +1,7 @@
/**
* 商品列表
*/
-.content-right .goods-detail img { width: 80px; height: 80px; position: absolute; border: 1px solid #eee; }
+.content-right .goods-detail img { width: 80px; height: 80px; position: absolute; }
.content-right .goods-detail { position: relative; min-height: 80px; }
.content-right .goods-title { display: block; max-height: 36px; overflow: hidden; text-overflow: ellipsis; }
.content-right .goods-title:hover { text-decoration: underline; }
diff --git a/public/static/admin/default/js/orderaftersale.js b/public/static/admin/default/js/orderaftersale.js
index 5a8b2882a..e710afda4 100644
--- a/public/static/admin/default/js/orderaftersale.js
+++ b/public/static/admin/default/js/orderaftersale.js
@@ -4,39 +4,35 @@ FromInit('form.form-validation-refuse');
$(function()
{
+ // 弹窗数据初始化
+ function PopupInit($popup, data)
+ {
+ // 用户信息
+ $popup.find('input[name="id"]').val(data.id);
+ $popup.find('.user-info img').attr('src', data.user.avatar || $popup.find('.user-info img').attr('src'));
+ $popup.find('.user-info .user-base .username span').html(data.user.username || '
未填写');
+ $popup.find('.user-info .user-base .nickname span').html(data.user.nickname || '
未填写');
+ $popup.find('.user-info .user-base .mobile span').html(data.user.mobile || '
未填写');
+ $popup.find('.user-info .user-base .email span').html(data.user.email || '
未填写');
+
+ // 申请信息
+ $popup.find('.apply-info .type span').html(data.type_text || '
未填写');
+ $popup.find('.apply-info .reason span').html(data.reason || '
未填写');
+ $popup.find('.apply-info .number span').html(data.number || '
未填写');
+ $popup.find('.apply-info .price span').html('¥'+data.price || '
未填写');
+ $popup.find('.apply-info .msg span').html(data.price || '
未填写');
+
+ $popup.modal();
+ }
// 审核
$('table.am-table .submit-audit').on('click', function()
{
- var $audit_popup = $('#order-audit-popup');
- var json = $(this).data('json');
- console.log(json);
-
- // 用户信息
- $audit_popup.find('input[name="id"]').val(json.id);
- $audit_popup.find('.user-info img').attr('src', json.user.avatar || $audit_popup.find('.user-info img').attr('src'));
- $audit_popup.find('.user-info .user-base .username span').html(json.user.username || '
未填写');
- $audit_popup.find('.user-info .user-base .nickname span').html(json.user.nickname || '
未填写');
- $audit_popup.find('.user-info .user-base .mobile span').html(json.user.mobile || '
未填写');
- $audit_popup.find('.user-info .user-base .email span').html(json.user.email || '
未填写');
-
- $audit_popup.modal();
+ PopupInit($('#order-audit-popup'), $(this).data('json'));
});
// 拒绝
$('table.am-table .submit-refuse').on('click', function()
{
- var $refuse_popup = $('#order-refuse-popup');
- var json = $(this).data('json');
- console.log(json);
-
- // 用户信息
- $refuse_popup.find('input[name="id"]').val(json.id);
- $refuse_popup.find('.user-info img').attr('src', json.user.avatar || $refuse_popup.find('.user-info img').attr('src'));
- $refuse_popup.find('.user-info .user-base .username span').html(json.user.username || '
未填写');
- $refuse_popup.find('.user-info .user-base .nickname span').html(json.user.nickname || '
未填写');
- $refuse_popup.find('.user-info .user-base .mobile span').html(json.user.mobile || '
未填写');
- $refuse_popup.find('.user-info .user-base .email span').html(json.user.email || '
未填写');
-
- $refuse_popup.modal();
+ PopupInit($('#order-refuse-popup'), $(this).data('json'));
});
});
\ No newline at end of file
diff --git a/public/static/index/default/css/order.css b/public/static/index/default/css/order.css
index 6955948d0..81dab9660 100755
--- a/public/static/index/default/css/order.css
+++ b/public/static/index/default/css/order.css
@@ -59,7 +59,7 @@ table.data-ongoing .base-operate { border-top: 1px dashed #fff1f5; }
* 商品列表
*/
.goods-detail { position: relative; min-height: 80px; }
-.goods-detail img { width: 80px; height: 80px; position: absolute; left: 0; border: 1px solid #eee; }
+.goods-detail img { width: 80px; height: 80px; position: absolute; left: 0; }
.goods-title { display: -webkit-box; max-height: 36px; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.goods-title:hover { text-decoration: underline; }
.goods-base { float: left; top: 0; margin-left: 85px; }
diff --git a/public/static/index/default/css/orderaftersale.index.css b/public/static/index/default/css/orderaftersale.index.css
index 2fd6e824d..4e576a24c 100644
--- a/public/static/index/default/css/orderaftersale.index.css
+++ b/public/static/index/default/css/orderaftersale.index.css
@@ -1,7 +1,7 @@
/**
* 商品列表
*/
-.user-content-body .goods-detail img { width: 80px; height: 80px; position: absolute; border: 1px solid #eee; }
+.user-content-body .goods-detail img { width: 80px; height: 80px; position: absolute; }
.user-content-body .goods-detail { position: relative; min-height: 80px; }
.user-content-body .goods-title { display: block; max-height: 36px; overflow: hidden; text-overflow: ellipsis; }
.user-content-body .goods-title:hover { text-decoration: underline; }
diff --git a/route/route.config b/route/route.config
index 3d0af72cc..5d390c8da 100755
--- a/route/route.config
+++ b/route/route.config
@@ -24,7 +24,7 @@ Route::get('goods'.$ds.':id', 'index/goods/index');
// 搜索
Route::get('search'.$ds.'c'.$ds.':category_id', 'index/search/index');
-Route::get('search'.$ds.'k'.$ds.':keywords', 'index/search/index');
+Route::get('search'.$ds.'k'.$ds.':wd', 'index/search/index');
Route::rule('search', 'index/search/index', 'GET|POST');
// 分类